@memberjunction/ng-dashboards 6.2.0-edge.5 → 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/README.md +28 -0
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +15 -7
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts +7 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +209 -57
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts +12 -11
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.js +15 -15
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.js.map +1 -1
- package/dist/AI/components/execution-monitoring.component.d.ts.map +1 -1
- package/dist/AI/components/execution-monitoring.component.js +28 -16
- package/dist/AI/components/execution-monitoring.component.js.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +1 -0
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +30 -6
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.d.ts +1 -1
- package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.js +15 -7
- package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/sensitive-fields.d.ts +9 -4
- package/dist/AI/components/vectors/sensitive-fields.d.ts.map +1 -1
- package/dist/AI/components/vectors/sensitive-fields.js +39 -14
- package/dist/AI/components/vectors/sensitive-fields.js.map +1 -1
- package/dist/AI/components/vectors/vector-document-rules.d.ts +13 -0
- package/dist/AI/components/vectors/vector-document-rules.d.ts.map +1 -1
- package/dist/AI/components/vectors/vector-document-rules.js +14 -0
- package/dist/AI/components/vectors/vector-document-rules.js.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts +34 -14
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +127 -50
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/vector-store-selection.d.ts +32 -0
- package/dist/AI/components/vectors/vector-store-selection.d.ts.map +1 -0
- package/dist/AI/components/vectors/vector-store-selection.js +57 -0
- package/dist/AI/components/vectors/vector-store-selection.js.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts +236 -0
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.js +374 -0
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.js.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts +195 -0
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js +2910 -0
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js.map +1 -0
- package/dist/ChiefOfStaff/index.d.ts +3 -0
- package/dist/ChiefOfStaff/index.d.ts.map +1 -0
- package/dist/ChiefOfStaff/index.js +3 -0
- package/dist/ChiefOfStaff/index.js.map +1 -0
- package/dist/Communication/communication-logs-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-logs-resource.component.js +2 -1
- package/dist/Communication/communication-logs-resource.component.js.map +1 -1
- package/dist/Communication/communication-monitor-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-monitor-resource.component.js +23 -18
- package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
- package/dist/Communication/communication-runs-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-runs-resource.component.js +11 -10
- package/dist/Communication/communication-runs-resource.component.js.map +1 -1
- package/dist/DashboardEditor/dashboard-editor.component.d.ts +17 -2
- package/dist/DashboardEditor/dashboard-editor.component.d.ts.map +1 -1
- package/dist/DashboardEditor/dashboard-editor.component.js +94 -43
- package/dist/DashboardEditor/dashboard-editor.component.js.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +24 -0
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +146 -50
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/DataExplorer/models/explorer-state.interface.d.ts +2 -0
- package/dist/DataExplorer/models/explorer-state.interface.d.ts.map +1 -1
- package/dist/DataExplorer/models/explorer-state.interface.js.map +1 -1
- package/dist/LoginStudio/login-studio-resource.component.d.ts +10 -2
- package/dist/LoginStudio/login-studio-resource.component.d.ts.map +1 -1
- package/dist/LoginStudio/login-studio-resource.component.js +110 -77
- package/dist/LoginStudio/login-studio-resource.component.js.map +1 -1
- package/dist/MCP/mcp-dashboard.component.d.ts +24 -4
- package/dist/MCP/mcp-dashboard.component.d.ts.map +1 -1
- package/dist/MCP/mcp-dashboard.component.js +118 -65
- package/dist/MCP/mcp-dashboard.component.js.map +1 -1
- package/dist/PredictiveStudio/business-predictions.view-models.d.ts +1 -1
- package/dist/PredictiveStudio/business-predictions.view-models.d.ts.map +1 -1
- package/dist/PredictiveStudio/business-predictions.view-models.js +3 -3
- package/dist/PredictiveStudio/business-predictions.view-models.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-experiments.component.d.ts +6 -63
- package/dist/PredictiveStudio/components/ps-experiments.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-experiments.component.js +256 -521
- package/dist/PredictiveStudio/components/ps-experiments.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts +0 -18
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js +122 -249
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts +5 -9
- package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-pipelines.component.js +98 -130
- package/dist/PredictiveStudio/components/ps-pipelines.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts +53 -4
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.js +335 -326
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts +19 -0
- package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts.map +1 -0
- package/dist/PredictiveStudio/components/ps-row-drivers.component.js +85 -0
- package/dist/PredictiveStudio/components/ps-row-drivers.component.js.map +1 -0
- package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts +19 -1
- package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts.map +1 -1
- package/dist/PredictiveStudio/engine/predictive-studio.engine.js +51 -2
- package/dist/PredictiveStudio/engine/predictive-studio.engine.js.map +1 -1
- package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts +3 -1
- package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts.map +1 -1
- package/dist/PredictiveStudio/predictive-studio-agent-context.js +3 -0
- package/dist/PredictiveStudio/predictive-studio-agent-context.js.map +1 -1
- package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts +27 -4
- package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts.map +1 -1
- package/dist/PredictiveStudio/predictive-studio-score-history.service.js +94 -61
- package/dist/PredictiveStudio/predictive-studio-score-history.service.js.map +1 -1
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts +29 -5
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js +185 -103
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js.map +1 -1
- package/dist/PredictiveStudio/resources/ps-studio-resource.component.js +1 -1
- package/dist/PredictiveStudio/resources/ps-studio-resource.component.js.map +1 -1
- package/dist/ai-dashboards.module.d.ts +22 -21
- package/dist/ai-dashboards.module.d.ts.map +1 -1
- package/dist/ai-dashboards.module.js +8 -2
- package/dist/ai-dashboards.module.js.map +1 -1
- package/dist/public-api.d.ts +2 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +71 -71
- package/dist/PredictiveStudio/at-risk.view-models.d.ts +0 -120
- package/dist/PredictiveStudio/at-risk.view-models.d.ts.map +0 -1
- package/dist/PredictiveStudio/at-risk.view-models.js +0 -261
- package/dist/PredictiveStudio/at-risk.view-models.js.map +0 -1
- package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts +0 -109
- package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts.map +0 -1
- package/dist/PredictiveStudio/components/ps-confirm-modal.component.js +0 -323
- package/dist/PredictiveStudio/components/ps-confirm-modal.component.js.map +0 -1
- package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts +0 -137
- package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts.map +0 -1
- package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js +0 -826
- package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UserInfo, type IMetadataProvider } from '@memberjunction/core';
|
|
2
|
-
import {
|
|
3
|
-
import { type OutcomeConfig } from '@memberjunction/predictive-studio-core';
|
|
1
|
+
import { RunView, UserInfo, type IMetadataProvider } from '@memberjunction/core';
|
|
2
|
+
import { MJProcessRunDetailEntity } from '@memberjunction/core-entities';
|
|
3
|
+
import { type RowDriver, type OutcomeConfig } from '@memberjunction/predictive-studio-core';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/** One historical score point for an entity record produced by a model run. */
|
|
6
6
|
export interface ModelScoreHistoryPoint {
|
|
@@ -18,25 +18,48 @@ export interface ModelScoreHistoryPoint {
|
|
|
18
18
|
Delta: number | null;
|
|
19
19
|
}
|
|
20
20
|
export interface LoadScoreHistoryParams {
|
|
21
|
+
/** The provider the history is read through. Required: a dropped provider is a compile error, not an empty panel. */
|
|
21
22
|
provider: IMetadataProvider;
|
|
22
23
|
User?: UserInfo;
|
|
23
24
|
entityId?: string | null;
|
|
24
25
|
recordId: string;
|
|
26
|
+
/** When set, only the runs of this model's Record Processes are read (filtered in the query, not after it). */
|
|
25
27
|
modelId?: string | null;
|
|
28
|
+
/** The most recent runs to read (default 50). */
|
|
26
29
|
MaxRuns?: number;
|
|
27
30
|
OutcomeConfig?: OutcomeConfig | null;
|
|
28
31
|
ProblemType?: string | null;
|
|
32
|
+
InvertedRisk: boolean;
|
|
29
33
|
}
|
|
34
|
+
/** The Process Run Detail columns the history reads. */
|
|
35
|
+
type ScoreHistoryDetailRow = Pick<MJProcessRunDetailEntity, 'ProcessRunID' | 'ResultPayload' | 'Status' | 'CompletedAt' | '__mj_CreatedAt' | 'DurationMs'>;
|
|
30
36
|
/**
|
|
31
37
|
* Service for retrieving and formatting the complete historical trendline of model prediction
|
|
32
38
|
* results for a specific entity record from `MJ: Process Run Details`.
|
|
33
39
|
*/
|
|
34
40
|
export declare class PredictiveStudioScoreHistoryService {
|
|
41
|
+
/** The fields {@link LoadRecordScoreHistory} reads; display-only, so the read is `simple`. */
|
|
42
|
+
private static readonly historyFields;
|
|
35
43
|
/**
|
|
36
|
-
* Load the
|
|
44
|
+
* Load the most recent predictions for a record (up to `MaxRuns`), returned oldest to newest. Read failures are logged
|
|
45
|
+
* and return an empty history.
|
|
37
46
|
*/
|
|
38
47
|
LoadRecordScoreHistory(params: LoadScoreHistoryParams): Promise<ModelScoreHistoryPoint[]>;
|
|
48
|
+
/** The RunView the history reads through. Tests override this to serve fixture rows. */
|
|
49
|
+
protected CreateRunView(provider: IMetadataProvider): Pick<RunView, 'RunView' | 'RunViews'>;
|
|
50
|
+
/**
|
|
51
|
+
* The detail filter: the record (and entity, when known) and, when a model is given, only the runs of Record Processes
|
|
52
|
+
* whose configuration names that model. Schema and view names come from the provider's metadata.
|
|
53
|
+
*/
|
|
54
|
+
protected BuildHistoryFilter(params: LoadScoreHistoryParams): string;
|
|
55
|
+
/** `ProcessRunID IN (…)` over the runs of the Record Processes configured for `modelId`. */
|
|
56
|
+
protected BuildModelRunsPredicate(provider: IMetadataProvider, modelId: string): string;
|
|
57
|
+
/** Turn the oldest-to-newest detail rows into trendline points, skipping rows without a usable score. */
|
|
58
|
+
protected ToHistoryPoints(rows: ScoreHistoryDetailRow[], params: LoadScoreHistoryParams): ModelScoreHistoryPoint[];
|
|
59
|
+
/** Parse a stored payload to its prediction fields; null when it is missing or not JSON. */
|
|
60
|
+
private parsePayload;
|
|
39
61
|
static ɵfac: i0.ɵɵFactoryDeclaration<PredictiveStudioScoreHistoryService, never>;
|
|
40
62
|
static ɵprov: i0.ɵɵInjectableDeclaration<PredictiveStudioScoreHistoryService>;
|
|
41
63
|
}
|
|
64
|
+
export {};
|
|
42
65
|
//# sourceMappingURL=predictive-studio-score-history.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predictive-studio-score-history.service.d.ts","sourceRoot":"","sources":["../../src/PredictiveStudio/predictive-studio-score-history.service.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"predictive-studio-score-history.service.d.ts","sourceRoot":"","sources":["../../src/Predict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,cAAc,GAAG,eAAe,GAAG,QAAQ,GAAG,aAAa,GAAG,gBAAgB,GAAG,YAAY,CAAC,CAAC;AAU3J;;;GAGG;AACH,qBAGa,mCAAmC;IAC9C,8FAA8F;IAC9F,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAkI;IAEvK;;;OAGG;IACU,sBAAsB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC;IA0BtG,wFAAwF;IACxF,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,UAAU,CAAC;IAI3F;;;OAGG;IACH,SAAS,CAAC,kBAAkB,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM;IAWpE,4FAA4F;IAC5F,SAAS,CAAC,uBAAuB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IAavF,yGAAyG;IACzG,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,qBAAqB,EAAE,EAAE,MAAM,EAAE,sBAAsB,GAAG,sBAAsB,EAAE;IA+BlH,4FAA4F;IAC5F,OAAO,CAAC,YAAY;yCArGT,mCAAmC;6CAAnC,mCAAmC;CA8G/C"}
|
|
@@ -1,83 +1,116 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core';
|
|
2
|
-
import { RunView } from '@memberjunction/core';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { formatPredictionScore, resolveScoreBand, } from '@memberjunction/predictive-studio-core';
|
|
2
|
+
import { LogError, RunView } from '@memberjunction/core';
|
|
3
|
+
import { EscapeSQLString } from '@memberjunction/global';
|
|
4
|
+
import { AtRiskRules, formatPredictionScore, resolveScoreBand, } from '@memberjunction/predictive-studio-core';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
|
-
function bandForScore(score) {
|
|
8
|
-
return score >= 0.7 ? 'high' : score >= 0.4 ? 'medium' : 'low';
|
|
9
|
-
}
|
|
10
6
|
/**
|
|
11
7
|
* Service for retrieving and formatting the complete historical trendline of model prediction
|
|
12
8
|
* results for a specific entity record from `MJ: Process Run Details`.
|
|
13
9
|
*/
|
|
14
10
|
export class PredictiveStudioScoreHistoryService {
|
|
11
|
+
/** The fields {@link LoadRecordScoreHistory} reads; display-only, so the read is `simple`. */
|
|
12
|
+
static historyFields = ['ProcessRunID', 'ResultPayload', 'Status', 'CompletedAt', '__mj_CreatedAt', 'DurationMs'];
|
|
15
13
|
/**
|
|
16
|
-
* Load the
|
|
14
|
+
* Load the most recent predictions for a record (up to `MaxRuns`), returned oldest to newest. Read failures are logged
|
|
15
|
+
* and return an empty history.
|
|
17
16
|
*/
|
|
18
17
|
async LoadRecordScoreHistory(params) {
|
|
19
|
-
|
|
20
|
-
if (!recordId)
|
|
18
|
+
if (!params.recordId)
|
|
21
19
|
return [];
|
|
22
|
-
let extraFilter = `RecordID = '${recordId.replace(/'/g, "''")}'`;
|
|
23
|
-
if (entityId) {
|
|
24
|
-
extraFilter += ` AND EntityID = '${entityId.replace(/'/g, "''")}'`;
|
|
25
|
-
}
|
|
26
20
|
try {
|
|
27
|
-
const
|
|
28
|
-
const res = await rv.RunView({
|
|
21
|
+
const res = await this.CreateRunView(params.provider).RunView({
|
|
29
22
|
EntityName: 'MJ: Process Run Details',
|
|
30
|
-
ExtraFilter:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
ExtraFilter: this.BuildHistoryFilter(params),
|
|
24
|
+
// Newest first so MaxRuns keeps the latest window; reversed below for the oldest-to-newest trendline.
|
|
25
|
+
OrderBy: '__mj_CreatedAt DESC',
|
|
26
|
+
MaxRows: params.MaxRuns ?? 50,
|
|
27
|
+
ResultType: 'simple',
|
|
28
|
+
Fields: PredictiveStudioScoreHistoryService.historyFields,
|
|
29
|
+
}, params.User);
|
|
30
|
+
if (!res.Success) {
|
|
31
|
+
LogError(`PredictiveStudioScoreHistoryService.LoadRecordScoreHistory: ${res.ErrorMessage}`);
|
|
36
32
|
return [];
|
|
37
|
-
const points = [];
|
|
38
|
-
let previousScore = null;
|
|
39
|
-
for (const d of res.Results) {
|
|
40
|
-
if (!d.ResultPayload)
|
|
41
|
-
continue;
|
|
42
|
-
let parsed;
|
|
43
|
-
try {
|
|
44
|
-
parsed = JSON.parse(d.ResultPayload);
|
|
45
|
-
}
|
|
46
|
-
catch {
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
const p = parsed.output ?? parsed;
|
|
50
|
-
if (typeof p.score !== 'number' || !Number.isFinite(p.score))
|
|
51
|
-
continue;
|
|
52
|
-
const effectiveModelId = p.modelId ?? parsed.modelId;
|
|
53
|
-
if (modelId && effectiveModelId && !UUIDsEqual(effectiveModelId, modelId)) {
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
const score = p.score;
|
|
57
|
-
const delta = previousScore !== null ? score - previousScore : null;
|
|
58
|
-
previousScore = score;
|
|
59
|
-
const runDate = d.CompletedAt ?? d.__mj_CreatedAt ?? new Date();
|
|
60
|
-
const resolvedBand = outcomeConfig ? resolveScoreBand(score, outcomeConfig) : null;
|
|
61
|
-
points.push({
|
|
62
|
-
runId: d.ProcessRunID,
|
|
63
|
-
RunDate: runDate instanceof Date ? runDate : new Date(runDate),
|
|
64
|
-
score,
|
|
65
|
-
ScoreFormatted: formatPredictionScore(score, outcomeConfig, problemType),
|
|
66
|
-
riskPct: Math.round(score * 100),
|
|
67
|
-
class: p.class ?? null,
|
|
68
|
-
band: resolvedBand?.Key ?? bandForScore(score),
|
|
69
|
-
status: resolvedBand?.Label ?? d.Status ?? 'Completed',
|
|
70
|
-
DurationMs: d.DurationMs ?? null,
|
|
71
|
-
drivers: ParseRowDrivers(p.drivers) ?? [],
|
|
72
|
-
Delta: delta,
|
|
73
|
-
});
|
|
74
33
|
}
|
|
75
|
-
return
|
|
34
|
+
return this.ToHistoryPoints([...(res.Results ?? [])].reverse(), params);
|
|
76
35
|
}
|
|
77
|
-
catch {
|
|
36
|
+
catch (err) {
|
|
37
|
+
LogError(`PredictiveStudioScoreHistoryService.LoadRecordScoreHistory: ${err instanceof Error ? err.message : String(err)}`);
|
|
78
38
|
return [];
|
|
79
39
|
}
|
|
80
40
|
}
|
|
41
|
+
/** The RunView the history reads through. Tests override this to serve fixture rows. */
|
|
42
|
+
CreateRunView(provider) {
|
|
43
|
+
return RunView.FromMetadataProvider(provider);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The detail filter: the record (and entity, when known) and, when a model is given, only the runs of Record Processes
|
|
47
|
+
* whose configuration names that model. Schema and view names come from the provider's metadata.
|
|
48
|
+
*/
|
|
49
|
+
BuildHistoryFilter(params) {
|
|
50
|
+
let filter = `RecordID = '${EscapeSQLString(params.recordId)}'`;
|
|
51
|
+
if (params.entityId) {
|
|
52
|
+
filter += ` AND EntityID = '${EscapeSQLString(params.entityId)}'`;
|
|
53
|
+
}
|
|
54
|
+
if (params.modelId) {
|
|
55
|
+
filter += ` AND ${this.BuildModelRunsPredicate(params.provider, params.modelId)}`;
|
|
56
|
+
}
|
|
57
|
+
return filter;
|
|
58
|
+
}
|
|
59
|
+
/** `ProcessRunID IN (…)` over the runs of the Record Processes configured for `modelId`. */
|
|
60
|
+
BuildModelRunsPredicate(provider, modelId) {
|
|
61
|
+
const runs = provider.EntityByName('MJ: Process Runs');
|
|
62
|
+
const processes = provider.EntityByName('MJ: Record Processes');
|
|
63
|
+
if (!runs || !processes) {
|
|
64
|
+
throw new Error("The 'MJ: Process Runs' or 'MJ: Record Processes' entity is not in this provider's metadata.");
|
|
65
|
+
}
|
|
66
|
+
return (`ProcessRunID IN (SELECT pr.ID FROM ${runs.SchemaName}.${runs.BaseView} pr ` +
|
|
67
|
+
`INNER JOIN ${processes.SchemaName}.${processes.BaseView} rp ON rp.ID = pr.RecordProcessID ` +
|
|
68
|
+
`WHERE JSON_VALUE(rp.Configuration, '$.modelId') = '${EscapeSQLString(modelId)}')`);
|
|
69
|
+
}
|
|
70
|
+
/** Turn the oldest-to-newest detail rows into trendline points, skipping rows without a usable score. */
|
|
71
|
+
ToHistoryPoints(rows, params) {
|
|
72
|
+
const points = [];
|
|
73
|
+
let previousScore = null;
|
|
74
|
+
for (const d of rows) {
|
|
75
|
+
const p = this.parsePayload(d.ResultPayload);
|
|
76
|
+
if (!p || typeof p.score !== 'number' || !Number.isFinite(p.score))
|
|
77
|
+
continue;
|
|
78
|
+
const score = p.score;
|
|
79
|
+
const delta = previousScore !== null ? score - previousScore : null;
|
|
80
|
+
previousScore = score;
|
|
81
|
+
const runDate = d.CompletedAt ?? d.__mj_CreatedAt ?? new Date();
|
|
82
|
+
const resolvedBand = params.OutcomeConfig ? resolveScoreBand(score, params.OutcomeConfig) : null;
|
|
83
|
+
// Risk and its band follow the same rule as the at-risk list, so a renewal model's history is not inverted
|
|
84
|
+
// relative to its list; the outcome band supplies only the status label.
|
|
85
|
+
const risk = AtRiskRules.RiskOf(score, params.InvertedRisk);
|
|
86
|
+
points.push({
|
|
87
|
+
runId: d.ProcessRunID,
|
|
88
|
+
RunDate: runDate instanceof Date ? runDate : new Date(runDate),
|
|
89
|
+
score,
|
|
90
|
+
ScoreFormatted: formatPredictionScore(score, params.OutcomeConfig, params.ProblemType),
|
|
91
|
+
riskPct: Math.round(risk * 100),
|
|
92
|
+
class: p.class ?? null,
|
|
93
|
+
band: AtRiskRules.RiskBandFor(risk),
|
|
94
|
+
status: resolvedBand?.Label || d.Status || 'Completed',
|
|
95
|
+
DurationMs: d.DurationMs ?? null,
|
|
96
|
+
drivers: AtRiskRules.ParseRowDrivers(p.drivers, params.InvertedRisk) ?? [],
|
|
97
|
+
Delta: delta,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return points;
|
|
101
|
+
}
|
|
102
|
+
/** Parse a stored payload to its prediction fields; null when it is missing or not JSON. */
|
|
103
|
+
parsePayload(payload) {
|
|
104
|
+
if (!payload)
|
|
105
|
+
return null;
|
|
106
|
+
try {
|
|
107
|
+
const parsed = JSON.parse(payload);
|
|
108
|
+
return parsed.output ?? parsed;
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
81
114
|
static ɵfac = function PredictiveStudioScoreHistoryService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PredictiveStudioScoreHistoryService)(); };
|
|
82
115
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: PredictiveStudioScoreHistoryService, factory: PredictiveStudioScoreHistoryService.ɵfac, providedIn: 'root' });
|
|
83
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predictive-studio-score-history.service.js","sourceRoot":"","sources":["../../src/PredictiveStudio/predictive-studio-score-history.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAoC,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAkB,MAAM,uBAAuB,CAAC;AACxE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,GAEjB,MAAM,wCAAwC,CAAC;;AA6BhD,SAAS,YAAY,CAAC,KAAa;IACjC,OAAO,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;AACjE,CAAC;AAED;;;GAGG;AAIH,MAAM,OAAO,mCAAmC;IAC9C;;OAEG;IACI,KAAK,CAAC,sBAAsB,CAAC,MAA8B;QAChE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,EAAE,aAAa,EA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E,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE;oBACzC,KAAK,EAAE,KAAK;iBACb,CAAC,CAAC;YACL,CAAC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;6HApFU,mCAAmC;gEAAnC,mCAAmC,WAAnC,mCAAmC,mBAFlC,MAAM;;iFAEP,mCAAmC;cAH/C,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { RunView, UserInfo, type IMetadataProvider } from '@memberjunction/core';\nimport { MJProcessRunDetailEntity } from '@memberjunction/core-entities';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { ParseRowDrivers, type RowDriver } from './at-risk.view-models';\nimport {\n formatPredictionScore,\n resolveScoreBand,\n type OutcomeConfig,\n} from '@memberjunction/predictive-studio-core';\n\n/** One historical score point for an entity record produced by a model run. */\nexport interface ModelScoreHistoryPoint {\n runId: string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n RunDate: Date;\n score: number; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n ScoreFormatted: string;\n riskPct: number; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n class: string | null; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n band: 'high' | 'medium' | 'low' | string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n status: string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n DurationMs: number | null;\n drivers: RowDriver[]; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** Score delta compared to previous run (e.g. +0.05 or -0.12), or null for the first run. */\n Delta: number | null;\n}\n\nexport interface LoadScoreHistoryParams {\n provider: IMetadataProvider; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n User?: UserInfo;\n entityId?: string | null; // case-violation-ok-legacy-back-compat: optional, and the old name is also read off a value the checker cannot type; renaming it stays assignable and silently yields undefined\n recordId: string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n modelId?: string | null; // case-violation-ok-legacy-back-compat: optional, and the old name is also read off a value the checker cannot type; renaming it stays assignable and silently yields undefined\n MaxRuns?: number;\n OutcomeConfig?: OutcomeConfig | null;\n ProblemType?: string | null;\n}\n\nfunction bandForScore(score: number): 'high' | 'medium' | 'low' {\n return score >= 0.7 ? 'high' : score >= 0.4 ? 'medium' : 'low';\n}\n\n/**\n * Service for retrieving and formatting the complete historical trendline of model prediction\n * results for a specific entity record from `MJ: Process Run Details`.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class PredictiveStudioScoreHistoryService {\n /**\n * Load the history of predictions for a specific record across all runs (ordered oldest to newest).\n */\n public async LoadRecordScoreHistory(params: LoadScoreHistoryParams): Promise<ModelScoreHistoryPoint[]> {\n const { provider, User: user, entityId, recordId, modelId, MaxRuns: maxRuns = 50, OutcomeConfig: outcomeConfig, ProblemType: problemType } = params;\n if (!recordId) return [];\n\n let extraFilter = `RecordID = '${recordId.replace(/'/g, \"''\")}'`;\n if (entityId) {\n extraFilter += ` AND EntityID = '${entityId.replace(/'/g, \"''\")}'`;\n }\n\n try {\n const rv = RunView.FromMetadataProvider(provider);\n const res = await rv.RunView<MJProcessRunDetailEntity>(\n {\n EntityName: 'MJ: Process Run Details',\n ExtraFilter: extraFilter,\n OrderBy: '__mj_CreatedAt ASC',\n MaxRows: maxRuns,\n ResultType: 'entity_object',\n },\n user,\n );\n\n if (!res.Success || !res.Results) return [];\n\n const points: ModelScoreHistoryPoint[] = [];\n let previousScore: number | null = null;\n\n for (const d of res.Results) {\n if (!d.ResultPayload) continue;\n\n let parsed: {\n modelId?: string;\n score?: number;\n class?: string;\n drivers?: unknown;\n scoredAt?: string;\n output?: { modelId?: string; score?: number; class?: string; drivers?: unknown; scoredAt?: string };\n };\n\n try {\n parsed = JSON.parse(d.ResultPayload);\n } catch {\n continue;\n }\n\n const p = parsed.output ?? parsed;\n if (typeof p.score !== 'number' || !Number.isFinite(p.score)) continue;\n\n const effectiveModelId = p.modelId ?? parsed.modelId;\n if (modelId && effectiveModelId && !UUIDsEqual(effectiveModelId, modelId)) {\n continue;\n }\n\n const score = p.score;\n const delta = previousScore !== null ? score - previousScore : null;\n previousScore = score;\n\n const runDate = d.CompletedAt ?? d.__mj_CreatedAt ?? new Date();\n\n const resolvedBand = outcomeConfig ? resolveScoreBand(score, outcomeConfig) : null;\n\n points.push({\n runId: d.ProcessRunID,\n RunDate: runDate instanceof Date ? runDate : new Date(runDate),\n score,\n ScoreFormatted: formatPredictionScore(score, outcomeConfig, problemType),\n riskPct: Math.round(score * 100),\n class: p.class ?? null,\n band: resolvedBand?.Key ?? bandForScore(score),\n status: resolvedBand?.Label ?? d.Status ?? 'Completed',\n DurationMs: d.DurationMs ?? null,\n drivers: ParseRowDrivers(p.drivers) ?? [],\n Delta: delta,\n });\n }\n\n return points;\n } catch {\n return [];\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"predictive-studio-score-history.service.js","sourceRoot":"","sources":["../../src/PredictiveStudio/predictive-studio-score-history.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAoC,MAAM,sBAAsB,CAAC;AAE3F,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EACL,WAAW,EAEX,qBAAqB,EACrB,gBAAgB,GAEjB,MAAM,wCAAwC,CAAC;;AA4ChD;;;GAGG;AAIH,MAAM,OAAO,mCAAmC;IAC9C,8FAA8F;IACtF,MAAM,CAAU,aAAa,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AAU,EAAE,CAAC,CAAC,UAAU,IAAI,IAAI;gBAChC,OAAO,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE;gBAC1E,KAAK,EAAE,KAAK;aACb,CAAC,CAAC;QACL,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,4FAA4F;IACpF,YAAY,CAAC,OAAsB;QACzC,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC1B,IAAI,CAAC;YACH,MAAM,MAAM,GAA+C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC/E,OAAO,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC;QACjC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;6HA7GU,mCAAmC;gEAAnC,mCAAmC,WAAnC,mCAAmC,mBAFlC,MAAM;;iFAEP,mCAAmC;cAH/C,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { LogError, RunView, UserInfo, type IMetadataProvider } from '@memberjunction/core';\nimport { MJProcessRunDetailEntity } from '@memberjunction/core-entities';\nimport { EscapeSQLString } from '@memberjunction/global';\nimport {\n AtRiskRules,\n type RowDriver,\n formatPredictionScore,\n resolveScoreBand,\n type OutcomeConfig,\n} from '@memberjunction/predictive-studio-core';\n\n/** One historical score point for an entity record produced by a model run. */\nexport interface ModelScoreHistoryPoint {\n runId: string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n RunDate: Date;\n score: number; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n ScoreFormatted: string;\n riskPct: number; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n class: string | null; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n band: 'high' | 'medium' | 'low' | string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n status: string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n DurationMs: number | null;\n drivers: RowDriver[]; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** Score delta compared to previous run (e.g. +0.05 or -0.12), or null for the first run. */\n Delta: number | null;\n}\n\nexport interface LoadScoreHistoryParams {\n /** The provider the history is read through. Required: a dropped provider is a compile error, not an empty panel. */\n provider: IMetadataProvider; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n User?: UserInfo;\n entityId?: string | null; // case-violation-ok-legacy-back-compat: optional, and the old name is also read off a value the checker cannot type; renaming it stays assignable and silently yields undefined\n recordId: string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** When set, only the runs of this model's Record Processes are read (filtered in the query, not after it). */\n modelId?: string | null; // case-violation-ok-legacy-back-compat: optional, and the old name is also read off a value the checker cannot type; renaming it stays assignable and silently yields undefined\n /** The most recent runs to read (default 50). */\n MaxRuns?: number;\n OutcomeConfig?: OutcomeConfig | null;\n ProblemType?: string | null;\n InvertedRisk: boolean;\n}\n\n/** The Process Run Detail columns the history reads. */\ntype ScoreHistoryDetailRow = Pick<MJProcessRunDetailEntity, 'ProcessRunID' | 'ResultPayload' | 'Status' | 'CompletedAt' | '__mj_CreatedAt' | 'DurationMs'>;\n\n/** The prediction fields of a stored result payload (write-back runs nest them under `output`). */\ninterface ScoredPayload {\n score?: number;\n class?: string;\n // unknown: the raw per-record drivers; AtRiskRules.ParseRowDrivers narrows them\n drivers?: unknown;\n}\n\n/**\n * Service for retrieving and formatting the complete historical trendline of model prediction\n * results for a specific entity record from `MJ: Process Run Details`.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class PredictiveStudioScoreHistoryService {\n /** The fields {@link LoadRecordScoreHistory} reads; display-only, so the read is `simple`. */\n private static readonly historyFields: Array<keyof ScoreHistoryDetailRow> = ['ProcessRunID', 'ResultPayload', 'Status', 'CompletedAt', '__mj_CreatedAt', 'DurationMs'];\n\n /**\n * Load the most recent predictions for a record (up to `MaxRuns`), returned oldest to newest. Read failures are logged\n * and return an empty history.\n */\n public async LoadRecordScoreHistory(params: LoadScoreHistoryParams): Promise<ModelScoreHistoryPoint[]> {\n if (!params.recordId) return [];\n try {\n const res = await this.CreateRunView(params.provider).RunView<ScoreHistoryDetailRow>(\n {\n EntityName: 'MJ: Process Run Details',\n ExtraFilter: this.BuildHistoryFilter(params),\n // Newest first so MaxRuns keeps the latest window; reversed below for the oldest-to-newest trendline.\n OrderBy: '__mj_CreatedAt DESC',\n MaxRows: params.MaxRuns ?? 50,\n ResultType: 'simple',\n Fields: PredictiveStudioScoreHistoryService.historyFields,\n },\n params.User,\n );\n if (!res.Success) {\n LogError(`PredictiveStudioScoreHistoryService.LoadRecordScoreHistory: ${res.ErrorMessage}`);\n return [];\n }\n return this.ToHistoryPoints([...(res.Results ?? [])].reverse(), params);\n } catch (err) {\n LogError(`PredictiveStudioScoreHistoryService.LoadRecordScoreHistory: ${err instanceof Error ? err.message : String(err)}`);\n return [];\n }\n }\n\n /** The RunView the history reads through. Tests override this to serve fixture rows. */\n protected CreateRunView(provider: IMetadataProvider): Pick<RunView, 'RunView' | 'RunViews'> {\n return RunView.FromMetadataProvider(provider);\n }\n\n /**\n * The detail filter: the record (and entity, when known) and, when a model is given, only the runs of Record Processes\n * whose configuration names that model. Schema and view names come from the provider's metadata.\n */\n protected BuildHistoryFilter(params: LoadScoreHistoryParams): string {\n let filter = `RecordID = '${EscapeSQLString(params.recordId)}'`;\n if (params.entityId) {\n filter += ` AND EntityID = '${EscapeSQLString(params.entityId)}'`;\n }\n if (params.modelId) {\n filter += ` AND ${this.BuildModelRunsPredicate(params.provider, params.modelId)}`;\n }\n return filter;\n }\n\n /** `ProcessRunID IN (…)` over the runs of the Record Processes configured for `modelId`. */\n protected BuildModelRunsPredicate(provider: IMetadataProvider, modelId: string): string {\n const runs = provider.EntityByName('MJ: Process Runs');\n const processes = provider.EntityByName('MJ: Record Processes');\n if (!runs || !processes) {\n throw new Error(\"The 'MJ: Process Runs' or 'MJ: Record Processes' entity is not in this provider's metadata.\");\n }\n return (\n `ProcessRunID IN (SELECT pr.ID FROM ${runs.SchemaName}.${runs.BaseView} pr ` +\n `INNER JOIN ${processes.SchemaName}.${processes.BaseView} rp ON rp.ID = pr.RecordProcessID ` +\n `WHERE JSON_VALUE(rp.Configuration, '$.modelId') = '${EscapeSQLString(modelId)}')`\n );\n }\n\n /** Turn the oldest-to-newest detail rows into trendline points, skipping rows without a usable score. */\n protected ToHistoryPoints(rows: ScoreHistoryDetailRow[], params: LoadScoreHistoryParams): ModelScoreHistoryPoint[] {\n const points: ModelScoreHistoryPoint[] = [];\n let previousScore: number | null = null;\n for (const d of rows) {\n const p = this.parsePayload(d.ResultPayload);\n if (!p || typeof p.score !== 'number' || !Number.isFinite(p.score)) continue;\n const score = p.score;\n const delta = previousScore !== null ? score - previousScore : null;\n previousScore = score;\n const runDate = d.CompletedAt ?? d.__mj_CreatedAt ?? new Date();\n const resolvedBand = params.OutcomeConfig ? resolveScoreBand(score, params.OutcomeConfig) : null;\n // Risk and its band follow the same rule as the at-risk list, so a renewal model's history is not inverted\n // relative to its list; the outcome band supplies only the status label.\n const risk = AtRiskRules.RiskOf(score, params.InvertedRisk);\n points.push({\n runId: d.ProcessRunID,\n RunDate: runDate instanceof Date ? runDate : new Date(runDate),\n score,\n ScoreFormatted: formatPredictionScore(score, params.OutcomeConfig, params.ProblemType),\n riskPct: Math.round(risk * 100),\n class: p.class ?? null,\n band: AtRiskRules.RiskBandFor(risk),\n status: resolvedBand?.Label || d.Status || 'Completed',\n DurationMs: d.DurationMs ?? null,\n drivers: AtRiskRules.ParseRowDrivers(p.drivers, params.InvertedRisk) ?? [],\n Delta: delta,\n });\n }\n return points;\n }\n\n /** Parse a stored payload to its prediction fields; null when it is missing or not JSON. */\n private parsePayload(payload: string | null): ScoredPayload | null {\n if (!payload) return null;\n try {\n const parsed: ScoredPayload & { output?: ScoredPayload } = JSON.parse(payload);\n return parsed.output ?? parsed;\n } catch {\n return null;\n }\n }\n}\n"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { UserInfo } from '@memberjunction/core';
|
|
2
2
|
import { MJConversationEntity } from '@memberjunction/core-entities';
|
|
3
|
+
import { type AtRiskRow } from '@memberjunction/predictive-studio-core';
|
|
4
|
+
import type { PredictionGridRowsLoadedEvent } from '../components/ps-predictions-grid.component';
|
|
3
5
|
import { PSResourceBase } from './ps-resource-base';
|
|
4
6
|
import { type BusinessPredictionCard } from '../business-predictions.view-models';
|
|
5
|
-
import { type AtRiskRow } from '../at-risk.view-models';
|
|
6
7
|
import { type PSCapabilityCard } from '../predictive-studio-copilot.view-models';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
@@ -83,12 +84,23 @@ export declare class PSPredictionsResourceComponent extends PSResourceBase {
|
|
|
83
84
|
get atRiskRows(): AtRiskRow[];
|
|
84
85
|
/** @deprecated Use {@link AtRiskRows}. */
|
|
85
86
|
set atRiskRows(value: AtRiskRow[]);
|
|
86
|
-
/**
|
|
87
|
+
/** The features the model weighted most for the open prediction (coefficient models only). */
|
|
87
88
|
Drivers: string[];
|
|
88
89
|
/** @deprecated Use {@link Drivers}. */
|
|
89
90
|
get drivers(): string[];
|
|
90
91
|
/** @deprecated Use {@link Drivers}. */
|
|
91
92
|
set drivers(value: string[]);
|
|
93
|
+
/**
|
|
94
|
+
* True when the latest run has more predictions than {@link PredictiveStudioEngine.MaxRunDetailRows}: the at-risk
|
|
95
|
+
* list holds only the first ones, and the workspace says so.
|
|
96
|
+
*/
|
|
97
|
+
AtRiskCapped: boolean;
|
|
98
|
+
/** The run-detail cap, formatted for the capped notice. */
|
|
99
|
+
readonly MaxRunDetailRowsLabel: string;
|
|
100
|
+
/** The most at-risk records "Send to a list" adds, highest risk first. */
|
|
101
|
+
static readonly AtRiskListLimit = 200;
|
|
102
|
+
/** True once the open prediction's latest run is looked up (found or not): the grid then renders and reads it once. */
|
|
103
|
+
LatestRunResolved: boolean;
|
|
92
104
|
/** Whether the at-risk list is loading for the open prediction. */
|
|
93
105
|
AtRiskLoading: boolean;
|
|
94
106
|
/** @deprecated Use {@link AtRiskLoading}. */
|
|
@@ -144,8 +156,19 @@ export declare class PSPredictionsResourceComponent extends PSResourceBase {
|
|
|
144
156
|
Open(c: BusinessPredictionCard): void;
|
|
145
157
|
/** @deprecated Use {@link Open}. */
|
|
146
158
|
open(c: BusinessPredictionCard): void;
|
|
147
|
-
/**
|
|
159
|
+
/** Clears everything derived from the previously open prediction, so a model switch never shows its rows or notices. */
|
|
160
|
+
private resetAtRiskState;
|
|
161
|
+
/**
|
|
162
|
+
* Load the open prediction's plain-language drivers and resolve its latest run. The run's rows are read once, by the
|
|
163
|
+
* embedded grid, and arrive through {@link OnAtRiskRowsLoaded}.
|
|
164
|
+
*/
|
|
148
165
|
private loadAtRisk;
|
|
166
|
+
/** True while `c` is still the open prediction (a slow lookup must not overwrite a newer one's state). */
|
|
167
|
+
private isStillOpen;
|
|
168
|
+
/** The grid parsed the latest run: its rows drive the counts, the export, "Send to a list" and the agent context. */
|
|
169
|
+
OnAtRiskRowsLoaded(event: PredictionGridRowsLoadedEvent): Promise<void>;
|
|
170
|
+
/** The grid could not read the latest run (it shows the error and a retry itself). */
|
|
171
|
+
OnAtRiskRowsLoadFailed(message: string): void;
|
|
149
172
|
/** Retry loading the open prediction's at-risk list after a failure — bound to the at-risk error banner. */
|
|
150
173
|
RetryAtRisk(): void;
|
|
151
174
|
/** @deprecated Use {@link RetryAtRisk}. */
|
|
@@ -176,8 +199,9 @@ export declare class PSPredictionsResourceComponent extends PSResourceBase {
|
|
|
176
199
|
askAgentTo(prompt: string): void;
|
|
177
200
|
/**
|
|
178
201
|
* P1 #4 — "Send to a list" as a one-click server action (no agent sentence to parse): create an MJ List
|
|
179
|
-
* over the model's target entity and add the at-risk members (
|
|
180
|
-
* act on it immediately
|
|
202
|
+
* over the model's target entity and add the at-risk members (risk at least `AT_RISK_LIST_MIN_RISK_PCT`, highest
|
|
203
|
+
* first, at most {@link AtRiskListLimit}) so a team can act on it immediately; the result line says how many of the
|
|
204
|
+
* qualifying records were added.
|
|
181
205
|
*/
|
|
182
206
|
SendToList(): Promise<void>;
|
|
183
207
|
/** @deprecated Use {@link SendToList}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ps-predictions-resource.component.d.ts","sourceRoot":"","sources":["../../../src/PredictiveStudio/resources/ps-predictions-resource.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmC,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ps-predictions-resource.component.d.ts","sourceRoot":"","sources":["../../../src/PredictiveStudio/resources/ps-predictions-resource.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmC,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAkG,MAAM,+BAA+B,CAAC;AAGrK,OAAO,EAAiD,KAAK,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACvH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAEjG,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAwB,KAAK,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAIxG,OAAO,EAA2C,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;;AAK1H;;;;;;GAMG;AACH,qBA2Qa,8BAA+B,SAAQ,cAAc;IAChE,SAAS,CAAC,QAAQ,CAAC,UAAU,iBAAiB;IAC9C,SAAS,CAAC,QAAQ,CAAC,YAAY,iBAAiB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