@memberjunction/server 2.77.0 → 2.79.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 +259 -176
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1590 -1123
- package/dist/generated/generated.js.map +1 -1
- package/dist/resolvers/CreateQueryResolver.d.ts.map +1 -1
- package/dist/resolvers/CreateQueryResolver.js +19 -11
- package/dist/resolvers/CreateQueryResolver.js.map +1 -1
- package/package.json +34 -34
- package/src/generated/generated.ts +1143 -857
- package/src/resolvers/CreateQueryResolver.ts +24 -16
|
@@ -1332,6 +1332,24 @@ export class AIAgentRun_ {
|
|
|
1332
1332
|
each time the agent processes a prompt step.`})
|
|
1333
1333
|
TotalPromptIterations: number;
|
|
1334
1334
|
|
|
1335
|
+
@Field({nullable: true, description: `The AI Configuration used for this agent execution. When set, this configuration was used for all prompts executed by this agent and its sub-agents.`})
|
|
1336
|
+
@MaxLength(16)
|
|
1337
|
+
ConfigurationID?: string;
|
|
1338
|
+
|
|
1339
|
+
@Field({nullable: true, description: `Runtime model override that was used for this execution. When set, this model took precedence over all other model selection methods.`})
|
|
1340
|
+
@MaxLength(16)
|
|
1341
|
+
OverrideModelID?: string;
|
|
1342
|
+
|
|
1343
|
+
@Field({nullable: true, description: `Runtime vendor override that was used for this execution. When set along with OverrideModelID, this vendor was used to provide the model.`})
|
|
1344
|
+
@MaxLength(16)
|
|
1345
|
+
OverrideVendorID?: string;
|
|
1346
|
+
|
|
1347
|
+
@Field({nullable: true, description: `JSON serialized data that was passed for template rendering and prompt execution. This data was passed to the agent's prompt as well as all sub-agents.`})
|
|
1348
|
+
Data?: string;
|
|
1349
|
+
|
|
1350
|
+
@Field(() => Boolean, {nullable: true, description: `Indicates whether verbose logging was enabled during this agent execution. When true, detailed decision-making and execution flow was logged.`})
|
|
1351
|
+
Verbose?: boolean;
|
|
1352
|
+
|
|
1335
1353
|
@Field({nullable: true})
|
|
1336
1354
|
@MaxLength(510)
|
|
1337
1355
|
Agent?: string;
|
|
@@ -1344,6 +1362,18 @@ each time the agent processes a prompt step.`})
|
|
|
1344
1362
|
@MaxLength(200)
|
|
1345
1363
|
User?: string;
|
|
1346
1364
|
|
|
1365
|
+
@Field({nullable: true})
|
|
1366
|
+
@MaxLength(200)
|
|
1367
|
+
Configuration?: string;
|
|
1368
|
+
|
|
1369
|
+
@Field({nullable: true})
|
|
1370
|
+
@MaxLength(100)
|
|
1371
|
+
OverrideModel?: string;
|
|
1372
|
+
|
|
1373
|
+
@Field({nullable: true})
|
|
1374
|
+
@MaxLength(100)
|
|
1375
|
+
OverrideVendor?: string;
|
|
1376
|
+
|
|
1347
1377
|
@Field(() => [AIAgentRunStep_])
|
|
1348
1378
|
MJ_AIAgentRunSteps_AgentRunIDArray: AIAgentRunStep_[]; // Link to MJ_AIAgentRunSteps
|
|
1349
1379
|
|
|
@@ -1446,6 +1476,21 @@ export class CreateAIAgentRunInput {
|
|
|
1446
1476
|
|
|
1447
1477
|
@Field(() => Int, { nullable: true })
|
|
1448
1478
|
TotalPromptIterations?: number;
|
|
1479
|
+
|
|
1480
|
+
@Field({ nullable: true })
|
|
1481
|
+
ConfigurationID: string | null;
|
|
1482
|
+
|
|
1483
|
+
@Field({ nullable: true })
|
|
1484
|
+
OverrideModelID: string | null;
|
|
1485
|
+
|
|
1486
|
+
@Field({ nullable: true })
|
|
1487
|
+
OverrideVendorID: string | null;
|
|
1488
|
+
|
|
1489
|
+
@Field({ nullable: true })
|
|
1490
|
+
Data: string | null;
|
|
1491
|
+
|
|
1492
|
+
@Field(() => Boolean, { nullable: true })
|
|
1493
|
+
Verbose?: boolean | null;
|
|
1449
1494
|
}
|
|
1450
1495
|
|
|
1451
1496
|
|
|
@@ -1541,6 +1586,21 @@ export class UpdateAIAgentRunInput {
|
|
|
1541
1586
|
@Field(() => Int, { nullable: true })
|
|
1542
1587
|
TotalPromptIterations?: number;
|
|
1543
1588
|
|
|
1589
|
+
@Field({ nullable: true })
|
|
1590
|
+
ConfigurationID?: string | null;
|
|
1591
|
+
|
|
1592
|
+
@Field({ nullable: true })
|
|
1593
|
+
OverrideModelID?: string | null;
|
|
1594
|
+
|
|
1595
|
+
@Field({ nullable: true })
|
|
1596
|
+
OverrideVendorID?: string | null;
|
|
1597
|
+
|
|
1598
|
+
@Field({ nullable: true })
|
|
1599
|
+
Data?: string | null;
|
|
1600
|
+
|
|
1601
|
+
@Field(() => Boolean, { nullable: true })
|
|
1602
|
+
Verbose?: boolean | null;
|
|
1603
|
+
|
|
1544
1604
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
1545
1605
|
OldValues___?: KeyValuePairInput[];
|
|
1546
1606
|
}
|
|
@@ -1695,9 +1755,6 @@ export class AIVendor_ {
|
|
|
1695
1755
|
@Field(() => [AIResultCache_])
|
|
1696
1756
|
AIResultCache_VendorIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
1697
1757
|
|
|
1698
|
-
@Field(() => [AIModelCost_])
|
|
1699
|
-
MJ_AIModelCosts_VendorIDArray: AIModelCost_[]; // Link to MJ_AIModelCosts
|
|
1700
|
-
|
|
1701
1758
|
@Field(() => [AIModelVendor_])
|
|
1702
1759
|
MJ_AIModelVendors_VendorIDArray: AIModelVendor_[]; // Link to MJ_AIModelVendors
|
|
1703
1760
|
|
|
@@ -1707,6 +1764,12 @@ export class AIVendor_ {
|
|
|
1707
1764
|
@Field(() => [AIVendorType_])
|
|
1708
1765
|
MJ_AIVendorTypes_VendorIDArray: AIVendorType_[]; // Link to MJ_AIVendorTypes
|
|
1709
1766
|
|
|
1767
|
+
@Field(() => [AIModelCost_])
|
|
1768
|
+
MJ_AIModelCosts_VendorIDArray: AIModelCost_[]; // Link to MJ_AIModelCosts
|
|
1769
|
+
|
|
1770
|
+
@Field(() => [AIAgentRun_])
|
|
1771
|
+
MJ_AIAgentRuns_OverrideVendorIDArray: AIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
1772
|
+
|
|
1710
1773
|
}
|
|
1711
1774
|
|
|
1712
1775
|
//****************************************************************************
|
|
@@ -1823,17 +1886,6 @@ export class AIVendorResolver extends ResolverBase {
|
|
|
1823
1886
|
return result;
|
|
1824
1887
|
}
|
|
1825
1888
|
|
|
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
1889
|
@FieldResolver(() => [AIModelVendor_])
|
|
1838
1890
|
async MJ_AIModelVendors_VendorIDArray(@Root() aivendor_: AIVendor_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1839
1891
|
this.CheckUserReadPermissions('MJ: AI Model Vendors', userPayload);
|
|
@@ -1867,6 +1919,28 @@ export class AIVendorResolver extends ResolverBase {
|
|
|
1867
1919
|
return result;
|
|
1868
1920
|
}
|
|
1869
1921
|
|
|
1922
|
+
@FieldResolver(() => [AIModelCost_])
|
|
1923
|
+
async MJ_AIModelCosts_VendorIDArray(@Root() aivendor_: AIVendor_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1924
|
+
this.CheckUserReadPermissions('MJ: AI Model Costs', userPayload);
|
|
1925
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1926
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1927
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelCosts] WHERE [VendorID]='${aivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Costs', userPayload, EntityPermissionType.Read, 'AND');
|
|
1928
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
1929
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Costs', rows);
|
|
1930
|
+
return result;
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
@FieldResolver(() => [AIAgentRun_])
|
|
1934
|
+
async MJ_AIAgentRuns_OverrideVendorIDArray(@Root() aivendor_: AIVendor_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1935
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
1936
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1937
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1938
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [OverrideVendorID]='${aivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
1939
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
1940
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows);
|
|
1941
|
+
return result;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1870
1944
|
@Mutation(() => AIVendor_)
|
|
1871
1945
|
async CreateAIVendor(
|
|
1872
1946
|
@Arg('input', () => CreateAIVendorInput) input: CreateAIVendorInput,
|
|
@@ -1958,6 +2032,9 @@ export class AIConfiguration_ {
|
|
|
1958
2032
|
@Field(() => [AIPromptRun_])
|
|
1959
2033
|
MJ_AIPromptRuns_ConfigurationIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
1960
2034
|
|
|
2035
|
+
@Field(() => [AIAgentRun_])
|
|
2036
|
+
MJ_AIAgentRuns_ConfigurationIDArray: AIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
2037
|
+
|
|
1961
2038
|
}
|
|
1962
2039
|
|
|
1963
2040
|
//****************************************************************************
|
|
@@ -2131,6 +2208,17 @@ export class AIConfigurationResolver extends ResolverBase {
|
|
|
2131
2208
|
return result;
|
|
2132
2209
|
}
|
|
2133
2210
|
|
|
2211
|
+
@FieldResolver(() => [AIAgentRun_])
|
|
2212
|
+
async MJ_AIAgentRuns_ConfigurationIDArray(@Root() aiconfiguration_: AIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2213
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
2214
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2215
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2216
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [ConfigurationID]='${aiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2217
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2218
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows);
|
|
2219
|
+
return result;
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2134
2222
|
@Mutation(() => AIConfiguration_)
|
|
2135
2223
|
async CreateAIConfiguration(
|
|
2136
2224
|
@Arg('input', () => CreateAIConfigurationInput) input: CreateAIConfigurationInput,
|
|
@@ -2304,23 +2392,23 @@ if this limit is exceeded.`})
|
|
|
2304
2392
|
@MaxLength(200)
|
|
2305
2393
|
Type?: string;
|
|
2306
2394
|
|
|
2307
|
-
@Field(() => [AIAgentRequest_])
|
|
2308
|
-
AIAgentRequests_AgentIDArray: AIAgentRequest_[]; // Link to AIAgentRequests
|
|
2309
|
-
|
|
2310
|
-
@Field(() => [AIAgentLearningCycle_])
|
|
2311
|
-
AIAgentLearningCycles_AgentIDArray: AIAgentLearningCycle_[]; // Link to AIAgentLearningCycles
|
|
2312
|
-
|
|
2313
2395
|
@Field(() => [AIAgentModel_])
|
|
2314
2396
|
AIAgentModels_AgentIDArray: AIAgentModel_[]; // Link to AIAgentModels
|
|
2315
2397
|
|
|
2316
2398
|
@Field(() => [AIAgentAction_])
|
|
2317
2399
|
AIAgentActions_AgentIDArray: AIAgentAction_[]; // Link to AIAgentActions
|
|
2318
2400
|
|
|
2401
|
+
@Field(() => [AIAgentLearningCycle_])
|
|
2402
|
+
AIAgentLearningCycles_AgentIDArray: AIAgentLearningCycle_[]; // Link to AIAgentLearningCycles
|
|
2403
|
+
|
|
2404
|
+
@Field(() => [AIAgentRequest_])
|
|
2405
|
+
AIAgentRequests_AgentIDArray: AIAgentRequest_[]; // Link to AIAgentRequests
|
|
2406
|
+
|
|
2319
2407
|
@Field(() => [AIAgentStep_])
|
|
2320
2408
|
MJ_AIAgentSteps_AgentIDArray: AIAgentStep_[]; // Link to MJ_AIAgentSteps
|
|
2321
2409
|
|
|
2322
|
-
@Field(() => [
|
|
2323
|
-
|
|
2410
|
+
@Field(() => [AIAgentNote_])
|
|
2411
|
+
AIAgentNotes_AgentIDArray: AIAgentNote_[]; // Link to AIAgentNotes
|
|
2324
2412
|
|
|
2325
2413
|
@Field(() => [AIAgentPrompt_])
|
|
2326
2414
|
MJ_AIAgentPrompts_AgentIDArray: AIAgentPrompt_[]; // Link to MJ_AIAgentPrompts
|
|
@@ -2328,8 +2416,8 @@ if this limit is exceeded.`})
|
|
|
2328
2416
|
@Field(() => [AIAgentRun_])
|
|
2329
2417
|
MJ_AIAgentRuns_AgentIDArray: AIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
2330
2418
|
|
|
2331
|
-
@Field(() => [
|
|
2332
|
-
|
|
2419
|
+
@Field(() => [AIAgentStep_])
|
|
2420
|
+
MJ_AIAgentSteps_SubAgentIDArray: AIAgentStep_[]; // Link to MJ_AIAgentSteps
|
|
2333
2421
|
|
|
2334
2422
|
@Field(() => [AIResultCache_])
|
|
2335
2423
|
AIResultCache_AgentIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
@@ -2614,47 +2702,47 @@ export class AIAgentResolver extends ResolverBase {
|
|
|
2614
2702
|
return result;
|
|
2615
2703
|
}
|
|
2616
2704
|
|
|
2617
|
-
@FieldResolver(() => [
|
|
2618
|
-
async
|
|
2619
|
-
this.CheckUserReadPermissions('AI Agent
|
|
2705
|
+
@FieldResolver(() => [AIAgentModel_])
|
|
2706
|
+
async AIAgentModels_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2707
|
+
this.CheckUserReadPermissions('AI Agent Models', userPayload);
|
|
2620
2708
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2621
2709
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2622
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2710
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
2623
2711
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2624
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
2712
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Models', rows);
|
|
2625
2713
|
return result;
|
|
2626
2714
|
}
|
|
2627
2715
|
|
|
2628
|
-
@FieldResolver(() => [
|
|
2629
|
-
async
|
|
2630
|
-
this.CheckUserReadPermissions('AI Agent
|
|
2716
|
+
@FieldResolver(() => [AIAgentAction_])
|
|
2717
|
+
async AIAgentActions_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2718
|
+
this.CheckUserReadPermissions('AI Agent Actions', userPayload);
|
|
2631
2719
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2632
2720
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2633
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2721
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
2634
2722
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2635
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
2723
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Actions', rows);
|
|
2636
2724
|
return result;
|
|
2637
2725
|
}
|
|
2638
2726
|
|
|
2639
|
-
@FieldResolver(() => [
|
|
2640
|
-
async
|
|
2641
|
-
this.CheckUserReadPermissions('AI Agent
|
|
2727
|
+
@FieldResolver(() => [AIAgentLearningCycle_])
|
|
2728
|
+
async AIAgentLearningCycles_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2729
|
+
this.CheckUserReadPermissions('AI Agent Learning Cycles', userPayload);
|
|
2642
2730
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2643
2731
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2644
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2732
|
+
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
2733
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2646
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
2734
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Learning Cycles', rows);
|
|
2647
2735
|
return result;
|
|
2648
2736
|
}
|
|
2649
2737
|
|
|
2650
|
-
@FieldResolver(() => [
|
|
2651
|
-
async
|
|
2652
|
-
this.CheckUserReadPermissions('AI Agent
|
|
2738
|
+
@FieldResolver(() => [AIAgentRequest_])
|
|
2739
|
+
async AIAgentRequests_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2740
|
+
this.CheckUserReadPermissions('AI Agent Requests', userPayload);
|
|
2653
2741
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2654
2742
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2655
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2743
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRequests] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Requests', userPayload, EntityPermissionType.Read, 'AND');
|
|
2656
2744
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2657
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
2745
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Requests', rows);
|
|
2658
2746
|
return result;
|
|
2659
2747
|
}
|
|
2660
2748
|
|
|
@@ -2669,14 +2757,14 @@ export class AIAgentResolver extends ResolverBase {
|
|
|
2669
2757
|
return result;
|
|
2670
2758
|
}
|
|
2671
2759
|
|
|
2672
|
-
@FieldResolver(() => [
|
|
2673
|
-
async
|
|
2674
|
-
this.CheckUserReadPermissions('
|
|
2760
|
+
@FieldResolver(() => [AIAgentNote_])
|
|
2761
|
+
async AIAgentNotes_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2762
|
+
this.CheckUserReadPermissions('AI Agent Notes', userPayload);
|
|
2675
2763
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2676
2764
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2677
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2765
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
|
|
2678
2766
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2679
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
2767
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', rows);
|
|
2680
2768
|
return result;
|
|
2681
2769
|
}
|
|
2682
2770
|
|
|
@@ -2702,14 +2790,14 @@ export class AIAgentResolver extends ResolverBase {
|
|
|
2702
2790
|
return result;
|
|
2703
2791
|
}
|
|
2704
2792
|
|
|
2705
|
-
@FieldResolver(() => [
|
|
2706
|
-
async
|
|
2707
|
-
this.CheckUserReadPermissions('AI Agent
|
|
2793
|
+
@FieldResolver(() => [AIAgentStep_])
|
|
2794
|
+
async MJ_AIAgentSteps_SubAgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2795
|
+
this.CheckUserReadPermissions('MJ: AI Agent Steps', userPayload);
|
|
2708
2796
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2709
2797
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2710
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2798
|
+
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
2799
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2712
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
2800
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Steps', rows);
|
|
2713
2801
|
return result;
|
|
2714
2802
|
}
|
|
2715
2803
|
|
|
@@ -4598,12 +4686,12 @@ export class AIPrompt_ {
|
|
|
4598
4686
|
@Field(() => [AIResultCache_])
|
|
4599
4687
|
AIResultCache_AIPromptIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
4600
4688
|
|
|
4601
|
-
@Field(() => [AIAgentType_])
|
|
4602
|
-
MJ_AIAgentTypes_SystemPromptIDArray: AIAgentType_[]; // Link to MJ_AIAgentTypes
|
|
4603
|
-
|
|
4604
4689
|
@Field(() => [AIConfiguration_])
|
|
4605
4690
|
MJ_AIConfigurations_DefaultPromptForContextCompressionIDArray: AIConfiguration_[]; // Link to MJ_AIConfigurations
|
|
4606
4691
|
|
|
4692
|
+
@Field(() => [AIAgentType_])
|
|
4693
|
+
MJ_AIAgentTypes_SystemPromptIDArray: AIAgentType_[]; // Link to MJ_AIAgentTypes
|
|
4694
|
+
|
|
4607
4695
|
@Field(() => [AIConfiguration_])
|
|
4608
4696
|
MJ_AIConfigurations_DefaultPromptForContextSummarizationIDArray: AIConfiguration_[]; // Link to MJ_AIConfigurations
|
|
4609
4697
|
|
|
@@ -4613,12 +4701,12 @@ export class AIPrompt_ {
|
|
|
4613
4701
|
@Field(() => [AIPromptModel_])
|
|
4614
4702
|
MJ_AIPromptModels_PromptIDArray: AIPromptModel_[]; // Link to MJ_AIPromptModels
|
|
4615
4703
|
|
|
4616
|
-
@Field(() => [AIAgentStep_])
|
|
4617
|
-
MJ_AIAgentSteps_PromptIDArray: AIAgentStep_[]; // Link to MJ_AIAgentSteps
|
|
4618
|
-
|
|
4619
4704
|
@Field(() => [AIAgentPrompt_])
|
|
4620
4705
|
MJ_AIAgentPrompts_PromptIDArray: AIAgentPrompt_[]; // Link to MJ_AIAgentPrompts
|
|
4621
4706
|
|
|
4707
|
+
@Field(() => [AIAgentStep_])
|
|
4708
|
+
MJ_AIAgentSteps_PromptIDArray: AIAgentStep_[]; // Link to MJ_AIAgentSteps
|
|
4709
|
+
|
|
4622
4710
|
@Field(() => [AIPromptRun_])
|
|
4623
4711
|
MJ_AIPromptRuns_PromptIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
4624
4712
|
|
|
@@ -5000,25 +5088,25 @@ export class AIPromptResolver extends ResolverBase {
|
|
|
5000
5088
|
return result;
|
|
5001
5089
|
}
|
|
5002
5090
|
|
|
5003
|
-
@FieldResolver(() => [
|
|
5004
|
-
async
|
|
5005
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
5091
|
+
@FieldResolver(() => [AIConfiguration_])
|
|
5092
|
+
async MJ_AIConfigurations_DefaultPromptForContextCompressionIDArray(@Root() aiprompt_: AIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5093
|
+
this.CheckUserReadPermissions('MJ: AI Configurations', userPayload);
|
|
5006
5094
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5007
5095
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5008
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
5096
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIConfigurations] WHERE [DefaultPromptForContextCompressionID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
5009
5097
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5010
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
5098
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Configurations', rows);
|
|
5011
5099
|
return result;
|
|
5012
5100
|
}
|
|
5013
5101
|
|
|
5014
|
-
@FieldResolver(() => [
|
|
5015
|
-
async
|
|
5016
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
5102
|
+
@FieldResolver(() => [AIAgentType_])
|
|
5103
|
+
async MJ_AIAgentTypes_SystemPromptIDArray(@Root() aiprompt_: AIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5104
|
+
this.CheckUserReadPermissions('MJ: AI Agent Types', userPayload);
|
|
5017
5105
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5018
5106
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5019
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
5107
|
+
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
5108
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5021
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
5109
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Types', rows);
|
|
5022
5110
|
return result;
|
|
5023
5111
|
}
|
|
5024
5112
|
|
|
@@ -5055,25 +5143,25 @@ export class AIPromptResolver extends ResolverBase {
|
|
|
5055
5143
|
return result;
|
|
5056
5144
|
}
|
|
5057
5145
|
|
|
5058
|
-
@FieldResolver(() => [
|
|
5059
|
-
async
|
|
5060
|
-
this.CheckUserReadPermissions('MJ: AI Agent
|
|
5146
|
+
@FieldResolver(() => [AIAgentPrompt_])
|
|
5147
|
+
async MJ_AIAgentPrompts_PromptIDArray(@Root() aiprompt_: AIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5148
|
+
this.CheckUserReadPermissions('MJ: AI Agent Prompts', userPayload);
|
|
5061
5149
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5062
5150
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5063
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
5151
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentPrompts] WHERE [PromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Prompts', userPayload, EntityPermissionType.Read, 'AND');
|
|
5064
5152
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5065
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent
|
|
5153
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', rows);
|
|
5066
5154
|
return result;
|
|
5067
5155
|
}
|
|
5068
5156
|
|
|
5069
|
-
@FieldResolver(() => [
|
|
5070
|
-
async
|
|
5071
|
-
this.CheckUserReadPermissions('MJ: AI Agent
|
|
5157
|
+
@FieldResolver(() => [AIAgentStep_])
|
|
5158
|
+
async MJ_AIAgentSteps_PromptIDArray(@Root() aiprompt_: AIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5159
|
+
this.CheckUserReadPermissions('MJ: AI Agent Steps', userPayload);
|
|
5072
5160
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5073
5161
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5074
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
5162
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentSteps] WHERE [PromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Steps', userPayload, EntityPermissionType.Read, 'AND');
|
|
5075
5163
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5076
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent
|
|
5164
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Steps', rows);
|
|
5077
5165
|
return result;
|
|
5078
5166
|
}
|
|
5079
5167
|
|
|
@@ -5780,14 +5868,14 @@ export class Company_ {
|
|
|
5780
5868
|
@MaxLength(10)
|
|
5781
5869
|
_mj__UpdatedAt: Date;
|
|
5782
5870
|
|
|
5783
|
-
@Field(() => [
|
|
5784
|
-
|
|
5871
|
+
@Field(() => [Employee_])
|
|
5872
|
+
Employees_CompanyIDArray: Employee_[]; // Link to Employees
|
|
5785
5873
|
|
|
5786
5874
|
@Field(() => [CompanyIntegration_])
|
|
5787
5875
|
CompanyIntegrations_CompanyNameArray: CompanyIntegration_[]; // Link to CompanyIntegrations
|
|
5788
5876
|
|
|
5789
|
-
@Field(() => [
|
|
5790
|
-
|
|
5877
|
+
@Field(() => [Workflow_])
|
|
5878
|
+
Workflows_CompanyNameArray: Workflow_[]; // Link to Workflows
|
|
5791
5879
|
|
|
5792
5880
|
}
|
|
5793
5881
|
|
|
@@ -5912,14 +6000,14 @@ export class CompanyResolver extends ResolverBase {
|
|
|
5912
6000
|
return result;
|
|
5913
6001
|
}
|
|
5914
6002
|
|
|
5915
|
-
@FieldResolver(() => [
|
|
5916
|
-
async
|
|
5917
|
-
this.CheckUserReadPermissions('
|
|
6003
|
+
@FieldResolver(() => [Employee_])
|
|
6004
|
+
async Employees_CompanyIDArray(@Root() company_: Company_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6005
|
+
this.CheckUserReadPermissions('Employees', userPayload);
|
|
5918
6006
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5919
6007
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5920
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6008
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployees] WHERE [CompanyID]='${company_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employees', userPayload, EntityPermissionType.Read, 'AND');
|
|
5921
6009
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5922
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
6010
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employees', rows);
|
|
5923
6011
|
return result;
|
|
5924
6012
|
}
|
|
5925
6013
|
|
|
@@ -5934,14 +6022,14 @@ export class CompanyResolver extends ResolverBase {
|
|
|
5934
6022
|
return result;
|
|
5935
6023
|
}
|
|
5936
6024
|
|
|
5937
|
-
@FieldResolver(() => [
|
|
5938
|
-
async
|
|
5939
|
-
this.CheckUserReadPermissions('
|
|
6025
|
+
@FieldResolver(() => [Workflow_])
|
|
6026
|
+
async Workflows_CompanyNameArray(@Root() company_: Company_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6027
|
+
this.CheckUserReadPermissions('Workflows', userPayload);
|
|
5940
6028
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5941
6029
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5942
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6030
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwWorkflows] WHERE [CompanyName]='${company_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Workflows', userPayload, EntityPermissionType.Read, 'AND');
|
|
5943
6031
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5944
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
6032
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Workflows', rows);
|
|
5945
6033
|
return result;
|
|
5946
6034
|
}
|
|
5947
6035
|
|
|
@@ -6046,21 +6134,21 @@ export class Employee_ {
|
|
|
6046
6134
|
@MaxLength(200)
|
|
6047
6135
|
SupervisorEmail?: string;
|
|
6048
6136
|
|
|
6049
|
-
@Field(() => [
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
@Field(() => [EmployeeSkill_])
|
|
6053
|
-
EmployeeSkills_EmployeeIDArray: EmployeeSkill_[]; // Link to EmployeeSkills
|
|
6137
|
+
@Field(() => [Employee_])
|
|
6138
|
+
Employees_SupervisorIDArray: Employee_[]; // Link to Employees
|
|
6054
6139
|
|
|
6055
6140
|
@Field(() => [EmployeeCompanyIntegration_])
|
|
6056
6141
|
EmployeeCompanyIntegrations_EmployeeIDArray: EmployeeCompanyIntegration_[]; // Link to EmployeeCompanyIntegrations
|
|
6057
6142
|
|
|
6058
|
-
@Field(() => [Employee_])
|
|
6059
|
-
Employees_SupervisorIDArray: Employee_[]; // Link to Employees
|
|
6060
|
-
|
|
6061
6143
|
@Field(() => [EmployeeRole_])
|
|
6062
6144
|
EmployeeRoles_EmployeeIDArray: EmployeeRole_[]; // Link to EmployeeRoles
|
|
6063
6145
|
|
|
6146
|
+
@Field(() => [EmployeeSkill_])
|
|
6147
|
+
EmployeeSkills_EmployeeIDArray: EmployeeSkill_[]; // Link to EmployeeSkills
|
|
6148
|
+
|
|
6149
|
+
@Field(() => [User_])
|
|
6150
|
+
Users_EmployeeIDArray: User_[]; // Link to Users
|
|
6151
|
+
|
|
6064
6152
|
}
|
|
6065
6153
|
|
|
6066
6154
|
//****************************************************************************
|
|
@@ -6202,58 +6290,58 @@ export class EmployeeResolver extends ResolverBase {
|
|
|
6202
6290
|
return result;
|
|
6203
6291
|
}
|
|
6204
6292
|
|
|
6205
|
-
@FieldResolver(() => [
|
|
6206
|
-
async
|
|
6207
|
-
this.CheckUserReadPermissions('
|
|
6293
|
+
@FieldResolver(() => [Employee_])
|
|
6294
|
+
async Employees_SupervisorIDArray(@Root() employee_: Employee_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6295
|
+
this.CheckUserReadPermissions('Employees', userPayload);
|
|
6208
6296
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6209
6297
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6210
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6298
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployees] WHERE [SupervisorID]='${employee_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employees', userPayload, EntityPermissionType.Read, 'AND');
|
|
6211
6299
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6212
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
6300
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employees', rows);
|
|
6213
6301
|
return result;
|
|
6214
6302
|
}
|
|
6215
6303
|
|
|
6216
|
-
@FieldResolver(() => [
|
|
6217
|
-
async
|
|
6218
|
-
this.CheckUserReadPermissions('Employee
|
|
6304
|
+
@FieldResolver(() => [EmployeeCompanyIntegration_])
|
|
6305
|
+
async EmployeeCompanyIntegrations_EmployeeIDArray(@Root() employee_: Employee_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6306
|
+
this.CheckUserReadPermissions('Employee Company Integrations', userPayload);
|
|
6219
6307
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6220
6308
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6221
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6309
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeCompanyIntegrations] WHERE [EmployeeID]='${employee_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employee Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
6222
6310
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6223
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Employee
|
|
6311
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employee Company Integrations', rows);
|
|
6224
6312
|
return result;
|
|
6225
6313
|
}
|
|
6226
6314
|
|
|
6227
|
-
@FieldResolver(() => [
|
|
6228
|
-
async
|
|
6229
|
-
this.CheckUserReadPermissions('Employee
|
|
6315
|
+
@FieldResolver(() => [EmployeeRole_])
|
|
6316
|
+
async EmployeeRoles_EmployeeIDArray(@Root() employee_: Employee_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6317
|
+
this.CheckUserReadPermissions('Employee Roles', userPayload);
|
|
6230
6318
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6231
6319
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6232
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6320
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeRoles] WHERE [EmployeeID]='${employee_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employee Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
6233
6321
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6234
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Employee
|
|
6322
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employee Roles', rows);
|
|
6235
6323
|
return result;
|
|
6236
6324
|
}
|
|
6237
6325
|
|
|
6238
|
-
@FieldResolver(() => [
|
|
6239
|
-
async
|
|
6240
|
-
this.CheckUserReadPermissions('
|
|
6326
|
+
@FieldResolver(() => [EmployeeSkill_])
|
|
6327
|
+
async EmployeeSkills_EmployeeIDArray(@Root() employee_: Employee_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6328
|
+
this.CheckUserReadPermissions('Employee Skills', userPayload);
|
|
6241
6329
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6242
6330
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6243
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6331
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeSkills] WHERE [EmployeeID]='${employee_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employee Skills', userPayload, EntityPermissionType.Read, 'AND');
|
|
6244
6332
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6245
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
6333
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employee Skills', rows);
|
|
6246
6334
|
return result;
|
|
6247
6335
|
}
|
|
6248
6336
|
|
|
6249
|
-
@FieldResolver(() => [
|
|
6250
|
-
async
|
|
6251
|
-
this.CheckUserReadPermissions('
|
|
6337
|
+
@FieldResolver(() => [User_])
|
|
6338
|
+
async Users_EmployeeIDArray(@Root() employee_: Employee_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6339
|
+
this.CheckUserReadPermissions('Users', userPayload);
|
|
6252
6340
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6253
6341
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6254
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6342
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUsers] WHERE [EmployeeID]='${employee_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Users', userPayload, EntityPermissionType.Read, 'AND');
|
|
6255
6343
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6256
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
6344
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Users', rows);
|
|
6257
6345
|
return result;
|
|
6258
6346
|
}
|
|
6259
6347
|
|
|
@@ -6963,21 +7051,21 @@ export class Role_ {
|
|
|
6963
7051
|
@MaxLength(10)
|
|
6964
7052
|
_mj__UpdatedAt: Date;
|
|
6965
7053
|
|
|
7054
|
+
@Field(() => [EmployeeRole_])
|
|
7055
|
+
EmployeeRoles_RoleIDArray: EmployeeRole_[]; // Link to EmployeeRoles
|
|
7056
|
+
|
|
7057
|
+
@Field(() => [EntityPermission_])
|
|
7058
|
+
EntityPermissions_RoleNameArray: EntityPermission_[]; // Link to EntityPermissions
|
|
7059
|
+
|
|
6966
7060
|
@Field(() => [UserRole_])
|
|
6967
7061
|
UserRoles_RoleNameArray: UserRole_[]; // Link to UserRoles
|
|
6968
7062
|
|
|
6969
7063
|
@Field(() => [AuthorizationRole_])
|
|
6970
7064
|
AuthorizationRoles_RoleNameArray: AuthorizationRole_[]; // Link to AuthorizationRoles
|
|
6971
7065
|
|
|
6972
|
-
@Field(() => [EntityPermission_])
|
|
6973
|
-
EntityPermissions_RoleNameArray: EntityPermission_[]; // Link to EntityPermissions
|
|
6974
|
-
|
|
6975
7066
|
@Field(() => [QueryPermission_])
|
|
6976
7067
|
QueryPermissions_RoleNameArray: QueryPermission_[]; // Link to QueryPermissions
|
|
6977
7068
|
|
|
6978
|
-
@Field(() => [EmployeeRole_])
|
|
6979
|
-
EmployeeRoles_RoleIDArray: EmployeeRole_[]; // Link to EmployeeRoles
|
|
6980
|
-
|
|
6981
7069
|
@Field(() => [ResourcePermission_])
|
|
6982
7070
|
ResourcePermissions_RoleIDArray: ResourcePermission_[]; // Link to ResourcePermissions
|
|
6983
7071
|
|
|
@@ -7098,6 +7186,28 @@ export class RoleResolver extends ResolverBase {
|
|
|
7098
7186
|
return result;
|
|
7099
7187
|
}
|
|
7100
7188
|
|
|
7189
|
+
@FieldResolver(() => [EmployeeRole_])
|
|
7190
|
+
async EmployeeRoles_RoleIDArray(@Root() role_: Role_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7191
|
+
this.CheckUserReadPermissions('Employee Roles', userPayload);
|
|
7192
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7193
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
7194
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeRoles] WHERE [RoleID]='${role_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employee Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
7195
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
7196
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employee Roles', rows);
|
|
7197
|
+
return result;
|
|
7198
|
+
}
|
|
7199
|
+
|
|
7200
|
+
@FieldResolver(() => [EntityPermission_])
|
|
7201
|
+
async EntityPermissions_RoleNameArray(@Root() role_: Role_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7202
|
+
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
7203
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7204
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
7205
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityPermissions] WHERE [RoleName]='${role_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
7206
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
7207
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Permissions', rows);
|
|
7208
|
+
return result;
|
|
7209
|
+
}
|
|
7210
|
+
|
|
7101
7211
|
@FieldResolver(() => [UserRole_])
|
|
7102
7212
|
async UserRoles_RoleNameArray(@Root() role_: Role_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7103
7213
|
this.CheckUserReadPermissions('User Roles', userPayload);
|
|
@@ -7120,17 +7230,6 @@ export class RoleResolver extends ResolverBase {
|
|
|
7120
7230
|
return result;
|
|
7121
7231
|
}
|
|
7122
7232
|
|
|
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
7233
|
@FieldResolver(() => [QueryPermission_])
|
|
7135
7234
|
async QueryPermissions_RoleNameArray(@Root() role_: Role_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7136
7235
|
this.CheckUserReadPermissions('Query Permissions', userPayload);
|
|
@@ -7142,17 +7241,6 @@ export class RoleResolver extends ResolverBase {
|
|
|
7142
7241
|
return result;
|
|
7143
7242
|
}
|
|
7144
7243
|
|
|
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
7244
|
@FieldResolver(() => [ResourcePermission_])
|
|
7157
7245
|
async ResourcePermissions_RoleIDArray(@Root() role_: Role_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7158
7246
|
this.CheckUserReadPermissions('Resource Permissions', userPayload);
|
|
@@ -7918,17 +8006,17 @@ export class CompanyIntegration_ {
|
|
|
7918
8006
|
@MaxLength(8)
|
|
7919
8007
|
LastRunEndedAt?: Date;
|
|
7920
8008
|
|
|
7921
|
-
@Field(() => [CompanyIntegrationRecordMap_])
|
|
7922
|
-
CompanyIntegrationRecordMaps_CompanyIntegrationIDArray: CompanyIntegrationRecordMap_[]; // Link to CompanyIntegrationRecordMaps
|
|
7923
|
-
|
|
7924
8009
|
@Field(() => [List_])
|
|
7925
8010
|
Lists_CompanyIntegrationIDArray: List_[]; // Link to Lists
|
|
7926
8011
|
|
|
8012
|
+
@Field(() => [EmployeeCompanyIntegration_])
|
|
8013
|
+
EmployeeCompanyIntegrations_CompanyIntegrationIDArray: EmployeeCompanyIntegration_[]; // Link to EmployeeCompanyIntegrations
|
|
8014
|
+
|
|
7927
8015
|
@Field(() => [CompanyIntegrationRun_])
|
|
7928
8016
|
CompanyIntegrationRuns_CompanyIntegrationIDArray: CompanyIntegrationRun_[]; // Link to CompanyIntegrationRuns
|
|
7929
8017
|
|
|
7930
|
-
@Field(() => [
|
|
7931
|
-
|
|
8018
|
+
@Field(() => [CompanyIntegrationRecordMap_])
|
|
8019
|
+
CompanyIntegrationRecordMaps_CompanyIntegrationIDArray: CompanyIntegrationRecordMap_[]; // Link to CompanyIntegrationRecordMaps
|
|
7932
8020
|
|
|
7933
8021
|
}
|
|
7934
8022
|
|
|
@@ -8090,25 +8178,25 @@ export class CompanyIntegrationResolver extends ResolverBase {
|
|
|
8090
8178
|
return result;
|
|
8091
8179
|
}
|
|
8092
8180
|
|
|
8093
|
-
@FieldResolver(() => [
|
|
8094
|
-
async
|
|
8095
|
-
this.CheckUserReadPermissions('
|
|
8181
|
+
@FieldResolver(() => [List_])
|
|
8182
|
+
async Lists_CompanyIntegrationIDArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8183
|
+
this.CheckUserReadPermissions('Lists', userPayload);
|
|
8096
8184
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8097
8185
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
8098
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
8186
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwLists] WHERE [CompanyIntegrationID]='${companyintegration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Lists', userPayload, EntityPermissionType.Read, 'AND');
|
|
8099
8187
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
8100
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
8188
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Lists', rows);
|
|
8101
8189
|
return result;
|
|
8102
8190
|
}
|
|
8103
8191
|
|
|
8104
|
-
@FieldResolver(() => [
|
|
8105
|
-
async
|
|
8106
|
-
this.CheckUserReadPermissions('
|
|
8192
|
+
@FieldResolver(() => [EmployeeCompanyIntegration_])
|
|
8193
|
+
async EmployeeCompanyIntegrations_CompanyIntegrationIDArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8194
|
+
this.CheckUserReadPermissions('Employee Company Integrations', userPayload);
|
|
8107
8195
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8108
8196
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
8109
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
8197
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeCompanyIntegrations] WHERE [CompanyIntegrationID]='${companyintegration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employee Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
8110
8198
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
8111
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
8199
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employee Company Integrations', rows);
|
|
8112
8200
|
return result;
|
|
8113
8201
|
}
|
|
8114
8202
|
|
|
@@ -8123,14 +8211,14 @@ export class CompanyIntegrationResolver extends ResolverBase {
|
|
|
8123
8211
|
return result;
|
|
8124
8212
|
}
|
|
8125
8213
|
|
|
8126
|
-
@FieldResolver(() => [
|
|
8127
|
-
async
|
|
8128
|
-
this.CheckUserReadPermissions('
|
|
8214
|
+
@FieldResolver(() => [CompanyIntegrationRecordMap_])
|
|
8215
|
+
async CompanyIntegrationRecordMaps_CompanyIntegrationIDArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8216
|
+
this.CheckUserReadPermissions('Company Integration Record Maps', userPayload);
|
|
8129
8217
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8130
8218
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
8131
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
8219
|
+
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
8220
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
8133
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
8221
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Record Maps', rows);
|
|
8134
8222
|
return result;
|
|
8135
8223
|
}
|
|
8136
8224
|
|
|
@@ -8906,111 +8994,111 @@ export class Entity_ {
|
|
|
8906
8994
|
@MaxLength(510)
|
|
8907
8995
|
ParentBaseView?: string;
|
|
8908
8996
|
|
|
8909
|
-
@Field(() => [
|
|
8910
|
-
|
|
8997
|
+
@Field(() => [EntityPermission_])
|
|
8998
|
+
EntityPermissions_EntityIDArray: EntityPermission_[]; // Link to EntityPermissions
|
|
8911
8999
|
|
|
8912
|
-
@Field(() => [
|
|
8913
|
-
|
|
9000
|
+
@Field(() => [EntityRelationship_])
|
|
9001
|
+
EntityRelationships_EntityIDArray: EntityRelationship_[]; // Link to EntityRelationships
|
|
8914
9002
|
|
|
8915
|
-
@Field(() => [
|
|
8916
|
-
|
|
9003
|
+
@Field(() => [EntityField_])
|
|
9004
|
+
EntityFields_EntityIDArray: EntityField_[]; // Link to EntityFields
|
|
8917
9005
|
|
|
8918
|
-
@Field(() => [
|
|
8919
|
-
|
|
9006
|
+
@Field(() => [EntityAIAction_])
|
|
9007
|
+
EntityAIActions_EntityIDArray: EntityAIAction_[]; // Link to EntityAIActions
|
|
8920
9008
|
|
|
8921
|
-
@Field(() => [
|
|
8922
|
-
|
|
9009
|
+
@Field(() => [UserRecordLog_])
|
|
9010
|
+
UserRecordLogs_EntityIDArray: UserRecordLog_[]; // Link to UserRecordLogs
|
|
9011
|
+
|
|
9012
|
+
@Field(() => [IntegrationURLFormat_])
|
|
9013
|
+
IntegrationURLFormats_EntityIDArray: IntegrationURLFormat_[]; // Link to IntegrationURLFormats
|
|
8923
9014
|
|
|
8924
9015
|
@Field(() => [Entity_])
|
|
8925
9016
|
Entities_ParentIDArray: Entity_[]; // Link to Entities
|
|
8926
9017
|
|
|
8927
|
-
@Field(() => [
|
|
8928
|
-
|
|
9018
|
+
@Field(() => [UserFavorite_])
|
|
9019
|
+
UserFavorites_EntityIDArray: UserFavorite_[]; // Link to UserFavorites
|
|
8929
9020
|
|
|
8930
|
-
@Field(() => [
|
|
8931
|
-
|
|
9021
|
+
@Field(() => [CompanyIntegrationRunDetail_])
|
|
9022
|
+
CompanyIntegrationRunDetails_EntityIDArray: CompanyIntegrationRunDetail_[]; // Link to CompanyIntegrationRunDetails
|
|
8932
9023
|
|
|
8933
|
-
@Field(() => [
|
|
8934
|
-
|
|
9024
|
+
@Field(() => [ApplicationEntity_])
|
|
9025
|
+
ApplicationEntities_EntityIDArray: ApplicationEntity_[]; // Link to ApplicationEntities
|
|
8935
9026
|
|
|
8936
|
-
@Field(() => [
|
|
8937
|
-
|
|
9027
|
+
@Field(() => [UserApplicationEntity_])
|
|
9028
|
+
UserApplicationEntities_EntityIDArray: UserApplicationEntity_[]; // Link to UserApplicationEntities
|
|
8938
9029
|
|
|
8939
|
-
@Field(() => [
|
|
8940
|
-
|
|
9030
|
+
@Field(() => [List_])
|
|
9031
|
+
Lists_EntityIDArray: List_[]; // Link to Lists
|
|
9032
|
+
|
|
9033
|
+
@Field(() => [UserView_])
|
|
9034
|
+
UserViews_EntityIDArray: UserView_[]; // Link to UserViews
|
|
9035
|
+
|
|
9036
|
+
@Field(() => [RecordChange_])
|
|
9037
|
+
RecordChanges_EntityIDArray: RecordChange_[]; // Link to RecordChanges
|
|
9038
|
+
|
|
9039
|
+
@Field(() => [AuditLog_])
|
|
9040
|
+
AuditLogs_EntityIDArray: AuditLog_[]; // Link to AuditLogs
|
|
9041
|
+
|
|
9042
|
+
@Field(() => [ResourceType_])
|
|
9043
|
+
ResourceTypes_EntityIDArray: ResourceType_[]; // Link to ResourceTypes
|
|
8941
9044
|
|
|
8942
9045
|
@Field(() => [TaggedItem_])
|
|
8943
9046
|
TaggedItems_EntityIDArray: TaggedItem_[]; // Link to TaggedItems
|
|
8944
9047
|
|
|
9048
|
+
@Field(() => [DatasetItem_])
|
|
9049
|
+
DatasetItems_EntityIDArray: DatasetItem_[]; // Link to DatasetItems
|
|
9050
|
+
|
|
9051
|
+
@Field(() => [CompanyIntegrationRecordMap_])
|
|
9052
|
+
CompanyIntegrationRecordMaps_EntityIDArray: CompanyIntegrationRecordMap_[]; // Link to CompanyIntegrationRecordMaps
|
|
9053
|
+
|
|
8945
9054
|
@Field(() => [RecordMergeLog_])
|
|
8946
9055
|
RecordMergeLogs_EntityIDArray: RecordMergeLog_[]; // Link to RecordMergeLogs
|
|
8947
9056
|
|
|
8948
|
-
@Field(() => [UserApplicationEntity_])
|
|
8949
|
-
UserApplicationEntities_EntityIDArray: UserApplicationEntity_[]; // Link to UserApplicationEntities
|
|
8950
|
-
|
|
8951
9057
|
@Field(() => [QueryField_])
|
|
8952
9058
|
QueryFields_SourceEntityIDArray: QueryField_[]; // Link to QueryFields
|
|
8953
9059
|
|
|
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
|
|
9060
|
+
@Field(() => [Conversation_])
|
|
9061
|
+
Conversations_LinkedEntityIDArray: Conversation_[]; // Link to Conversations
|
|
8968
9062
|
|
|
8969
9063
|
@Field(() => [EntityDocument_])
|
|
8970
9064
|
EntityDocuments_EntityIDArray: EntityDocument_[]; // Link to EntityDocuments
|
|
8971
9065
|
|
|
8972
|
-
@Field(() => [
|
|
8973
|
-
|
|
9066
|
+
@Field(() => [DataContextItem_])
|
|
9067
|
+
DataContextItems_EntityIDArray: DataContextItem_[]; // Link to DataContextItems
|
|
9068
|
+
|
|
9069
|
+
@Field(() => [User_])
|
|
9070
|
+
Users_LinkedEntityIDArray: User_[]; // Link to Users
|
|
9071
|
+
|
|
9072
|
+
@Field(() => [EntityRecordDocument_])
|
|
9073
|
+
EntityRecordDocuments_EntityIDArray: EntityRecordDocument_[]; // Link to EntityRecordDocuments
|
|
8974
9074
|
|
|
8975
9075
|
@Field(() => [FileEntityRecordLink_])
|
|
8976
9076
|
FileEntityRecordLinks_EntityIDArray: FileEntityRecordLink_[]; // Link to FileEntityRecordLinks
|
|
8977
9077
|
|
|
9078
|
+
@Field(() => [UserViewCategory_])
|
|
9079
|
+
UserViewCategories_EntityIDArray: UserViewCategory_[]; // Link to UserViewCategories
|
|
9080
|
+
|
|
8978
9081
|
@Field(() => [EntitySetting_])
|
|
8979
9082
|
EntitySettings_EntityIDArray: EntitySetting_[]; // Link to EntitySettings
|
|
8980
9083
|
|
|
8981
|
-
@Field(() => [
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
@Field(() => [CompanyIntegrationRunDetail_])
|
|
8985
|
-
CompanyIntegrationRunDetails_EntityIDArray: CompanyIntegrationRunDetail_[]; // Link to CompanyIntegrationRunDetails
|
|
9084
|
+
@Field(() => [DuplicateRun_])
|
|
9085
|
+
DuplicateRuns_EntityIDArray: DuplicateRun_[]; // Link to DuplicateRuns
|
|
8986
9086
|
|
|
8987
|
-
@Field(() => [
|
|
8988
|
-
|
|
9087
|
+
@Field(() => [EntityAction_])
|
|
9088
|
+
EntityActions_EntityIDArray: EntityAction_[]; // Link to EntityActions
|
|
8989
9089
|
|
|
8990
|
-
@Field(() => [
|
|
8991
|
-
|
|
9090
|
+
@Field(() => [TemplateParam_])
|
|
9091
|
+
TemplateParams_EntityIDArray: TemplateParam_[]; // Link to TemplateParams
|
|
8992
9092
|
|
|
8993
|
-
@Field(() => [
|
|
8994
|
-
|
|
9093
|
+
@Field(() => [Recommendation_])
|
|
9094
|
+
Recommendations_SourceEntityIDArray: Recommendation_[]; // Link to Recommendations
|
|
8995
9095
|
|
|
8996
|
-
@Field(() => [
|
|
8997
|
-
|
|
9096
|
+
@Field(() => [RecommendationItem_])
|
|
9097
|
+
RecommendationItems_DestinationEntityIDArray: RecommendationItem_[]; // Link to RecommendationItems
|
|
8998
9098
|
|
|
8999
9099
|
@Field(() => [EntityCommunicationMessageType_])
|
|
9000
9100
|
EntityCommunicationMessageTypes_EntityIDArray: EntityCommunicationMessageType_[]; // Link to EntityCommunicationMessageTypes
|
|
9001
9101
|
|
|
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
9102
|
@Field(() => [QueryEntity_])
|
|
9015
9103
|
QueryEntities_EntityIDArray: QueryEntity_[]; // Link to QueryEntities
|
|
9016
9104
|
|
|
@@ -9416,388 +9504,388 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
9416
9504
|
return result;
|
|
9417
9505
|
}
|
|
9418
9506
|
|
|
9419
|
-
@FieldResolver(() => [
|
|
9420
|
-
async
|
|
9421
|
-
this.CheckUserReadPermissions('
|
|
9507
|
+
@FieldResolver(() => [EntityPermission_])
|
|
9508
|
+
async EntityPermissions_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9509
|
+
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
9422
9510
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9423
9511
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9424
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9512
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityPermissions] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9425
9513
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9426
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9514
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Permissions', rows);
|
|
9427
9515
|
return result;
|
|
9428
9516
|
}
|
|
9429
9517
|
|
|
9430
|
-
@FieldResolver(() => [
|
|
9431
|
-
async
|
|
9432
|
-
this.CheckUserReadPermissions('
|
|
9518
|
+
@FieldResolver(() => [EntityRelationship_])
|
|
9519
|
+
async EntityRelationships_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9520
|
+
this.CheckUserReadPermissions('Entity Relationships', userPayload);
|
|
9433
9521
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9434
9522
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9435
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9523
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityRelationships] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
9436
9524
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9437
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9525
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Relationships', rows);
|
|
9438
9526
|
return result;
|
|
9439
9527
|
}
|
|
9440
9528
|
|
|
9441
|
-
@FieldResolver(() => [
|
|
9442
|
-
async
|
|
9443
|
-
this.CheckUserReadPermissions('
|
|
9529
|
+
@FieldResolver(() => [EntityField_])
|
|
9530
|
+
async EntityFields_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9531
|
+
this.CheckUserReadPermissions('Entity Fields', userPayload);
|
|
9444
9532
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9445
9533
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9446
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9534
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityFields] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
9447
9535
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9448
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9536
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Fields', rows);
|
|
9449
9537
|
return result;
|
|
9450
9538
|
}
|
|
9451
9539
|
|
|
9452
|
-
@FieldResolver(() => [
|
|
9453
|
-
async
|
|
9454
|
-
this.CheckUserReadPermissions('
|
|
9540
|
+
@FieldResolver(() => [EntityAIAction_])
|
|
9541
|
+
async EntityAIActions_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9542
|
+
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
9455
9543
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9456
9544
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9457
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9545
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityAIActions] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9458
9546
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9459
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9547
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity AI Actions', rows);
|
|
9460
9548
|
return result;
|
|
9461
9549
|
}
|
|
9462
9550
|
|
|
9463
|
-
@FieldResolver(() => [
|
|
9464
|
-
async
|
|
9465
|
-
this.CheckUserReadPermissions('
|
|
9551
|
+
@FieldResolver(() => [UserRecordLog_])
|
|
9552
|
+
async UserRecordLogs_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9553
|
+
this.CheckUserReadPermissions('User Record Logs', userPayload);
|
|
9466
9554
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9467
9555
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9468
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9556
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserRecordLogs] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Record Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
9469
9557
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9470
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9558
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Record Logs', rows);
|
|
9471
9559
|
return result;
|
|
9472
9560
|
}
|
|
9473
9561
|
|
|
9474
|
-
@FieldResolver(() => [
|
|
9475
|
-
async
|
|
9476
|
-
this.CheckUserReadPermissions('
|
|
9562
|
+
@FieldResolver(() => [IntegrationURLFormat_])
|
|
9563
|
+
async IntegrationURLFormats_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9564
|
+
this.CheckUserReadPermissions('Integration URL Formats', userPayload);
|
|
9477
9565
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9478
9566
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9479
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9567
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwIntegrationURLFormats] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Integration URL Formats', userPayload, EntityPermissionType.Read, 'AND');
|
|
9480
9568
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9481
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9569
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Integration URL Formats', rows);
|
|
9482
9570
|
return result;
|
|
9483
9571
|
}
|
|
9484
9572
|
|
|
9485
|
-
@FieldResolver(() => [
|
|
9486
|
-
async
|
|
9487
|
-
this.CheckUserReadPermissions('
|
|
9573
|
+
@FieldResolver(() => [Entity_])
|
|
9574
|
+
async Entities_ParentIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9575
|
+
this.CheckUserReadPermissions('Entities', userPayload);
|
|
9488
9576
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9489
9577
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9490
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9578
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntities] WHERE [ParentID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
9491
9579
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9492
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9580
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entities', rows);
|
|
9493
9581
|
return result;
|
|
9494
9582
|
}
|
|
9495
9583
|
|
|
9496
|
-
@FieldResolver(() => [
|
|
9497
|
-
async
|
|
9498
|
-
this.CheckUserReadPermissions('
|
|
9584
|
+
@FieldResolver(() => [UserFavorite_])
|
|
9585
|
+
async UserFavorites_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9586
|
+
this.CheckUserReadPermissions('User Favorites', userPayload);
|
|
9499
9587
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9500
9588
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9501
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9589
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserFavorites] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Favorites', userPayload, EntityPermissionType.Read, 'AND');
|
|
9502
9590
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9503
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9591
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Favorites', rows);
|
|
9504
9592
|
return result;
|
|
9505
9593
|
}
|
|
9506
9594
|
|
|
9507
|
-
@FieldResolver(() => [
|
|
9508
|
-
async
|
|
9509
|
-
this.CheckUserReadPermissions('
|
|
9595
|
+
@FieldResolver(() => [CompanyIntegrationRunDetail_])
|
|
9596
|
+
async CompanyIntegrationRunDetails_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9597
|
+
this.CheckUserReadPermissions('Company Integration Run Details', userPayload);
|
|
9510
9598
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9511
9599
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9512
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9600
|
+
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
9601
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9514
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9602
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Run Details', rows);
|
|
9515
9603
|
return result;
|
|
9516
9604
|
}
|
|
9517
9605
|
|
|
9518
|
-
@FieldResolver(() => [
|
|
9519
|
-
async
|
|
9520
|
-
this.CheckUserReadPermissions('
|
|
9606
|
+
@FieldResolver(() => [ApplicationEntity_])
|
|
9607
|
+
async ApplicationEntities_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9608
|
+
this.CheckUserReadPermissions('Application Entities', userPayload);
|
|
9521
9609
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9522
9610
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9523
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9611
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwApplicationEntities] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
9524
9612
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9525
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9613
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Application Entities', rows);
|
|
9526
9614
|
return result;
|
|
9527
9615
|
}
|
|
9528
9616
|
|
|
9529
|
-
@FieldResolver(() => [
|
|
9530
|
-
async
|
|
9531
|
-
this.CheckUserReadPermissions('
|
|
9617
|
+
@FieldResolver(() => [UserApplicationEntity_])
|
|
9618
|
+
async UserApplicationEntities_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9619
|
+
this.CheckUserReadPermissions('User Application Entities', userPayload);
|
|
9532
9620
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9533
9621
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9534
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9622
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserApplicationEntities] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
9535
9623
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9536
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9624
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Application Entities', rows);
|
|
9537
9625
|
return result;
|
|
9538
9626
|
}
|
|
9539
9627
|
|
|
9540
|
-
@FieldResolver(() => [
|
|
9541
|
-
async
|
|
9542
|
-
this.CheckUserReadPermissions('
|
|
9628
|
+
@FieldResolver(() => [List_])
|
|
9629
|
+
async Lists_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9630
|
+
this.CheckUserReadPermissions('Lists', userPayload);
|
|
9543
9631
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9544
9632
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9545
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9633
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwLists] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Lists', userPayload, EntityPermissionType.Read, 'AND');
|
|
9546
9634
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9547
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9635
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Lists', rows);
|
|
9548
9636
|
return result;
|
|
9549
9637
|
}
|
|
9550
9638
|
|
|
9551
|
-
@FieldResolver(() => [
|
|
9552
|
-
async
|
|
9553
|
-
this.CheckUserReadPermissions('
|
|
9639
|
+
@FieldResolver(() => [UserView_])
|
|
9640
|
+
async UserViews_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9641
|
+
this.CheckUserReadPermissions('User Views', userPayload);
|
|
9554
9642
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9555
9643
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9556
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9644
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViews] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Views', userPayload, EntityPermissionType.Read, 'AND');
|
|
9557
9645
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9558
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9646
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Views', rows);
|
|
9559
9647
|
return result;
|
|
9560
9648
|
}
|
|
9561
9649
|
|
|
9562
|
-
@FieldResolver(() => [
|
|
9563
|
-
async
|
|
9564
|
-
this.CheckUserReadPermissions('
|
|
9650
|
+
@FieldResolver(() => [RecordChange_])
|
|
9651
|
+
async RecordChanges_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9652
|
+
this.CheckUserReadPermissions('Record Changes', userPayload);
|
|
9565
9653
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9566
9654
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9567
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9655
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordChanges] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Record Changes', userPayload, EntityPermissionType.Read, 'AND');
|
|
9568
9656
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9569
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9657
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Record Changes', rows);
|
|
9570
9658
|
return result;
|
|
9571
9659
|
}
|
|
9572
9660
|
|
|
9573
|
-
@FieldResolver(() => [
|
|
9574
|
-
async
|
|
9575
|
-
this.CheckUserReadPermissions('
|
|
9661
|
+
@FieldResolver(() => [AuditLog_])
|
|
9662
|
+
async AuditLogs_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9663
|
+
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
9576
9664
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9577
9665
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9578
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9666
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogs] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
9579
9667
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9580
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9668
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Audit Logs', rows);
|
|
9581
9669
|
return result;
|
|
9582
9670
|
}
|
|
9583
9671
|
|
|
9584
|
-
@FieldResolver(() => [
|
|
9585
|
-
async
|
|
9586
|
-
this.CheckUserReadPermissions('
|
|
9672
|
+
@FieldResolver(() => [ResourceType_])
|
|
9673
|
+
async ResourceTypes_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9674
|
+
this.CheckUserReadPermissions('Resource Types', userPayload);
|
|
9587
9675
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9588
9676
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9589
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9677
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceTypes] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Resource Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
9590
9678
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9591
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9679
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Resource Types', rows);
|
|
9592
9680
|
return result;
|
|
9593
9681
|
}
|
|
9594
9682
|
|
|
9595
|
-
@FieldResolver(() => [
|
|
9596
|
-
async
|
|
9597
|
-
this.CheckUserReadPermissions('
|
|
9683
|
+
@FieldResolver(() => [TaggedItem_])
|
|
9684
|
+
async TaggedItems_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9685
|
+
this.CheckUserReadPermissions('Tagged Items', userPayload);
|
|
9598
9686
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9599
9687
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9600
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9688
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTaggedItems] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Tagged Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
9601
9689
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9602
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9690
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Tagged Items', rows);
|
|
9603
9691
|
return result;
|
|
9604
9692
|
}
|
|
9605
9693
|
|
|
9606
|
-
@FieldResolver(() => [
|
|
9607
|
-
async
|
|
9608
|
-
this.CheckUserReadPermissions('
|
|
9694
|
+
@FieldResolver(() => [DatasetItem_])
|
|
9695
|
+
async DatasetItems_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9696
|
+
this.CheckUserReadPermissions('Dataset Items', userPayload);
|
|
9609
9697
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9610
9698
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9611
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9699
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDatasetItems] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dataset Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
9612
9700
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9613
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9701
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Dataset Items', rows);
|
|
9614
9702
|
return result;
|
|
9615
9703
|
}
|
|
9616
9704
|
|
|
9617
|
-
@FieldResolver(() => [
|
|
9618
|
-
async
|
|
9619
|
-
this.CheckUserReadPermissions('
|
|
9705
|
+
@FieldResolver(() => [CompanyIntegrationRecordMap_])
|
|
9706
|
+
async CompanyIntegrationRecordMaps_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9707
|
+
this.CheckUserReadPermissions('Company Integration Record Maps', userPayload);
|
|
9620
9708
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9621
9709
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9622
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9710
|
+
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
9711
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9624
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9712
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Record Maps', rows);
|
|
9625
9713
|
return result;
|
|
9626
9714
|
}
|
|
9627
9715
|
|
|
9628
|
-
@FieldResolver(() => [
|
|
9629
|
-
async
|
|
9630
|
-
this.CheckUserReadPermissions('
|
|
9716
|
+
@FieldResolver(() => [RecordMergeLog_])
|
|
9717
|
+
async RecordMergeLogs_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9718
|
+
this.CheckUserReadPermissions('Record Merge Logs', userPayload);
|
|
9631
9719
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9632
9720
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9633
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9721
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordMergeLogs] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Record Merge Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
9634
9722
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9635
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9723
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Record Merge Logs', rows);
|
|
9636
9724
|
return result;
|
|
9637
9725
|
}
|
|
9638
9726
|
|
|
9639
|
-
@FieldResolver(() => [
|
|
9640
|
-
async
|
|
9641
|
-
this.CheckUserReadPermissions('
|
|
9727
|
+
@FieldResolver(() => [QueryField_])
|
|
9728
|
+
async QueryFields_SourceEntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9729
|
+
this.CheckUserReadPermissions('Query Fields', userPayload);
|
|
9642
9730
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9643
9731
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9644
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9732
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryFields] WHERE [SourceEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Query Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
9645
9733
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9646
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9734
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Query Fields', rows);
|
|
9647
9735
|
return result;
|
|
9648
9736
|
}
|
|
9649
9737
|
|
|
9650
|
-
@FieldResolver(() => [
|
|
9651
|
-
async
|
|
9652
|
-
this.CheckUserReadPermissions('
|
|
9738
|
+
@FieldResolver(() => [Conversation_])
|
|
9739
|
+
async Conversations_LinkedEntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9740
|
+
this.CheckUserReadPermissions('Conversations', userPayload);
|
|
9653
9741
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9654
9742
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9655
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9743
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversations] WHERE [LinkedEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
9656
9744
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9657
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9745
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Conversations', rows);
|
|
9658
9746
|
return result;
|
|
9659
9747
|
}
|
|
9660
9748
|
|
|
9661
|
-
@FieldResolver(() => [
|
|
9662
|
-
async
|
|
9663
|
-
this.CheckUserReadPermissions('
|
|
9749
|
+
@FieldResolver(() => [EntityDocument_])
|
|
9750
|
+
async EntityDocuments_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9751
|
+
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
9664
9752
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9665
9753
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9666
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9754
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocuments] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
9667
9755
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9668
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9756
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Documents', rows);
|
|
9669
9757
|
return result;
|
|
9670
9758
|
}
|
|
9671
9759
|
|
|
9672
|
-
@FieldResolver(() => [
|
|
9673
|
-
async
|
|
9674
|
-
this.CheckUserReadPermissions('
|
|
9760
|
+
@FieldResolver(() => [DataContextItem_])
|
|
9761
|
+
async DataContextItems_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9762
|
+
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
9675
9763
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9676
9764
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9677
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9765
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContextItems] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
9678
9766
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9679
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9767
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Data Context Items', rows);
|
|
9680
9768
|
return result;
|
|
9681
9769
|
}
|
|
9682
9770
|
|
|
9683
|
-
@FieldResolver(() => [
|
|
9684
|
-
async
|
|
9685
|
-
this.CheckUserReadPermissions('
|
|
9771
|
+
@FieldResolver(() => [User_])
|
|
9772
|
+
async Users_LinkedEntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9773
|
+
this.CheckUserReadPermissions('Users', userPayload);
|
|
9686
9774
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9687
9775
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9688
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9776
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUsers] WHERE [LinkedEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Users', userPayload, EntityPermissionType.Read, 'AND');
|
|
9689
9777
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9690
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9778
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Users', rows);
|
|
9691
9779
|
return result;
|
|
9692
9780
|
}
|
|
9693
9781
|
|
|
9694
|
-
@FieldResolver(() => [
|
|
9695
|
-
async
|
|
9696
|
-
this.CheckUserReadPermissions('
|
|
9782
|
+
@FieldResolver(() => [EntityRecordDocument_])
|
|
9783
|
+
async EntityRecordDocuments_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9784
|
+
this.CheckUserReadPermissions('Entity Record Documents', userPayload);
|
|
9697
9785
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9698
9786
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9699
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9787
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityRecordDocuments] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Record Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
9700
9788
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9701
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9789
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Record Documents', rows);
|
|
9702
9790
|
return result;
|
|
9703
9791
|
}
|
|
9704
9792
|
|
|
9705
|
-
@FieldResolver(() => [
|
|
9706
|
-
async
|
|
9707
|
-
this.CheckUserReadPermissions('
|
|
9793
|
+
@FieldResolver(() => [FileEntityRecordLink_])
|
|
9794
|
+
async FileEntityRecordLinks_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9795
|
+
this.CheckUserReadPermissions('File Entity Record Links', userPayload);
|
|
9708
9796
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9709
9797
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9710
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9798
|
+
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
9799
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9712
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9800
|
+
const result = this.ArrayMapFieldNamesToCodeNames('File Entity Record Links', rows);
|
|
9713
9801
|
return result;
|
|
9714
9802
|
}
|
|
9715
9803
|
|
|
9716
|
-
@FieldResolver(() => [
|
|
9717
|
-
async
|
|
9718
|
-
this.CheckUserReadPermissions('
|
|
9804
|
+
@FieldResolver(() => [UserViewCategory_])
|
|
9805
|
+
async UserViewCategories_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9806
|
+
this.CheckUserReadPermissions('User View Categories', userPayload);
|
|
9719
9807
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9720
9808
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9721
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9809
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewCategories] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User View Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
9722
9810
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9723
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9811
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User View Categories', rows);
|
|
9724
9812
|
return result;
|
|
9725
9813
|
}
|
|
9726
9814
|
|
|
9727
|
-
@FieldResolver(() => [
|
|
9728
|
-
async
|
|
9729
|
-
this.CheckUserReadPermissions('Entity
|
|
9815
|
+
@FieldResolver(() => [EntitySetting_])
|
|
9816
|
+
async EntitySettings_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9817
|
+
this.CheckUserReadPermissions('Entity Settings', userPayload);
|
|
9730
9818
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9731
9819
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9732
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9820
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntitySettings] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Settings', userPayload, EntityPermissionType.Read, 'AND');
|
|
9733
9821
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9734
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Entity
|
|
9822
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Settings', rows);
|
|
9735
9823
|
return result;
|
|
9736
9824
|
}
|
|
9737
9825
|
|
|
9738
|
-
@FieldResolver(() => [
|
|
9739
|
-
async
|
|
9740
|
-
this.CheckUserReadPermissions('
|
|
9826
|
+
@FieldResolver(() => [DuplicateRun_])
|
|
9827
|
+
async DuplicateRuns_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9828
|
+
this.CheckUserReadPermissions('Duplicate Runs', userPayload);
|
|
9741
9829
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9742
9830
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9743
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9831
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDuplicateRuns] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Duplicate Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
9744
9832
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9745
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9833
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Duplicate Runs', rows);
|
|
9746
9834
|
return result;
|
|
9747
9835
|
}
|
|
9748
9836
|
|
|
9749
|
-
@FieldResolver(() => [
|
|
9750
|
-
async
|
|
9751
|
-
this.CheckUserReadPermissions('Entity
|
|
9837
|
+
@FieldResolver(() => [EntityAction_])
|
|
9838
|
+
async EntityActions_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9839
|
+
this.CheckUserReadPermissions('Entity Actions', userPayload);
|
|
9752
9840
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9753
9841
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9754
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9842
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityActions] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9755
9843
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9756
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Entity
|
|
9844
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Actions', rows);
|
|
9757
9845
|
return result;
|
|
9758
9846
|
}
|
|
9759
9847
|
|
|
9760
|
-
@FieldResolver(() => [
|
|
9761
|
-
async
|
|
9762
|
-
this.CheckUserReadPermissions('
|
|
9848
|
+
@FieldResolver(() => [TemplateParam_])
|
|
9849
|
+
async TemplateParams_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9850
|
+
this.CheckUserReadPermissions('Template Params', userPayload);
|
|
9763
9851
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9764
9852
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9765
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9853
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateParams] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Template Params', userPayload, EntityPermissionType.Read, 'AND');
|
|
9766
9854
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9767
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9855
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Params', rows);
|
|
9768
9856
|
return result;
|
|
9769
9857
|
}
|
|
9770
9858
|
|
|
9771
|
-
@FieldResolver(() => [
|
|
9772
|
-
async
|
|
9773
|
-
this.CheckUserReadPermissions('
|
|
9859
|
+
@FieldResolver(() => [Recommendation_])
|
|
9860
|
+
async Recommendations_SourceEntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9861
|
+
this.CheckUserReadPermissions('Recommendations', userPayload);
|
|
9774
9862
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9775
9863
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9776
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9864
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendations] WHERE [SourceEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Recommendations', userPayload, EntityPermissionType.Read, 'AND');
|
|
9777
9865
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9778
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9866
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Recommendations', rows);
|
|
9779
9867
|
return result;
|
|
9780
9868
|
}
|
|
9781
9869
|
|
|
9782
|
-
@FieldResolver(() => [
|
|
9783
|
-
async
|
|
9784
|
-
this.CheckUserReadPermissions('
|
|
9870
|
+
@FieldResolver(() => [RecommendationItem_])
|
|
9871
|
+
async RecommendationItems_DestinationEntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9872
|
+
this.CheckUserReadPermissions('Recommendation Items', userPayload);
|
|
9785
9873
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9786
9874
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9787
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9875
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendationItems] WHERE [DestinationEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Recommendation Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
9788
9876
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9789
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9877
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Recommendation Items', rows);
|
|
9790
9878
|
return result;
|
|
9791
9879
|
}
|
|
9792
9880
|
|
|
9793
|
-
@FieldResolver(() => [
|
|
9794
|
-
async
|
|
9795
|
-
this.CheckUserReadPermissions('
|
|
9881
|
+
@FieldResolver(() => [EntityCommunicationMessageType_])
|
|
9882
|
+
async EntityCommunicationMessageTypes_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9883
|
+
this.CheckUserReadPermissions('Entity Communication Message Types', userPayload);
|
|
9796
9884
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9797
9885
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9798
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9886
|
+
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
9887
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9800
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9888
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Communication Message Types', rows);
|
|
9801
9889
|
return result;
|
|
9802
9890
|
}
|
|
9803
9891
|
|
|
@@ -9936,98 +10024,95 @@ export class User_ {
|
|
|
9936
10024
|
@MaxLength(200)
|
|
9937
10025
|
EmployeeSupervisorEmail?: string;
|
|
9938
10026
|
|
|
9939
|
-
@Field(() => [RecommendationRun_])
|
|
9940
|
-
RecommendationRuns_RunByUserIDArray: RecommendationRun_[]; // Link to RecommendationRuns
|
|
9941
|
-
|
|
9942
10027
|
@Field(() => [UserApplication_])
|
|
9943
10028
|
UserApplications_UserIDArray: UserApplication_[]; // Link to UserApplications
|
|
9944
10029
|
|
|
9945
|
-
@Field(() => [
|
|
9946
|
-
|
|
10030
|
+
@Field(() => [UserRole_])
|
|
10031
|
+
UserRoles_UserIDArray: UserRole_[]; // Link to UserRoles
|
|
9947
10032
|
|
|
9948
|
-
@Field(() => [
|
|
9949
|
-
|
|
10033
|
+
@Field(() => [Workspace_])
|
|
10034
|
+
Workspaces_UserIDArray: Workspace_[]; // Link to Workspaces
|
|
9950
10035
|
|
|
9951
10036
|
@Field(() => [Report_])
|
|
9952
10037
|
Reports_UserIDArray: Report_[]; // Link to Reports
|
|
9953
10038
|
|
|
9954
|
-
@Field(() => [
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
@Field(() => [Action_])
|
|
9958
|
-
Actions_CodeApprovedByUserIDArray: Action_[]; // Link to Actions
|
|
10039
|
+
@Field(() => [ReportSnapshot_])
|
|
10040
|
+
ReportSnapshots_UserIDArray: ReportSnapshot_[]; // Link to ReportSnapshots
|
|
9959
10041
|
|
|
9960
|
-
@Field(() => [
|
|
9961
|
-
|
|
10042
|
+
@Field(() => [RecordChange_])
|
|
10043
|
+
RecordChanges_UserIDArray: RecordChange_[]; // Link to RecordChanges
|
|
9962
10044
|
|
|
9963
|
-
@Field(() => [
|
|
9964
|
-
|
|
10045
|
+
@Field(() => [Dashboard_])
|
|
10046
|
+
Dashboards_UserIDArray: Dashboard_[]; // Link to Dashboards
|
|
9965
10047
|
|
|
9966
|
-
@Field(() => [
|
|
9967
|
-
|
|
10048
|
+
@Field(() => [UserViewRun_])
|
|
10049
|
+
UserViewRuns_RunByUserIDArray: UserViewRun_[]; // Link to UserViewRuns
|
|
9968
10050
|
|
|
9969
|
-
@Field(() => [
|
|
9970
|
-
|
|
10051
|
+
@Field(() => [AuditLog_])
|
|
10052
|
+
AuditLogs_UserIDArray: AuditLog_[]; // Link to AuditLogs
|
|
9971
10053
|
|
|
9972
|
-
@Field(() => [
|
|
9973
|
-
|
|
10054
|
+
@Field(() => [List_])
|
|
10055
|
+
Lists_UserIDArray: List_[]; // Link to Lists
|
|
9974
10056
|
|
|
9975
|
-
@Field(() => [
|
|
9976
|
-
|
|
10057
|
+
@Field(() => [UserFavorite_])
|
|
10058
|
+
UserFavorites_UserIDArray: UserFavorite_[]; // Link to UserFavorites
|
|
9977
10059
|
|
|
9978
|
-
@Field(() => [
|
|
9979
|
-
|
|
10060
|
+
@Field(() => [UserRecordLog_])
|
|
10061
|
+
UserRecordLogs_UserIDArray: UserRecordLog_[]; // Link to UserRecordLogs
|
|
9980
10062
|
|
|
9981
|
-
@Field(() => [
|
|
9982
|
-
|
|
10063
|
+
@Field(() => [UserView_])
|
|
10064
|
+
UserViews_UserIDArray: UserView_[]; // Link to UserViews
|
|
9983
10065
|
|
|
9984
|
-
@Field(() => [
|
|
9985
|
-
|
|
10066
|
+
@Field(() => [CompanyIntegrationRun_])
|
|
10067
|
+
CompanyIntegrationRuns_RunByUserIDArray: CompanyIntegrationRun_[]; // Link to CompanyIntegrationRuns
|
|
9986
10068
|
|
|
9987
|
-
@Field(() => [
|
|
9988
|
-
|
|
10069
|
+
@Field(() => [UserNotification_])
|
|
10070
|
+
UserNotifications_UserIDArray: UserNotification_[]; // Link to UserNotifications
|
|
9989
10071
|
|
|
9990
10072
|
@Field(() => [Conversation_])
|
|
9991
10073
|
Conversations_UserIDArray: Conversation_[]; // Link to Conversations
|
|
9992
10074
|
|
|
9993
|
-
@Field(() => [
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
@Field(() => [CommunicationRun_])
|
|
9997
|
-
CommunicationRuns_UserIDArray: CommunicationRun_[]; // Link to CommunicationRuns
|
|
10075
|
+
@Field(() => [RecordMergeLog_])
|
|
10076
|
+
RecordMergeLogs_InitiatedByUserIDArray: RecordMergeLog_[]; // Link to RecordMergeLogs
|
|
9998
10077
|
|
|
9999
|
-
@Field(() => [
|
|
10000
|
-
|
|
10078
|
+
@Field(() => [DataContext_])
|
|
10079
|
+
DataContexts_UserIDArray: DataContext_[]; // Link to DataContexts
|
|
10001
10080
|
|
|
10002
|
-
@Field(() => [
|
|
10003
|
-
|
|
10081
|
+
@Field(() => [ReportCategory_])
|
|
10082
|
+
ReportCategories_UserIDArray: ReportCategory_[]; // Link to ReportCategories
|
|
10004
10083
|
|
|
10005
|
-
@Field(() => [
|
|
10006
|
-
|
|
10084
|
+
@Field(() => [UserViewCategory_])
|
|
10085
|
+
UserViewCategories_UserIDArray: UserViewCategory_[]; // Link to UserViewCategories
|
|
10007
10086
|
|
|
10008
|
-
@Field(() => [
|
|
10009
|
-
|
|
10087
|
+
@Field(() => [DashboardCategory_])
|
|
10088
|
+
DashboardCategories_UserIDArray: DashboardCategory_[]; // Link to DashboardCategories
|
|
10010
10089
|
|
|
10011
|
-
@Field(() => [
|
|
10012
|
-
|
|
10090
|
+
@Field(() => [QueryCategory_])
|
|
10091
|
+
QueryCategories_UserIDArray: QueryCategory_[]; // Link to QueryCategories
|
|
10013
10092
|
|
|
10014
10093
|
@Field(() => [DuplicateRun_])
|
|
10015
10094
|
DuplicateRuns_StartedByUserIDArray: DuplicateRun_[]; // Link to DuplicateRuns
|
|
10016
10095
|
|
|
10017
|
-
@Field(() => [
|
|
10018
|
-
|
|
10096
|
+
@Field(() => [ActionExecutionLog_])
|
|
10097
|
+
ActionExecutionLogs_UserIDArray: ActionExecutionLog_[]; // Link to ActionExecutionLogs
|
|
10019
10098
|
|
|
10020
|
-
@Field(() => [
|
|
10021
|
-
|
|
10099
|
+
@Field(() => [Action_])
|
|
10100
|
+
Actions_CodeApprovedByUserIDArray: Action_[]; // Link to Actions
|
|
10101
|
+
|
|
10102
|
+
@Field(() => [CommunicationRun_])
|
|
10103
|
+
CommunicationRuns_UserIDArray: CommunicationRun_[]; // Link to CommunicationRuns
|
|
10022
10104
|
|
|
10023
10105
|
@Field(() => [Template_])
|
|
10024
10106
|
Templates_UserIDArray: Template_[]; // Link to Templates
|
|
10025
10107
|
|
|
10026
|
-
@Field(() => [
|
|
10027
|
-
|
|
10108
|
+
@Field(() => [TemplateCategory_])
|
|
10109
|
+
TemplateCategories_UserIDArray: TemplateCategory_[]; // Link to TemplateCategories
|
|
10028
10110
|
|
|
10029
|
-
@Field(() => [
|
|
10030
|
-
|
|
10111
|
+
@Field(() => [RecommendationRun_])
|
|
10112
|
+
RecommendationRuns_RunByUserIDArray: RecommendationRun_[]; // Link to RecommendationRuns
|
|
10113
|
+
|
|
10114
|
+
@Field(() => [RecordChangeReplayRun_])
|
|
10115
|
+
RecordChangeReplayRuns_UserIDArray: RecordChangeReplayRun_[]; // Link to RecordChangeReplayRuns
|
|
10031
10116
|
|
|
10032
10117
|
@Field(() => [ListCategory_])
|
|
10033
10118
|
ListCategories_UserIDArray: ListCategory_[]; // Link to ListCategories
|
|
@@ -10035,21 +10120,24 @@ export class User_ {
|
|
|
10035
10120
|
@Field(() => [ScheduledAction_])
|
|
10036
10121
|
ScheduledActions_CreatedByUserIDArray: ScheduledAction_[]; // Link to ScheduledActions
|
|
10037
10122
|
|
|
10123
|
+
@Field(() => [ResourceLink_])
|
|
10124
|
+
ResourceLinks_UserIDArray: ResourceLink_[]; // Link to ResourceLinks
|
|
10125
|
+
|
|
10038
10126
|
@Field(() => [AIAgentRequest_])
|
|
10039
10127
|
AIAgentRequests_ResponseByUserIDArray: AIAgentRequest_[]; // Link to AIAgentRequests
|
|
10040
10128
|
|
|
10041
|
-
@Field(() => [
|
|
10042
|
-
|
|
10129
|
+
@Field(() => [AIAgentNote_])
|
|
10130
|
+
AIAgentNotes_UserIDArray: AIAgentNote_[]; // Link to AIAgentNotes
|
|
10043
10131
|
|
|
10044
10132
|
@Field(() => [ReportUserState_])
|
|
10045
10133
|
MJ_ReportUserStates_UserIDArray: ReportUserState_[]; // Link to MJ_ReportUserStates
|
|
10046
10134
|
|
|
10047
|
-
@Field(() => [AIAgentNote_])
|
|
10048
|
-
AIAgentNotes_UserIDArray: AIAgentNote_[]; // Link to AIAgentNotes
|
|
10049
|
-
|
|
10050
10135
|
@Field(() => [DashboardUserState_])
|
|
10051
10136
|
MJ_DashboardUserStates_UserIDArray: DashboardUserState_[]; // Link to MJ_DashboardUserStates
|
|
10052
10137
|
|
|
10138
|
+
@Field(() => [DashboardUserPreference_])
|
|
10139
|
+
MJ_DashboardUserPreferences_UserIDArray: DashboardUserPreference_[]; // Link to MJ_DashboardUserPreferences
|
|
10140
|
+
|
|
10053
10141
|
@Field(() => [ResourcePermission_])
|
|
10054
10142
|
ResourcePermissions_UserIDArray: ResourcePermission_[]; // Link to ResourcePermissions
|
|
10055
10143
|
|
|
@@ -10221,17 +10309,6 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10221
10309
|
return result;
|
|
10222
10310
|
}
|
|
10223
10311
|
|
|
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
10312
|
@FieldResolver(() => [UserApplication_])
|
|
10236
10313
|
async UserApplications_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10237
10314
|
this.CheckUserReadPermissions('User Applications', userPayload);
|
|
@@ -10243,25 +10320,25 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10243
10320
|
return result;
|
|
10244
10321
|
}
|
|
10245
10322
|
|
|
10246
|
-
@FieldResolver(() => [
|
|
10247
|
-
async
|
|
10248
|
-
this.CheckUserReadPermissions('
|
|
10323
|
+
@FieldResolver(() => [UserRole_])
|
|
10324
|
+
async UserRoles_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10325
|
+
this.CheckUserReadPermissions('User Roles', userPayload);
|
|
10249
10326
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10250
10327
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10251
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10328
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserRoles] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
10252
10329
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10253
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10330
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Roles', rows);
|
|
10254
10331
|
return result;
|
|
10255
10332
|
}
|
|
10256
10333
|
|
|
10257
|
-
@FieldResolver(() => [
|
|
10258
|
-
async
|
|
10259
|
-
this.CheckUserReadPermissions('
|
|
10334
|
+
@FieldResolver(() => [Workspace_])
|
|
10335
|
+
async Workspaces_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10336
|
+
this.CheckUserReadPermissions('Workspaces', userPayload);
|
|
10260
10337
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10261
10338
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10262
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10339
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwWorkspaces] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Workspaces', userPayload, EntityPermissionType.Read, 'AND');
|
|
10263
10340
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10264
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10341
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Workspaces', rows);
|
|
10265
10342
|
return result;
|
|
10266
10343
|
}
|
|
10267
10344
|
|
|
@@ -10276,135 +10353,124 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10276
10353
|
return result;
|
|
10277
10354
|
}
|
|
10278
10355
|
|
|
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);
|
|
10356
|
+
@FieldResolver(() => [ReportSnapshot_])
|
|
10357
|
+
async ReportSnapshots_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10358
|
+
this.CheckUserReadPermissions('Report Snapshots', userPayload);
|
|
10293
10359
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10294
10360
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10295
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10361
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportSnapshots] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
10296
10362
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10297
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10363
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Report Snapshots', rows);
|
|
10298
10364
|
return result;
|
|
10299
10365
|
}
|
|
10300
10366
|
|
|
10301
|
-
@FieldResolver(() => [
|
|
10302
|
-
async
|
|
10303
|
-
this.CheckUserReadPermissions('
|
|
10367
|
+
@FieldResolver(() => [RecordChange_])
|
|
10368
|
+
async RecordChanges_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10369
|
+
this.CheckUserReadPermissions('Record Changes', userPayload);
|
|
10304
10370
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10305
10371
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10306
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10372
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordChanges] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Record Changes', userPayload, EntityPermissionType.Read, 'AND');
|
|
10307
10373
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10308
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10374
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Record Changes', rows);
|
|
10309
10375
|
return result;
|
|
10310
10376
|
}
|
|
10311
10377
|
|
|
10312
|
-
@FieldResolver(() => [
|
|
10313
|
-
async
|
|
10314
|
-
this.CheckUserReadPermissions('
|
|
10378
|
+
@FieldResolver(() => [Dashboard_])
|
|
10379
|
+
async Dashboards_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10380
|
+
this.CheckUserReadPermissions('Dashboards', userPayload);
|
|
10315
10381
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10316
10382
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10317
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10383
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboards] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dashboards', userPayload, EntityPermissionType.Read, 'AND');
|
|
10318
10384
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10319
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10385
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Dashboards', rows);
|
|
10320
10386
|
return result;
|
|
10321
10387
|
}
|
|
10322
10388
|
|
|
10323
|
-
@FieldResolver(() => [
|
|
10324
|
-
async
|
|
10325
|
-
this.CheckUserReadPermissions('
|
|
10389
|
+
@FieldResolver(() => [UserViewRun_])
|
|
10390
|
+
async UserViewRuns_RunByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10391
|
+
this.CheckUserReadPermissions('User View Runs', userPayload);
|
|
10326
10392
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10327
10393
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10328
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10394
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewRuns] WHERE [RunByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User View Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10329
10395
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10330
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10396
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User View Runs', rows);
|
|
10331
10397
|
return result;
|
|
10332
10398
|
}
|
|
10333
10399
|
|
|
10334
|
-
@FieldResolver(() => [
|
|
10335
|
-
async
|
|
10336
|
-
this.CheckUserReadPermissions('
|
|
10400
|
+
@FieldResolver(() => [AuditLog_])
|
|
10401
|
+
async AuditLogs_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10402
|
+
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
10337
10403
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10338
10404
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10339
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10405
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogs] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10340
10406
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10341
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10407
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Audit Logs', rows);
|
|
10342
10408
|
return result;
|
|
10343
10409
|
}
|
|
10344
10410
|
|
|
10345
|
-
@FieldResolver(() => [
|
|
10346
|
-
async
|
|
10347
|
-
this.CheckUserReadPermissions('
|
|
10411
|
+
@FieldResolver(() => [List_])
|
|
10412
|
+
async Lists_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10413
|
+
this.CheckUserReadPermissions('Lists', userPayload);
|
|
10348
10414
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10349
10415
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10350
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10416
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwLists] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Lists', userPayload, EntityPermissionType.Read, 'AND');
|
|
10351
10417
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10352
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10418
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Lists', rows);
|
|
10353
10419
|
return result;
|
|
10354
10420
|
}
|
|
10355
10421
|
|
|
10356
|
-
@FieldResolver(() => [
|
|
10357
|
-
async
|
|
10358
|
-
this.CheckUserReadPermissions('
|
|
10422
|
+
@FieldResolver(() => [UserFavorite_])
|
|
10423
|
+
async UserFavorites_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10424
|
+
this.CheckUserReadPermissions('User Favorites', userPayload);
|
|
10359
10425
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10360
10426
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10361
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10427
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserFavorites] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Favorites', userPayload, EntityPermissionType.Read, 'AND');
|
|
10362
10428
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10363
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10429
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Favorites', rows);
|
|
10364
10430
|
return result;
|
|
10365
10431
|
}
|
|
10366
10432
|
|
|
10367
|
-
@FieldResolver(() => [
|
|
10368
|
-
async
|
|
10369
|
-
this.CheckUserReadPermissions('Record
|
|
10433
|
+
@FieldResolver(() => [UserRecordLog_])
|
|
10434
|
+
async UserRecordLogs_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10435
|
+
this.CheckUserReadPermissions('User Record Logs', userPayload);
|
|
10370
10436
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10371
10437
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10372
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10438
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserRecordLogs] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Record Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10373
10439
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10374
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Record
|
|
10440
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Record Logs', rows);
|
|
10375
10441
|
return result;
|
|
10376
10442
|
}
|
|
10377
10443
|
|
|
10378
|
-
@FieldResolver(() => [
|
|
10379
|
-
async
|
|
10380
|
-
this.CheckUserReadPermissions('User
|
|
10444
|
+
@FieldResolver(() => [UserView_])
|
|
10445
|
+
async UserViews_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10446
|
+
this.CheckUserReadPermissions('User Views', userPayload);
|
|
10381
10447
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10382
10448
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10383
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10449
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViews] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Views', userPayload, EntityPermissionType.Read, 'AND');
|
|
10384
10450
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10385
|
-
const result = this.ArrayMapFieldNamesToCodeNames('User
|
|
10451
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Views', rows);
|
|
10386
10452
|
return result;
|
|
10387
10453
|
}
|
|
10388
10454
|
|
|
10389
|
-
@FieldResolver(() => [
|
|
10390
|
-
async
|
|
10391
|
-
this.CheckUserReadPermissions('
|
|
10455
|
+
@FieldResolver(() => [CompanyIntegrationRun_])
|
|
10456
|
+
async CompanyIntegrationRuns_RunByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10457
|
+
this.CheckUserReadPermissions('Company Integration Runs', userPayload);
|
|
10392
10458
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10393
10459
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10394
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10460
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRuns] WHERE [RunByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Company Integration Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10395
10461
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10396
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10462
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Runs', rows);
|
|
10397
10463
|
return result;
|
|
10398
10464
|
}
|
|
10399
10465
|
|
|
10400
|
-
@FieldResolver(() => [
|
|
10401
|
-
async
|
|
10402
|
-
this.CheckUserReadPermissions('
|
|
10466
|
+
@FieldResolver(() => [UserNotification_])
|
|
10467
|
+
async UserNotifications_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10468
|
+
this.CheckUserReadPermissions('User Notifications', userPayload);
|
|
10403
10469
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10404
10470
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10405
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10471
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserNotifications] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Notifications', userPayload, EntityPermissionType.Read, 'AND');
|
|
10406
10472
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10407
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10473
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Notifications', rows);
|
|
10408
10474
|
return result;
|
|
10409
10475
|
}
|
|
10410
10476
|
|
|
@@ -10419,113 +10485,113 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10419
10485
|
return result;
|
|
10420
10486
|
}
|
|
10421
10487
|
|
|
10422
|
-
@FieldResolver(() => [
|
|
10423
|
-
async
|
|
10424
|
-
this.CheckUserReadPermissions('
|
|
10488
|
+
@FieldResolver(() => [RecordMergeLog_])
|
|
10489
|
+
async RecordMergeLogs_InitiatedByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10490
|
+
this.CheckUserReadPermissions('Record Merge Logs', userPayload);
|
|
10425
10491
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10426
10492
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10427
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10493
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordMergeLogs] WHERE [InitiatedByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Record Merge Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10428
10494
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10429
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10495
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Record Merge Logs', rows);
|
|
10430
10496
|
return result;
|
|
10431
10497
|
}
|
|
10432
10498
|
|
|
10433
|
-
@FieldResolver(() => [
|
|
10434
|
-
async
|
|
10435
|
-
this.CheckUserReadPermissions('
|
|
10499
|
+
@FieldResolver(() => [DataContext_])
|
|
10500
|
+
async DataContexts_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10501
|
+
this.CheckUserReadPermissions('Data Contexts', userPayload);
|
|
10436
10502
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10437
10503
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10438
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10504
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContexts] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Data Contexts', userPayload, EntityPermissionType.Read, 'AND');
|
|
10439
10505
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10440
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10506
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Data Contexts', rows);
|
|
10441
10507
|
return result;
|
|
10442
10508
|
}
|
|
10443
10509
|
|
|
10444
|
-
@FieldResolver(() => [
|
|
10445
|
-
async
|
|
10446
|
-
this.CheckUserReadPermissions('
|
|
10510
|
+
@FieldResolver(() => [ReportCategory_])
|
|
10511
|
+
async ReportCategories_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10512
|
+
this.CheckUserReadPermissions('Report Categories', userPayload);
|
|
10447
10513
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10448
10514
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10449
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10515
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportCategories] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Report Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
10450
10516
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10451
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10517
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Report Categories', rows);
|
|
10452
10518
|
return result;
|
|
10453
10519
|
}
|
|
10454
10520
|
|
|
10455
|
-
@FieldResolver(() => [
|
|
10456
|
-
async
|
|
10457
|
-
this.CheckUserReadPermissions('
|
|
10521
|
+
@FieldResolver(() => [UserViewCategory_])
|
|
10522
|
+
async UserViewCategories_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10523
|
+
this.CheckUserReadPermissions('User View Categories', userPayload);
|
|
10458
10524
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10459
10525
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10460
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10526
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewCategories] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User View Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
10461
10527
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10462
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10528
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User View Categories', rows);
|
|
10463
10529
|
return result;
|
|
10464
10530
|
}
|
|
10465
10531
|
|
|
10466
|
-
@FieldResolver(() => [
|
|
10467
|
-
async
|
|
10468
|
-
this.CheckUserReadPermissions('
|
|
10532
|
+
@FieldResolver(() => [DashboardCategory_])
|
|
10533
|
+
async DashboardCategories_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10534
|
+
this.CheckUserReadPermissions('Dashboard Categories', userPayload);
|
|
10469
10535
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10470
10536
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10471
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10537
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategories] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dashboard Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
10472
10538
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10473
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10539
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Dashboard Categories', rows);
|
|
10474
10540
|
return result;
|
|
10475
10541
|
}
|
|
10476
10542
|
|
|
10477
|
-
@FieldResolver(() => [
|
|
10478
|
-
async
|
|
10479
|
-
this.CheckUserReadPermissions('
|
|
10543
|
+
@FieldResolver(() => [QueryCategory_])
|
|
10544
|
+
async QueryCategories_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10545
|
+
this.CheckUserReadPermissions('Query Categories', userPayload);
|
|
10480
10546
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10481
10547
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10482
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10548
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryCategories] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Query Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
10483
10549
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10484
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10550
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Query Categories', rows);
|
|
10485
10551
|
return result;
|
|
10486
10552
|
}
|
|
10487
10553
|
|
|
10488
|
-
@FieldResolver(() => [
|
|
10489
|
-
async
|
|
10490
|
-
this.CheckUserReadPermissions('
|
|
10554
|
+
@FieldResolver(() => [DuplicateRun_])
|
|
10555
|
+
async DuplicateRuns_StartedByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10556
|
+
this.CheckUserReadPermissions('Duplicate Runs', userPayload);
|
|
10491
10557
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10492
10558
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10493
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10559
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDuplicateRuns] WHERE [StartedByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Duplicate Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10494
10560
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10495
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10561
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Duplicate Runs', rows);
|
|
10496
10562
|
return result;
|
|
10497
10563
|
}
|
|
10498
10564
|
|
|
10499
|
-
@FieldResolver(() => [
|
|
10500
|
-
async
|
|
10501
|
-
this.CheckUserReadPermissions('
|
|
10565
|
+
@FieldResolver(() => [ActionExecutionLog_])
|
|
10566
|
+
async ActionExecutionLogs_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10567
|
+
this.CheckUserReadPermissions('Action Execution Logs', userPayload);
|
|
10502
10568
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10503
10569
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10504
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10570
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActionExecutionLogs] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Action Execution Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10505
10571
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10506
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10572
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Action Execution Logs', rows);
|
|
10507
10573
|
return result;
|
|
10508
10574
|
}
|
|
10509
10575
|
|
|
10510
|
-
@FieldResolver(() => [
|
|
10511
|
-
async
|
|
10512
|
-
this.CheckUserReadPermissions('
|
|
10576
|
+
@FieldResolver(() => [Action_])
|
|
10577
|
+
async Actions_CodeApprovedByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10578
|
+
this.CheckUserReadPermissions('Actions', userPayload);
|
|
10513
10579
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10514
10580
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10515
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10581
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActions] WHERE [CodeApprovedByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
10516
10582
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10517
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10583
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Actions', rows);
|
|
10518
10584
|
return result;
|
|
10519
10585
|
}
|
|
10520
10586
|
|
|
10521
|
-
@FieldResolver(() => [
|
|
10522
|
-
async
|
|
10523
|
-
this.CheckUserReadPermissions('
|
|
10587
|
+
@FieldResolver(() => [CommunicationRun_])
|
|
10588
|
+
async CommunicationRuns_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10589
|
+
this.CheckUserReadPermissions('Communication Runs', userPayload);
|
|
10524
10590
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10525
10591
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10526
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10592
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCommunicationRuns] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Communication Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10527
10593
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10528
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10594
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Communication Runs', rows);
|
|
10529
10595
|
return result;
|
|
10530
10596
|
}
|
|
10531
10597
|
|
|
@@ -10540,25 +10606,36 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10540
10606
|
return result;
|
|
10541
10607
|
}
|
|
10542
10608
|
|
|
10543
|
-
@FieldResolver(() => [
|
|
10544
|
-
async
|
|
10545
|
-
this.CheckUserReadPermissions('
|
|
10609
|
+
@FieldResolver(() => [TemplateCategory_])
|
|
10610
|
+
async TemplateCategories_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10611
|
+
this.CheckUserReadPermissions('Template Categories', userPayload);
|
|
10546
10612
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10547
10613
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10548
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10614
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateCategories] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Template Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
10549
10615
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10550
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10616
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Categories', rows);
|
|
10551
10617
|
return result;
|
|
10552
10618
|
}
|
|
10553
10619
|
|
|
10554
|
-
@FieldResolver(() => [
|
|
10555
|
-
async
|
|
10556
|
-
this.CheckUserReadPermissions('
|
|
10620
|
+
@FieldResolver(() => [RecommendationRun_])
|
|
10621
|
+
async RecommendationRuns_RunByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10622
|
+
this.CheckUserReadPermissions('Recommendation Runs', userPayload);
|
|
10557
10623
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10558
10624
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10559
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10625
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendationRuns] WHERE [RunByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Recommendation Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10560
10626
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10561
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10627
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Recommendation Runs', rows);
|
|
10628
|
+
return result;
|
|
10629
|
+
}
|
|
10630
|
+
|
|
10631
|
+
@FieldResolver(() => [RecordChangeReplayRun_])
|
|
10632
|
+
async RecordChangeReplayRuns_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10633
|
+
this.CheckUserReadPermissions('Record Change Replay Runs', userPayload);
|
|
10634
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10635
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10636
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordChangeReplayRuns] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Record Change Replay Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10637
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10638
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Record Change Replay Runs', rows);
|
|
10562
10639
|
return result;
|
|
10563
10640
|
}
|
|
10564
10641
|
|
|
@@ -10584,6 +10661,17 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10584
10661
|
return result;
|
|
10585
10662
|
}
|
|
10586
10663
|
|
|
10664
|
+
@FieldResolver(() => [ResourceLink_])
|
|
10665
|
+
async ResourceLinks_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10666
|
+
this.CheckUserReadPermissions('Resource Links', userPayload);
|
|
10667
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10668
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10669
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceLinks] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Resource Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
10670
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10671
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Resource Links', rows);
|
|
10672
|
+
return result;
|
|
10673
|
+
}
|
|
10674
|
+
|
|
10587
10675
|
@FieldResolver(() => [AIAgentRequest_])
|
|
10588
10676
|
async AIAgentRequests_ResponseByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10589
10677
|
this.CheckUserReadPermissions('AI Agent Requests', userPayload);
|
|
@@ -10595,14 +10683,14 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10595
10683
|
return result;
|
|
10596
10684
|
}
|
|
10597
10685
|
|
|
10598
|
-
@FieldResolver(() => [
|
|
10599
|
-
async
|
|
10600
|
-
this.CheckUserReadPermissions('
|
|
10686
|
+
@FieldResolver(() => [AIAgentNote_])
|
|
10687
|
+
async AIAgentNotes_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10688
|
+
this.CheckUserReadPermissions('AI Agent Notes', userPayload);
|
|
10601
10689
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10602
10690
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10603
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10691
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
|
|
10604
10692
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10605
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10693
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', rows);
|
|
10606
10694
|
return result;
|
|
10607
10695
|
}
|
|
10608
10696
|
|
|
@@ -10617,25 +10705,25 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10617
10705
|
return result;
|
|
10618
10706
|
}
|
|
10619
10707
|
|
|
10620
|
-
@FieldResolver(() => [
|
|
10621
|
-
async
|
|
10622
|
-
this.CheckUserReadPermissions('
|
|
10708
|
+
@FieldResolver(() => [DashboardUserState_])
|
|
10709
|
+
async MJ_DashboardUserStates_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10710
|
+
this.CheckUserReadPermissions('MJ: Dashboard User States', userPayload);
|
|
10623
10711
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10624
10712
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10625
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10713
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardUserStates] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard User States', userPayload, EntityPermissionType.Read, 'AND');
|
|
10626
10714
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10627
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10715
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User States', rows);
|
|
10628
10716
|
return result;
|
|
10629
10717
|
}
|
|
10630
10718
|
|
|
10631
|
-
@FieldResolver(() => [
|
|
10632
|
-
async
|
|
10633
|
-
this.CheckUserReadPermissions('MJ: Dashboard User
|
|
10719
|
+
@FieldResolver(() => [DashboardUserPreference_])
|
|
10720
|
+
async MJ_DashboardUserPreferences_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10721
|
+
this.CheckUserReadPermissions('MJ: Dashboard User Preferences', userPayload);
|
|
10634
10722
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10635
10723
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10636
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10724
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardUserPreferences] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard User Preferences', userPayload, EntityPermissionType.Read, 'AND');
|
|
10637
10725
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10638
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User
|
|
10726
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User Preferences', rows);
|
|
10639
10727
|
return result;
|
|
10640
10728
|
}
|
|
10641
10729
|
|
|
@@ -11386,14 +11474,14 @@ export class UserView_ {
|
|
|
11386
11474
|
@MaxLength(510)
|
|
11387
11475
|
EntityBaseView: string;
|
|
11388
11476
|
|
|
11389
|
-
@Field(() => [
|
|
11390
|
-
|
|
11477
|
+
@Field(() => [EntityRelationship_])
|
|
11478
|
+
EntityRelationships_DisplayUserViewGUIDArray: EntityRelationship_[]; // Link to EntityRelationships
|
|
11391
11479
|
|
|
11392
11480
|
@Field(() => [UserViewRun_])
|
|
11393
11481
|
UserViewRuns_UserViewIDArray: UserViewRun_[]; // Link to UserViewRuns
|
|
11394
11482
|
|
|
11395
|
-
@Field(() => [
|
|
11396
|
-
|
|
11483
|
+
@Field(() => [DataContextItem_])
|
|
11484
|
+
DataContextItems_ViewIDArray: DataContextItem_[]; // Link to DataContextItems
|
|
11397
11485
|
|
|
11398
11486
|
}
|
|
11399
11487
|
|
|
@@ -11596,14 +11684,14 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
11596
11684
|
return result;
|
|
11597
11685
|
}
|
|
11598
11686
|
|
|
11599
|
-
@FieldResolver(() => [
|
|
11600
|
-
async
|
|
11601
|
-
this.CheckUserReadPermissions('
|
|
11687
|
+
@FieldResolver(() => [EntityRelationship_])
|
|
11688
|
+
async EntityRelationships_DisplayUserViewGUIDArray(@Root() userview_: UserView_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11689
|
+
this.CheckUserReadPermissions('Entity Relationships', userPayload);
|
|
11602
11690
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11603
11691
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
11604
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
11692
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityRelationships] WHERE [DisplayUserViewGUID]='${userview_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
11605
11693
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
11606
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
11694
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Relationships', rows);
|
|
11607
11695
|
return result;
|
|
11608
11696
|
}
|
|
11609
11697
|
|
|
@@ -11618,14 +11706,14 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
11618
11706
|
return result;
|
|
11619
11707
|
}
|
|
11620
11708
|
|
|
11621
|
-
@FieldResolver(() => [
|
|
11622
|
-
async
|
|
11623
|
-
this.CheckUserReadPermissions('
|
|
11709
|
+
@FieldResolver(() => [DataContextItem_])
|
|
11710
|
+
async DataContextItems_ViewIDArray(@Root() userview_: UserView_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11711
|
+
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
11624
11712
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11625
11713
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
11626
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
11714
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContextItems] WHERE [ViewID]='${userview_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
11627
11715
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
11628
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
11716
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Data Context Items', rows);
|
|
11629
11717
|
return result;
|
|
11630
11718
|
}
|
|
11631
11719
|
|
|
@@ -11719,15 +11807,15 @@ export class CompanyIntegrationRun_ {
|
|
|
11719
11807
|
@MaxLength(200)
|
|
11720
11808
|
RunByUser: string;
|
|
11721
11809
|
|
|
11810
|
+
@Field(() => [CompanyIntegrationRunAPILog_])
|
|
11811
|
+
CompanyIntegrationRunAPILogs_CompanyIntegrationRunIDArray: CompanyIntegrationRunAPILog_[]; // Link to CompanyIntegrationRunAPILogs
|
|
11812
|
+
|
|
11722
11813
|
@Field(() => [ErrorLog_])
|
|
11723
11814
|
ErrorLogs_CompanyIntegrationRunIDArray: ErrorLog_[]; // Link to ErrorLogs
|
|
11724
11815
|
|
|
11725
11816
|
@Field(() => [CompanyIntegrationRunDetail_])
|
|
11726
11817
|
CompanyIntegrationRunDetails_CompanyIntegrationRunIDArray: CompanyIntegrationRunDetail_[]; // Link to CompanyIntegrationRunDetails
|
|
11727
11818
|
|
|
11728
|
-
@Field(() => [CompanyIntegrationRunAPILog_])
|
|
11729
|
-
CompanyIntegrationRunAPILogs_CompanyIntegrationRunIDArray: CompanyIntegrationRunAPILog_[]; // Link to CompanyIntegrationRunAPILogs
|
|
11730
|
-
|
|
11731
11819
|
}
|
|
11732
11820
|
|
|
11733
11821
|
//****************************************************************************
|
|
@@ -11864,6 +11952,17 @@ export class CompanyIntegrationRunResolver extends ResolverBase {
|
|
|
11864
11952
|
return result;
|
|
11865
11953
|
}
|
|
11866
11954
|
|
|
11955
|
+
@FieldResolver(() => [CompanyIntegrationRunAPILog_])
|
|
11956
|
+
async CompanyIntegrationRunAPILogs_CompanyIntegrationRunIDArray(@Root() companyintegrationrun_: CompanyIntegrationRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11957
|
+
this.CheckUserReadPermissions('Company Integration Run API Logs', userPayload);
|
|
11958
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11959
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
11960
|
+
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');
|
|
11961
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
11962
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Run API Logs', rows);
|
|
11963
|
+
return result;
|
|
11964
|
+
}
|
|
11965
|
+
|
|
11867
11966
|
@FieldResolver(() => [ErrorLog_])
|
|
11868
11967
|
async ErrorLogs_CompanyIntegrationRunIDArray(@Root() companyintegrationrun_: CompanyIntegrationRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11869
11968
|
this.CheckUserReadPermissions('Error Logs', userPayload);
|
|
@@ -11886,17 +11985,6 @@ export class CompanyIntegrationRunResolver extends ResolverBase {
|
|
|
11886
11985
|
return result;
|
|
11887
11986
|
}
|
|
11888
11987
|
|
|
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
11988
|
@Mutation(() => CompanyIntegrationRun_)
|
|
11901
11989
|
async CreateCompanyIntegrationRun(
|
|
11902
11990
|
@Arg('input', () => CreateCompanyIntegrationRunInput) input: CreateCompanyIntegrationRunInput,
|
|
@@ -12379,14 +12467,14 @@ export class Application_ {
|
|
|
12379
12467
|
@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
12468
|
SchemaAutoAddNewEntities?: string;
|
|
12381
12469
|
|
|
12382
|
-
@Field(() => [
|
|
12383
|
-
|
|
12470
|
+
@Field(() => [ApplicationEntity_])
|
|
12471
|
+
ApplicationEntities_ApplicationIDArray: ApplicationEntity_[]; // Link to ApplicationEntities
|
|
12384
12472
|
|
|
12385
12473
|
@Field(() => [UserApplication_])
|
|
12386
12474
|
UserApplications_ApplicationIDArray: UserApplication_[]; // Link to UserApplications
|
|
12387
12475
|
|
|
12388
|
-
@Field(() => [
|
|
12389
|
-
|
|
12476
|
+
@Field(() => [ApplicationSetting_])
|
|
12477
|
+
ApplicationSettings_ApplicationIDArray: ApplicationSetting_[]; // Link to ApplicationSettings
|
|
12390
12478
|
|
|
12391
12479
|
@Field(() => [Dashboard_])
|
|
12392
12480
|
Dashboards_ApplicationIDArray: Dashboard_[]; // Link to Dashboards
|
|
@@ -12517,14 +12605,14 @@ export class ApplicationResolver extends ResolverBase {
|
|
|
12517
12605
|
return result;
|
|
12518
12606
|
}
|
|
12519
12607
|
|
|
12520
|
-
@FieldResolver(() => [
|
|
12521
|
-
async
|
|
12522
|
-
this.CheckUserReadPermissions('Application
|
|
12608
|
+
@FieldResolver(() => [ApplicationEntity_])
|
|
12609
|
+
async ApplicationEntities_ApplicationIDArray(@Root() application_: Application_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12610
|
+
this.CheckUserReadPermissions('Application Entities', userPayload);
|
|
12523
12611
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12524
12612
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
12525
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
12613
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwApplicationEntities] WHERE [ApplicationID]='${application_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
12526
12614
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
12527
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Application
|
|
12615
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Application Entities', rows);
|
|
12528
12616
|
return result;
|
|
12529
12617
|
}
|
|
12530
12618
|
|
|
@@ -12539,14 +12627,14 @@ export class ApplicationResolver extends ResolverBase {
|
|
|
12539
12627
|
return result;
|
|
12540
12628
|
}
|
|
12541
12629
|
|
|
12542
|
-
@FieldResolver(() => [
|
|
12543
|
-
async
|
|
12544
|
-
this.CheckUserReadPermissions('Application
|
|
12630
|
+
@FieldResolver(() => [ApplicationSetting_])
|
|
12631
|
+
async ApplicationSettings_ApplicationIDArray(@Root() application_: Application_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12632
|
+
this.CheckUserReadPermissions('Application Settings', userPayload);
|
|
12545
12633
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12546
12634
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
12547
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
12635
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwApplicationSettings] WHERE [ApplicationID]='${application_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Application Settings', userPayload, EntityPermissionType.Read, 'AND');
|
|
12548
12636
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
12549
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Application
|
|
12637
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Application Settings', rows);
|
|
12550
12638
|
return result;
|
|
12551
12639
|
}
|
|
12552
12640
|
|
|
@@ -15848,17 +15936,17 @@ export class Authorization_ {
|
|
|
15848
15936
|
@Field(() => [AuthorizationRole_])
|
|
15849
15937
|
AuthorizationRoles_AuthorizationIDArray: AuthorizationRole_[]; // Link to AuthorizationRoles
|
|
15850
15938
|
|
|
15851
|
-
@Field(() => [ActionAuthorization_])
|
|
15852
|
-
ActionAuthorizations_AuthorizationIDArray: ActionAuthorization_[]; // Link to ActionAuthorizations
|
|
15853
|
-
|
|
15854
15939
|
@Field(() => [Authorization_])
|
|
15855
15940
|
Authorizations_ParentIDArray: Authorization_[]; // Link to Authorizations
|
|
15856
15941
|
|
|
15942
|
+
@Field(() => [AuditLogType_])
|
|
15943
|
+
AuditLogTypes_AuthorizationNameArray: AuditLogType_[]; // Link to AuditLogTypes
|
|
15944
|
+
|
|
15857
15945
|
@Field(() => [AuditLog_])
|
|
15858
15946
|
AuditLogs_AuthorizationNameArray: AuditLog_[]; // Link to AuditLogs
|
|
15859
15947
|
|
|
15860
|
-
@Field(() => [
|
|
15861
|
-
|
|
15948
|
+
@Field(() => [ActionAuthorization_])
|
|
15949
|
+
ActionAuthorizations_AuthorizationIDArray: ActionAuthorization_[]; // Link to ActionAuthorizations
|
|
15862
15950
|
|
|
15863
15951
|
}
|
|
15864
15952
|
|
|
@@ -15994,25 +16082,25 @@ export class AuthorizationResolver extends ResolverBase {
|
|
|
15994
16082
|
return result;
|
|
15995
16083
|
}
|
|
15996
16084
|
|
|
15997
|
-
@FieldResolver(() => [
|
|
15998
|
-
async
|
|
15999
|
-
this.CheckUserReadPermissions('
|
|
16085
|
+
@FieldResolver(() => [Authorization_])
|
|
16086
|
+
async Authorizations_ParentIDArray(@Root() authorization_: Authorization_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16087
|
+
this.CheckUserReadPermissions('Authorizations', userPayload);
|
|
16000
16088
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16001
16089
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16002
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
16090
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuthorizations] WHERE [ParentID]='${authorization_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Authorizations', userPayload, EntityPermissionType.Read, 'AND');
|
|
16003
16091
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16004
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
16092
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Authorizations', rows);
|
|
16005
16093
|
return result;
|
|
16006
16094
|
}
|
|
16007
16095
|
|
|
16008
|
-
@FieldResolver(() => [
|
|
16009
|
-
async
|
|
16010
|
-
this.CheckUserReadPermissions('
|
|
16096
|
+
@FieldResolver(() => [AuditLogType_])
|
|
16097
|
+
async AuditLogTypes_AuthorizationNameArray(@Root() authorization_: Authorization_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16098
|
+
this.CheckUserReadPermissions('Audit Log Types', userPayload);
|
|
16011
16099
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16012
16100
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16013
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
16101
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogTypes] WHERE [AuthorizationName]='${authorization_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Audit Log Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
16014
16102
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16015
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
16103
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Audit Log Types', rows);
|
|
16016
16104
|
return result;
|
|
16017
16105
|
}
|
|
16018
16106
|
|
|
@@ -16027,14 +16115,14 @@ export class AuthorizationResolver extends ResolverBase {
|
|
|
16027
16115
|
return result;
|
|
16028
16116
|
}
|
|
16029
16117
|
|
|
16030
|
-
@FieldResolver(() => [
|
|
16031
|
-
async
|
|
16032
|
-
this.CheckUserReadPermissions('
|
|
16118
|
+
@FieldResolver(() => [ActionAuthorization_])
|
|
16119
|
+
async ActionAuthorizations_AuthorizationIDArray(@Root() authorization_: Authorization_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16120
|
+
this.CheckUserReadPermissions('Action Authorizations', userPayload);
|
|
16033
16121
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16034
16122
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16035
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
16123
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActionAuthorizations] WHERE [AuthorizationID]='${authorization_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Action Authorizations', userPayload, EntityPermissionType.Read, 'AND');
|
|
16036
16124
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16037
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
16125
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Action Authorizations', rows);
|
|
16038
16126
|
return result;
|
|
16039
16127
|
}
|
|
16040
16128
|
|
|
@@ -16284,12 +16372,12 @@ export class AuditLogType_ {
|
|
|
16284
16372
|
@MaxLength(200)
|
|
16285
16373
|
Authorization?: string;
|
|
16286
16374
|
|
|
16287
|
-
@Field(() => [AuditLogType_])
|
|
16288
|
-
AuditLogTypes_ParentIDArray: AuditLogType_[]; // Link to AuditLogTypes
|
|
16289
|
-
|
|
16290
16375
|
@Field(() => [AuditLog_])
|
|
16291
16376
|
AuditLogs_AuditLogTypeNameArray: AuditLog_[]; // Link to AuditLogs
|
|
16292
16377
|
|
|
16378
|
+
@Field(() => [AuditLogType_])
|
|
16379
|
+
AuditLogTypes_ParentIDArray: AuditLogType_[]; // Link to AuditLogTypes
|
|
16380
|
+
|
|
16293
16381
|
}
|
|
16294
16382
|
|
|
16295
16383
|
//****************************************************************************
|
|
@@ -16407,25 +16495,25 @@ export class AuditLogTypeResolver extends ResolverBase {
|
|
|
16407
16495
|
return result;
|
|
16408
16496
|
}
|
|
16409
16497
|
|
|
16410
|
-
@FieldResolver(() => [
|
|
16411
|
-
async
|
|
16412
|
-
this.CheckUserReadPermissions('Audit
|
|
16498
|
+
@FieldResolver(() => [AuditLog_])
|
|
16499
|
+
async AuditLogs_AuditLogTypeNameArray(@Root() auditlogtype_: AuditLogType_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16500
|
+
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
16413
16501
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16414
16502
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16415
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
16503
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogs] WHERE [AuditLogTypeName]='${auditlogtype_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
16416
16504
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16417
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Audit
|
|
16505
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Audit Logs', rows);
|
|
16418
16506
|
return result;
|
|
16419
16507
|
}
|
|
16420
16508
|
|
|
16421
|
-
@FieldResolver(() => [
|
|
16422
|
-
async
|
|
16423
|
-
this.CheckUserReadPermissions('Audit
|
|
16509
|
+
@FieldResolver(() => [AuditLogType_])
|
|
16510
|
+
async AuditLogTypes_ParentIDArray(@Root() auditlogtype_: AuditLogType_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16511
|
+
this.CheckUserReadPermissions('Audit Log Types', userPayload);
|
|
16424
16512
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16425
16513
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16426
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
16514
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogTypes] WHERE [ParentID]='${auditlogtype_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Audit Log Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
16427
16515
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16428
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Audit
|
|
16516
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Audit Log Types', rows);
|
|
16429
16517
|
return result;
|
|
16430
16518
|
}
|
|
16431
16519
|
|
|
@@ -16733,42 +16821,45 @@ export class AIModel_ {
|
|
|
16733
16821
|
@Field(() => [AIAction_])
|
|
16734
16822
|
AIActions_DefaultModelIDArray: AIAction_[]; // Link to AIActions
|
|
16735
16823
|
|
|
16736
|
-
@Field(() => [EntityDocument_])
|
|
16737
|
-
EntityDocuments_AIModelIDArray: EntityDocument_[]; // Link to EntityDocuments
|
|
16738
|
-
|
|
16739
16824
|
@Field(() => [AIModelAction_])
|
|
16740
16825
|
AIModelActions_AIModelIDArray: AIModelAction_[]; // Link to AIModelActions
|
|
16741
16826
|
|
|
16742
16827
|
@Field(() => [VectorIndex_])
|
|
16743
16828
|
VectorIndexes_EmbeddingModelIDArray: VectorIndex_[]; // Link to VectorIndexes
|
|
16744
16829
|
|
|
16830
|
+
@Field(() => [EntityDocument_])
|
|
16831
|
+
EntityDocuments_AIModelIDArray: EntityDocument_[]; // Link to EntityDocuments
|
|
16832
|
+
|
|
16833
|
+
@Field(() => [EntityAIAction_])
|
|
16834
|
+
EntityAIActions_AIModelIDArray: EntityAIAction_[]; // Link to EntityAIActions
|
|
16835
|
+
|
|
16745
16836
|
@Field(() => [ContentType_])
|
|
16746
16837
|
ContentTypes_AIModelIDArray: ContentType_[]; // Link to ContentTypes
|
|
16747
16838
|
|
|
16748
16839
|
@Field(() => [AIResultCache_])
|
|
16749
16840
|
AIResultCache_AIModelIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
16750
16841
|
|
|
16751
|
-
@Field(() => [
|
|
16752
|
-
|
|
16842
|
+
@Field(() => [AIAgentModel_])
|
|
16843
|
+
AIAgentModels_ModelIDArray: AIAgentModel_[]; // Link to AIAgentModels
|
|
16753
16844
|
|
|
16754
16845
|
@Field(() => [AIModelVendor_])
|
|
16755
16846
|
MJ_AIModelVendors_ModelIDArray: AIModelVendor_[]; // Link to MJ_AIModelVendors
|
|
16756
16847
|
|
|
16757
|
-
@Field(() => [
|
|
16758
|
-
|
|
16848
|
+
@Field(() => [GeneratedCode_])
|
|
16849
|
+
GeneratedCodes_GeneratedByModelIDArray: GeneratedCode_[]; // Link to GeneratedCodes
|
|
16759
16850
|
|
|
16760
16851
|
@Field(() => [AIModelCost_])
|
|
16761
16852
|
MJ_AIModelCosts_ModelIDArray: AIModelCost_[]; // Link to MJ_AIModelCosts
|
|
16762
16853
|
|
|
16763
|
-
@Field(() => [GeneratedCode_])
|
|
16764
|
-
GeneratedCodes_GeneratedByModelIDArray: GeneratedCode_[]; // Link to GeneratedCodes
|
|
16765
|
-
|
|
16766
16854
|
@Field(() => [AIPromptModel_])
|
|
16767
16855
|
MJ_AIPromptModels_ModelIDArray: AIPromptModel_[]; // Link to MJ_AIPromptModels
|
|
16768
16856
|
|
|
16769
16857
|
@Field(() => [AIPromptRun_])
|
|
16770
16858
|
MJ_AIPromptRuns_ModelIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
16771
16859
|
|
|
16860
|
+
@Field(() => [AIAgentRun_])
|
|
16861
|
+
MJ_AIAgentRuns_OverrideModelIDArray: AIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
16862
|
+
|
|
16772
16863
|
}
|
|
16773
16864
|
|
|
16774
16865
|
//****************************************************************************
|
|
@@ -16921,17 +17012,6 @@ export class AIModelResolver extends ResolverBase {
|
|
|
16921
17012
|
return result;
|
|
16922
17013
|
}
|
|
16923
17014
|
|
|
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
17015
|
@FieldResolver(() => [AIModelAction_])
|
|
16936
17016
|
async AIModelActions_AIModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16937
17017
|
this.CheckUserReadPermissions('AI Model Actions', userPayload);
|
|
@@ -16954,6 +17034,28 @@ export class AIModelResolver extends ResolverBase {
|
|
|
16954
17034
|
return result;
|
|
16955
17035
|
}
|
|
16956
17036
|
|
|
17037
|
+
@FieldResolver(() => [EntityDocument_])
|
|
17038
|
+
async EntityDocuments_AIModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17039
|
+
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
17040
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17041
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
17042
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocuments] WHERE [AIModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
17043
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
17044
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Documents', rows);
|
|
17045
|
+
return result;
|
|
17046
|
+
}
|
|
17047
|
+
|
|
17048
|
+
@FieldResolver(() => [EntityAIAction_])
|
|
17049
|
+
async EntityAIActions_AIModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17050
|
+
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
17051
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17052
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
17053
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityAIActions] WHERE [AIModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
17054
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
17055
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity AI Actions', rows);
|
|
17056
|
+
return result;
|
|
17057
|
+
}
|
|
17058
|
+
|
|
16957
17059
|
@FieldResolver(() => [ContentType_])
|
|
16958
17060
|
async ContentTypes_AIModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16959
17061
|
this.CheckUserReadPermissions('Content Types', userPayload);
|
|
@@ -16976,14 +17078,14 @@ export class AIModelResolver extends ResolverBase {
|
|
|
16976
17078
|
return result;
|
|
16977
17079
|
}
|
|
16978
17080
|
|
|
16979
|
-
@FieldResolver(() => [
|
|
16980
|
-
async
|
|
16981
|
-
this.CheckUserReadPermissions('
|
|
17081
|
+
@FieldResolver(() => [AIAgentModel_])
|
|
17082
|
+
async AIAgentModels_ModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17083
|
+
this.CheckUserReadPermissions('AI Agent Models', userPayload);
|
|
16982
17084
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16983
17085
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16984
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
17086
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [ModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
16985
17087
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16986
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
17088
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Models', rows);
|
|
16987
17089
|
return result;
|
|
16988
17090
|
}
|
|
16989
17091
|
|
|
@@ -16998,14 +17100,14 @@ export class AIModelResolver extends ResolverBase {
|
|
|
16998
17100
|
return result;
|
|
16999
17101
|
}
|
|
17000
17102
|
|
|
17001
|
-
@FieldResolver(() => [
|
|
17002
|
-
async
|
|
17003
|
-
this.CheckUserReadPermissions('
|
|
17103
|
+
@FieldResolver(() => [GeneratedCode_])
|
|
17104
|
+
async GeneratedCodes_GeneratedByModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17105
|
+
this.CheckUserReadPermissions('Generated Codes', userPayload);
|
|
17004
17106
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17005
17107
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
17006
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
17108
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodes] WHERE [GeneratedByModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Generated Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
17007
17109
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
17008
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
17110
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Generated Codes', rows);
|
|
17009
17111
|
return result;
|
|
17010
17112
|
}
|
|
17011
17113
|
|
|
@@ -17020,17 +17122,6 @@ export class AIModelResolver extends ResolverBase {
|
|
|
17020
17122
|
return result;
|
|
17021
17123
|
}
|
|
17022
17124
|
|
|
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
17125
|
@FieldResolver(() => [AIPromptModel_])
|
|
17035
17126
|
async MJ_AIPromptModels_ModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17036
17127
|
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
@@ -17053,6 +17144,17 @@ export class AIModelResolver extends ResolverBase {
|
|
|
17053
17144
|
return result;
|
|
17054
17145
|
}
|
|
17055
17146
|
|
|
17147
|
+
@FieldResolver(() => [AIAgentRun_])
|
|
17148
|
+
async MJ_AIAgentRuns_OverrideModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17149
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
17150
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17151
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
17152
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [OverrideModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
17153
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
17154
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows);
|
|
17155
|
+
return result;
|
|
17156
|
+
}
|
|
17157
|
+
|
|
17056
17158
|
@Mutation(() => AIModel_)
|
|
17057
17159
|
async CreateAIModel(
|
|
17058
17160
|
@Arg('input', () => CreateAIModelInput) input: CreateAIModelInput,
|
|
@@ -23417,12 +23519,12 @@ export class Query_ {
|
|
|
23417
23519
|
@Field(() => [QueryField_])
|
|
23418
23520
|
QueryFields_QueryIDArray: QueryField_[]; // Link to QueryFields
|
|
23419
23521
|
|
|
23420
|
-
@Field(() => [DataContextItem_])
|
|
23421
|
-
DataContextItems_QueryIDArray: DataContextItem_[]; // Link to DataContextItems
|
|
23422
|
-
|
|
23423
23522
|
@Field(() => [QueryPermission_])
|
|
23424
23523
|
QueryPermissions_QueryIDArray: QueryPermission_[]; // Link to QueryPermissions
|
|
23425
23524
|
|
|
23525
|
+
@Field(() => [DataContextItem_])
|
|
23526
|
+
DataContextItems_QueryIDArray: DataContextItem_[]; // Link to DataContextItems
|
|
23527
|
+
|
|
23426
23528
|
@Field(() => [QueryParameter_])
|
|
23427
23529
|
MJ_QueryParameters_QueryIDArray: QueryParameter_[]; // Link to MJ_QueryParameters
|
|
23428
23530
|
|
|
@@ -23594,25 +23696,25 @@ export class QueryResolver extends ResolverBase {
|
|
|
23594
23696
|
return result;
|
|
23595
23697
|
}
|
|
23596
23698
|
|
|
23597
|
-
@FieldResolver(() => [
|
|
23598
|
-
async
|
|
23599
|
-
this.CheckUserReadPermissions('
|
|
23699
|
+
@FieldResolver(() => [QueryPermission_])
|
|
23700
|
+
async QueryPermissions_QueryIDArray(@Root() query_: Query_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23701
|
+
this.CheckUserReadPermissions('Query Permissions', userPayload);
|
|
23600
23702
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23601
23703
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
23602
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
23704
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryPermissions] WHERE [QueryID]='${query_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Query Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
23603
23705
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
23604
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
23706
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Query Permissions', rows);
|
|
23605
23707
|
return result;
|
|
23606
23708
|
}
|
|
23607
23709
|
|
|
23608
|
-
@FieldResolver(() => [
|
|
23609
|
-
async
|
|
23610
|
-
this.CheckUserReadPermissions('
|
|
23710
|
+
@FieldResolver(() => [DataContextItem_])
|
|
23711
|
+
async DataContextItems_QueryIDArray(@Root() query_: Query_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23712
|
+
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
23611
23713
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23612
23714
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
23613
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
23715
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContextItems] WHERE [QueryID]='${query_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
23614
23716
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
23615
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
23717
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Data Context Items', rows);
|
|
23616
23718
|
return result;
|
|
23617
23719
|
}
|
|
23618
23720
|
|
|
@@ -24377,12 +24479,12 @@ export class VectorDatabase_ {
|
|
|
24377
24479
|
@MaxLength(10)
|
|
24378
24480
|
_mj__UpdatedAt: Date;
|
|
24379
24481
|
|
|
24380
|
-
@Field(() => [EntityDocument_])
|
|
24381
|
-
EntityDocuments_IDArray: EntityDocument_[]; // Link to EntityDocuments
|
|
24382
|
-
|
|
24383
24482
|
@Field(() => [VectorIndex_])
|
|
24384
24483
|
VectorIndexes_VectorDatabaseIDArray: VectorIndex_[]; // Link to VectorIndexes
|
|
24385
24484
|
|
|
24485
|
+
@Field(() => [EntityDocument_])
|
|
24486
|
+
EntityDocuments_IDArray: EntityDocument_[]; // Link to EntityDocuments
|
|
24487
|
+
|
|
24386
24488
|
}
|
|
24387
24489
|
|
|
24388
24490
|
//****************************************************************************
|
|
@@ -24489,25 +24591,25 @@ export class VectorDatabaseResolver extends ResolverBase {
|
|
|
24489
24591
|
return result;
|
|
24490
24592
|
}
|
|
24491
24593
|
|
|
24492
|
-
@FieldResolver(() => [
|
|
24493
|
-
async
|
|
24494
|
-
this.CheckUserReadPermissions('
|
|
24594
|
+
@FieldResolver(() => [VectorIndex_])
|
|
24595
|
+
async VectorIndexes_VectorDatabaseIDArray(@Root() vectordatabase_: VectorDatabase_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24596
|
+
this.CheckUserReadPermissions('Vector Indexes', userPayload);
|
|
24495
24597
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24496
24598
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
24497
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
24599
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwVectorIndexes] WHERE [VectorDatabaseID]='${vectordatabase_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Vector Indexes', userPayload, EntityPermissionType.Read, 'AND');
|
|
24498
24600
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
24499
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
24601
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Vector Indexes', rows);
|
|
24500
24602
|
return result;
|
|
24501
24603
|
}
|
|
24502
24604
|
|
|
24503
|
-
@FieldResolver(() => [
|
|
24504
|
-
async
|
|
24505
|
-
this.CheckUserReadPermissions('
|
|
24605
|
+
@FieldResolver(() => [EntityDocument_])
|
|
24606
|
+
async EntityDocuments_IDArray(@Root() vectordatabase_: VectorDatabase_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24607
|
+
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
24506
24608
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24507
24609
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
24508
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
24610
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocuments] WHERE [ID]='${vectordatabase_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
24509
24611
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
24510
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
24612
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Documents', rows);
|
|
24511
24613
|
return result;
|
|
24512
24614
|
}
|
|
24513
24615
|
|
|
@@ -24829,12 +24931,12 @@ export class EntityDocument_ {
|
|
|
24829
24931
|
@MaxLength(100)
|
|
24830
24932
|
AIModel: string;
|
|
24831
24933
|
|
|
24832
|
-
@Field(() => [EntityDocumentSetting_])
|
|
24833
|
-
EntityDocumentSettings_EntityDocumentIDArray: EntityDocumentSetting_[]; // Link to EntityDocumentSettings
|
|
24834
|
-
|
|
24835
24934
|
@Field(() => [EntityDocumentRun_])
|
|
24836
24935
|
EntityDocumentRuns_EntityDocumentIDArray: EntityDocumentRun_[]; // Link to EntityDocumentRuns
|
|
24837
24936
|
|
|
24937
|
+
@Field(() => [EntityDocumentSetting_])
|
|
24938
|
+
EntityDocumentSettings_EntityDocumentIDArray: EntityDocumentSetting_[]; // Link to EntityDocumentSettings
|
|
24939
|
+
|
|
24838
24940
|
@Field(() => [EntityRecordDocument_])
|
|
24839
24941
|
EntityRecordDocuments_EntityDocumentIDArray: EntityRecordDocument_[]; // Link to EntityRecordDocuments
|
|
24840
24942
|
|
|
@@ -24974,25 +25076,25 @@ export class EntityDocumentResolver extends ResolverBase {
|
|
|
24974
25076
|
return result;
|
|
24975
25077
|
}
|
|
24976
25078
|
|
|
24977
|
-
@FieldResolver(() => [
|
|
24978
|
-
async
|
|
24979
|
-
this.CheckUserReadPermissions('Entity Document
|
|
25079
|
+
@FieldResolver(() => [EntityDocumentRun_])
|
|
25080
|
+
async EntityDocumentRuns_EntityDocumentIDArray(@Root() entitydocument_: EntityDocument_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25081
|
+
this.CheckUserReadPermissions('Entity Document Runs', userPayload);
|
|
24980
25082
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24981
25083
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
24982
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
25084
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocumentRuns] WHERE [EntityDocumentID]='${entitydocument_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Document Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
24983
25085
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
24984
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Entity Document
|
|
25086
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Document Runs', rows);
|
|
24985
25087
|
return result;
|
|
24986
25088
|
}
|
|
24987
25089
|
|
|
24988
|
-
@FieldResolver(() => [
|
|
24989
|
-
async
|
|
24990
|
-
this.CheckUserReadPermissions('Entity Document
|
|
25090
|
+
@FieldResolver(() => [EntityDocumentSetting_])
|
|
25091
|
+
async EntityDocumentSettings_EntityDocumentIDArray(@Root() entitydocument_: EntityDocument_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25092
|
+
this.CheckUserReadPermissions('Entity Document Settings', userPayload);
|
|
24991
25093
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24992
25094
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
24993
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
25095
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocumentSettings] WHERE [EntityDocumentID]='${entitydocument_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Document Settings', userPayload, EntityPermissionType.Read, 'AND');
|
|
24994
25096
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
24995
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Entity Document
|
|
25097
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Document Settings', rows);
|
|
24996
25098
|
return result;
|
|
24997
25099
|
}
|
|
24998
25100
|
|
|
@@ -25323,12 +25425,12 @@ export class DataContext_ {
|
|
|
25323
25425
|
@MaxLength(200)
|
|
25324
25426
|
User: string;
|
|
25325
25427
|
|
|
25326
|
-
@Field(() => [Report_])
|
|
25327
|
-
Reports_DataContextIDArray: Report_[]; // Link to Reports
|
|
25328
|
-
|
|
25329
25428
|
@Field(() => [DataContextItem_])
|
|
25330
25429
|
DataContextItems_DataContextIDArray: DataContextItem_[]; // Link to DataContextItems
|
|
25331
25430
|
|
|
25431
|
+
@Field(() => [Report_])
|
|
25432
|
+
Reports_DataContextIDArray: Report_[]; // Link to Reports
|
|
25433
|
+
|
|
25332
25434
|
@Field(() => [Conversation_])
|
|
25333
25435
|
Conversations_DataContextIDArray: Conversation_[]; // Link to Conversations
|
|
25334
25436
|
|
|
@@ -25438,25 +25540,25 @@ export class DataContextResolver extends ResolverBase {
|
|
|
25438
25540
|
return result;
|
|
25439
25541
|
}
|
|
25440
25542
|
|
|
25441
|
-
@FieldResolver(() => [
|
|
25442
|
-
async
|
|
25443
|
-
this.CheckUserReadPermissions('
|
|
25543
|
+
@FieldResolver(() => [DataContextItem_])
|
|
25544
|
+
async DataContextItems_DataContextIDArray(@Root() datacontext_: DataContext_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25545
|
+
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
25444
25546
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
25445
25547
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
25446
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
25548
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContextItems] WHERE [DataContextID]='${datacontext_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
25447
25549
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
25448
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
25550
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Data Context Items', rows);
|
|
25449
25551
|
return result;
|
|
25450
25552
|
}
|
|
25451
25553
|
|
|
25452
|
-
@FieldResolver(() => [
|
|
25453
|
-
async
|
|
25454
|
-
this.CheckUserReadPermissions('
|
|
25554
|
+
@FieldResolver(() => [Report_])
|
|
25555
|
+
async Reports_DataContextIDArray(@Root() datacontext_: DataContext_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25556
|
+
this.CheckUserReadPermissions('Reports', userPayload);
|
|
25455
25557
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
25456
25558
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
25457
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
25559
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReports] WHERE [DataContextID]='${datacontext_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
25458
25560
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
25459
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
25561
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Reports', rows);
|
|
25460
25562
|
return result;
|
|
25461
25563
|
}
|
|
25462
25564
|
|
|
@@ -25757,12 +25859,12 @@ export class DashboardCategory_ {
|
|
|
25757
25859
|
@MaxLength(200)
|
|
25758
25860
|
User: string;
|
|
25759
25861
|
|
|
25760
|
-
@Field(() => [DashboardCategory_])
|
|
25761
|
-
DashboardCategories_ParentIDArray: DashboardCategory_[]; // Link to DashboardCategories
|
|
25762
|
-
|
|
25763
25862
|
@Field(() => [Dashboard_])
|
|
25764
25863
|
Dashboards_CategoryIDArray: Dashboard_[]; // Link to Dashboards
|
|
25765
25864
|
|
|
25865
|
+
@Field(() => [DashboardCategory_])
|
|
25866
|
+
DashboardCategories_ParentIDArray: DashboardCategory_[]; // Link to DashboardCategories
|
|
25867
|
+
|
|
25766
25868
|
}
|
|
25767
25869
|
|
|
25768
25870
|
//****************************************************************************
|
|
@@ -25869,25 +25971,25 @@ export class DashboardCategoryResolver extends ResolverBase {
|
|
|
25869
25971
|
return result;
|
|
25870
25972
|
}
|
|
25871
25973
|
|
|
25872
|
-
@FieldResolver(() => [
|
|
25873
|
-
async
|
|
25874
|
-
this.CheckUserReadPermissions('
|
|
25974
|
+
@FieldResolver(() => [Dashboard_])
|
|
25975
|
+
async Dashboards_CategoryIDArray(@Root() dashboardcategory_: DashboardCategory_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25976
|
+
this.CheckUserReadPermissions('Dashboards', userPayload);
|
|
25875
25977
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
25876
25978
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
25877
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
25979
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboards] WHERE [CategoryID]='${dashboardcategory_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dashboards', userPayload, EntityPermissionType.Read, 'AND');
|
|
25878
25980
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
25879
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
25981
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Dashboards', rows);
|
|
25880
25982
|
return result;
|
|
25881
25983
|
}
|
|
25882
25984
|
|
|
25883
|
-
@FieldResolver(() => [
|
|
25884
|
-
async
|
|
25885
|
-
this.CheckUserReadPermissions('
|
|
25985
|
+
@FieldResolver(() => [DashboardCategory_])
|
|
25986
|
+
async DashboardCategories_ParentIDArray(@Root() dashboardcategory_: DashboardCategory_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25987
|
+
this.CheckUserReadPermissions('Dashboard Categories', userPayload);
|
|
25886
25988
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
25887
25989
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
25888
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
25990
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategories] WHERE [ParentID]='${dashboardcategory_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dashboard Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
25889
25991
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
25890
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
25992
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Dashboard Categories', rows);
|
|
25891
25993
|
return result;
|
|
25892
25994
|
}
|
|
25893
25995
|
|
|
@@ -29311,12 +29413,12 @@ export class Action_ {
|
|
|
29311
29413
|
@Field(() => [ActionLibrary_])
|
|
29312
29414
|
ActionLibraries_ActionIDArray: ActionLibrary_[]; // Link to ActionLibraries
|
|
29313
29415
|
|
|
29314
|
-
@Field(() => [ScheduledAction_])
|
|
29315
|
-
ScheduledActions_ActionIDArray: ScheduledAction_[]; // Link to ScheduledActions
|
|
29316
|
-
|
|
29317
29416
|
@Field(() => [ActionResultCode_])
|
|
29318
29417
|
ActionResultCodes_ActionIDArray: ActionResultCode_[]; // Link to ActionResultCodes
|
|
29319
29418
|
|
|
29419
|
+
@Field(() => [ScheduledAction_])
|
|
29420
|
+
ScheduledActions_ActionIDArray: ScheduledAction_[]; // Link to ScheduledActions
|
|
29421
|
+
|
|
29320
29422
|
@Field(() => [AIAgentAction_])
|
|
29321
29423
|
AIAgentActions_ActionIDArray: AIAgentAction_[]; // Link to AIAgentActions
|
|
29322
29424
|
|
|
@@ -29556,25 +29658,25 @@ export class ActionResolver extends ResolverBase {
|
|
|
29556
29658
|
return result;
|
|
29557
29659
|
}
|
|
29558
29660
|
|
|
29559
|
-
@FieldResolver(() => [
|
|
29560
|
-
async
|
|
29561
|
-
this.CheckUserReadPermissions('
|
|
29661
|
+
@FieldResolver(() => [ActionResultCode_])
|
|
29662
|
+
async ActionResultCodes_ActionIDArray(@Root() action_: Action_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29663
|
+
this.CheckUserReadPermissions('Action Result Codes', userPayload);
|
|
29562
29664
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29563
29665
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29564
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
29666
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActionResultCodes] WHERE [ActionID]='${action_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Action Result Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
29565
29667
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
29566
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
29668
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Action Result Codes', rows);
|
|
29567
29669
|
return result;
|
|
29568
29670
|
}
|
|
29569
29671
|
|
|
29570
|
-
@FieldResolver(() => [
|
|
29571
|
-
async
|
|
29572
|
-
this.CheckUserReadPermissions('
|
|
29672
|
+
@FieldResolver(() => [ScheduledAction_])
|
|
29673
|
+
async ScheduledActions_ActionIDArray(@Root() action_: Action_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29674
|
+
this.CheckUserReadPermissions('Scheduled Actions', userPayload);
|
|
29573
29675
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29574
29676
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29575
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
29677
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwScheduledActions] WHERE [ActionID]='${action_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Scheduled Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
29576
29678
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
29577
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
29679
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Scheduled Actions', rows);
|
|
29578
29680
|
return result;
|
|
29579
29681
|
}
|
|
29580
29682
|
|
|
@@ -31589,12 +31691,12 @@ export class CommunicationProvider_ {
|
|
|
31589
31691
|
@Field(() => Boolean, {description: `Whether or not the provider supports replying to messages`})
|
|
31590
31692
|
SupportsReplying: boolean;
|
|
31591
31693
|
|
|
31592
|
-
@Field(() => [CommunicationLog_])
|
|
31593
|
-
CommunicationLogs_CommunicationProviderIDArray: CommunicationLog_[]; // Link to CommunicationLogs
|
|
31594
|
-
|
|
31595
31694
|
@Field(() => [CommunicationProviderMessageType_])
|
|
31596
31695
|
CommunicationProviderMessageTypes_CommunicationProviderIDArray: CommunicationProviderMessageType_[]; // Link to CommunicationProviderMessageTypes
|
|
31597
31696
|
|
|
31697
|
+
@Field(() => [CommunicationLog_])
|
|
31698
|
+
CommunicationLogs_CommunicationProviderIDArray: CommunicationLog_[]; // Link to CommunicationLogs
|
|
31699
|
+
|
|
31598
31700
|
}
|
|
31599
31701
|
|
|
31600
31702
|
//****************************************************************************
|
|
@@ -31725,25 +31827,25 @@ export class CommunicationProviderResolver extends ResolverBase {
|
|
|
31725
31827
|
return result;
|
|
31726
31828
|
}
|
|
31727
31829
|
|
|
31728
|
-
@FieldResolver(() => [
|
|
31729
|
-
async
|
|
31730
|
-
this.CheckUserReadPermissions('Communication
|
|
31830
|
+
@FieldResolver(() => [CommunicationProviderMessageType_])
|
|
31831
|
+
async CommunicationProviderMessageTypes_CommunicationProviderIDArray(@Root() communicationprovider_: CommunicationProvider_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31832
|
+
this.CheckUserReadPermissions('Communication Provider Message Types', userPayload);
|
|
31731
31833
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31732
31834
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
31733
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
31835
|
+
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
31836
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
31735
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Communication
|
|
31837
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Communication Provider Message Types', rows);
|
|
31736
31838
|
return result;
|
|
31737
31839
|
}
|
|
31738
31840
|
|
|
31739
|
-
@FieldResolver(() => [
|
|
31740
|
-
async
|
|
31741
|
-
this.CheckUserReadPermissions('Communication
|
|
31841
|
+
@FieldResolver(() => [CommunicationLog_])
|
|
31842
|
+
async CommunicationLogs_CommunicationProviderIDArray(@Root() communicationprovider_: CommunicationProvider_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31843
|
+
this.CheckUserReadPermissions('Communication Logs', userPayload);
|
|
31742
31844
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31743
31845
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
31744
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
31846
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCommunicationLogs] WHERE [CommunicationProviderID]='${communicationprovider_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Communication Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
31745
31847
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
31746
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Communication
|
|
31848
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Communication Logs', rows);
|
|
31747
31849
|
return result;
|
|
31748
31850
|
}
|
|
31749
31851
|
|
|
@@ -32659,12 +32761,12 @@ export class Template_ {
|
|
|
32659
32761
|
@MaxLength(200)
|
|
32660
32762
|
User: string;
|
|
32661
32763
|
|
|
32662
|
-
@Field(() => [TemplateContent_])
|
|
32663
|
-
TemplateContents_TemplateIDArray: TemplateContent_[]; // Link to TemplateContents
|
|
32664
|
-
|
|
32665
32764
|
@Field(() => [TemplateParam_])
|
|
32666
32765
|
TemplateParams_TemplateIDArray: TemplateParam_[]; // Link to TemplateParams
|
|
32667
32766
|
|
|
32767
|
+
@Field(() => [TemplateContent_])
|
|
32768
|
+
TemplateContents_TemplateIDArray: TemplateContent_[]; // Link to TemplateContents
|
|
32769
|
+
|
|
32668
32770
|
@Field(() => [AIPrompt_])
|
|
32669
32771
|
AIPrompts_TemplateIDArray: AIPrompt_[]; // Link to AIPrompts
|
|
32670
32772
|
|
|
@@ -32801,25 +32903,25 @@ export class TemplateResolver extends ResolverBase {
|
|
|
32801
32903
|
return result;
|
|
32802
32904
|
}
|
|
32803
32905
|
|
|
32804
|
-
@FieldResolver(() => [
|
|
32805
|
-
async
|
|
32806
|
-
this.CheckUserReadPermissions('Template
|
|
32906
|
+
@FieldResolver(() => [TemplateParam_])
|
|
32907
|
+
async TemplateParams_TemplateIDArray(@Root() template_: Template_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32908
|
+
this.CheckUserReadPermissions('Template Params', userPayload);
|
|
32807
32909
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
32808
32910
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
32809
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
32911
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateParams] WHERE [TemplateID]='${template_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Template Params', userPayload, EntityPermissionType.Read, 'AND');
|
|
32810
32912
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
32811
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Template
|
|
32913
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Params', rows);
|
|
32812
32914
|
return result;
|
|
32813
32915
|
}
|
|
32814
32916
|
|
|
32815
|
-
@FieldResolver(() => [
|
|
32816
|
-
async
|
|
32817
|
-
this.CheckUserReadPermissions('Template
|
|
32917
|
+
@FieldResolver(() => [TemplateContent_])
|
|
32918
|
+
async TemplateContents_TemplateIDArray(@Root() template_: Template_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32919
|
+
this.CheckUserReadPermissions('Template Contents', userPayload);
|
|
32818
32920
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
32819
32921
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
32820
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
32922
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateContents] WHERE [TemplateID]='${template_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Template Contents', userPayload, EntityPermissionType.Read, 'AND');
|
|
32821
32923
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
32822
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Template
|
|
32924
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Contents', rows);
|
|
32823
32925
|
return result;
|
|
32824
32926
|
}
|
|
32825
32927
|
|
|
@@ -40955,6 +41057,68 @@ export class AIPromptRun_ {
|
|
|
40955
41057
|
@MaxLength(16)
|
|
40956
41058
|
RerunFromPromptRunID?: string;
|
|
40957
41059
|
|
|
41060
|
+
@Field({nullable: true, description: `JSON object containing detailed model selection information including all models considered, their scores, and the selection rationale`})
|
|
41061
|
+
ModelSelection?: string;
|
|
41062
|
+
|
|
41063
|
+
@Field({description: `Current execution status of the prompt run. Valid values: Pending, Running, Completed, Failed, Cancelled`})
|
|
41064
|
+
@MaxLength(100)
|
|
41065
|
+
Status: string;
|
|
41066
|
+
|
|
41067
|
+
@Field(() => Boolean, {description: `Indicates whether this prompt run was cancelled before completion`})
|
|
41068
|
+
Cancelled: boolean;
|
|
41069
|
+
|
|
41070
|
+
@Field({nullable: true, description: `Detailed reason for cancellation if the prompt run was cancelled. Could be user_requested, timeout, error, or resource_limit`})
|
|
41071
|
+
CancellationReason?: string;
|
|
41072
|
+
|
|
41073
|
+
@Field(() => Int, {nullable: true, description: `Power rank of the model that was selected for this run. Lower numbers indicate more powerful models`})
|
|
41074
|
+
ModelPowerRank?: number;
|
|
41075
|
+
|
|
41076
|
+
@Field({nullable: true, description: `Strategy used for model selection. Valid values: Default (system default), Specific (specific models configured), ByPower (based on power ranking)`})
|
|
41077
|
+
@MaxLength(100)
|
|
41078
|
+
SelectionStrategy?: string;
|
|
41079
|
+
|
|
41080
|
+
@Field(() => Boolean, {description: `Indicates whether this result was served from cache rather than executing a new model call`})
|
|
41081
|
+
CacheHit: boolean;
|
|
41082
|
+
|
|
41083
|
+
@Field({nullable: true, description: `Unique key used for caching this prompt result, typically a hash of the prompt and parameters`})
|
|
41084
|
+
@MaxLength(1000)
|
|
41085
|
+
CacheKey?: string;
|
|
41086
|
+
|
|
41087
|
+
@Field({nullable: true, description: `ID of the AIPrompt used as a judge to evaluate and rank multiple parallel execution results`})
|
|
41088
|
+
@MaxLength(16)
|
|
41089
|
+
JudgeID?: string;
|
|
41090
|
+
|
|
41091
|
+
@Field(() => Float, {nullable: true, description: `Score assigned by the judge prompt when evaluating multiple results. Higher scores indicate better results`})
|
|
41092
|
+
JudgeScore?: number;
|
|
41093
|
+
|
|
41094
|
+
@Field(() => Boolean, {description: `Indicates whether this result was selected as the best result when multiple models were run in parallel`})
|
|
41095
|
+
WasSelectedResult: boolean;
|
|
41096
|
+
|
|
41097
|
+
@Field(() => Boolean, {description: `Indicates whether streaming was enabled for this prompt execution`})
|
|
41098
|
+
StreamingEnabled: boolean;
|
|
41099
|
+
|
|
41100
|
+
@Field(() => Int, {nullable: true, description: `Time in milliseconds from request initiation to receiving the first token from the model`})
|
|
41101
|
+
FirstTokenTime?: number;
|
|
41102
|
+
|
|
41103
|
+
@Field({nullable: true, description: `Detailed error information in JSON format if the prompt execution failed, including stack traces and error codes`})
|
|
41104
|
+
ErrorDetails?: string;
|
|
41105
|
+
|
|
41106
|
+
@Field({nullable: true, description: `References the specific child prompt that was executed as part of hierarchical prompt composition. NULL for regular prompts or parent prompts that don't directly execute a child.`})
|
|
41107
|
+
@MaxLength(16)
|
|
41108
|
+
ChildPromptID?: string;
|
|
41109
|
+
|
|
41110
|
+
@Field(() => Int, {nullable: true, description: `Queue time in milliseconds before the model started processing the request. Provider-specific timing metric.`})
|
|
41111
|
+
QueueTime?: number;
|
|
41112
|
+
|
|
41113
|
+
@Field(() => Int, {nullable: true, description: `Time in milliseconds for the model to ingest and process the prompt. Provider-specific timing metric.`})
|
|
41114
|
+
PromptTime?: number;
|
|
41115
|
+
|
|
41116
|
+
@Field(() => Int, {nullable: true, description: `Time in milliseconds for the model to generate the completion/response tokens. Provider-specific timing metric.`})
|
|
41117
|
+
CompletionTime?: number;
|
|
41118
|
+
|
|
41119
|
+
@Field({nullable: true, description: `JSON field containing provider-specific response metadata and details not captured in standard fields. Structure varies by AI provider.`})
|
|
41120
|
+
ModelSpecificResponseDetails?: string;
|
|
41121
|
+
|
|
40958
41122
|
@Field()
|
|
40959
41123
|
@MaxLength(510)
|
|
40960
41124
|
Prompt: string;
|
|
@@ -40979,6 +41143,14 @@ export class AIPromptRun_ {
|
|
|
40979
41143
|
@MaxLength(100)
|
|
40980
41144
|
OriginalModel?: string;
|
|
40981
41145
|
|
|
41146
|
+
@Field({nullable: true})
|
|
41147
|
+
@MaxLength(510)
|
|
41148
|
+
Judge?: string;
|
|
41149
|
+
|
|
41150
|
+
@Field({nullable: true})
|
|
41151
|
+
@MaxLength(510)
|
|
41152
|
+
ChildPrompt?: string;
|
|
41153
|
+
|
|
40982
41154
|
@Field(() => [AIPromptRun_])
|
|
40983
41155
|
MJ_AIPromptRuns_ParentIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
40984
41156
|
|
|
@@ -41168,6 +41340,63 @@ export class CreateAIPromptRunInput {
|
|
|
41168
41340
|
|
|
41169
41341
|
@Field({ nullable: true })
|
|
41170
41342
|
RerunFromPromptRunID: string | null;
|
|
41343
|
+
|
|
41344
|
+
@Field({ nullable: true })
|
|
41345
|
+
ModelSelection: string | null;
|
|
41346
|
+
|
|
41347
|
+
@Field({ nullable: true })
|
|
41348
|
+
Status?: string;
|
|
41349
|
+
|
|
41350
|
+
@Field(() => Boolean, { nullable: true })
|
|
41351
|
+
Cancelled?: boolean;
|
|
41352
|
+
|
|
41353
|
+
@Field({ nullable: true })
|
|
41354
|
+
CancellationReason: string | null;
|
|
41355
|
+
|
|
41356
|
+
@Field(() => Int, { nullable: true })
|
|
41357
|
+
ModelPowerRank: number | null;
|
|
41358
|
+
|
|
41359
|
+
@Field({ nullable: true })
|
|
41360
|
+
SelectionStrategy: string | null;
|
|
41361
|
+
|
|
41362
|
+
@Field(() => Boolean, { nullable: true })
|
|
41363
|
+
CacheHit?: boolean;
|
|
41364
|
+
|
|
41365
|
+
@Field({ nullable: true })
|
|
41366
|
+
CacheKey: string | null;
|
|
41367
|
+
|
|
41368
|
+
@Field({ nullable: true })
|
|
41369
|
+
JudgeID: string | null;
|
|
41370
|
+
|
|
41371
|
+
@Field(() => Float, { nullable: true })
|
|
41372
|
+
JudgeScore: number | null;
|
|
41373
|
+
|
|
41374
|
+
@Field(() => Boolean, { nullable: true })
|
|
41375
|
+
WasSelectedResult?: boolean;
|
|
41376
|
+
|
|
41377
|
+
@Field(() => Boolean, { nullable: true })
|
|
41378
|
+
StreamingEnabled?: boolean;
|
|
41379
|
+
|
|
41380
|
+
@Field(() => Int, { nullable: true })
|
|
41381
|
+
FirstTokenTime: number | null;
|
|
41382
|
+
|
|
41383
|
+
@Field({ nullable: true })
|
|
41384
|
+
ErrorDetails: string | null;
|
|
41385
|
+
|
|
41386
|
+
@Field({ nullable: true })
|
|
41387
|
+
ChildPromptID: string | null;
|
|
41388
|
+
|
|
41389
|
+
@Field(() => Int, { nullable: true })
|
|
41390
|
+
QueueTime: number | null;
|
|
41391
|
+
|
|
41392
|
+
@Field(() => Int, { nullable: true })
|
|
41393
|
+
PromptTime: number | null;
|
|
41394
|
+
|
|
41395
|
+
@Field(() => Int, { nullable: true })
|
|
41396
|
+
CompletionTime: number | null;
|
|
41397
|
+
|
|
41398
|
+
@Field({ nullable: true })
|
|
41399
|
+
ModelSpecificResponseDetails: string | null;
|
|
41171
41400
|
}
|
|
41172
41401
|
|
|
41173
41402
|
|
|
@@ -41353,6 +41582,63 @@ export class UpdateAIPromptRunInput {
|
|
|
41353
41582
|
@Field({ nullable: true })
|
|
41354
41583
|
RerunFromPromptRunID?: string | null;
|
|
41355
41584
|
|
|
41585
|
+
@Field({ nullable: true })
|
|
41586
|
+
ModelSelection?: string | null;
|
|
41587
|
+
|
|
41588
|
+
@Field({ nullable: true })
|
|
41589
|
+
Status?: string;
|
|
41590
|
+
|
|
41591
|
+
@Field(() => Boolean, { nullable: true })
|
|
41592
|
+
Cancelled?: boolean;
|
|
41593
|
+
|
|
41594
|
+
@Field({ nullable: true })
|
|
41595
|
+
CancellationReason?: string | null;
|
|
41596
|
+
|
|
41597
|
+
@Field(() => Int, { nullable: true })
|
|
41598
|
+
ModelPowerRank?: number | null;
|
|
41599
|
+
|
|
41600
|
+
@Field({ nullable: true })
|
|
41601
|
+
SelectionStrategy?: string | null;
|
|
41602
|
+
|
|
41603
|
+
@Field(() => Boolean, { nullable: true })
|
|
41604
|
+
CacheHit?: boolean;
|
|
41605
|
+
|
|
41606
|
+
@Field({ nullable: true })
|
|
41607
|
+
CacheKey?: string | null;
|
|
41608
|
+
|
|
41609
|
+
@Field({ nullable: true })
|
|
41610
|
+
JudgeID?: string | null;
|
|
41611
|
+
|
|
41612
|
+
@Field(() => Float, { nullable: true })
|
|
41613
|
+
JudgeScore?: number | null;
|
|
41614
|
+
|
|
41615
|
+
@Field(() => Boolean, { nullable: true })
|
|
41616
|
+
WasSelectedResult?: boolean;
|
|
41617
|
+
|
|
41618
|
+
@Field(() => Boolean, { nullable: true })
|
|
41619
|
+
StreamingEnabled?: boolean;
|
|
41620
|
+
|
|
41621
|
+
@Field(() => Int, { nullable: true })
|
|
41622
|
+
FirstTokenTime?: number | null;
|
|
41623
|
+
|
|
41624
|
+
@Field({ nullable: true })
|
|
41625
|
+
ErrorDetails?: string | null;
|
|
41626
|
+
|
|
41627
|
+
@Field({ nullable: true })
|
|
41628
|
+
ChildPromptID?: string | null;
|
|
41629
|
+
|
|
41630
|
+
@Field(() => Int, { nullable: true })
|
|
41631
|
+
QueueTime?: number | null;
|
|
41632
|
+
|
|
41633
|
+
@Field(() => Int, { nullable: true })
|
|
41634
|
+
PromptTime?: number | null;
|
|
41635
|
+
|
|
41636
|
+
@Field(() => Int, { nullable: true })
|
|
41637
|
+
CompletionTime?: number | null;
|
|
41638
|
+
|
|
41639
|
+
@Field({ nullable: true })
|
|
41640
|
+
ModelSpecificResponseDetails?: string | null;
|
|
41641
|
+
|
|
41356
41642
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
41357
41643
|
OldValues___?: KeyValuePairInput[];
|
|
41358
41644
|
}
|