@memberjunction/core-entities-server 6.2.0-edge.4 → 6.2.0-edge.5
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/custom/MJAIAgentSessionEntityServer.server.d.ts +26 -3
- package/dist/custom/MJAIAgentSessionEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJAIAgentSessionEntityServer.server.js +41 -3
- package/dist/custom/MJAIAgentSessionEntityServer.server.js.map +1 -1
- package/dist/custom/MJDataContextItemEntityServer.server.d.ts +33 -0
- package/dist/custom/MJDataContextItemEntityServer.server.d.ts.map +1 -0
- package/dist/custom/MJDataContextItemEntityServer.server.js +84 -0
- package/dist/custom/MJDataContextItemEntityServer.server.js.map +1 -0
- package/dist/custom/MJFileEntityServer.server.d.ts +45 -0
- package/dist/custom/MJFileEntityServer.server.d.ts.map +1 -0
- package/dist/custom/MJFileEntityServer.server.js +101 -0
- package/dist/custom/MJFileEntityServer.server.js.map +1 -0
- package/dist/custom/MJQueryEntityServer.server.d.ts +5 -1
- package/dist/custom/MJQueryEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJQueryEntityServer.server.js +11 -6
- package/dist/custom/MJQueryEntityServer.server.js.map +1 -1
- package/dist/custom/MJQuerySQLEntityServer.server.js +3 -3
- package/dist/custom/MJQuerySQLEntityServer.server.js.map +1 -1
- package/dist/custom/MJRowLevelSecurityFilterEntityServer.server.d.ts +26 -14
- package/dist/custom/MJRowLevelSecurityFilterEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJRowLevelSecurityFilterEntityServer.server.js +57 -32
- package/dist/custom/MJRowLevelSecurityFilterEntityServer.server.js.map +1 -1
- package/dist/custom/MJUserRoutineEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJUserRoutineEntityServer.server.js +12 -3
- package/dist/custom/MJUserRoutineEntityServer.server.js.map +1 -1
- package/dist/custom/MJUserViewEntityServer.server.d.ts +26 -0
- package/dist/custom/MJUserViewEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJUserViewEntityServer.server.js +74 -4
- package/dist/custom/MJUserViewEntityServer.server.js.map +1 -1
- package/dist/custom/MJVectorIndexEntityServer.server.d.ts +81 -11
- package/dist/custom/MJVectorIndexEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJVectorIndexEntityServer.server.js +252 -42
- package/dist/custom/MJVectorIndexEntityServer.server.js.map +1 -1
- package/dist/custom/query-extraction/pipeline.d.ts.map +1 -1
- package/dist/custom/query-extraction/pipeline.js +56 -5
- package/dist/custom/query-extraction/pipeline.js.map +1 -1
- package/dist/custom/query-extraction/types.d.ts +3 -0
- package/dist/custom/query-extraction/types.d.ts.map +1 -1
- package/dist/custom/rowFilterValidation.d.ts +47 -2
- package/dist/custom/rowFilterValidation.d.ts.map +1 -1
- package/dist/custom/rowFilterValidation.js +122 -11
- package/dist/custom/rowFilterValidation.js.map +1 -1
- package/dist/custom/template-extraction/pipeline.d.ts +6 -1
- package/dist/custom/template-extraction/pipeline.d.ts.map +1 -1
- package/dist/custom/template-extraction/pipeline.js +15 -6
- package/dist/custom/template-extraction/pipeline.js.map +1 -1
- package/dist/custom/template-extraction/types.d.ts +1 -1
- package/dist/custom/template-extraction/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +30 -30
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ValidationResult } from '@memberjunction/core';
|
|
1
|
+
import { EntitySaveOptions, ValidationResult } from '@memberjunction/core';
|
|
2
2
|
import { MJAIAgentSessionEntity } from '@memberjunction/core-entities';
|
|
3
3
|
/**
|
|
4
4
|
* Server-side `MJ: AI Agent Sessions` entity.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* `maxSessionDeadlineIso`, the `identityVerification` state) out of the session owner's reach
|
|
6
|
+
* It keeps the **server-authoritative keys** inside `Config` (the janitor's
|
|
7
|
+
* `maxSessionDeadlineIso`, the `identityVerification` state) out of the session owner's reach, and it
|
|
8
|
+
* keeps every save from writing back the **recording ledger's columns** (see {@link Save}). The
|
|
8
9
|
* owner can legitimately write the row — the `UI` and `Widget Guest` roles hold `CanUpdate` on their
|
|
9
10
|
* own sessions — so the protection has to live at the entity, where the generated CRUD mutations,
|
|
10
11
|
* `StartAgentSession(configJson)` and every other path converge on `Save()`.
|
|
@@ -17,6 +18,28 @@ import { MJAIAgentSessionEntity } from '@memberjunction/core-entities';
|
|
|
17
18
|
* out of is not a guard.
|
|
18
19
|
*/
|
|
19
20
|
export declare class MJAIAgentSessionEntityServer extends MJAIAgentSessionEntity {
|
|
21
|
+
/**
|
|
22
|
+
* Columns the client-direct recording ledger's stored procedures own (#5294). They change under a live
|
|
23
|
+
* session (shard inserts, terminal stamps, assembly claims and finishes) without going through this
|
|
24
|
+
* entity.
|
|
25
|
+
*/
|
|
26
|
+
private static readonly recordingLedgerFields;
|
|
27
|
+
/**
|
|
28
|
+
* Saves without writing back the recording ledger's columns the caller did not change.
|
|
29
|
+
*
|
|
30
|
+
* An update writes every loaded column, so a session loaded before a ledger procedure ran and saved
|
|
31
|
+
* after it (a heartbeat, the close, a delegated tool call that rolls `Config` forward, a verification
|
|
32
|
+
* step) would put the stale recording state back: rewind the assembly version and status (a running
|
|
33
|
+
* assembly then loses its fence and a superseded one can win it) or clear `RecordingFileID` (a later
|
|
34
|
+
* re-assembly then has no file to reuse and writes silence over audio it can no longer recover).
|
|
35
|
+
* Marking those fields not-loaded makes the save leave them out of the update procedure, whose
|
|
36
|
+
* `ISNULL` keeps the stored values. A field the caller set explicitly (the legacy whole-call upload
|
|
37
|
+
* stamps `RecordingFileID`) is dirty and is still saved; an insert takes every column.
|
|
38
|
+
*
|
|
39
|
+
* `MarkNotLoaded` is the hydration paths' tool; this entity uses it for the same meaning — "this copy
|
|
40
|
+
* of the value is not the database's" — at the one place every server-side save converges.
|
|
41
|
+
*/
|
|
42
|
+
Save(options?: EntitySaveOptions): Promise<boolean>;
|
|
20
43
|
Validate(): ValidationResult;
|
|
21
44
|
/** Returns a refusal when an untrusted save changes a protected `Config` key, else null. */
|
|
22
45
|
private checkProtectedConfigKeys;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MJAIAgentSessionEntityServer.server.d.ts","sourceRoot":"","sources":["../../src/custom/MJAIAgentSessionEntityServer.server.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"MJAIAgentSessionEntityServer.server.d.ts","sourceRoot":"","sources":["../../src/custom/MJAIAgentSessionEntityServer.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAA4C,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEjI,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAGvE;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,4BAA6B,SAAQ,sBAAsB;IACpE;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAG3C;IAEF;;;;;;;;;;;;;;OAcG;IACmB,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAYzD,QAAQ,IAAI,gBAAgB;IAU5C,4FAA4F;IAC5F,OAAO,CAAC,wBAAwB;CAyBnC"}
|
|
@@ -4,6 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
var MJAIAgentSessionEntityServer_1;
|
|
7
8
|
import { BaseEntity, ValidationErrorInfo, ValidationErrorType } from '@memberjunction/core';
|
|
8
9
|
import { RegisterClass } from '@memberjunction/global';
|
|
9
10
|
import { MJAIAgentSessionEntity } from '@memberjunction/core-entities';
|
|
@@ -11,8 +12,9 @@ import { FindProtectedSessionConfigChanges, IsTrustedSessionConfigWriteActive }
|
|
|
11
12
|
/**
|
|
12
13
|
* Server-side `MJ: AI Agent Sessions` entity.
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
-
* `maxSessionDeadlineIso`, the `identityVerification` state) out of the session owner's reach
|
|
15
|
+
* It keeps the **server-authoritative keys** inside `Config` (the janitor's
|
|
16
|
+
* `maxSessionDeadlineIso`, the `identityVerification` state) out of the session owner's reach, and it
|
|
17
|
+
* keeps every save from writing back the **recording ledger's columns** (see {@link Save}). The
|
|
16
18
|
* owner can legitimately write the row — the `UI` and `Widget Guest` roles hold `CanUpdate` on their
|
|
17
19
|
* own sessions — so the protection has to live at the entity, where the generated CRUD mutations,
|
|
18
20
|
* `StartAgentSession(configJson)` and every other path converge on `Save()`.
|
|
@@ -25,6 +27,42 @@ import { FindProtectedSessionConfigChanges, IsTrustedSessionConfigWriteActive }
|
|
|
25
27
|
* out of is not a guard.
|
|
26
28
|
*/
|
|
27
29
|
let MJAIAgentSessionEntityServer = class MJAIAgentSessionEntityServer extends MJAIAgentSessionEntity {
|
|
30
|
+
static { MJAIAgentSessionEntityServer_1 = this; }
|
|
31
|
+
/**
|
|
32
|
+
* Columns the client-direct recording ledger's stored procedures own (#5294). They change under a live
|
|
33
|
+
* session (shard inserts, terminal stamps, assembly claims and finishes) without going through this
|
|
34
|
+
* entity.
|
|
35
|
+
*/
|
|
36
|
+
static { this.recordingLedgerFields = [
|
|
37
|
+
'RecordingStatus', 'RecordingExpectedShards', 'RecordingCapturedSamples', 'RecordingGaps',
|
|
38
|
+
'RecordingAssemblyVersion', 'RecordingFileID', 'RecordingMedia',
|
|
39
|
+
]; }
|
|
40
|
+
/**
|
|
41
|
+
* Saves without writing back the recording ledger's columns the caller did not change.
|
|
42
|
+
*
|
|
43
|
+
* An update writes every loaded column, so a session loaded before a ledger procedure ran and saved
|
|
44
|
+
* after it (a heartbeat, the close, a delegated tool call that rolls `Config` forward, a verification
|
|
45
|
+
* step) would put the stale recording state back: rewind the assembly version and status (a running
|
|
46
|
+
* assembly then loses its fence and a superseded one can win it) or clear `RecordingFileID` (a later
|
|
47
|
+
* re-assembly then has no file to reuse and writes silence over audio it can no longer recover).
|
|
48
|
+
* Marking those fields not-loaded makes the save leave them out of the update procedure, whose
|
|
49
|
+
* `ISNULL` keeps the stored values. A field the caller set explicitly (the legacy whole-call upload
|
|
50
|
+
* stamps `RecordingFileID`) is dirty and is still saved; an insert takes every column.
|
|
51
|
+
*
|
|
52
|
+
* `MarkNotLoaded` is the hydration paths' tool; this entity uses it for the same meaning — "this copy
|
|
53
|
+
* of the value is not the database's" — at the one place every server-side save converges.
|
|
54
|
+
*/
|
|
55
|
+
async Save(options) {
|
|
56
|
+
if (this.IsSaved) {
|
|
57
|
+
for (const name of MJAIAgentSessionEntityServer_1.recordingLedgerFields) {
|
|
58
|
+
const field = this.GetFieldByName(name);
|
|
59
|
+
if (field && !field.Dirty) {
|
|
60
|
+
field.MarkNotLoaded();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return super.Save(options);
|
|
65
|
+
}
|
|
28
66
|
Validate() {
|
|
29
67
|
const result = super.Validate();
|
|
30
68
|
const violation = this.checkProtectedConfigKeys();
|
|
@@ -56,7 +94,7 @@ let MJAIAgentSessionEntityServer = class MJAIAgentSessionEntityServer extends MJ
|
|
|
56
94
|
return new ValidationErrorInfo('Config', `Config keys [${changed.join(', ')}] are server-managed and cannot be set by the session owner.`, null, ValidationErrorType.Failure);
|
|
57
95
|
}
|
|
58
96
|
};
|
|
59
|
-
MJAIAgentSessionEntityServer = __decorate([
|
|
97
|
+
MJAIAgentSessionEntityServer = MJAIAgentSessionEntityServer_1 = __decorate([
|
|
60
98
|
RegisterClass(BaseEntity, 'MJ: AI Agent Sessions')
|
|
61
99
|
], MJAIAgentSessionEntityServer);
|
|
62
100
|
export { MJAIAgentSessionEntityServer };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MJAIAgentSessionEntityServer.server.js","sourceRoot":"","sources":["../../src/custom/MJAIAgentSessionEntityServer.server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MJAIAgentSessionEntityServer.server.js","sourceRoot":"","sources":["../../src/custom/MJAIAgentSessionEntityServer.server.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAqB,mBAAmB,EAAE,mBAAmB,EAAoB,MAAM,sBAAsB,CAAC;AACjI,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,iCAAiC,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAC;AAE5G;;;;;;;;;;;;;;;;GAgBG;AAEI,IAAM,4BAA4B,GAAlC,MAAM,4BAA6B,SAAQ,sBAAsB;;IACpE;;;;OAIG;aACqB,0BAAqB,GAA8C;QACvF,iBAAiB,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,eAAe;QACzF,0BAA0B,EAAE,iBAAiB,EAAE,gBAAgB;KAClE,AAH4C,CAG3C;IAEF;;;;;;;;;;;;;;OAcG;IACa,KAAK,CAAC,IAAI,CAAC,OAA2B;QAClD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,KAAK,MAAM,IAAI,IAAI,8BAA4B,CAAC,qBAAqB,EAAE,CAAC;gBACpE,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;gBACxC,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;oBACxB,KAAK,CAAC,aAAa,EAAE,CAAC;gBAC1B,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAEe,QAAQ;QACpB,MAAM,MAAM,GA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@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EntitySaveOptions, ValidationResult } from '@memberjunction/core';
|
|
2
|
+
import { MJDataContextItemEntity } from '@memberjunction/core-entities';
|
|
3
|
+
/**
|
|
4
|
+
* Server-side `MJ: Data Context Items` entity. The SQL of a `sql` item runs when its data context is
|
|
5
|
+
* loaded, so only an administrator (Owner-type user) may save an item that is a SQL item or holds SQL
|
|
6
|
+
* text: creating it, changing any of its fields, or moving it to another data context. Other items
|
|
7
|
+
* stay writable as before.
|
|
8
|
+
*
|
|
9
|
+
* The rule reads the item's values, not which fields changed, because this entity does not track
|
|
10
|
+
* record changes and a client's `OldValues___` can decide what looks changed. A non-Owner's save of an
|
|
11
|
+
* existing item whose `Type` or `SQL` was not loaded is refused as well: those columns keep their
|
|
12
|
+
* stored values on save, and the stored item may be a SQL item.
|
|
13
|
+
*/
|
|
14
|
+
export declare class MJDataContextItemEntityServer extends MJDataContextItemEntity {
|
|
15
|
+
private static readonly SQL_WRITE_REFUSED;
|
|
16
|
+
private static readonly SQL_NOT_LOADED_REFUSED;
|
|
17
|
+
/** The columns that decide whether an item holds SQL. */
|
|
18
|
+
private static readonly SQL_COLUMNS;
|
|
19
|
+
Validate(): ValidationResult;
|
|
20
|
+
/** Applies the same rule to a `ReplayOnly` save, which skips `Validate()`. */
|
|
21
|
+
Save(options?: EntitySaveOptions): Promise<boolean>;
|
|
22
|
+
/** Returns why the acting user may not save this item, or null when they may. */
|
|
23
|
+
private saveRefusal;
|
|
24
|
+
/** True when this is an existing item whose `Type` or `SQL` was not loaded. */
|
|
25
|
+
private sqlColumnsNotLoaded;
|
|
26
|
+
/** True when the item, as loaded and changed, is a SQL item or holds SQL text. */
|
|
27
|
+
private holdsSQL;
|
|
28
|
+
/** True when the acting user is an Owner-type user. */
|
|
29
|
+
private callerIsOwner;
|
|
30
|
+
/** Records the refusal so `LatestResult.CompleteMessage` carries it, and returns false. */
|
|
31
|
+
private refuseSave;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=MJDataContextItemEntityServer.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MJDataContextItemEntityServer.server.d.ts","sourceRoot":"","sources":["../../src/custom/MJDataContextItemEntityServer.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,iBAAiB,EAAsD,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7J,OAAO,EAAE,uBAAuB,EAA+B,MAAM,+BAA+B,CAAC;AAErG;;;;;;;;;;GAUG;AACH,qBACa,6BAA8B,SAAQ,uBAAuB;IACtE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAC8F;IAEvI,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CACuG;IAErJ,yDAAyD;IACzD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAqE;IAExF,QAAQ,IAAI,gBAAgB;IAU5C,8EAA8E;IACxD,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAQzE,iFAAiF;IACjF,OAAO,CAAC,WAAW;IAUnB,+EAA+E;IAC/E,OAAO,CAAC,mBAAmB;IAI3B,kFAAkF;IAClF,OAAO,CAAC,QAAQ;IAIhB,uDAAuD;IACvD,OAAO,CAAC,aAAa;IAKrB,2FAA2F;IAC3F,OAAO,CAAC,UAAU;CAUrB"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var MJDataContextItemEntityServer_1;
|
|
8
|
+
import { BaseEntity, BaseEntityResult, ValidationErrorInfo, ValidationErrorType } from '@memberjunction/core';
|
|
9
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
10
|
+
import { MJDataContextItemEntity } from '@memberjunction/core-entities';
|
|
11
|
+
/**
|
|
12
|
+
* Server-side `MJ: Data Context Items` entity. The SQL of a `sql` item runs when its data context is
|
|
13
|
+
* loaded, so only an administrator (Owner-type user) may save an item that is a SQL item or holds SQL
|
|
14
|
+
* text: creating it, changing any of its fields, or moving it to another data context. Other items
|
|
15
|
+
* stay writable as before.
|
|
16
|
+
*
|
|
17
|
+
* The rule reads the item's values, not which fields changed, because this entity does not track
|
|
18
|
+
* record changes and a client's `OldValues___` can decide what looks changed. A non-Owner's save of an
|
|
19
|
+
* existing item whose `Type` or `SQL` was not loaded is refused as well: those columns keep their
|
|
20
|
+
* stored values on save, and the stored item may be a SQL item.
|
|
21
|
+
*/
|
|
22
|
+
let MJDataContextItemEntityServer = class MJDataContextItemEntityServer extends MJDataContextItemEntity {
|
|
23
|
+
static { MJDataContextItemEntityServer_1 = this; }
|
|
24
|
+
static { this.SQL_WRITE_REFUSED = 'Only an administrator (Owner-type user) may save a data context item that holds SQL, because that SQL runs against the database.'; }
|
|
25
|
+
static { this.SQL_NOT_LOADED_REFUSED = 'Only an administrator (Owner-type user) may save a data context item whose Type and SQL were not loaded, because the stored item may hold SQL.'; }
|
|
26
|
+
/** The columns that decide whether an item holds SQL. */
|
|
27
|
+
static { this.SQL_COLUMNS = ['Type', 'SQL']; }
|
|
28
|
+
Validate() {
|
|
29
|
+
const result = super.Validate();
|
|
30
|
+
const refusal = this.saveRefusal();
|
|
31
|
+
if (refusal) {
|
|
32
|
+
result.Errors.push(new ValidationErrorInfo('SQL', refusal, this.SQL, ValidationErrorType.Failure));
|
|
33
|
+
}
|
|
34
|
+
result.Success = result.Success && result.Errors.length === 0;
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
/** Applies the same rule to a `ReplayOnly` save, which skips `Validate()`. */
|
|
38
|
+
async Save(options) {
|
|
39
|
+
const refusal = options?.ReplayOnly ? this.saveRefusal() : null;
|
|
40
|
+
if (refusal) {
|
|
41
|
+
return this.refuseSave(refusal);
|
|
42
|
+
}
|
|
43
|
+
return super.Save(options);
|
|
44
|
+
}
|
|
45
|
+
/** Returns why the acting user may not save this item, or null when they may. */
|
|
46
|
+
saveRefusal() {
|
|
47
|
+
if (this.callerIsOwner()) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
if (this.sqlColumnsNotLoaded()) {
|
|
51
|
+
return MJDataContextItemEntityServer_1.SQL_NOT_LOADED_REFUSED;
|
|
52
|
+
}
|
|
53
|
+
return this.holdsSQL() ? MJDataContextItemEntityServer_1.SQL_WRITE_REFUSED : null;
|
|
54
|
+
}
|
|
55
|
+
/** True when this is an existing item whose `Type` or `SQL` was not loaded. */
|
|
56
|
+
sqlColumnsNotLoaded() {
|
|
57
|
+
return this.IsSaved && MJDataContextItemEntityServer_1.SQL_COLUMNS.some((name) => this.GetFieldByName(name)?.NotLoaded === true);
|
|
58
|
+
}
|
|
59
|
+
/** True when the item, as loaded and changed, is a SQL item or holds SQL text. */
|
|
60
|
+
holdsSQL() {
|
|
61
|
+
return this.Type === 'sql' || !!this.SQL?.trim();
|
|
62
|
+
}
|
|
63
|
+
/** True when the acting user is an Owner-type user. */
|
|
64
|
+
callerIsOwner() {
|
|
65
|
+
const caller = this.ActiveUser;
|
|
66
|
+
return caller?.Type?.trim().toLowerCase() === 'owner';
|
|
67
|
+
}
|
|
68
|
+
/** Records the refusal so `LatestResult.CompleteMessage` carries it, and returns false. */
|
|
69
|
+
refuseSave(message) {
|
|
70
|
+
const result = new BaseEntityResult();
|
|
71
|
+
result.Success = false;
|
|
72
|
+
result.Type = this.IsSaved ? 'update' : 'create';
|
|
73
|
+
result.Message = message;
|
|
74
|
+
result.StartedAt = new Date();
|
|
75
|
+
result.EndedAt = new Date();
|
|
76
|
+
this.RegisterResultHistoryEntry(result);
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
MJDataContextItemEntityServer = MJDataContextItemEntityServer_1 = __decorate([
|
|
81
|
+
RegisterClass(BaseEntity, 'MJ: Data Context Items')
|
|
82
|
+
], MJDataContextItemEntityServer);
|
|
83
|
+
export { MJDataContextItemEntityServer };
|
|
84
|
+
//# sourceMappingURL=MJDataContextItemEntityServer.server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MJDataContextItemEntityServer.server.js","sourceRoot":"","sources":["../../src/custom/MJDataContextItemEntityServer.server.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAA+B,mBAAmB,EAAE,mBAAmB,EAAoB,MAAM,sBAAsB,CAAC;AAC7J,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAA+B,MAAM,+BAA+B,CAAC;AAErG;;;;;;;;;;GAUG;AAEI,IAAM,6BAA6B,GAAnC,MAAM,6BAA8B,SAAQ,uBAAuB;;aAC9C,sBAAiB,GACrC,kIAAkI,AAD7F,CAC8F;aAE/G,2BAAsB,GAC1C,gJAAgJ,AADtG,CACuG;IAErJ,yDAAyD;aACjC,gBAAW,GAAqD,CAAC,MAAM,EAAE,KAAK,CAAC,AAApE,CAAqE;IAExF,QAAQ;QACpB,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAChC,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACnC,IAAI,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,mBAAmB,CAAC,OAAO,C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oB,IAAI,CAAC,UAAU,CAAC;QAChD,OAAO,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC;IAC1D,CAAC;IAED,2FAA2F;IACnF,UAAU,CAAC,OAAe;QAC9B,MAAM,MAAM,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACtC,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;QACjD,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,MAAM,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;QAC9B,MAAM,CAAC,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC;QACxC,OAAO,KAAK,CAAC;IACjB,CAAC;;AAlEQ,6BAA6B;IADzC,aAAa,CAAC,UAAU,EAAE,wBAAwB,CAAC;GACvC,6BAA6B,CAmEzC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { EntitySaveOptions, ValidationResult } from '@memberjunction/core';
|
|
2
|
+
import { MJFileEntity } from '@memberjunction/core-entities';
|
|
3
|
+
/**
|
|
4
|
+
* Server-side `MJ: Files` entity: once a row exists, WHERE its bytes live is server-owned.
|
|
5
|
+
*
|
|
6
|
+
* `ProviderID` and `ProviderKey` decide which storage provider (and so which account) and which object every
|
|
7
|
+
* file-ID route — `DownloadUrl`, `GetFileContents`, `CreateMediaAccessToken`, `DeleteFile`, the artifact download URL,
|
|
8
|
+
* the agent file handler — reads, signs or deletes. A client that could re-point an existing row could make a row other
|
|
9
|
+
* users trust (an attachment, an artifact's file) serve, or delete, a different object. So a save that changes either
|
|
10
|
+
* field on an existing row is refused, unless trusted server code that chose the new location itself sets
|
|
11
|
+
* {@link AllowStorageLocationChange} first — the same opt-in pattern `MJRubricEvaluationScoreEntityServer` uses for
|
|
12
|
+
* server-computed rows. A GraphQL save never sets it.
|
|
13
|
+
*
|
|
14
|
+
* **What this does not cover — a new row.** A client may still create a row with a `ProviderKey` of its choosing, and
|
|
15
|
+
* `Name` (the object key when `ProviderKey` is empty) is client-writable on every row. Refusing a client-supplied
|
|
16
|
+
* `ProviderKey` on create would break Explorer's direct-upload path, which registers the object it just uploaded through
|
|
17
|
+
* a client save, and would not stop aliasing anyway (`Name` is the fallback key). MJStorage's `UploadFile` sets the field
|
|
18
|
+
* from a package that cannot reach this class. The guarantee for a new row comes from the routes instead: each one
|
|
19
|
+
* resolves the row through the storage gate (`FileStorageEngine.ResolveFileObject`), which requires the caller's access
|
|
20
|
+
* to the account and refuses an object any other `MJ: Files` row tracks when the caller cannot read that row. Closing the
|
|
21
|
+
* create path needs a server-side registration mutation for the direct-upload flow — a follow-up.
|
|
22
|
+
*/
|
|
23
|
+
export declare class MJFileEntityServer extends MJFileEntity {
|
|
24
|
+
/**
|
|
25
|
+
* Set by trusted server code, before `Save()`, when it re-points an existing row to a storage location it chose
|
|
26
|
+
* itself. A client save leaves this false, so a change to `ProviderID` or `ProviderKey` on an existing row is refused.
|
|
27
|
+
*/
|
|
28
|
+
AllowStorageLocationChange: boolean;
|
|
29
|
+
/** Adds the storage-location rule to the generated validation. */
|
|
30
|
+
Validate(): ValidationResult;
|
|
31
|
+
/**
|
|
32
|
+
* Applies the rule to a `ReplayOnly` save too: `ReplayOnly` skips `Validate()` but still writes, so without this the
|
|
33
|
+
* rule would be one save option away from off.
|
|
34
|
+
*/
|
|
35
|
+
Save(options?: EntitySaveOptions): Promise<boolean>;
|
|
36
|
+
/** The location fields this save would change on an existing row without the trusted opt-in. */
|
|
37
|
+
private refusedLocationChanges;
|
|
38
|
+
/** Whether `field` holds a different value from the one loaded (`ProviderID` compared as a UUID). */
|
|
39
|
+
private locationFieldChanged;
|
|
40
|
+
/** Records a refused save on the result history (so `LatestResult.CompleteMessage` carries why) and returns false. */
|
|
41
|
+
private refuse;
|
|
42
|
+
/** The refusal for a client change to a storage-location field. */
|
|
43
|
+
private static locationChangeMessage;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=MJFileEntityServer.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MJFileEntityServer.server.d.ts","sourceRoot":"","sources":["../../src/custom/MJFileEntityServer.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,iBAAiB,EAGjB,gBAAgB,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAK7D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,kBAAmB,SAAQ,YAAY;IAChD;;;OAGG;IACI,0BAA0B,UAAS;IAE1C,kEAAkE;IAClD,QAAQ,IAAI,gBAAgB;IAc5C;;;OAGG;IACmB,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAQzE,gGAAgG;IAChG,OAAO,CAAC,sBAAsB;IAQ9B,qGAAqG;IACrG,OAAO,CAAC,oBAAoB;IAa5B,sHAAsH;IACtH,OAAO,CAAC,MAAM;IAWd,mEAAmE;IACnE,OAAO,CAAC,MAAM,CAAC,qBAAqB;CAGvC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var MJFileEntityServer_1;
|
|
8
|
+
import { BaseEntity, BaseEntityResult, ValidationErrorInfo, ValidationErrorType, } from '@memberjunction/core';
|
|
9
|
+
import { RegisterClass, UUIDsEqual } from '@memberjunction/global';
|
|
10
|
+
import { MJFileEntity } from '@memberjunction/core-entities';
|
|
11
|
+
/**
|
|
12
|
+
* Server-side `MJ: Files` entity: once a row exists, WHERE its bytes live is server-owned.
|
|
13
|
+
*
|
|
14
|
+
* `ProviderID` and `ProviderKey` decide which storage provider (and so which account) and which object every
|
|
15
|
+
* file-ID route — `DownloadUrl`, `GetFileContents`, `CreateMediaAccessToken`, `DeleteFile`, the artifact download URL,
|
|
16
|
+
* the agent file handler — reads, signs or deletes. A client that could re-point an existing row could make a row other
|
|
17
|
+
* users trust (an attachment, an artifact's file) serve, or delete, a different object. So a save that changes either
|
|
18
|
+
* field on an existing row is refused, unless trusted server code that chose the new location itself sets
|
|
19
|
+
* {@link AllowStorageLocationChange} first — the same opt-in pattern `MJRubricEvaluationScoreEntityServer` uses for
|
|
20
|
+
* server-computed rows. A GraphQL save never sets it.
|
|
21
|
+
*
|
|
22
|
+
* **What this does not cover — a new row.** A client may still create a row with a `ProviderKey` of its choosing, and
|
|
23
|
+
* `Name` (the object key when `ProviderKey` is empty) is client-writable on every row. Refusing a client-supplied
|
|
24
|
+
* `ProviderKey` on create would break Explorer's direct-upload path, which registers the object it just uploaded through
|
|
25
|
+
* a client save, and would not stop aliasing anyway (`Name` is the fallback key). MJStorage's `UploadFile` sets the field
|
|
26
|
+
* from a package that cannot reach this class. The guarantee for a new row comes from the routes instead: each one
|
|
27
|
+
* resolves the row through the storage gate (`FileStorageEngine.ResolveFileObject`), which requires the caller's access
|
|
28
|
+
* to the account and refuses an object any other `MJ: Files` row tracks when the caller cannot read that row. Closing the
|
|
29
|
+
* create path needs a server-side registration mutation for the direct-upload flow — a follow-up.
|
|
30
|
+
*/
|
|
31
|
+
let MJFileEntityServer = MJFileEntityServer_1 = class MJFileEntityServer extends MJFileEntity {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
/**
|
|
35
|
+
* Set by trusted server code, before `Save()`, when it re-points an existing row to a storage location it chose
|
|
36
|
+
* itself. A client save leaves this false, so a change to `ProviderID` or `ProviderKey` on an existing row is refused.
|
|
37
|
+
*/
|
|
38
|
+
this.AllowStorageLocationChange = false;
|
|
39
|
+
}
|
|
40
|
+
/** Adds the storage-location rule to the generated validation. */
|
|
41
|
+
Validate() {
|
|
42
|
+
const result = super.Validate();
|
|
43
|
+
for (const field of this.refusedLocationChanges()) {
|
|
44
|
+
result.Errors.push(new ValidationErrorInfo(field, MJFileEntityServer_1.locationChangeMessage(field), this.GetFieldByName(field)?.Value, ValidationErrorType.Failure));
|
|
45
|
+
}
|
|
46
|
+
result.Success = result.Success && result.Errors.length === 0;
|
|
47
|
+
return result;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Applies the rule to a `ReplayOnly` save too: `ReplayOnly` skips `Validate()` but still writes, so without this the
|
|
51
|
+
* rule would be one save option away from off.
|
|
52
|
+
*/
|
|
53
|
+
async Save(options) {
|
|
54
|
+
const refused = options?.ReplayOnly ? this.refusedLocationChanges() : [];
|
|
55
|
+
if (refused.length > 0) {
|
|
56
|
+
return this.refuse(MJFileEntityServer_1.locationChangeMessage(refused[0]));
|
|
57
|
+
}
|
|
58
|
+
return super.Save(options);
|
|
59
|
+
}
|
|
60
|
+
/** The location fields this save would change on an existing row without the trusted opt-in. */
|
|
61
|
+
refusedLocationChanges() {
|
|
62
|
+
if (!this.IsSaved || this.AllowStorageLocationChange) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
const fields = ['ProviderID', 'ProviderKey'];
|
|
66
|
+
return fields.filter(field => this.locationFieldChanged(field));
|
|
67
|
+
}
|
|
68
|
+
/** Whether `field` holds a different value from the one loaded (`ProviderID` compared as a UUID). */
|
|
69
|
+
locationFieldChanged(field) {
|
|
70
|
+
const info = this.GetFieldByName(field);
|
|
71
|
+
if (!info?.Dirty) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
const before = info.OldValue;
|
|
75
|
+
const after = info.Value;
|
|
76
|
+
if (field === 'ProviderID') {
|
|
77
|
+
return !(before && after ? UUIDsEqual(before, after) : before === after);
|
|
78
|
+
}
|
|
79
|
+
return (before ?? null) !== (after ?? null);
|
|
80
|
+
}
|
|
81
|
+
/** Records a refused save on the result history (so `LatestResult.CompleteMessage` carries why) and returns false. */
|
|
82
|
+
refuse(message) {
|
|
83
|
+
const result = new BaseEntityResult();
|
|
84
|
+
result.Success = false;
|
|
85
|
+
result.Type = 'update';
|
|
86
|
+
result.Message = message;
|
|
87
|
+
result.StartedAt = new Date();
|
|
88
|
+
result.EndedAt = new Date();
|
|
89
|
+
this.RegisterResultHistoryEntry(result);
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
/** The refusal for a client change to a storage-location field. */
|
|
93
|
+
static locationChangeMessage(field) {
|
|
94
|
+
return `${field} cannot be changed on an existing file: where a file's bytes live is set by the server when the file is stored.`;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
MJFileEntityServer = MJFileEntityServer_1 = __decorate([
|
|
98
|
+
RegisterClass(BaseEntity, 'MJ: Files')
|
|
99
|
+
], MJFileEntityServer);
|
|
100
|
+
export { MJFileEntityServer };
|
|
101
|
+
//# sourceMappingURL=MJFileEntityServer.server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MJFileEntityServer.server.js","sourceRoot":"","sources":["../../src/custom/MJFileEntityServer.server.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EACH,UAAU,EACV,gBAAgB,EAEhB,mBAAmB,EACnB,mBAAmB,GAEtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAK7D;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,GAAG,KAAK,iHAAiH,CAAC;IACrI,CAAC;CACJ,CAAA;AAzEY,kBAAkB;IAD9B,aAAa,CAAC,UAAU,EAAE,WAAW,CAAC;GAC1B,kBAAkB,CAyE9B"}
|
|
@@ -67,11 +67,15 @@ export declare class MJQueryEntityServer extends MJQueryEntityExtended {
|
|
|
67
67
|
* when a dialect variant matching the current platform is saved — this handles
|
|
68
68
|
* the timing issue where the parent Query is saved before its QuerySQL children
|
|
69
69
|
* exist in the cache.
|
|
70
|
+
*
|
|
71
|
+
* @param skipAIEnrichment Skip the LLM enrichment stage, as `SkipEntityAIActions` does for Save.
|
|
70
72
|
*/
|
|
71
|
-
RerunExtraction(): Promise<void>;
|
|
73
|
+
RerunExtraction(skipAIEnrichment?: boolean): Promise<void>;
|
|
72
74
|
/**
|
|
73
75
|
* Runs the extraction pipeline and saves the UsesTemplate flag.
|
|
74
76
|
* On error, sets UsesTemplate=false and attempts to save so the query remains usable.
|
|
77
|
+
*
|
|
78
|
+
* @param skipAIEnrichment Skip the LLM enrichment stage (the save asked to skip AI actions).
|
|
75
79
|
*/
|
|
76
80
|
private extractAndSyncDataAsync;
|
|
77
81
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MJQueryEntityServer.server.d.ts","sourceRoot":"","sources":["../../src/custom/MJQueryEntityServer.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,iBAAiB,EAGjB,qBAAqB,EAExB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAoB,qBAAqB,EAAmC,MAAM,+BAA+B,CAAC;AAazH;;;;GAIG;AACH,qBACa,mBAAoB,SAAQ,qBAAqB;IAC1D;;;yEAGqE;IAC9D,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAI5C;;OAEG;cACsB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI5F;;;;;;;;;OASG;cACa,0BAA0B,IAAI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AO,CAAC,4BAA4B;IAgBpC;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAexB;;;;;;;OAOG;IACU,eAAe,CAAC,gBAAgB,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrE;;;;;OAKG;YACW,uBAAuB;IAsBrC;;OAEG;YACW,sBAAsB;IAmBpC;;;OAGG;YACW,wBAAwB;IAiCtC;;OAEG;YACW,sBAAsB;IA4BpC;;OAEG;YACW,oBAAoB;IA4BlC;;OAEG;YACW,6BAA6B;CAgB9C"}
|
|
@@ -91,7 +91,7 @@ let MJQueryEntityServer = class MJQueryEntityServer extends MJQueryEntityExtende
|
|
|
91
91
|
}
|
|
92
92
|
// Extract and sync parameters AFTER saving, outside of any transaction
|
|
93
93
|
if (shouldExtractData && this.SQL && this.SQL.trim().length > 0) {
|
|
94
|
-
await this.extractAndSyncDataAsync();
|
|
94
|
+
await this.extractAndSyncDataAsync(options?.SkipEntityAIActions === true);
|
|
95
95
|
await this.autoConvertDialectsAsync();
|
|
96
96
|
}
|
|
97
97
|
else if (!this.SQL || this.SQL.trim().length === 0) {
|
|
@@ -179,7 +179,7 @@ let MJQueryEntityServer = class MJQueryEntityServer extends MJQueryEntityExtende
|
|
|
179
179
|
* Builds the QuerySyncContext from this entity instance for use by the extraction pipeline.
|
|
180
180
|
* Resolves the SQL to the appropriate dialect variant for the connected database.
|
|
181
181
|
*/
|
|
182
|
-
buildSyncContext() {
|
|
182
|
+
buildSyncContext(skipAIEnrichment = false) {
|
|
183
183
|
return {
|
|
184
184
|
queryID: this.ID,
|
|
185
185
|
queryName: this.Name,
|
|
@@ -190,6 +190,7 @@ let MJQueryEntityServer = class MJQueryEntityServer extends MJQueryEntityExtende
|
|
|
190
190
|
runViewProvider: this.RunViewProviderToUse,
|
|
191
191
|
platform: this.currentPlatform,
|
|
192
192
|
parameterHints: this.ParameterHints,
|
|
193
|
+
SkipAIEnrichment: skipAIEnrichment,
|
|
193
194
|
};
|
|
194
195
|
}
|
|
195
196
|
/**
|
|
@@ -197,17 +198,21 @@ let MJQueryEntityServer = class MJQueryEntityServer extends MJQueryEntityExtende
|
|
|
197
198
|
* when a dialect variant matching the current platform is saved — this handles
|
|
198
199
|
* the timing issue where the parent Query is saved before its QuerySQL children
|
|
199
200
|
* exist in the cache.
|
|
201
|
+
*
|
|
202
|
+
* @param skipAIEnrichment Skip the LLM enrichment stage, as `SkipEntityAIActions` does for Save.
|
|
200
203
|
*/
|
|
201
|
-
async RerunExtraction() {
|
|
202
|
-
await this.extractAndSyncDataAsync();
|
|
204
|
+
async RerunExtraction(skipAIEnrichment = false) {
|
|
205
|
+
await this.extractAndSyncDataAsync(skipAIEnrichment);
|
|
203
206
|
}
|
|
204
207
|
/**
|
|
205
208
|
* Runs the extraction pipeline and saves the UsesTemplate flag.
|
|
206
209
|
* On error, sets UsesTemplate=false and attempts to save so the query remains usable.
|
|
210
|
+
*
|
|
211
|
+
* @param skipAIEnrichment Skip the LLM enrichment stage (the save asked to skip AI actions).
|
|
207
212
|
*/
|
|
208
|
-
async extractAndSyncDataAsync() {
|
|
213
|
+
async extractAndSyncDataAsync(skipAIEnrichment) {
|
|
209
214
|
try {
|
|
210
|
-
const ctx = this.buildSyncContext();
|
|
215
|
+
const ctx = this.buildSyncContext(skipAIEnrichment);
|
|
211
216
|
const pipelineResult = await RunExtractionPipeline(ctx);
|
|
212
217
|
this.UsesTemplate = pipelineResult.UsesTemplate;
|
|
213
218
|
// Save the query again to persist UsesTemplate and any changes from AI processing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MJQueryEntityServer.server.js","sourceRoot":"","sources":["../../src/custom/MJQueryEntityServer.server.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACH,UAAU,EAGV,QAAQ,GAGX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAoB,qBAAqB,EAAsB,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACzH,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,QA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ACT,OAAO,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,mDAAmD,aAAa,CAAC,IAAI,GAAG,CAAC,CAAC;QAC9G,CAAC;IACL,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,6BAA6B;QACvC,IAAI,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,OAAO;gBAAE,OAAO;YAE1B,MAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CACjD,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CACxC,CAAC;YAEF,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;YACpD,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5B,MAAM,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;YACtC,CAAC;QACL,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,OAAO,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,wCAAwC,EAAE,CAAC,CAAC,CAAC;QACjF,CAAC;IACL,CAAC;CACJ,CAAA;AA7XY,mBAAmB;IAD/B,aAAa,CAAC,UAAU,EAAE,aAAa,CAAC;GAC5B,mBAAmB,CA6X/B"}
|
|
@@ -30,7 +30,7 @@ let MJQuerySQLEntityServer = class MJQuerySQLEntityServer extends MJQuerySQLEnti
|
|
|
30
30
|
// current environment's database platform. A SQL Server environment
|
|
31
31
|
// receiving a PostgreSQL variant (or vice versa) should not re-extract.
|
|
32
32
|
try {
|
|
33
|
-
await this.triggerParentExtractionIfDialectMatches();
|
|
33
|
+
await this.triggerParentExtractionIfDialectMatches(options?.SkipEntityAIActions === true);
|
|
34
34
|
}
|
|
35
35
|
catch (e) {
|
|
36
36
|
// Non-fatal — the QuerySQL record saved successfully, extraction
|
|
@@ -49,7 +49,7 @@ let MJQuerySQLEntityServer = class MJQuerySQLEntityServer extends MJQuerySQLEnti
|
|
|
49
49
|
await QueryEngine.Instance.Config(false, this.ContextCurrentUser);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
async triggerParentExtractionIfDialectMatches() {
|
|
52
|
+
async triggerParentExtractionIfDialectMatches(skipAIEnrichment) {
|
|
53
53
|
const currentPlatform = resolveDbPlatformFromEnv() ?? 'sqlserver';
|
|
54
54
|
await this.ensureQueryEngineLoaded();
|
|
55
55
|
if (!this.isDialectForPlatform(currentPlatform)) {
|
|
@@ -65,7 +65,7 @@ let MJQuerySQLEntityServer = class MJQuerySQLEntityServer extends MJQuerySQLEnti
|
|
|
65
65
|
// will find the dialect variant via GetPlatformSQL().
|
|
66
66
|
if (parentQuery.SQL && parentQuery.SQL.trim().length > 0) {
|
|
67
67
|
LogStatus(`[MJQuerySQLEntityServer] Triggering re-extraction on "${parentQuery.Name}" — dialect variant saved for ${currentPlatform}`);
|
|
68
|
-
await parentQuery.RerunExtraction();
|
|
68
|
+
await parentQuery.RerunExtraction(skipAIEnrichment);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MJQuerySQLEntityServer.server.js","sourceRoot":"","sources":["../../src/custom/MJQuerySQLEntityServer.server.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACH,UAAU,EAGV,QAAQ,EACR,SAAS,GACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAGrF;;;;;;;;;;;GAWG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,gBAAgB;IAC/C,KAAK,CAAC,IA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