@memberjunction/server 5.51.0 → 6.1.0-edge.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/LICENSE +7 -0
- package/dist/agentSessions/SessionManager.d.ts +22 -1
- package/dist/agentSessions/SessionManager.d.ts.map +1 -1
- package/dist/agentSessions/SessionManager.js +13 -3
- package/dist/agentSessions/SessionManager.js.map +1 -1
- package/dist/auth/actingContextResolver.d.ts +44 -0
- package/dist/auth/actingContextResolver.d.ts.map +1 -0
- package/dist/auth/actingContextResolver.js +18 -0
- package/dist/auth/actingContextResolver.js.map +1 -0
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +1 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/sessionUserClone.d.ts +32 -0
- package/dist/auth/sessionUserClone.d.ts.map +1 -0
- package/dist/auth/sessionUserClone.js +50 -0
- package/dist/auth/sessionUserClone.js.map +1 -0
- package/dist/context.d.ts +1 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +43 -6
- package/dist/context.js.map +1 -1
- package/dist/generated/generated.d.ts +71 -0
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +383 -3
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/FireAndForgetHeartbeat.d.ts +5 -0
- package/dist/generic/FireAndForgetHeartbeat.d.ts.map +1 -1
- package/dist/generic/FireAndForgetHeartbeat.js +5 -4
- package/dist/generic/FireAndForgetHeartbeat.js.map +1 -1
- package/dist/generic/PushStatusResolver.d.ts +58 -0
- package/dist/generic/PushStatusResolver.d.ts.map +1 -1
- package/dist/generic/PushStatusResolver.js +42 -3
- package/dist/generic/PushStatusResolver.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts +9 -0
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +31 -13
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/multiTenancy/index.d.ts +19 -0
- package/dist/multiTenancy/index.d.ts.map +1 -1
- package/dist/multiTenancy/index.js +82 -5
- package/dist/multiTenancy/index.js.map +1 -1
- package/dist/resolvers/ActionResolver.d.ts.map +1 -1
- package/dist/resolvers/ActionResolver.js +12 -5
- package/dist/resolvers/ActionResolver.js.map +1 -1
- package/dist/resolvers/MCPResolver.d.ts.map +1 -1
- package/dist/resolvers/MCPResolver.js +13 -16
- package/dist/resolvers/MCPResolver.js.map +1 -1
- package/dist/resolvers/RealtimeClientSessionResolver.d.ts +1 -1
- package/dist/resolvers/RealtimeClientSessionResolver.d.ts.map +1 -1
- package/dist/resolvers/RealtimeClientSessionResolver.js +15 -14
- package/dist/resolvers/RealtimeClientSessionResolver.js.map +1 -1
- package/dist/resolvers/RemoteBrowserActionResolver.d.ts.map +1 -1
- package/dist/resolvers/RemoteBrowserActionResolver.js +19 -26
- package/dist/resolvers/RemoteBrowserActionResolver.js.map +1 -1
- package/dist/resolvers/ReportResolver.d.ts.map +1 -1
- package/dist/resolvers/ReportResolver.js +11 -3
- package/dist/resolvers/ReportResolver.js.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +30 -40
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/dist/resolvers/RunTestResolver.d.ts.map +1 -1
- package/dist/resolvers/RunTestResolver.js +90 -112
- package/dist/resolvers/RunTestResolver.js.map +1 -1
- package/dist/resolvers/SearchKnowledgeResolver.js +3 -3
- package/dist/resolvers/SearchKnowledgeResolver.js.map +1 -1
- package/dist/resolvers/SearchKnowledgeStreamResolver.js +2 -2
- package/dist/resolvers/SearchKnowledgeStreamResolver.js.map +1 -1
- package/dist/resolvers/VersionHistoryResolver.d.ts.map +1 -1
- package/dist/resolvers/VersionHistoryResolver.js +8 -12
- package/dist/resolvers/VersionHistoryResolver.js.map +1 -1
- package/dist/services/TaskOrchestrator.d.ts.map +1 -1
- package/dist/services/TaskOrchestrator.js +17 -15
- package/dist/services/TaskOrchestrator.js.map +1 -1
- package/package.json +100 -100
- package/src/__tests__/RealtimeBridgeResolver.test.ts +6 -0
- package/src/__tests__/SessionManager.test.ts +44 -0
- package/src/__tests__/multiTenancy.security.test.ts +254 -22
- package/src/__tests__/multiTenancy.test.ts +22 -0
- package/src/__tests__/pushStatusResolver.filter.test.ts +56 -0
- package/src/__tests__/resolverBase.rls.test.ts +4 -0
- package/src/__tests__/search-knowledge-tags.test.ts +74 -6
- package/src/__tests__/sessionUserClone.test.ts +161 -0
- package/src/agentSessions/SessionManager.ts +26 -2
- package/src/auth/actingContextResolver.ts +56 -0
- package/src/auth/index.ts +1 -0
- package/src/auth/sessionUserClone.ts +50 -0
- package/src/context.ts +48 -6
- package/src/generated/generated.ts +276 -3
- package/src/generic/FireAndForgetHeartbeat.ts +10 -4
- package/src/generic/PushStatusResolver.ts +79 -4
- package/src/generic/ResolverBase.ts +33 -13
- package/src/index.ts +4 -2
- package/src/multiTenancy/index.ts +92 -5
- package/src/resolvers/ActionResolver.ts +15 -7
- package/src/resolvers/MCPResolver.ts +13 -15
- package/src/resolvers/RealtimeClientSessionResolver.ts +15 -13
- package/src/resolvers/RemoteBrowserActionResolver.ts +19 -25
- package/src/resolvers/ReportResolver.ts +11 -3
- package/src/resolvers/RunAIAgentResolver.ts +30 -40
- package/src/resolvers/RunTestResolver.ts +90 -112
- package/src/resolvers/SearchKnowledgeResolver.ts +3 -3
- package/src/resolvers/SearchKnowledgeStreamResolver.ts +2 -2
- package/src/resolvers/VersionHistoryResolver.ts +10 -13
- package/src/resolvers/__tests__/ReportResolver.test.ts +279 -0
- package/src/services/TaskOrchestrator.ts +17 -17
|
@@ -1465,7 +1465,7 @@ __decorate([
|
|
|
1465
1465
|
__metadata("design:type", Date)
|
|
1466
1466
|
], MJActionExecutionLog_.prototype, "EndedAt", void 0);
|
|
1467
1467
|
__decorate([
|
|
1468
|
-
Field({ nullable: true, description: `JSON-formatted input parameters
|
|
1468
|
+
Field({ nullable: true, description: `JSON-formatted input parameters AS THE ACTION WAS CALLED, captured once when execution starts and never overwritten. Custom and Generated actions mutate their parameter array in place, so this is the only durable record of the values actually passed in; the final state lives in ResultParams. Parameter values may be redacted per ActionParam.LogValue / EntityActionParam.LogValue, and whole-record value types are never written - see the parameter's own documentation.` }),
|
|
1469
1469
|
__metadata("design:type", String)
|
|
1470
1470
|
], MJActionExecutionLog_.prototype, "Params", void 0);
|
|
1471
1471
|
__decorate([
|
|
@@ -1491,9 +1491,33 @@ __decorate([
|
|
|
1491
1491
|
__metadata("design:type", Date)
|
|
1492
1492
|
], MJActionExecutionLog_.prototype, "_mj__UpdatedAt", void 0);
|
|
1493
1493
|
__decorate([
|
|
1494
|
-
Field({ nullable: true, description: `
|
|
1494
|
+
Field({ nullable: true, description: `Human-readable summary message returned by the action - the reason for a refusal, or a short description of what was done. Not the action's output data: parameter values live in Params and ResultParams, and the outcome code in ResultCode.` }),
|
|
1495
1495
|
__metadata("design:type", String)
|
|
1496
1496
|
], MJActionExecutionLog_.prototype, "Message", void 0);
|
|
1497
|
+
__decorate([
|
|
1498
|
+
Field({ nullable: true, description: `Optional. The Entity Action binding that caused this run. NULL when the action was invoked directly - from a resolver, a script, an agent step or a scheduled action.` }),
|
|
1499
|
+
MaxLength(36),
|
|
1500
|
+
__metadata("design:type", String)
|
|
1501
|
+
], MJActionExecutionLog_.prototype, "EntityActionID", void 0);
|
|
1502
|
+
__decorate([
|
|
1503
|
+
Field({ nullable: true, description: `Optional. Which lifecycle event fired the binding - AfterUpdate, Validate, List and so on. Recorded separately from EntityActionID because one binding may be attached to several invocation types, and telling a Validate refusal apart from an AfterUpdate side effect is the first question anyone asks of this log.` }),
|
|
1504
|
+
MaxLength(36),
|
|
1505
|
+
__metadata("design:type", String)
|
|
1506
|
+
], MJActionExecutionLog_.prototype, "EntityActionInvocationTypeID", void 0);
|
|
1507
|
+
__decorate([
|
|
1508
|
+
Field({ nullable: true, description: `Optional. The entity of the record this run operated on. Deliberately denormalized rather than joined through EntityActionID: it survives the binding being deleted or retargeted, and it lets the log be queried by record with no join. Kept generic because every invoker has a subject - not only Entity Actions.` }),
|
|
1509
|
+
MaxLength(36),
|
|
1510
|
+
__metadata("design:type", String)
|
|
1511
|
+
], MJActionExecutionLog_.prototype, "TargetEntityID", void 0);
|
|
1512
|
+
__decorate([
|
|
1513
|
+
Field({ nullable: true, description: `Optional. The primary key of the record this run operated on, as text, paired with TargetEntityID. For multi-record invocation types (List, View) one log row is written per record, so this is always a single record.` }),
|
|
1514
|
+
MaxLength(450),
|
|
1515
|
+
__metadata("design:type", String)
|
|
1516
|
+
], MJActionExecutionLog_.prototype, "TargetRecordID", void 0);
|
|
1517
|
+
__decorate([
|
|
1518
|
+
Field({ nullable: true, description: `JSON-formatted FINAL parameter set captured when the action finished - the inputs as the action left them, plus any output parameters it produced. Written on FAILURE exactly as on success, under the same redaction rules: a failed run's partially-mutated inputs are usually the most diagnostic thing available, and an audit trail that records only successes is not an audit trail. Distinct from Params, which holds the values the action was called with and is never overwritten. NULL means one thing only - the run never finished (process died, host killed) - so it is a signal rather than an absence, and must not be backfilled.` }),
|
|
1519
|
+
__metadata("design:type", String)
|
|
1520
|
+
], MJActionExecutionLog_.prototype, "ResultParams", void 0);
|
|
1497
1521
|
__decorate([
|
|
1498
1522
|
Field(),
|
|
1499
1523
|
MaxLength(425),
|
|
@@ -1504,6 +1528,21 @@ __decorate([
|
|
|
1504
1528
|
MaxLength(100),
|
|
1505
1529
|
__metadata("design:type", String)
|
|
1506
1530
|
], MJActionExecutionLog_.prototype, "User", void 0);
|
|
1531
|
+
__decorate([
|
|
1532
|
+
Field({ nullable: true }),
|
|
1533
|
+
MaxLength(425),
|
|
1534
|
+
__metadata("design:type", String)
|
|
1535
|
+
], MJActionExecutionLog_.prototype, "EntityAction", void 0);
|
|
1536
|
+
__decorate([
|
|
1537
|
+
Field({ nullable: true }),
|
|
1538
|
+
MaxLength(255),
|
|
1539
|
+
__metadata("design:type", String)
|
|
1540
|
+
], MJActionExecutionLog_.prototype, "EntityActionInvocationType", void 0);
|
|
1541
|
+
__decorate([
|
|
1542
|
+
Field({ nullable: true }),
|
|
1543
|
+
MaxLength(255),
|
|
1544
|
+
__metadata("design:type", String)
|
|
1545
|
+
], MJActionExecutionLog_.prototype, "TargetEntity", void 0);
|
|
1507
1546
|
__decorate([
|
|
1508
1547
|
Field(() => [MJProcessRunDetail_]),
|
|
1509
1548
|
__metadata("design:type", Array)
|
|
@@ -1557,6 +1596,26 @@ __decorate([
|
|
|
1557
1596
|
Field({ nullable: true }),
|
|
1558
1597
|
__metadata("design:type", String)
|
|
1559
1598
|
], CreateMJActionExecutionLogInput.prototype, "Message", void 0);
|
|
1599
|
+
__decorate([
|
|
1600
|
+
Field({ nullable: true }),
|
|
1601
|
+
__metadata("design:type", String)
|
|
1602
|
+
], CreateMJActionExecutionLogInput.prototype, "EntityActionID", void 0);
|
|
1603
|
+
__decorate([
|
|
1604
|
+
Field({ nullable: true }),
|
|
1605
|
+
__metadata("design:type", String)
|
|
1606
|
+
], CreateMJActionExecutionLogInput.prototype, "EntityActionInvocationTypeID", void 0);
|
|
1607
|
+
__decorate([
|
|
1608
|
+
Field({ nullable: true }),
|
|
1609
|
+
__metadata("design:type", String)
|
|
1610
|
+
], CreateMJActionExecutionLogInput.prototype, "TargetEntityID", void 0);
|
|
1611
|
+
__decorate([
|
|
1612
|
+
Field({ nullable: true }),
|
|
1613
|
+
__metadata("design:type", String)
|
|
1614
|
+
], CreateMJActionExecutionLogInput.prototype, "TargetRecordID", void 0);
|
|
1615
|
+
__decorate([
|
|
1616
|
+
Field({ nullable: true }),
|
|
1617
|
+
__metadata("design:type", String)
|
|
1618
|
+
], CreateMJActionExecutionLogInput.prototype, "ResultParams", void 0);
|
|
1560
1619
|
__decorate([
|
|
1561
1620
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
1562
1621
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -1606,6 +1665,26 @@ __decorate([
|
|
|
1606
1665
|
Field({ nullable: true }),
|
|
1607
1666
|
__metadata("design:type", String)
|
|
1608
1667
|
], UpdateMJActionExecutionLogInput.prototype, "Message", void 0);
|
|
1668
|
+
__decorate([
|
|
1669
|
+
Field({ nullable: true }),
|
|
1670
|
+
__metadata("design:type", String)
|
|
1671
|
+
], UpdateMJActionExecutionLogInput.prototype, "EntityActionID", void 0);
|
|
1672
|
+
__decorate([
|
|
1673
|
+
Field({ nullable: true }),
|
|
1674
|
+
__metadata("design:type", String)
|
|
1675
|
+
], UpdateMJActionExecutionLogInput.prototype, "EntityActionInvocationTypeID", void 0);
|
|
1676
|
+
__decorate([
|
|
1677
|
+
Field({ nullable: true }),
|
|
1678
|
+
__metadata("design:type", String)
|
|
1679
|
+
], UpdateMJActionExecutionLogInput.prototype, "TargetEntityID", void 0);
|
|
1680
|
+
__decorate([
|
|
1681
|
+
Field({ nullable: true }),
|
|
1682
|
+
__metadata("design:type", String)
|
|
1683
|
+
], UpdateMJActionExecutionLogInput.prototype, "TargetRecordID", void 0);
|
|
1684
|
+
__decorate([
|
|
1685
|
+
Field({ nullable: true }),
|
|
1686
|
+
__metadata("design:type", String)
|
|
1687
|
+
], UpdateMJActionExecutionLogInput.prototype, "ResultParams", void 0);
|
|
1609
1688
|
__decorate([
|
|
1610
1689
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
1611
1690
|
__metadata("design:type", Array)
|
|
@@ -2371,6 +2450,10 @@ __decorate([
|
|
|
2371
2450
|
MaxLength(20),
|
|
2372
2451
|
__metadata("design:type", String)
|
|
2373
2452
|
], MJActionParam_.prototype, "MediaModality", void 0);
|
|
2453
|
+
__decorate([
|
|
2454
|
+
Field(() => Boolean, { description: `Whether this parameter's VALUE may be written to ActionExecutionLog.Params. Default 1. Set to 0 for parameters that carry records, credentials or personal data - for example the Data payload of Execute Agent. Independent of the hard rule that Entity Action params of ValueType 'Entity Object' or 'Entity Object Data' are never logged regardless of this flag. When logging is suppressed the log records the parameter name, its type and a redaction marker, never the value.` }),
|
|
2455
|
+
__metadata("design:type", Boolean)
|
|
2456
|
+
], MJActionParam_.prototype, "LogValue", void 0);
|
|
2374
2457
|
__decorate([
|
|
2375
2458
|
Field(),
|
|
2376
2459
|
MaxLength(425),
|
|
@@ -2433,6 +2516,10 @@ __decorate([
|
|
|
2433
2516
|
Field({ nullable: true }),
|
|
2434
2517
|
__metadata("design:type", String)
|
|
2435
2518
|
], CreateMJActionParamInput.prototype, "MediaModality", void 0);
|
|
2519
|
+
__decorate([
|
|
2520
|
+
Field(() => Boolean, { nullable: true }),
|
|
2521
|
+
__metadata("design:type", Boolean)
|
|
2522
|
+
], CreateMJActionParamInput.prototype, "LogValue", void 0);
|
|
2436
2523
|
__decorate([
|
|
2437
2524
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
2438
2525
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -2486,6 +2573,10 @@ __decorate([
|
|
|
2486
2573
|
Field({ nullable: true }),
|
|
2487
2574
|
__metadata("design:type", String)
|
|
2488
2575
|
], UpdateMJActionParamInput.prototype, "MediaModality", void 0);
|
|
2576
|
+
__decorate([
|
|
2577
|
+
Field(() => Boolean, { nullable: true }),
|
|
2578
|
+
__metadata("design:type", Boolean)
|
|
2579
|
+
], UpdateMJActionParamInput.prototype, "LogValue", void 0);
|
|
2489
2580
|
__decorate([
|
|
2490
2581
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
2491
2582
|
__metadata("design:type", Array)
|
|
@@ -32267,6 +32358,11 @@ __decorate([
|
|
|
32267
32358
|
Field(),
|
|
32268
32359
|
__metadata("design:type", Date)
|
|
32269
32360
|
], MJAPIApplicationScope_.prototype, "_mj__UpdatedAt", void 0);
|
|
32361
|
+
__decorate([
|
|
32362
|
+
Field({ nullable: true, description: `Optional row-level filter acting as a CEILING for every API key operating under this application — a restriction keys inherit and cannot widen. Composes with the per-key filter (APIKeyScope.RowFilterID) and with role-based RLS using AND, never OR, so no layer can broaden another. References the same RowLevelSecurityFilter catalog used by role-based RLS. NULL (the default) means the application imposes no row ceiling. The same authoring constraints as APIKeyScope.RowFilterID apply: exact single-entity resource pattern, all referenced columns must exist on that entity, and all referrers of the filter record must resolve to the same entity.` }),
|
|
32363
|
+
MaxLength(36),
|
|
32364
|
+
__metadata("design:type", String)
|
|
32365
|
+
], MJAPIApplicationScope_.prototype, "RowFilterID", void 0);
|
|
32270
32366
|
__decorate([
|
|
32271
32367
|
Field(),
|
|
32272
32368
|
MaxLength(100),
|
|
@@ -32277,6 +32373,11 @@ __decorate([
|
|
|
32277
32373
|
MaxLength(100),
|
|
32278
32374
|
__metadata("design:type", String)
|
|
32279
32375
|
], MJAPIApplicationScope_.prototype, "Scope", void 0);
|
|
32376
|
+
__decorate([
|
|
32377
|
+
Field({ nullable: true }),
|
|
32378
|
+
MaxLength(100),
|
|
32379
|
+
__metadata("design:type", String)
|
|
32380
|
+
], MJAPIApplicationScope_.prototype, "RowFilter", void 0);
|
|
32280
32381
|
MJAPIApplicationScope_ = __decorate([
|
|
32281
32382
|
ObjectType({ description: `Defines the scope ceiling for each application with pattern-based rules. Controls which scopes and resource patterns an application can use, regardless of what API keys grant.` })
|
|
32282
32383
|
], MJAPIApplicationScope_);
|
|
@@ -32314,6 +32415,10 @@ __decorate([
|
|
|
32314
32415
|
Field(() => Int, { nullable: true }),
|
|
32315
32416
|
__metadata("design:type", Number)
|
|
32316
32417
|
], CreateMJAPIApplicationScopeInput.prototype, "Priority", void 0);
|
|
32418
|
+
__decorate([
|
|
32419
|
+
Field({ nullable: true }),
|
|
32420
|
+
__metadata("design:type", String)
|
|
32421
|
+
], CreateMJAPIApplicationScopeInput.prototype, "RowFilterID", void 0);
|
|
32317
32422
|
__decorate([
|
|
32318
32423
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
32319
32424
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -32355,6 +32460,10 @@ __decorate([
|
|
|
32355
32460
|
Field(() => Int, { nullable: true }),
|
|
32356
32461
|
__metadata("design:type", Number)
|
|
32357
32462
|
], UpdateMJAPIApplicationScopeInput.prototype, "Priority", void 0);
|
|
32463
|
+
__decorate([
|
|
32464
|
+
Field({ nullable: true }),
|
|
32465
|
+
__metadata("design:type", String)
|
|
32466
|
+
], UpdateMJAPIApplicationScopeInput.prototype, "RowFilterID", void 0);
|
|
32358
32467
|
__decorate([
|
|
32359
32468
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
32360
32469
|
__metadata("design:type", Array)
|
|
@@ -33093,6 +33202,11 @@ __decorate([
|
|
|
33093
33202
|
Field(() => Int, { description: `Rule evaluation order. Higher priority rules are evaluated first. Within same priority, deny rules are evaluated before allow rules.` }),
|
|
33094
33203
|
__metadata("design:type", Number)
|
|
33095
33204
|
], MJAPIKeyScope_.prototype, "Priority", void 0);
|
|
33205
|
+
__decorate([
|
|
33206
|
+
Field({ nullable: true, description: `Optional row-level filter narrowing WHICH RECORDS this scope grant applies to, in addition to the resource pattern that governs which entities. References the same RowLevelSecurityFilter catalog used by role-based RLS, so the filter text flows through the standard {{Token}} substitution engine and every existing RLS enforcement point (RunView, Load by primary key, save, delete, search). NULL (the default) means no row restriction — behavior identical to before this column existed. When set, the rule's ResourcePattern must name a single exact entity (no wildcards, no comma-separated lists), every column the filter references must resolve to a real non-virtual field on that entity, and every other referrer of the same filter record must resolve to that same entity. Critically, this filter is evaluated INDEPENDENTLY of the role-RLS exemption: a user exempt from role RLS is still bound by their key's filter, because narrowing a principal below what their roles allow is the entire purpose of a key ceiling.` }),
|
|
33207
|
+
MaxLength(36),
|
|
33208
|
+
__metadata("design:type", String)
|
|
33209
|
+
], MJAPIKeyScope_.prototype, "RowFilterID", void 0);
|
|
33096
33210
|
__decorate([
|
|
33097
33211
|
Field(),
|
|
33098
33212
|
MaxLength(255),
|
|
@@ -33103,6 +33217,11 @@ __decorate([
|
|
|
33103
33217
|
MaxLength(100),
|
|
33104
33218
|
__metadata("design:type", String)
|
|
33105
33219
|
], MJAPIKeyScope_.prototype, "Scope", void 0);
|
|
33220
|
+
__decorate([
|
|
33221
|
+
Field({ nullable: true }),
|
|
33222
|
+
MaxLength(100),
|
|
33223
|
+
__metadata("design:type", String)
|
|
33224
|
+
], MJAPIKeyScope_.prototype, "RowFilter", void 0);
|
|
33106
33225
|
MJAPIKeyScope_ = __decorate([
|
|
33107
33226
|
ObjectType({ description: `Junction table linking API keys to their assigned permission scopes. Each key can have multiple scopes, and scopes can be shared across multiple keys.` })
|
|
33108
33227
|
], MJAPIKeyScope_);
|
|
@@ -33140,6 +33259,10 @@ __decorate([
|
|
|
33140
33259
|
Field(() => Int, { nullable: true }),
|
|
33141
33260
|
__metadata("design:type", Number)
|
|
33142
33261
|
], CreateMJAPIKeyScopeInput.prototype, "Priority", void 0);
|
|
33262
|
+
__decorate([
|
|
33263
|
+
Field({ nullable: true }),
|
|
33264
|
+
__metadata("design:type", String)
|
|
33265
|
+
], CreateMJAPIKeyScopeInput.prototype, "RowFilterID", void 0);
|
|
33143
33266
|
__decorate([
|
|
33144
33267
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
33145
33268
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -33181,6 +33304,10 @@ __decorate([
|
|
|
33181
33304
|
Field(() => Int, { nullable: true }),
|
|
33182
33305
|
__metadata("design:type", Number)
|
|
33183
33306
|
], UpdateMJAPIKeyScopeInput.prototype, "Priority", void 0);
|
|
33307
|
+
__decorate([
|
|
33308
|
+
Field({ nullable: true }),
|
|
33309
|
+
__metadata("design:type", String)
|
|
33310
|
+
], UpdateMJAPIKeyScopeInput.prototype, "RowFilterID", void 0);
|
|
33184
33311
|
__decorate([
|
|
33185
33312
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
33186
33313
|
__metadata("design:type", Array)
|
|
@@ -49954,6 +50081,11 @@ __decorate([
|
|
|
49954
50081
|
MaxLength(250),
|
|
49955
50082
|
__metadata("design:type", String)
|
|
49956
50083
|
], MJContentItemChunk_.prototype, "ContentItem", void 0);
|
|
50084
|
+
__decorate([
|
|
50085
|
+
Field({ nullable: true }),
|
|
50086
|
+
MaxLength(500),
|
|
50087
|
+
__metadata("design:type", String)
|
|
50088
|
+
], MJContentItemChunk_.prototype, "ParentChunk", void 0);
|
|
49957
50089
|
__decorate([
|
|
49958
50090
|
Field({ nullable: true }),
|
|
49959
50091
|
MaxLength(36),
|
|
@@ -67580,6 +67712,23 @@ __decorate([
|
|
|
67580
67712
|
MaxLength(255),
|
|
67581
67713
|
__metadata("design:type", String)
|
|
67582
67714
|
], MJEntity_.prototype, "ExternalObjectName", void 0);
|
|
67715
|
+
__decorate([
|
|
67716
|
+
Field({ nullable: true, description: `When set, CodeGen generates the entity's full base view under THIS name instead of BaseView, and the application owns BaseView — which is expected to wrap it (SELECT g.*, <extras> FROM <GeneratedBaseViewName> g). This gives an entity a custom base view WITHOUT inheriting the generated SQL: related-entity display joins, geo columns and recursive root-ID columns keep regenerating underneath, so a foreign key added later still appears. NULL (the default, and every pre-existing row) means the previous all-or-nothing behaviour: BaseViewGenerated alone decides whether CodeGen writes BaseView, and there is no second view. BaseView remains the public surface — entity field discovery, permissions and the generated CRUD procedures all target it. SQL SERVER ONLY: layering relies on sp_refreshview to re-resolve the application-owned outer view's SELECT * against a regenerated inner view. PostgreSQL freezes a view's column list at creation and has no refresh equivalent, so CodeGen rejects this column on PostgreSQL rather than let the outer view go silently stale.` }),
|
|
67717
|
+
MaxLength(255),
|
|
67718
|
+
__metadata("design:type", String)
|
|
67719
|
+
], MJEntity_.prototype, "GeneratedBaseViewName", void 0);
|
|
67720
|
+
__decorate([
|
|
67721
|
+
Field(() => Boolean, { description: `When 1, this entity may be populated by INSERT statements that do not go through BaseEntity.Save() — bulk loads, ETL/integration sync, or rows created as a side effect of a stored procedure. Default 0, meaning every insert is expected to flow through BaseEntity so that record-change tracking, entity actions, validation and cache invalidation all run. This column DECLARES intent for the code paths and tooling that consult it; it does not and cannot prevent anyone from executing SQL. Requires TrackRecordChanges = 0 and TrustServerCacheCompletely = 0, because a direct insert produces neither an audit row nor a cache-invalidation event.` }),
|
|
67722
|
+
__metadata("design:type", Boolean)
|
|
67723
|
+
], MJEntity_.prototype, "AllowDirectSQLInsert", void 0);
|
|
67724
|
+
__decorate([
|
|
67725
|
+
Field(() => Boolean, { description: `When 1, this entity may be modified by UPDATE statements that do not go through BaseEntity.Save() — bulk backfills, integration sync, or maintenance routines. Default 0, meaning every update is expected to flow through BaseEntity so that record-change tracking, entity actions, validation and cache invalidation all run. This column DECLARES intent for the code paths and tooling that consult it; it does not and cannot prevent anyone from executing SQL. Requires TrackRecordChanges = 0 and TrustServerCacheCompletely = 0, because a direct update produces neither an audit row nor a cache-invalidation event.` }),
|
|
67726
|
+
__metadata("design:type", Boolean)
|
|
67727
|
+
], MJEntity_.prototype, "AllowDirectSQLUpdate", void 0);
|
|
67728
|
+
__decorate([
|
|
67729
|
+
Field(() => Boolean, { description: `When 1, this entity may have rows removed by DELETE statements that do not go through BaseEntity.Delete() — purge and retention routines, or integration sync reconciling a remote source. Default 0, meaning every delete is expected to flow through BaseEntity so that record-change tracking, entity actions, cascade handling and cache invalidation all run. This column DECLARES intent for the code paths and tooling that consult it; it does not and cannot prevent anyone from executing SQL. Requires TrackRecordChanges = 0 and TrustServerCacheCompletely = 0, and additionally requires DeleteType = 'Hard' — a direct DELETE removes the row outright rather than setting DeletedAt, which would defeat soft delete.` }),
|
|
67730
|
+
__metadata("design:type", Boolean)
|
|
67731
|
+
], MJEntity_.prototype, "AllowDirectSQLDelete", void 0);
|
|
67583
67732
|
__decorate([
|
|
67584
67733
|
Field({ nullable: true, description: `Schema-based programmatic code name derived from the entity Name. Uses GetClassNameSchemaPrefix(SchemaName) as the prefix, then strips EntityNamePrefix from the Name and removes spaces. For "__mj" schema with entity "MJ: AI Models", this produces "MJAIModels". For entities in other schemas, the sanitized schema name is prepended. Used in GraphQL type generation and internal code references.` }),
|
|
67585
67734
|
__metadata("design:type", String)
|
|
@@ -67896,6 +68045,14 @@ __decorate([
|
|
|
67896
68045
|
Field(() => [MJScopedPromptConfig_]),
|
|
67897
68046
|
__metadata("design:type", Array)
|
|
67898
68047
|
], MJEntity_.prototype, "MJScopedPromptConfigs_PrimaryScopeEntityIDArray", void 0);
|
|
68048
|
+
__decorate([
|
|
68049
|
+
Field(() => [MJActionExecutionLog_]),
|
|
68050
|
+
__metadata("design:type", Array)
|
|
68051
|
+
], MJEntity_.prototype, "MJActionExecutionLogs_TargetEntityIDArray", void 0);
|
|
68052
|
+
__decorate([
|
|
68053
|
+
Field(() => [MJEntityAction_]),
|
|
68054
|
+
__metadata("design:type", Array)
|
|
68055
|
+
], MJEntity_.prototype, "MJEntityActions_ScopeEntityIDArray", void 0);
|
|
67899
68056
|
MJEntity_ = __decorate([
|
|
67900
68057
|
ObjectType({ description: `Catalog of all entities across all schemas` })
|
|
67901
68058
|
], MJEntity_);
|
|
@@ -68157,6 +68314,22 @@ __decorate([
|
|
|
68157
68314
|
Field({ nullable: true }),
|
|
68158
68315
|
__metadata("design:type", String)
|
|
68159
68316
|
], CreateMJEntityInput.prototype, "ExternalObjectName", void 0);
|
|
68317
|
+
__decorate([
|
|
68318
|
+
Field({ nullable: true }),
|
|
68319
|
+
__metadata("design:type", String)
|
|
68320
|
+
], CreateMJEntityInput.prototype, "GeneratedBaseViewName", void 0);
|
|
68321
|
+
__decorate([
|
|
68322
|
+
Field(() => Boolean, { nullable: true }),
|
|
68323
|
+
__metadata("design:type", Boolean)
|
|
68324
|
+
], CreateMJEntityInput.prototype, "AllowDirectSQLInsert", void 0);
|
|
68325
|
+
__decorate([
|
|
68326
|
+
Field(() => Boolean, { nullable: true }),
|
|
68327
|
+
__metadata("design:type", Boolean)
|
|
68328
|
+
], CreateMJEntityInput.prototype, "AllowDirectSQLUpdate", void 0);
|
|
68329
|
+
__decorate([
|
|
68330
|
+
Field(() => Boolean, { nullable: true }),
|
|
68331
|
+
__metadata("design:type", Boolean)
|
|
68332
|
+
], CreateMJEntityInput.prototype, "AllowDirectSQLDelete", void 0);
|
|
68160
68333
|
__decorate([
|
|
68161
68334
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
68162
68335
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -68422,6 +68595,22 @@ __decorate([
|
|
|
68422
68595
|
Field({ nullable: true }),
|
|
68423
68596
|
__metadata("design:type", String)
|
|
68424
68597
|
], UpdateMJEntityInput.prototype, "ExternalObjectName", void 0);
|
|
68598
|
+
__decorate([
|
|
68599
|
+
Field({ nullable: true }),
|
|
68600
|
+
__metadata("design:type", String)
|
|
68601
|
+
], UpdateMJEntityInput.prototype, "GeneratedBaseViewName", void 0);
|
|
68602
|
+
__decorate([
|
|
68603
|
+
Field(() => Boolean, { nullable: true }),
|
|
68604
|
+
__metadata("design:type", Boolean)
|
|
68605
|
+
], UpdateMJEntityInput.prototype, "AllowDirectSQLInsert", void 0);
|
|
68606
|
+
__decorate([
|
|
68607
|
+
Field(() => Boolean, { nullable: true }),
|
|
68608
|
+
__metadata("design:type", Boolean)
|
|
68609
|
+
], UpdateMJEntityInput.prototype, "AllowDirectSQLUpdate", void 0);
|
|
68610
|
+
__decorate([
|
|
68611
|
+
Field(() => Boolean, { nullable: true }),
|
|
68612
|
+
__metadata("design:type", Boolean)
|
|
68613
|
+
], UpdateMJEntityInput.prototype, "AllowDirectSQLDelete", void 0);
|
|
68425
68614
|
__decorate([
|
|
68426
68615
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
68427
68616
|
__metadata("design:type", Array)
|
|
@@ -69069,6 +69258,22 @@ let MJEntityResolverBase = class MJEntityResolverBase extends ResolverBase {
|
|
|
69069
69258
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows, this.GetUserFromPayload(userPayload));
|
|
69070
69259
|
return result;
|
|
69071
69260
|
}
|
|
69261
|
+
async MJActionExecutionLogs_TargetEntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
|
|
69262
|
+
this.CheckUserReadPermissions('MJ: Action Execution Logs', userPayload);
|
|
69263
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
69264
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwActionExecutionLogs')} WHERE ${provider.QuoteIdentifier('TargetEntityID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Action Execution Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
69265
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjentity_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
69266
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Action Execution Logs', rows, this.GetUserFromPayload(userPayload));
|
|
69267
|
+
return result;
|
|
69268
|
+
}
|
|
69269
|
+
async MJEntityActions_ScopeEntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
|
|
69270
|
+
this.CheckUserReadPermissions('MJ: Entity Actions', userPayload);
|
|
69271
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
69272
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityActions')} WHERE ${provider.QuoteIdentifier('ScopeEntityID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
69273
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjentity_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
69274
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Actions', rows, this.GetUserFromPayload(userPayload));
|
|
69275
|
+
return result;
|
|
69276
|
+
}
|
|
69072
69277
|
async CreateMJEntity(input, { providers, userPayload }, pubSub) {
|
|
69073
69278
|
const provider = GetReadWriteProvider(providers);
|
|
69074
69279
|
return this.CreateRecord('MJ: Entities', input, provider, userPayload, pubSub);
|
|
@@ -69766,6 +69971,24 @@ __decorate([
|
|
|
69766
69971
|
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
69767
69972
|
__metadata("design:returntype", Promise)
|
|
69768
69973
|
], MJEntityResolverBase.prototype, "MJScopedPromptConfigs_PrimaryScopeEntityIDArray", null);
|
|
69974
|
+
__decorate([
|
|
69975
|
+
FieldResolver(() => [MJActionExecutionLog_]),
|
|
69976
|
+
__param(0, Root()),
|
|
69977
|
+
__param(1, Ctx()),
|
|
69978
|
+
__param(2, PubSub()),
|
|
69979
|
+
__metadata("design:type", Function),
|
|
69980
|
+
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
69981
|
+
__metadata("design:returntype", Promise)
|
|
69982
|
+
], MJEntityResolverBase.prototype, "MJActionExecutionLogs_TargetEntityIDArray", null);
|
|
69983
|
+
__decorate([
|
|
69984
|
+
FieldResolver(() => [MJEntityAction_]),
|
|
69985
|
+
__param(0, Root()),
|
|
69986
|
+
__param(1, Ctx()),
|
|
69987
|
+
__param(2, PubSub()),
|
|
69988
|
+
__metadata("design:type", Function),
|
|
69989
|
+
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
69990
|
+
__metadata("design:returntype", Promise)
|
|
69991
|
+
], MJEntityResolverBase.prototype, "MJEntityActions_ScopeEntityIDArray", null);
|
|
69769
69992
|
__decorate([
|
|
69770
69993
|
Mutation(() => MJEntity_),
|
|
69771
69994
|
__param(0, Arg('input', () => CreateMJEntityInput)),
|
|
@@ -70094,6 +70317,10 @@ __decorate([
|
|
|
70094
70317
|
Field(() => [MJEntityActionInvocation_]),
|
|
70095
70318
|
__metadata("design:type", Array)
|
|
70096
70319
|
], MJEntityActionInvocationType_.prototype, "MJEntityActionInvocations_InvocationTypeIDArray", void 0);
|
|
70320
|
+
__decorate([
|
|
70321
|
+
Field(() => [MJActionExecutionLog_]),
|
|
70322
|
+
__metadata("design:type", Array)
|
|
70323
|
+
], MJEntityActionInvocationType_.prototype, "MJActionExecutionLogs_EntityActionInvocationTypeIDArray", void 0);
|
|
70097
70324
|
MJEntityActionInvocationType_ = __decorate([
|
|
70098
70325
|
ObjectType({ description: `Stores the possible invocation types of an action within the context of an entity. Examples would be: Record Created/Updated/Deleted/Accessed as well as things like “View” or “List” where you could run an EntityAction against an entire set of records in a view or list – either by user click or programmatically.` })
|
|
70099
70326
|
], MJEntityActionInvocationType_);
|
|
@@ -70227,6 +70454,14 @@ let MJEntityActionInvocationTypeResolver = class MJEntityActionInvocationTypeRes
|
|
|
70227
70454
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Action Invocations', rows, this.GetUserFromPayload(userPayload));
|
|
70228
70455
|
return result;
|
|
70229
70456
|
}
|
|
70457
|
+
async MJActionExecutionLogs_EntityActionInvocationTypeIDArray(mjentityactioninvocationtype_, { userPayload, providers }, pubSub) {
|
|
70458
|
+
this.CheckUserReadPermissions('MJ: Action Execution Logs', userPayload);
|
|
70459
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
70460
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwActionExecutionLogs')} WHERE ${provider.QuoteIdentifier('EntityActionInvocationTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Action Execution Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
70461
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjentityactioninvocationtype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
70462
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Action Execution Logs', rows, this.GetUserFromPayload(userPayload));
|
|
70463
|
+
return result;
|
|
70464
|
+
}
|
|
70230
70465
|
async CreateMJEntityActionInvocationType(input, { providers, userPayload }, pubSub) {
|
|
70231
70466
|
const provider = GetReadWriteProvider(providers);
|
|
70232
70467
|
return this.CreateRecord('MJ: Entity Action Invocation Types', input, provider, userPayload, pubSub);
|
|
@@ -70286,6 +70521,15 @@ __decorate([
|
|
|
70286
70521
|
__metadata("design:paramtypes", [MJEntityActionInvocationType_, Object, PubSubEngine]),
|
|
70287
70522
|
__metadata("design:returntype", Promise)
|
|
70288
70523
|
], MJEntityActionInvocationTypeResolver.prototype, "MJEntityActionInvocations_InvocationTypeIDArray", null);
|
|
70524
|
+
__decorate([
|
|
70525
|
+
FieldResolver(() => [MJActionExecutionLog_]),
|
|
70526
|
+
__param(0, Root()),
|
|
70527
|
+
__param(1, Ctx()),
|
|
70528
|
+
__param(2, PubSub()),
|
|
70529
|
+
__metadata("design:type", Function),
|
|
70530
|
+
__metadata("design:paramtypes", [MJEntityActionInvocationType_, Object, PubSubEngine]),
|
|
70531
|
+
__metadata("design:returntype", Promise)
|
|
70532
|
+
], MJEntityActionInvocationTypeResolver.prototype, "MJActionExecutionLogs_EntityActionInvocationTypeIDArray", null);
|
|
70289
70533
|
__decorate([
|
|
70290
70534
|
Mutation(() => MJEntityActionInvocationType_),
|
|
70291
70535
|
__param(0, Arg('input', () => CreateMJEntityActionInvocationTypeInput)),
|
|
@@ -70602,7 +70846,7 @@ __decorate([
|
|
|
70602
70846
|
__metadata("design:type", String)
|
|
70603
70847
|
], MJEntityActionParam_.prototype, "ActionParamID", void 0);
|
|
70604
70848
|
__decorate([
|
|
70605
|
-
Field({ description: `
|
|
70849
|
+
Field({ description: `How the parameter value is produced at invocation time. Static = the literal Value (parsed as JSON when it parses). Entity Object = the live BaseEntity instance, for actions that call entity methods. Entity Object Data = entity.GetAll(), a plain object - use this for any action that SERIALIZES the value, such as the Data payload of Execute Agent, because a BaseEntity serializes to {} (its fields are getters, not enumerable own properties). Entity Field = the named field's value. Script = evaluated expression with the entity in scope.` }),
|
|
70606
70850
|
MaxLength(20),
|
|
70607
70851
|
__metadata("design:type", String)
|
|
70608
70852
|
], MJEntityActionParam_.prototype, "ValueType", void 0);
|
|
@@ -70622,6 +70866,10 @@ __decorate([
|
|
|
70622
70866
|
Field(),
|
|
70623
70867
|
__metadata("design:type", Date)
|
|
70624
70868
|
], MJEntityActionParam_.prototype, "_mj__UpdatedAt", void 0);
|
|
70869
|
+
__decorate([
|
|
70870
|
+
Field(() => Boolean, { nullable: true, description: `Optional per-binding override of ActionParam.LogValue. NULL (the default) inherits the parameter definition. Set to 0 when this particular binding passes something sensitive through a parameter that is ordinarily safe to log - a message body through a generic Text parameter, for instance. Cannot re-enable logging for a value type the hard rule suppresses.` }),
|
|
70871
|
+
__metadata("design:type", Boolean)
|
|
70872
|
+
], MJEntityActionParam_.prototype, "LogValue", void 0);
|
|
70625
70873
|
__decorate([
|
|
70626
70874
|
Field(),
|
|
70627
70875
|
MaxLength(425),
|
|
@@ -70665,6 +70913,10 @@ __decorate([
|
|
|
70665
70913
|
Field({ nullable: true }),
|
|
70666
70914
|
__metadata("design:type", String)
|
|
70667
70915
|
], CreateMJEntityActionParamInput.prototype, "Comments", void 0);
|
|
70916
|
+
__decorate([
|
|
70917
|
+
Field(() => Boolean, { nullable: true }),
|
|
70918
|
+
__metadata("design:type", Boolean)
|
|
70919
|
+
], CreateMJEntityActionParamInput.prototype, "LogValue", void 0);
|
|
70668
70920
|
__decorate([
|
|
70669
70921
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
70670
70922
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -70702,6 +70954,10 @@ __decorate([
|
|
|
70702
70954
|
Field({ nullable: true }),
|
|
70703
70955
|
__metadata("design:type", String)
|
|
70704
70956
|
], UpdateMJEntityActionParamInput.prototype, "Comments", void 0);
|
|
70957
|
+
__decorate([
|
|
70958
|
+
Field(() => Boolean, { nullable: true }),
|
|
70959
|
+
__metadata("design:type", Boolean)
|
|
70960
|
+
], UpdateMJEntityActionParamInput.prototype, "LogValue", void 0);
|
|
70705
70961
|
__decorate([
|
|
70706
70962
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
70707
70963
|
__metadata("design:type", Array)
|
|
@@ -70888,6 +71144,25 @@ __decorate([
|
|
|
70888
71144
|
MaxLength(36),
|
|
70889
71145
|
__metadata("design:type", String)
|
|
70890
71146
|
], MJEntityAction_.prototype, "ID", void 0);
|
|
71147
|
+
__decorate([
|
|
71148
|
+
Field(() => Int, { description: `Execution order when multiple Entity Actions are bound to the same entity and invocation type. Lower runs first; ties fall back to creation order. Defaults to 0 so existing rows are unaffected.` }),
|
|
71149
|
+
__metadata("design:type", Number)
|
|
71150
|
+
], MJEntityAction_.prototype, "Sequence", void 0);
|
|
71151
|
+
__decorate([
|
|
71152
|
+
Field({ nullable: true, description: `Optional. Together with ScopeRecordID, narrows this Entity Action to records related to ONE specific record - for example a single Deal Type, Contract Type, Pipeline or Company - rather than every record of EntityID. NULL (the default) means the action applies to all records, which is the pre-existing behaviour. How a scope record relates to the subject record is resolved by the app that owns the scope entity; the framework only stores and filters on the pair.` }),
|
|
71153
|
+
MaxLength(36),
|
|
71154
|
+
__metadata("design:type", String)
|
|
71155
|
+
], MJEntityAction_.prototype, "ScopeEntityID", void 0);
|
|
71156
|
+
__decorate([
|
|
71157
|
+
Field({ nullable: true, description: `Optional. The primary key of the scope record, as text, paired with ScopeEntityID. Both columns are NULL or both are set (CK_EntityAction_Scope). Lets a configuration record such as a Deal Type surface "the workflows bound to me" as a real relationship rather than something buried in filter code.` }),
|
|
71158
|
+
MaxLength(450),
|
|
71159
|
+
__metadata("design:type", String)
|
|
71160
|
+
], MJEntityAction_.prototype, "ScopeRecordID", void 0);
|
|
71161
|
+
__decorate([
|
|
71162
|
+
Field({ description: `How much of this binding's activity reaches ActionExecutionLog. All (default) writes a row per invocation. FailuresOnly writes only runs that did not succeed - the right setting for a high-frequency binding on a busy entity, where the successful runs are noise. None disables logging for the binding entirely and should be rare, because it also removes the failure record.` }),
|
|
71163
|
+
MaxLength(20),
|
|
71164
|
+
__metadata("design:type", String)
|
|
71165
|
+
], MJEntityAction_.prototype, "LoggingMode", void 0);
|
|
70891
71166
|
__decorate([
|
|
70892
71167
|
Field(),
|
|
70893
71168
|
MaxLength(255),
|
|
@@ -70898,6 +71173,11 @@ __decorate([
|
|
|
70898
71173
|
MaxLength(425),
|
|
70899
71174
|
__metadata("design:type", String)
|
|
70900
71175
|
], MJEntityAction_.prototype, "Action", void 0);
|
|
71176
|
+
__decorate([
|
|
71177
|
+
Field({ nullable: true }),
|
|
71178
|
+
MaxLength(255),
|
|
71179
|
+
__metadata("design:type", String)
|
|
71180
|
+
], MJEntityAction_.prototype, "ScopeEntity", void 0);
|
|
70901
71181
|
__decorate([
|
|
70902
71182
|
Field(() => [MJEntityActionFilter_]),
|
|
70903
71183
|
__metadata("design:type", Array)
|
|
@@ -70910,6 +71190,10 @@ __decorate([
|
|
|
70910
71190
|
Field(() => [MJEntityActionParam_]),
|
|
70911
71191
|
__metadata("design:type", Array)
|
|
70912
71192
|
], MJEntityAction_.prototype, "MJEntityActionParams_EntityActionIDArray", void 0);
|
|
71193
|
+
__decorate([
|
|
71194
|
+
Field(() => [MJActionExecutionLog_]),
|
|
71195
|
+
__metadata("design:type", Array)
|
|
71196
|
+
], MJEntityAction_.prototype, "MJActionExecutionLogs_EntityActionIDArray", void 0);
|
|
70913
71197
|
MJEntityAction_ = __decorate([
|
|
70914
71198
|
ObjectType({ description: `Links entities to actions - this is the main place where you define the actions that part of, or available, for a given entity.` })
|
|
70915
71199
|
], MJEntityAction_);
|
|
@@ -70935,6 +71219,22 @@ __decorate([
|
|
|
70935
71219
|
Field({ nullable: true }),
|
|
70936
71220
|
__metadata("design:type", String)
|
|
70937
71221
|
], CreateMJEntityActionInput.prototype, "ID", void 0);
|
|
71222
|
+
__decorate([
|
|
71223
|
+
Field(() => Int, { nullable: true }),
|
|
71224
|
+
__metadata("design:type", Number)
|
|
71225
|
+
], CreateMJEntityActionInput.prototype, "Sequence", void 0);
|
|
71226
|
+
__decorate([
|
|
71227
|
+
Field({ nullable: true }),
|
|
71228
|
+
__metadata("design:type", String)
|
|
71229
|
+
], CreateMJEntityActionInput.prototype, "ScopeEntityID", void 0);
|
|
71230
|
+
__decorate([
|
|
71231
|
+
Field({ nullable: true }),
|
|
71232
|
+
__metadata("design:type", String)
|
|
71233
|
+
], CreateMJEntityActionInput.prototype, "ScopeRecordID", void 0);
|
|
71234
|
+
__decorate([
|
|
71235
|
+
Field({ nullable: true }),
|
|
71236
|
+
__metadata("design:type", String)
|
|
71237
|
+
], CreateMJEntityActionInput.prototype, "LoggingMode", void 0);
|
|
70938
71238
|
__decorate([
|
|
70939
71239
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
70940
71240
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -70964,6 +71264,22 @@ __decorate([
|
|
|
70964
71264
|
Field(),
|
|
70965
71265
|
__metadata("design:type", String)
|
|
70966
71266
|
], UpdateMJEntityActionInput.prototype, "ID", void 0);
|
|
71267
|
+
__decorate([
|
|
71268
|
+
Field(() => Int, { nullable: true }),
|
|
71269
|
+
__metadata("design:type", Number)
|
|
71270
|
+
], UpdateMJEntityActionInput.prototype, "Sequence", void 0);
|
|
71271
|
+
__decorate([
|
|
71272
|
+
Field({ nullable: true }),
|
|
71273
|
+
__metadata("design:type", String)
|
|
71274
|
+
], UpdateMJEntityActionInput.prototype, "ScopeEntityID", void 0);
|
|
71275
|
+
__decorate([
|
|
71276
|
+
Field({ nullable: true }),
|
|
71277
|
+
__metadata("design:type", String)
|
|
71278
|
+
], UpdateMJEntityActionInput.prototype, "ScopeRecordID", void 0);
|
|
71279
|
+
__decorate([
|
|
71280
|
+
Field({ nullable: true }),
|
|
71281
|
+
__metadata("design:type", String)
|
|
71282
|
+
], UpdateMJEntityActionInput.prototype, "LoggingMode", void 0);
|
|
70967
71283
|
__decorate([
|
|
70968
71284
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
70969
71285
|
__metadata("design:type", Array)
|
|
@@ -71059,6 +71375,14 @@ let MJEntityActionResolver = class MJEntityActionResolver extends ResolverBase {
|
|
|
71059
71375
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Action Params', rows, this.GetUserFromPayload(userPayload));
|
|
71060
71376
|
return result;
|
|
71061
71377
|
}
|
|
71378
|
+
async MJActionExecutionLogs_EntityActionIDArray(mjentityaction_, { userPayload, providers }, pubSub) {
|
|
71379
|
+
this.CheckUserReadPermissions('MJ: Action Execution Logs', userPayload);
|
|
71380
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
71381
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwActionExecutionLogs')} WHERE ${provider.QuoteIdentifier('EntityActionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Action Execution Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
71382
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjentityaction_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
71383
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Action Execution Logs', rows, this.GetUserFromPayload(userPayload));
|
|
71384
|
+
return result;
|
|
71385
|
+
}
|
|
71062
71386
|
async CreateMJEntityAction(input, { providers, userPayload }, pubSub) {
|
|
71063
71387
|
const provider = GetReadWriteProvider(providers);
|
|
71064
71388
|
return this.CreateRecord('MJ: Entity Actions', input, provider, userPayload, pubSub);
|
|
@@ -71136,6 +71460,15 @@ __decorate([
|
|
|
71136
71460
|
__metadata("design:paramtypes", [MJEntityAction_, Object, PubSubEngine]),
|
|
71137
71461
|
__metadata("design:returntype", Promise)
|
|
71138
71462
|
], MJEntityActionResolver.prototype, "MJEntityActionParams_EntityActionIDArray", null);
|
|
71463
|
+
__decorate([
|
|
71464
|
+
FieldResolver(() => [MJActionExecutionLog_]),
|
|
71465
|
+
__param(0, Root()),
|
|
71466
|
+
__param(1, Ctx()),
|
|
71467
|
+
__param(2, PubSub()),
|
|
71468
|
+
__metadata("design:type", Function),
|
|
71469
|
+
__metadata("design:paramtypes", [MJEntityAction_, Object, PubSubEngine]),
|
|
71470
|
+
__metadata("design:returntype", Promise)
|
|
71471
|
+
], MJEntityActionResolver.prototype, "MJActionExecutionLogs_EntityActionIDArray", null);
|
|
71139
71472
|
__decorate([
|
|
71140
71473
|
Mutation(() => MJEntityAction_),
|
|
71141
71474
|
__param(0, Arg('input', () => CreateMJEntityActionInput)),
|
|
@@ -112571,6 +112904,14 @@ __decorate([
|
|
|
112571
112904
|
Field(() => [MJEntityPermission_]),
|
|
112572
112905
|
__metadata("design:type", Array)
|
|
112573
112906
|
], MJRowLevelSecurityFilter_.prototype, "MJEntityPermissions_UpdateRLSFilterIDArray", void 0);
|
|
112907
|
+
__decorate([
|
|
112908
|
+
Field(() => [MJAPIKeyScope_]),
|
|
112909
|
+
__metadata("design:type", Array)
|
|
112910
|
+
], MJRowLevelSecurityFilter_.prototype, "MJAPIKeyScopes_RowFilterIDArray", void 0);
|
|
112911
|
+
__decorate([
|
|
112912
|
+
Field(() => [MJAPIApplicationScope_]),
|
|
112913
|
+
__metadata("design:type", Array)
|
|
112914
|
+
], MJRowLevelSecurityFilter_.prototype, "MJAPIApplicationScopes_RowFilterIDArray", void 0);
|
|
112574
112915
|
MJRowLevelSecurityFilter_ = __decorate([
|
|
112575
112916
|
ObjectType({ description: `Defines data access rules that filter records based on user context, implementing fine-grained security at the row level.` })
|
|
112576
112917
|
], MJRowLevelSecurityFilter_);
|
|
@@ -112736,6 +113077,22 @@ let MJRowLevelSecurityFilterResolver = class MJRowLevelSecurityFilterResolver ex
|
|
|
112736
113077
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
112737
113078
|
return result;
|
|
112738
113079
|
}
|
|
113080
|
+
async MJAPIKeyScopes_RowFilterIDArray(mjrowlevelsecurityfilter_, { userPayload, providers }, pubSub) {
|
|
113081
|
+
this.CheckUserReadPermissions('MJ: API Key Scopes', userPayload);
|
|
113082
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
113083
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeyScopes')} WHERE ${provider.QuoteIdentifier('RowFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Key Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
113084
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
113085
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Key Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
113086
|
+
return result;
|
|
113087
|
+
}
|
|
113088
|
+
async MJAPIApplicationScopes_RowFilterIDArray(mjrowlevelsecurityfilter_, { userPayload, providers }, pubSub) {
|
|
113089
|
+
this.CheckUserReadPermissions('MJ: API Application Scopes', userPayload);
|
|
113090
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
113091
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIApplicationScopes')} WHERE ${provider.QuoteIdentifier('RowFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Application Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
113092
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
113093
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Application Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
113094
|
+
return result;
|
|
113095
|
+
}
|
|
112739
113096
|
async CreateMJRowLevelSecurityFilter(input, { providers, userPayload }, pubSub) {
|
|
112740
113097
|
const provider = GetReadWriteProvider(providers);
|
|
112741
113098
|
return this.CreateRecord('MJ: Row Level Security Filters', input, provider, userPayload, pubSub);
|
|
@@ -112830,6 +113187,24 @@ __decorate([
|
|
|
112830
113187
|
__metadata("design:paramtypes", [MJRowLevelSecurityFilter_, Object, PubSubEngine]),
|
|
112831
113188
|
__metadata("design:returntype", Promise)
|
|
112832
113189
|
], MJRowLevelSecurityFilterResolver.prototype, "MJEntityPermissions_UpdateRLSFilterIDArray", null);
|
|
113190
|
+
__decorate([
|
|
113191
|
+
FieldResolver(() => [MJAPIKeyScope_]),
|
|
113192
|
+
__param(0, Root()),
|
|
113193
|
+
__param(1, Ctx()),
|
|
113194
|
+
__param(2, PubSub()),
|
|
113195
|
+
__metadata("design:type", Function),
|
|
113196
|
+
__metadata("design:paramtypes", [MJRowLevelSecurityFilter_, Object, PubSubEngine]),
|
|
113197
|
+
__metadata("design:returntype", Promise)
|
|
113198
|
+
], MJRowLevelSecurityFilterResolver.prototype, "MJAPIKeyScopes_RowFilterIDArray", null);
|
|
113199
|
+
__decorate([
|
|
113200
|
+
FieldResolver(() => [MJAPIApplicationScope_]),
|
|
113201
|
+
__param(0, Root()),
|
|
113202
|
+
__param(1, Ctx()),
|
|
113203
|
+
__param(2, PubSub()),
|
|
113204
|
+
__metadata("design:type", Function),
|
|
113205
|
+
__metadata("design:paramtypes", [MJRowLevelSecurityFilter_, Object, PubSubEngine]),
|
|
113206
|
+
__metadata("design:returntype", Promise)
|
|
113207
|
+
], MJRowLevelSecurityFilterResolver.prototype, "MJAPIApplicationScopes_RowFilterIDArray", null);
|
|
112833
113208
|
__decorate([
|
|
112834
113209
|
Mutation(() => MJRowLevelSecurityFilter_),
|
|
112835
113210
|
__param(0, Arg('input', () => CreateMJRowLevelSecurityFilterInput)),
|
|
@@ -135366,6 +135741,11 @@ __decorate([
|
|
|
135366
135741
|
Field(),
|
|
135367
135742
|
__metadata("design:type", Date)
|
|
135368
135743
|
], MJUserViewRunDetail_.prototype, "_mj__UpdatedAt", void 0);
|
|
135744
|
+
__decorate([
|
|
135745
|
+
Field(),
|
|
135746
|
+
MaxLength(100),
|
|
135747
|
+
__metadata("design:type", String)
|
|
135748
|
+
], MJUserViewRunDetail_.prototype, "UserViewRun", void 0);
|
|
135369
135749
|
__decorate([
|
|
135370
135750
|
Field(),
|
|
135371
135751
|
MaxLength(36),
|