@memberjunction/core-entities-server 6.2.0-edge.4 → 6.2.0-edge.6
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 +9 -3
- package/dist/custom/MJAIAgentSessionEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJAIAgentSessionEntityServer.server.js +21 -6
- package/dist/custom/MJAIAgentSessionEntityServer.server.js.map +1 -1
- package/dist/custom/MJComponentEntityServer.server.d.ts +9 -0
- package/dist/custom/MJComponentEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJComponentEntityServer.server.js +25 -1
- package/dist/custom/MJComponentEntityServer.server.js.map +1 -1
- package/dist/custom/MJConversationEntityServer.server.d.ts +13 -0
- package/dist/custom/MJConversationEntityServer.server.d.ts.map +1 -0
- package/dist/custom/MJConversationEntityServer.server.js +33 -0
- package/dist/custom/MJConversationEntityServer.server.js.map +1 -0
- package/dist/custom/MJDashboardEntityServer.server.d.ts +14 -0
- package/dist/custom/MJDashboardEntityServer.server.d.ts.map +1 -0
- package/dist/custom/MJDashboardEntityServer.server.js +38 -0
- package/dist/custom/MJDashboardEntityServer.server.js.map +1 -0
- 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/MJDuplicateRunEntityServer.server.d.ts +34 -2
- package/dist/custom/MJDuplicateRunEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJDuplicateRunEntityServer.server.js +103 -23
- package/dist/custom/MJDuplicateRunEntityServer.server.js.map +1 -1
- package/dist/custom/MJEntityAlternateBaseViewEntityServer.server.d.ts +73 -0
- package/dist/custom/MJEntityAlternateBaseViewEntityServer.server.d.ts.map +1 -0
- package/dist/custom/MJEntityAlternateBaseViewEntityServer.server.js +391 -0
- package/dist/custom/MJEntityAlternateBaseViewEntityServer.server.js.map +1 -0
- package/dist/custom/MJEntityFieldPermissionEntityServer.server.d.ts +96 -22
- package/dist/custom/MJEntityFieldPermissionEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJEntityFieldPermissionEntityServer.server.js +239 -55
- package/dist/custom/MJEntityFieldPermissionEntityServer.server.js.map +1 -1
- 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 +13 -1
- package/dist/custom/MJQueryEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJQueryEntityServer.server.js +56 -8
- 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/MJUserRoleEntityServer.server.d.ts +74 -7
- package/dist/custom/MJUserRoleEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJUserRoleEntityServer.server.js +206 -20
- package/dist/custom/MJUserRoleEntityServer.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 +43 -1
- package/dist/custom/MJUserViewEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJUserViewEntityServer.server.js +169 -11
- package/dist/custom/MJUserViewEntityServer.server.js.map +1 -1
- package/dist/custom/MJVectorIndexEntityServer.server.d.ts +83 -11
- package/dist/custom/MJVectorIndexEntityServer.server.d.ts.map +1 -1
- package/dist/custom/MJVectorIndexEntityServer.server.js +285 -42
- package/dist/custom/MJVectorIndexEntityServer.server.js.map +1 -1
- package/dist/custom/anonymousOwnershipKeyGuard.d.ts +42 -0
- package/dist/custom/anonymousOwnershipKeyGuard.d.ts.map +1 -0
- package/dist/custom/anonymousOwnershipKeyGuard.js +36 -0
- package/dist/custom/anonymousOwnershipKeyGuard.js.map +1 -0
- package/dist/custom/approvalStamp.d.ts +37 -0
- package/dist/custom/approvalStamp.d.ts.map +1 -0
- package/dist/custom/approvalStamp.js +67 -0
- package/dist/custom/approvalStamp.js.map +1 -0
- package/dist/custom/fieldPermissionAccess.d.ts +31 -0
- package/dist/custom/fieldPermissionAccess.d.ts.map +1 -0
- package/dist/custom/fieldPermissionAccess.js +38 -0
- package/dist/custom/fieldPermissionAccess.js.map +1 -0
- package/dist/custom/fieldPermissionReconciler.d.ts.map +1 -1
- package/dist/custom/fieldPermissionReconciler.js +12 -2
- package/dist/custom/fieldPermissionReconciler.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/resolve.d.ts.map +1 -1
- package/dist/custom/query-extraction/resolve.js +25 -7
- package/dist/custom/query-extraction/resolve.js.map +1 -1
- package/dist/custom/query-extraction/sync.d.ts +1 -1
- package/dist/custom/query-extraction/sync.d.ts.map +1 -1
- package/dist/custom/query-extraction/sync.js +84 -21
- package/dist/custom/query-extraction/sync.js.map +1 -1
- package/dist/custom/query-extraction/types.d.ts +7 -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/systemUserGuardState.d.ts +73 -0
- package/dist/custom/systemUserGuardState.d.ts.map +1 -0
- package/dist/custom/systemUserGuardState.js +161 -0
- package/dist/custom/systemUserGuardState.js.map +1 -0
- package/dist/custom/template-extraction/parser.js +5 -2
- package/dist/custom/template-extraction/parser.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 +2 -2
- package/dist/custom/template-extraction/types.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +30 -30
|
@@ -10,7 +10,13 @@ import { RegisterClass, MJGlobal } from "@memberjunction/global";
|
|
|
10
10
|
import { MJVectorIndexEntity } from "@memberjunction/core-entities";
|
|
11
11
|
import { VectorDBBase } from "@memberjunction/ai-vectordb";
|
|
12
12
|
import { GetAIAPIKey } from "@memberjunction/ai";
|
|
13
|
+
import { AIEmbeddingRunner } from "@memberjunction/ai-prompts";
|
|
13
14
|
import { AIEngineBase } from "@memberjunction/ai-engine-base";
|
|
15
|
+
/** The distance metrics a provider index can be created with. */
|
|
16
|
+
const VALID_METRICS = ['cosine', 'euclidean', 'dotproduct'];
|
|
17
|
+
/** Raised by {@link MJVectorIndexEntityServer.withTimeout}, so a hung provider is told apart from one that refused. */
|
|
18
|
+
class ProvisionTimeoutError extends Error {
|
|
19
|
+
}
|
|
14
20
|
/**
|
|
15
21
|
* Server-side VectorIndex entity that syncs with the vector database provider.
|
|
16
22
|
* On create: calls vectorDB.CreateIndex() to provision the index in the provider (e.g., Pinecone).
|
|
@@ -18,21 +24,30 @@ import { AIEngineBase } from "@memberjunction/ai-engine-base";
|
|
|
18
24
|
*
|
|
19
25
|
* Provisioning is DETACHED from the save that triggers it: the save returns once the metadata row is
|
|
20
26
|
* written, and the provider call runs afterwards (see {@link Save}). That call is bounded by
|
|
21
|
-
* {@link CREATE_INDEX_TIMEOUT_MS}: past it the hook stops waiting
|
|
22
|
-
*
|
|
23
|
-
*
|
|
27
|
+
* {@link CREATE_INDEX_TIMEOUT_MS}: past it the hook stops waiting and records `timed-out`. The provider
|
|
28
|
+
* call itself is abandoned, not cancelled (there is no cancellation handle), so the bound limits how
|
|
29
|
+
* long this record's provisioning stays open, not the provider's work.
|
|
24
30
|
* Pinecone's createIndex returns as soon as the request is accepted (we never pass waitUntilReady),
|
|
25
31
|
* so the bound only ever trips on a hung connection, not on a slow index build.
|
|
32
|
+
*
|
|
33
|
+
* Whatever the outcome, it is written onto the row's `ProviderConfig` as a {@link VectorIndexProvisionState}.
|
|
26
34
|
*/
|
|
27
35
|
let MJVectorIndexEntityServer = class MJVectorIndexEntityServer extends MJVectorIndexEntity {
|
|
28
36
|
static { MJVectorIndexEntityServer_1 = this; }
|
|
29
37
|
/** Upper bound on one provider CreateIndex call. */
|
|
30
38
|
static { this.CREATE_INDEX_TIMEOUT_MS = 60_000; }
|
|
39
|
+
/** Upper bound on the one embedding call that learns a model's width (see resolveDimensions). */
|
|
40
|
+
static { this.DIMENSION_PROBE_TIMEOUT_MS = 30_000; }
|
|
41
|
+
/** Width used only when the record has none and the probe cannot answer (OpenAI text-embedding-3-small). */
|
|
42
|
+
static { this.DEFAULT_DIMENSIONS = 1536; }
|
|
43
|
+
/** The one string embedded to learn a model's width; its content is irrelevant, only the vector's length is read. */
|
|
44
|
+
static { this.DIMENSION_PROBE_TEXT = 'dimension probe'; }
|
|
31
45
|
/**
|
|
32
46
|
* After saving, if this is a new record, create the index in the provider.
|
|
33
47
|
* The provider call is deliberately NOT awaited: the client only needs the metadata row, and the
|
|
34
48
|
* request that triggered the save (an "Auto" index from the UI, or the Config page) must not wait
|
|
35
|
-
* on the provider.
|
|
49
|
+
* on the provider. Save() never throws over provisioning; the outcome is recorded on the row's
|
|
50
|
+
* `ProviderConfig` instead (see {@link createIndexInProvider}).
|
|
36
51
|
*/
|
|
37
52
|
async Save(options) {
|
|
38
53
|
const isNew = this.IsSaved === false;
|
|
@@ -76,13 +91,74 @@ let MJVectorIndexEntityServer = class MJVectorIndexEntityServer extends MJVector
|
|
|
76
91
|
return sanitized;
|
|
77
92
|
}
|
|
78
93
|
/**
|
|
79
|
-
*
|
|
94
|
+
* The detached half of {@link Save}: provision, then write the outcome onto the row.
|
|
95
|
+
*
|
|
96
|
+
* Before this, a provider that refused (`success: false`), threw, or never answered reached only
|
|
97
|
+
* the server log, and the committed row looked exactly like one with an index behind it. The
|
|
98
|
+
* row's `ProviderConfig` now says which of the {@link VectorIndexProvisionState}s it is in.
|
|
99
|
+
*
|
|
100
|
+
* Keep this name: the integration suite's content-vectorization fixture stubs it by name to keep
|
|
101
|
+
* the provider out of the run.
|
|
80
102
|
*/
|
|
81
103
|
async createIndexInProvider() {
|
|
104
|
+
let outcome;
|
|
105
|
+
try {
|
|
106
|
+
outcome = await this.provisionIndexInProvider();
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
110
|
+
// A driver that throws rather than returning `success: false` is the same verdict; a call
|
|
111
|
+
// that outlived the bound is not, because the provider may still finish it.
|
|
112
|
+
outcome = { state: error instanceof ProvisionTimeoutError ? 'timed-out' : 'failed', reason };
|
|
113
|
+
}
|
|
114
|
+
await this.recordProvisionState(outcome);
|
|
115
|
+
switch (outcome.state) {
|
|
116
|
+
case 'failed':
|
|
117
|
+
LogError(`Vector index "${this.Name}" was NOT created in the vector database provider: ` +
|
|
118
|
+
`${outcome.reason ?? 'the provider reported a failure with no message'}. ` +
|
|
119
|
+
`Recorded provisionState "failed" on the record; delete it and recreate it once the provider is reachable.`);
|
|
120
|
+
break;
|
|
121
|
+
case 'timed-out':
|
|
122
|
+
LogError(`Vector index "${this.Name}": ${outcome.reason ?? 'the provider did not answer in time'}. ` +
|
|
123
|
+
`Recorded provisionState "timed-out" on the record.`);
|
|
124
|
+
break;
|
|
125
|
+
case 'unprovisioned':
|
|
126
|
+
case 'not-applicable':
|
|
127
|
+
case 'adopted':
|
|
128
|
+
LogStatus(`Vector index "${this.Name}": provisionState "${outcome.state}" (${outcome.reason ?? 'no detail'})`);
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Create the index in the vector database provider and report what happened.
|
|
134
|
+
*
|
|
135
|
+
* Returns rather than logs, so {@link createIndexInProvider} records every outcome the same way.
|
|
136
|
+
* Throws only when the driver throws or the call times out; the caller classifies both.
|
|
137
|
+
*/
|
|
138
|
+
async provisionIndexInProvider() {
|
|
139
|
+
// A row created with ExternalID already set addresses an index that exists on the provider
|
|
140
|
+
// (an Open App's shipped index, or one made outside MJ). Creating one from Name instead would
|
|
141
|
+
// leave an empty index behind and point the row at it, away from the vectors it names.
|
|
142
|
+
const adoptedIndex = this.ExternalID?.trim();
|
|
143
|
+
if (adoptedIndex) {
|
|
144
|
+
return {
|
|
145
|
+
state: 'adopted',
|
|
146
|
+
reason: `ExternalID "${adoptedIndex}" names an existing provider index; nothing was created`,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
82
149
|
const vectorDB = await this.getVectorDBInstance();
|
|
83
150
|
if (!vectorDB) {
|
|
84
|
-
|
|
85
|
-
return
|
|
151
|
+
// getVectorDBInstance() has already logged the specific reason.
|
|
152
|
+
return {
|
|
153
|
+
state: 'unprovisioned',
|
|
154
|
+
reason: `No vector DB driver instance could be built for VectorDatabaseID ${this.VectorDatabaseID} in this process`,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
if (vectorDB.ManagesIndexes === false) {
|
|
158
|
+
return {
|
|
159
|
+
state: 'not-applicable',
|
|
160
|
+
reason: 'This vector database driver owns no index objects; this record is the whole index definition',
|
|
161
|
+
};
|
|
86
162
|
}
|
|
87
163
|
// Sanitize the index name for the provider (e.g., Pinecone requires lowercase, no spaces)
|
|
88
164
|
const sanitizedName = this.sanitizeIndexName(this.Name);
|
|
@@ -91,8 +167,8 @@ let MJVectorIndexEntityServer = class MJVectorIndexEntityServer extends MJVector
|
|
|
91
167
|
}
|
|
92
168
|
const params = {
|
|
93
169
|
id: sanitizedName,
|
|
94
|
-
dimension: this.resolveDimensions(),
|
|
95
|
-
metric:
|
|
170
|
+
dimension: await this.resolveDimensions(),
|
|
171
|
+
metric: this.resolveMetric(),
|
|
96
172
|
additionalParams: {
|
|
97
173
|
serverless: {
|
|
98
174
|
cloud: 'aws',
|
|
@@ -101,29 +177,33 @@ let MJVectorIndexEntityServer = class MJVectorIndexEntityServer extends MJVector
|
|
|
101
177
|
}
|
|
102
178
|
};
|
|
103
179
|
LogStatus(`Creating index "${sanitizedName}" in vector DB provider...`);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
LogStatus(`Index "${sanitizedName}" created successfully in provider`);
|
|
108
|
-
await this.saveProviderMetadata(result.data, params, sanitizedName);
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
LogError(`Provider returned error creating index "${sanitizedName}": ${result.message}`);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
catch (error) {
|
|
115
|
-
LogError(`Exception while creating index "${sanitizedName}" in vector DB provider`, undefined, error);
|
|
180
|
+
const result = await MJVectorIndexEntityServer_1.withTimeout(vectorDB.CreateIndex(params), MJVectorIndexEntityServer_1.CREATE_INDEX_TIMEOUT_MS, `CreateIndex("${sanitizedName}")`);
|
|
181
|
+
if (!result.success) {
|
|
182
|
+
return { state: 'failed', reason: result.message || 'the provider reported a failure with no message' };
|
|
116
183
|
}
|
|
184
|
+
LogStatus(`Index "${sanitizedName}" created successfully in provider`);
|
|
185
|
+
await this.saveProviderMetadata(result.data, params, sanitizedName);
|
|
186
|
+
return { state: 'provisioned' };
|
|
117
187
|
}
|
|
118
188
|
/**
|
|
119
189
|
* Delete the index from the vector database provider.
|
|
120
190
|
*/
|
|
121
191
|
async deleteIndexFromProvider() {
|
|
192
|
+
if (this.readProvisionState() === 'adopted') {
|
|
193
|
+
// MJ never created this index, and other rows or apps may still use it.
|
|
194
|
+
LogStatus(`Vector index "${this.Name}" adopted an existing provider index; leaving it in place`);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
122
197
|
const vectorDB = await this.getVectorDBInstance();
|
|
123
198
|
if (!vectorDB) {
|
|
124
199
|
LogError(`Cannot delete index: no VectorDB instance for database ${this.VectorDatabaseID}`);
|
|
125
200
|
return;
|
|
126
201
|
}
|
|
202
|
+
if (vectorDB.ManagesIndexes === false) {
|
|
203
|
+
// Nothing was ever provisioned, so there is nothing to remove. Asking anyway just
|
|
204
|
+
// produces an "unsupported" error log on every delete.
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
127
207
|
// Same rule every read path uses to address the index on its provider (ExternalID, else Name).
|
|
128
208
|
// An index provisioned through Save() above always has ExternalID set to its sanitized name.
|
|
129
209
|
const providerIndexName = AIEngineBase.Instance.GetProviderIndexName(this);
|
|
@@ -184,15 +264,82 @@ let MJVectorIndexEntityServer = class MJVectorIndexEntityServer extends MJVector
|
|
|
184
264
|
* Resolve the embedding dimensions to create the provider index at.
|
|
185
265
|
*
|
|
186
266
|
* Prefers this index's own `Dimensions` column, which is where the operator states it and what the
|
|
187
|
-
* embedding call already honors.
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
267
|
+
* embedding call already honors. When the record carries none (every index created from the UI:
|
|
268
|
+
* the Config page's Create Index and the "Vector Index: Auto" path both leave it null, and
|
|
269
|
+
* `MJ: AI Models` has no width column to copy from), the width is learned by embedding one short
|
|
270
|
+
* string with the index's own model and reading the vector's length. Every provider fixes the width
|
|
271
|
+
* at create time, so guessing it wrong gives an index the sync can never write to: a 384-dimension
|
|
272
|
+
* model's vectors are rejected by a `VECTOR(1536)` column or a 1536-wide Pinecone index outright.
|
|
191
273
|
*
|
|
192
|
-
* 1536 (OpenAI text-embedding-3-small) remains the fallback
|
|
274
|
+
* 1536 (OpenAI text-embedding-3-small) remains the fallback only when the probe cannot run or
|
|
275
|
+
* fails, and the failure is logged so the width can be set by hand. A wrong fallback does not go
|
|
276
|
+
* unnoticed: the vectorize pipeline compares every returned vector against the index's width and
|
|
277
|
+
* refuses the batch before upserting it.
|
|
278
|
+
*/
|
|
279
|
+
async resolveDimensions() {
|
|
280
|
+
if (this.Dimensions) {
|
|
281
|
+
return this.Dimensions;
|
|
282
|
+
}
|
|
283
|
+
const probed = await this.probeModelDimensions();
|
|
284
|
+
if (probed === null) {
|
|
285
|
+
LogError(`Vector index "${this.Name}": could not learn the embedding width; creating the provider index at the ${MJVectorIndexEntityServer_1.DEFAULT_DIMENSIONS} fallback. Set Dimensions on the record if the model's width differs.`);
|
|
286
|
+
return MJVectorIndexEntityServer_1.DEFAULT_DIMENSIONS;
|
|
287
|
+
}
|
|
288
|
+
return probed;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Embed one short string with this index's embedding model and return the vector's length, or null
|
|
292
|
+
* when there is no model, no user context, or the call fails. `ModelID` is pinned so the answer
|
|
293
|
+
* comes from the model the index is for; the run row is skipped since this is not a real workload.
|
|
193
294
|
*/
|
|
194
|
-
|
|
195
|
-
|
|
295
|
+
async probeModelDimensions() {
|
|
296
|
+
if (!this.EmbeddingModelID) {
|
|
297
|
+
LogError(`Vector index "${this.Name}" has no EmbeddingModelID; cannot probe its embedding width`);
|
|
298
|
+
return null;
|
|
299
|
+
}
|
|
300
|
+
if (!this.ContextCurrentUser) {
|
|
301
|
+
LogError(`Vector index "${this.Name}" has no context user; cannot probe its embedding width`);
|
|
302
|
+
return null;
|
|
303
|
+
}
|
|
304
|
+
try {
|
|
305
|
+
const result = await MJVectorIndexEntityServer_1.withTimeout(new AIEmbeddingRunner().RunEmbedding({
|
|
306
|
+
Texts: [MJVectorIndexEntityServer_1.DIMENSION_PROBE_TEXT],
|
|
307
|
+
ModelID: this.EmbeddingModelID,
|
|
308
|
+
ContextUser: this.ContextCurrentUser,
|
|
309
|
+
// The entity's data provider is the same object as its metadata provider; this is
|
|
310
|
+
// the cast BaseEntity itself uses wherever it needs the metadata view of it.
|
|
311
|
+
Provider: this.ProviderToUse,
|
|
312
|
+
SkipRunRecord: true,
|
|
313
|
+
Description: `Vector index "${this.Name}" dimension probe`,
|
|
314
|
+
}), MJVectorIndexEntityServer_1.DIMENSION_PROBE_TIMEOUT_MS, `Dimension probe for vector index "${this.Name}"`);
|
|
315
|
+
const width = result.Success ? result.Vectors?.[0]?.length ?? 0 : 0;
|
|
316
|
+
if (width <= 0) {
|
|
317
|
+
LogError(`Dimension probe for vector index "${this.Name}" returned no vector: ${result.ErrorMessage ?? 'empty result'}`);
|
|
318
|
+
return null;
|
|
319
|
+
}
|
|
320
|
+
LogStatus(`Vector index "${this.Name}": embedding width ${width} learned from model ${result.ModelName ?? this.EmbeddingModelID}`);
|
|
321
|
+
return width;
|
|
322
|
+
}
|
|
323
|
+
catch (error) {
|
|
324
|
+
LogError(`Dimension probe for vector index "${this.Name}" failed`, undefined, error);
|
|
325
|
+
return null;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Resolve the distance metric to request the provider index be created with.
|
|
330
|
+
*
|
|
331
|
+
* `Metric` on this row is what the operator asked for; `cosine` is the fallback. This used to be
|
|
332
|
+
* hardcoded to `cosine` at the call site, which made the `Metric` write-back a tautology: the
|
|
333
|
+
* column simply echoed a constant this file had chosen, so it could never disagree with the
|
|
334
|
+
* provider and could never tell you the provider had done something else.
|
|
335
|
+
*/
|
|
336
|
+
resolveMetric() {
|
|
337
|
+
const stated = this.Metric?.trim().toLowerCase();
|
|
338
|
+
const match = VALID_METRICS.find((m) => m === stated);
|
|
339
|
+
if (stated && !match) {
|
|
340
|
+
LogError(`Vector index "${this.Name}" declares an unrecognized Metric "${this.Metric}"; requesting "cosine" instead. Valid values: ${VALID_METRICS.join(', ')}.`);
|
|
341
|
+
}
|
|
342
|
+
return match ?? 'cosine';
|
|
196
343
|
}
|
|
197
344
|
/**
|
|
198
345
|
* Resolve `work` or reject after `timeoutMs`, whichever comes first. The timer is cleared when the
|
|
@@ -202,46 +349,142 @@ let MJVectorIndexEntityServer = class MJVectorIndexEntityServer extends MJVector
|
|
|
202
349
|
static withTimeout(work, timeoutMs, label) {
|
|
203
350
|
return new Promise((resolve, reject) => {
|
|
204
351
|
const timer = setTimeout(() => {
|
|
205
|
-
reject(new
|
|
206
|
-
`but
|
|
352
|
+
reject(new ProvisionTimeoutError(`${label} timed out after ${timeoutMs}ms; the provider may still finish on its side, ` +
|
|
353
|
+
`but nothing it returns will be written back to the record`));
|
|
207
354
|
}, timeoutMs);
|
|
208
355
|
Promise.resolve(work).then((value) => { clearTimeout(timer); resolve(value); }, (error) => { clearTimeout(timer); reject(error); });
|
|
209
356
|
});
|
|
210
357
|
}
|
|
211
358
|
/**
|
|
212
359
|
* After provider creates the index, save the returned metadata back to our record.
|
|
213
|
-
* Stores ExternalID, Dimensions, Metric, and
|
|
360
|
+
* Stores ExternalID, Dimensions, Metric, the provisioning state, and provider config as JSON.
|
|
361
|
+
*
|
|
362
|
+
* **Provider truth beats our request.** `Dimensions` and `Metric` are read off the provider's
|
|
363
|
+
* own response when it reports them, and only fall back to what we asked for. A provider is
|
|
364
|
+
* free to round, clamp or ignore a requested dimension, and the whole point of these two
|
|
365
|
+
* columns is to be checkable against the embeddings we later generate; a column that can
|
|
366
|
+
* only ever repeat our own request is not a check.
|
|
367
|
+
*
|
|
368
|
+
* A failed write-back is logged rather than recorded: the index exists, and the only way to
|
|
369
|
+
* record anything on the row is the same save that just failed.
|
|
214
370
|
*/
|
|
215
371
|
async saveProviderMetadata(providerResult, params, sanitizedName) {
|
|
216
372
|
try {
|
|
217
|
-
// Save what we know from our params + whatever the provider returned
|
|
218
373
|
this.ExternalID = sanitizedName; // The sanitized name used in the provider
|
|
219
|
-
this.Dimensions = params.dimension;
|
|
220
|
-
this.Metric = params.metric;
|
|
221
|
-
// Store full provider response + our spec as JSON config
|
|
222
|
-
const
|
|
374
|
+
this.Dimensions = this.readProviderDimension(providerResult) ?? params.dimension;
|
|
375
|
+
this.Metric = this.readProviderMetric(providerResult) ?? params.metric;
|
|
376
|
+
// Store full provider response + our spec as JSON config while preserving existing keys (e.g. namespaceField)
|
|
377
|
+
const extra = {};
|
|
223
378
|
if (params.additionalParams) {
|
|
224
|
-
|
|
379
|
+
extra['spec'] = params.additionalParams;
|
|
225
380
|
}
|
|
226
381
|
if (providerResult && typeof providerResult === 'object') {
|
|
227
382
|
// Extract useful provider metadata (host, status, etc.)
|
|
228
383
|
if ('host' in providerResult)
|
|
229
|
-
|
|
384
|
+
extra['host'] = providerResult['host'];
|
|
230
385
|
if ('status' in providerResult)
|
|
231
|
-
|
|
386
|
+
extra['status'] = providerResult['status'];
|
|
232
387
|
}
|
|
233
|
-
this.ProviderConfig =
|
|
388
|
+
this.ProviderConfig = this.buildProviderConfig({ state: 'provisioned' }, extra);
|
|
234
389
|
const saved = await super.Save();
|
|
235
390
|
if (saved) {
|
|
236
391
|
LogStatus(`Saved provider metadata for index "${this.Name}"`);
|
|
237
392
|
}
|
|
238
393
|
else {
|
|
239
|
-
LogError(
|
|
394
|
+
LogError(this.writeBackFailureMessage(sanitizedName, this.LatestResult?.CompleteMessage ?? 'the record save returned false with no message'));
|
|
240
395
|
}
|
|
241
396
|
}
|
|
242
397
|
catch (error) {
|
|
243
|
-
LogError(
|
|
398
|
+
LogError(this.writeBackFailureMessage(sanitizedName, error instanceof Error ? error.message : String(error)), undefined, error);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
writeBackFailureMessage(sanitizedName, reason) {
|
|
402
|
+
return `Vector index "${this.Name}" WAS created in the vector database provider as "${sanitizedName}", but its ` +
|
|
403
|
+
`provider metadata could not be written back to the record: ${reason}. The index exists and the record ` +
|
|
404
|
+
`does not yet address it; set ExternalID to "${sanitizedName}" to reconcile them.`;
|
|
405
|
+
}
|
|
406
|
+
/** The provider's own dimension, when it reported a usable one. */
|
|
407
|
+
readProviderDimension(providerResult) {
|
|
408
|
+
const raw = providerResult?.['dimension'];
|
|
409
|
+
const value = typeof raw === 'number' ? raw : typeof raw === 'string' ? Number(raw) : NaN;
|
|
410
|
+
return Number.isFinite(value) && value > 0 ? value : null;
|
|
411
|
+
}
|
|
412
|
+
/** The provider's own metric, when it reported a recognized one. */
|
|
413
|
+
readProviderMetric(providerResult) {
|
|
414
|
+
const raw = providerResult?.['metric'];
|
|
415
|
+
if (typeof raw !== 'string') {
|
|
416
|
+
return null;
|
|
417
|
+
}
|
|
418
|
+
const normalized = raw.trim().toLowerCase();
|
|
419
|
+
return VALID_METRICS.find((m) => m === normalized) ?? null;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Write the provisioning outcome onto the row, so a row that has no index behind it says so
|
|
423
|
+
* instead of looking identical to one that does.
|
|
424
|
+
*
|
|
425
|
+
* Best-effort by construction: this runs after the caller's save has already returned, and a
|
|
426
|
+
* second failure here must not replace the original diagnosis with a save error.
|
|
427
|
+
*/
|
|
428
|
+
async recordProvisionState(outcome) {
|
|
429
|
+
if (outcome.state === 'provisioned') {
|
|
430
|
+
return; // saveProviderMetadata already stamped it, along with the provider's values
|
|
431
|
+
}
|
|
432
|
+
try {
|
|
433
|
+
this.ProviderConfig = this.buildProviderConfig(outcome);
|
|
434
|
+
const saved = await super.Save();
|
|
435
|
+
if (!saved) {
|
|
436
|
+
LogError(`Could not record provisioning state "${outcome.state}" on vector index "${this.Name}": ${this.LatestResult?.CompleteMessage ?? 'save returned false'}`);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
catch (error) {
|
|
440
|
+
LogError(`Could not record provisioning state "${outcome.state}" on vector index "${this.Name}"`, undefined, error);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
/** The `provisionState` recorded on `ProviderConfig`, or undefined when there is none or it cannot be read. */
|
|
444
|
+
readProvisionState() {
|
|
445
|
+
if (!this.ProviderConfig) {
|
|
446
|
+
return undefined;
|
|
447
|
+
}
|
|
448
|
+
try {
|
|
449
|
+
const parsed = JSON.parse(this.ProviderConfig);
|
|
450
|
+
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
451
|
+
const state = parsed['provisionState'];
|
|
452
|
+
return typeof state === 'string' ? state : undefined;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
catch {
|
|
456
|
+
// An unreadable ProviderConfig carries no provisioning state.
|
|
457
|
+
}
|
|
458
|
+
return undefined;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Merge the provisioning outcome into the existing `ProviderConfig` JSON bag, preserving any
|
|
462
|
+
* driver-specific keys already there (e.g. Pinecone's `namespaceField`).
|
|
463
|
+
*/
|
|
464
|
+
buildProviderConfig(outcome, extra) {
|
|
465
|
+
let existing = {};
|
|
466
|
+
if (this.ProviderConfig) {
|
|
467
|
+
try {
|
|
468
|
+
const parsed = JSON.parse(this.ProviderConfig);
|
|
469
|
+
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
470
|
+
existing = parsed;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
catch {
|
|
474
|
+
// A ProviderConfig we cannot parse is not something to preserve silently.
|
|
475
|
+
LogError(`Vector index "${this.Name}" has an unparseable ProviderConfig; it is being replaced.`);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
const merged = { ...existing, ...(extra ?? {}) };
|
|
479
|
+
merged['provisionState'] = outcome.state;
|
|
480
|
+
merged['provisionCheckedAt'] = new Date().toISOString();
|
|
481
|
+
if (outcome.reason) {
|
|
482
|
+
merged['provisionMessage'] = outcome.reason;
|
|
483
|
+
}
|
|
484
|
+
else {
|
|
485
|
+
delete merged['provisionMessage'];
|
|
244
486
|
}
|
|
487
|
+
return JSON.stringify(merged);
|
|
245
488
|
}
|
|
246
489
|
};
|
|
247
490
|
MJVectorIndexEntityServer = MJVectorIndexEntityServer_1 = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MJVectorIndexEntityServer.server.js","sourceRoot":"","sources":["../../src/custom/MJVectorIndexEntityServer.server.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAqB,QAAQ,EAAE,SAAS,EAAY,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAA0B,MAAM,+BAA+B,CAAC;AAC5F,OAAO,EAAE,YAAY,EAA2C,MAAM,6BAA6B,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D;;;;;;;;;;;;GAYG;AAEI,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,mBAAmB;;IAC9D,oDAAoD;aAC7B,4BAAuB,GAAG,MAAM,AAAT,CAAU;IAExD;;;;;OAKG;IACa,KAAK,CAAC,IAAI,CAAC,OAA2B;QAClD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC;QACrC,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAE7C,IAAI,UAAU,IAAI,KAAK,EAAE,CAAC;YACtB,IAAI,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gBACzC,QAAQ,CAAC,2BAA2B,IAAI,CAAC,IAAI,yBAAyB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;YAC9F,CAAC,CAAC,CAAC;QACP,CAAC;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;IAED;;OAEG;IACa,KAAK,CAAC,MAAM;QACxB,oFAAoF;QACpF,MAAM,IAA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D,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;;AA1fQ,yBAAyB;IADrC,aAAa,CAAC,UAAU,EAAE,oBAAoB,CAAC;GACnC,yBAAyB,CA2frC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ValidationErrorInfo, type TransactionVariable } from '@memberjunction/core';
|
|
2
|
+
/** The slice of a transaction group the guard reads: its variables. */
|
|
3
|
+
export interface GuardedTransactionGroup {
|
|
4
|
+
Variables: ReadonlyArray<Pick<TransactionVariable, 'EntityObject' | 'Type' | 'FieldName'>>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The slice of a BaseEntity the guard reads: whether the row exists yet, who is saving it, its fields, and the
|
|
8
|
+
* transaction group it is saved in (if any).
|
|
9
|
+
*/
|
|
10
|
+
export interface OwnershipKeyGuardTarget {
|
|
11
|
+
IsSaved: boolean;
|
|
12
|
+
ContextCurrentUser?: {
|
|
13
|
+
IsMagicLinkAnonymous?: boolean;
|
|
14
|
+
} | null;
|
|
15
|
+
GetFieldByName(name: string): {
|
|
16
|
+
Dirty: boolean;
|
|
17
|
+
} | null | undefined;
|
|
18
|
+
TransactionGroup?: GuardedTransactionGroup | null;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Whether a `'Use'` transaction variable will set one of `fieldNames` on `target` (case-insensitive). Such a variable
|
|
22
|
+
* sets its field at `Submit()`, after `Validate()` has passed, so a check that reads `Dirty` never sees the value
|
|
23
|
+
* that is written. `ExecuteTransactionGroup` registers every variable before any item is saved, which is what lets a
|
|
24
|
+
* `Validate()` see them. The same rule guards `MJ: Conversation Details` (`fieldSetByTransactionVariable`).
|
|
25
|
+
*/
|
|
26
|
+
export declare function IsSetByTransactionVariable(target: Pick<OwnershipKeyGuardTarget, 'TransactionGroup'>, fieldNames: readonly string[]): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Refuses an anonymous visitor changing an anonymous-session ownership key on an EXISTING row (#4931).
|
|
29
|
+
*
|
|
30
|
+
* An anonymous visitor's realtime session is owned through `AIAgentSession.ConversationID` →
|
|
31
|
+
* `Conversation.ExternalID` (see `AuthorizeSessionAccess` in `@memberjunction/server`). Every anonymous
|
|
32
|
+
* visitor shares one Anonymous user, so under a role whose row-level security filters by `UserID` (the
|
|
33
|
+
* stock `UI` role) one visitor can load another visitor's row and would otherwise rewrite either key to
|
|
34
|
+
* its own identity and pass the ownership gate. The key is set once, when the row is created — by
|
|
35
|
+
* `SessionManager` for a server-created session and its conversation, and by the web widget for the
|
|
36
|
+
* conversation it creates — so an insert is allowed and only a change to a saved row is refused.
|
|
37
|
+
* Named callers are unaffected.
|
|
38
|
+
*
|
|
39
|
+
* @returns a refusal to push into the entity's validation result, or null when the save may proceed.
|
|
40
|
+
*/
|
|
41
|
+
export declare function CheckAnonymousOwnershipKeyChange(target: OwnershipKeyGuardTarget, fieldName: string): ValidationErrorInfo | null;
|
|
42
|
+
//# sourceMappingURL=anonymousOwnershipKeyGuard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anonymousOwnershipKeyGuard.d.ts","sourceRoot":"","sources":["../../src/custom/anonymousOwnershipKeyGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAuB,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE1G,uEAAuE;AACvE,MAAM,WAAW,uBAAuB;IACpC,SAAS,EAAE,aAAa,CAAC,IAAI,CAAC,mBAAmB,EAAE,cAAc,GAAG,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC;CAC9F;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE;QAAE,oBAAoB,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAC/D,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,GAAG,SAAS,CAAC;IACpE,gBAAgB,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;CACrD;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,IAAI,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAK5I;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAc/H"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ValidationErrorInfo, ValidationErrorType } from '@memberjunction/core';
|
|
2
|
+
/**
|
|
3
|
+
* Whether a `'Use'` transaction variable will set one of `fieldNames` on `target` (case-insensitive). Such a variable
|
|
4
|
+
* sets its field at `Submit()`, after `Validate()` has passed, so a check that reads `Dirty` never sees the value
|
|
5
|
+
* that is written. `ExecuteTransactionGroup` registers every variable before any item is saved, which is what lets a
|
|
6
|
+
* `Validate()` see them. The same rule guards `MJ: Conversation Details` (`fieldSetByTransactionVariable`).
|
|
7
|
+
*/
|
|
8
|
+
export function IsSetByTransactionVariable(target, fieldNames) {
|
|
9
|
+
const wanted = fieldNames.map((n) => n.toLowerCase());
|
|
10
|
+
return !!target.TransactionGroup?.Variables.some((v) => v.EntityObject === target && v.Type === 'Use' && wanted.includes(v.FieldName.trim().toLowerCase()));
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Refuses an anonymous visitor changing an anonymous-session ownership key on an EXISTING row (#4931).
|
|
14
|
+
*
|
|
15
|
+
* An anonymous visitor's realtime session is owned through `AIAgentSession.ConversationID` →
|
|
16
|
+
* `Conversation.ExternalID` (see `AuthorizeSessionAccess` in `@memberjunction/server`). Every anonymous
|
|
17
|
+
* visitor shares one Anonymous user, so under a role whose row-level security filters by `UserID` (the
|
|
18
|
+
* stock `UI` role) one visitor can load another visitor's row and would otherwise rewrite either key to
|
|
19
|
+
* its own identity and pass the ownership gate. The key is set once, when the row is created — by
|
|
20
|
+
* `SessionManager` for a server-created session and its conversation, and by the web widget for the
|
|
21
|
+
* conversation it creates — so an insert is allowed and only a change to a saved row is refused.
|
|
22
|
+
* Named callers are unaffected.
|
|
23
|
+
*
|
|
24
|
+
* @returns a refusal to push into the entity's validation result, or null when the save may proceed.
|
|
25
|
+
*/
|
|
26
|
+
export function CheckAnonymousOwnershipKeyChange(target, fieldName) {
|
|
27
|
+
if (!target.IsSaved || !target.ContextCurrentUser?.IsMagicLinkAnonymous) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
// `ID` too: a variable that sets it re-points the update at another row, which then takes this row's key.
|
|
31
|
+
if (!target.GetFieldByName(fieldName)?.Dirty && !IsSetByTransactionVariable(target, [fieldName, 'ID'])) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return new ValidationErrorInfo(fieldName, `${fieldName} identifies who owns an anonymous realtime session and cannot be changed by an anonymous visitor.`, null, ValidationErrorType.Failure);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=anonymousOwnershipKeyGuard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anonymousOwnershipKeyGuard.js","sourceRoot":"","sources":["../../src/custom/anonymousOwnershipKeyGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAA4B,MAAM,sBAAsB,CAAC;AAkB1G;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAyD,EAAE,UAA6B;IAC/H,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IACtD,OAAO,CAAC,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,CAAC,IAAI,CAC5C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,KAAK,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAC5G,CAAC;AACN,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,gCAAgC,CAAC,MAA+B,EAAE,SAAiB;IAC/F,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,oBAAoB,EAAE,CAAC;QACtE,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,0GAA0G;IAC1G,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,KAAK,IAAI,CAAC,0BAA0B,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC;QACrG,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,OAAO,IAAI,mBAAmB,CAC1B,SAAS,EACT,GAAG,SAAS,mGAAmG,EAC/G,IAAI,EACJ,mBAAmB,CAAC,OAAO,CAC9B,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side approval stamping for queries, user views, dashboards and components.
|
|
3
|
+
*
|
|
4
|
+
* Approving is a server act. A save that moves a record's status to Approved records the context
|
|
5
|
+
* user as the approver, the time, and — once the definition is stored — the fingerprint of that
|
|
6
|
+
* definition (`approvals.ts` in `@memberjunction/core-entities`). Values a client sends for those
|
|
7
|
+
* three columns are never stored. Who may approve is whoever may update the record today.
|
|
8
|
+
*/
|
|
9
|
+
import { BaseEntity, BaseEntityResult } from '@memberjunction/core';
|
|
10
|
+
/** The approval columns every approvable entity carries. */
|
|
11
|
+
export interface ApprovalColumns {
|
|
12
|
+
ApprovedByUserID: string | null;
|
|
13
|
+
ApprovedAt: Date | null;
|
|
14
|
+
ApprovedFingerprint: string | null;
|
|
15
|
+
}
|
|
16
|
+
/** The status column that carries the approval: `Status` on queries, `ApprovalStatus` on the others. */
|
|
17
|
+
export type ApprovalStatusField = 'Status' | 'ApprovalStatus';
|
|
18
|
+
/**
|
|
19
|
+
* Applies the approval rules to a record about to be saved, and says whether this save approves it.
|
|
20
|
+
*
|
|
21
|
+
* - The save approves when the status becomes Approved and the stored status is not Approved (or
|
|
22
|
+
* the record is new). The approver is the context user and the time is now; the fingerprint is
|
|
23
|
+
* cleared until the caller stamps it from the definition as stored.
|
|
24
|
+
* - On any other save the three columns keep their stored values (none on a create), so values a
|
|
25
|
+
* client sent are ignored. Moving away from Approved clears nothing: the approval stays as history
|
|
26
|
+
* and stops being current because the status is no longer Approved.
|
|
27
|
+
*
|
|
28
|
+
* The stored values are read from the database rather than the record's old values, which a client
|
|
29
|
+
* can supply on an update.
|
|
30
|
+
*
|
|
31
|
+
* @returns true when this save approves the record
|
|
32
|
+
* @throws when the stored row cannot be read, or when approving with no context user
|
|
33
|
+
*/
|
|
34
|
+
export declare function ApplyApprovalRulesAsync(record: BaseEntity & ApprovalColumns, statusField: ApprovalStatusField, newStatus: string | null): Promise<boolean>;
|
|
35
|
+
/** A failed save result for a save refused before anything was written. */
|
|
36
|
+
export declare function ApprovalRefusalResult(record: BaseEntity, error: unknown): BaseEntityResult;
|
|
37
|
+
//# sourceMappingURL=approvalStamp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approvalStamp.d.ts","sourceRoot":"","sources":["../../src/custom/approvalStamp.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC5B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,wGAAwG;AACxG,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,gBAAgB,CAAC;AAS9D;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,uBAAuB,CACzC,MAAM,EAAE,UAAU,GAAG,eAAe,EACpC,WAAW,EAAE,mBAAmB,EAChC,SAAS,EAAE,MAAM,GAAG,IAAI,GACzB,OAAO,CAAC,OAAO,CAAC,CAgBlB;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAQ1F"}
|