@memberjunction/predictive-studio 6.2.1 → 6.3.0-edge.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -11
- package/dist/actions/base-predictive-studio.action.d.ts +7 -0
- package/dist/actions/base-predictive-studio.action.d.ts.map +1 -1
- package/dist/actions/base-predictive-studio.action.js +22 -0
- package/dist/actions/base-predictive-studio.action.js.map +1 -1
- package/dist/actions/driver-classes.d.ts +2 -0
- package/dist/actions/driver-classes.d.ts.map +1 -1
- package/dist/actions/driver-classes.js +2 -0
- package/dist/actions/driver-classes.js.map +1 -1
- package/dist/actions/evaluate-drift.action.d.ts +100 -0
- package/dist/actions/evaluate-drift.action.d.ts.map +1 -0
- package/dist/actions/evaluate-drift.action.js +512 -0
- package/dist/actions/evaluate-drift.action.js.map +1 -0
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +7 -0
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/migrate-pipelines.action.d.ts +19 -0
- package/dist/actions/migrate-pipelines.action.d.ts.map +1 -0
- package/dist/actions/migrate-pipelines.action.js +51 -0
- package/dist/actions/migrate-pipelines.action.js.map +1 -0
- package/dist/actions/promote-model.action.d.ts +12 -1
- package/dist/actions/promote-model.action.d.ts.map +1 -1
- package/dist/actions/promote-model.action.js +7 -2
- package/dist/actions/promote-model.action.js.map +1 -1
- package/dist/actions/promote-model.gate.d.ts +31 -2
- package/dist/actions/promote-model.gate.d.ts.map +1 -1
- package/dist/actions/promote-model.gate.js +84 -5
- package/dist/actions/promote-model.gate.js.map +1 -1
- package/dist/actions/run-experiment.action.d.ts.map +1 -1
- package/dist/actions/run-experiment.action.js +5 -4
- package/dist/actions/run-experiment.action.js.map +1 -1
- package/dist/actions/schedule-model-scoring.action.js +2 -2
- package/dist/actions/schedule-model-scoring.action.js.map +1 -1
- package/dist/actions/score-record-set.action.js +1 -1
- package/dist/actions/score-record-set.action.js.map +1 -1
- package/dist/actions/score-record-set.runner.d.ts +2 -2
- package/dist/actions/score-record-set.runner.js +3 -3
- package/dist/actions/score-record-set.runner.js.map +1 -1
- package/dist/actions/train-model.action.d.ts +28 -25
- package/dist/actions/train-model.action.d.ts.map +1 -1
- package/dist/actions/train-model.action.js +50 -39
- package/dist/actions/train-model.action.js.map +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/agent/modeling-plan-to-pipeline.d.ts +0 -2
- package/dist/agent/modeling-plan-to-pipeline.d.ts.map +1 -1
- package/dist/agent/modeling-plan-to-pipeline.js +30 -39
- package/dist/agent/modeling-plan-to-pipeline.js.map +1 -1
- package/dist/agent/pipeline-builder-agent.d.ts +47 -18
- package/dist/agent/pipeline-builder-agent.d.ts.map +1 -1
- package/dist/agent/pipeline-builder-agent.js +161 -92
- package/dist/agent/pipeline-builder-agent.js.map +1 -1
- package/dist/agent/pipeline-builder.d.ts +178 -56
- package/dist/agent/pipeline-builder.d.ts.map +1 -1
- package/dist/agent/pipeline-builder.js +333 -234
- package/dist/agent/pipeline-builder.js.map +1 -1
- package/dist/experiment/budget.d.ts +61 -0
- package/dist/experiment/budget.d.ts.map +1 -0
- package/dist/experiment/budget.js +72 -0
- package/dist/experiment/budget.js.map +1 -0
- package/dist/experiment/experiment-orchestrator.d.ts +43 -7
- package/dist/experiment/experiment-orchestrator.d.ts.map +1 -1
- package/dist/experiment/experiment-orchestrator.js +130 -33
- package/dist/experiment/experiment-orchestrator.js.map +1 -1
- package/dist/experiment/index.d.ts +2 -0
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +2 -0
- package/dist/experiment/index.js.map +1 -1
- package/dist/experiment/leaderboard.d.ts +15 -15
- package/dist/experiment/leaderboard.d.ts.map +1 -1
- package/dist/experiment/leaderboard.js +44 -18
- package/dist/experiment/leaderboard.js.map +1 -1
- package/dist/experiment/scores.d.ts +32 -0
- package/dist/experiment/scores.d.ts.map +1 -0
- package/dist/experiment/scores.js +62 -0
- package/dist/experiment/scores.js.map +1 -0
- package/dist/experiment/seams.d.ts +23 -20
- package/dist/experiment/seams.d.ts.map +1 -1
- package/dist/experiment/seams.js +54 -56
- package/dist/experiment/seams.js.map +1 -1
- package/dist/experiment/types.d.ts +55 -10
- package/dist/experiment/types.d.ts.map +1 -1
- package/dist/experiment/types.js.map +1 -1
- package/dist/feature-assembly/as-of/as-of-assembler.d.ts +412 -0
- package/dist/feature-assembly/as-of/as-of-assembler.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/as-of-assembler.js +1239 -0
- package/dist/feature-assembly/as-of/as-of-assembler.js.map +1 -0
- package/dist/feature-assembly/as-of/feature-resolution.d.ts +84 -0
- package/dist/feature-assembly/as-of/feature-resolution.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/feature-resolution.js +229 -0
- package/dist/feature-assembly/as-of/feature-resolution.js.map +1 -0
- package/dist/feature-assembly/as-of/index.d.ts +15 -0
- package/dist/feature-assembly/as-of/index.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/index.js +15 -0
- package/dist/feature-assembly/as-of/index.js.map +1 -0
- package/dist/feature-assembly/as-of/read-by-keys.d.ts +30 -0
- package/dist/feature-assembly/as-of/read-by-keys.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/read-by-keys.js +51 -0
- package/dist/feature-assembly/as-of/read-by-keys.js.map +1 -0
- package/dist/feature-assembly/as-of/record-history.d.ts +256 -0
- package/dist/feature-assembly/as-of/record-history.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/record-history.js +505 -0
- package/dist/feature-assembly/as-of/record-history.js.map +1 -0
- package/dist/feature-assembly/as-of/refusal.d.ts +19 -0
- package/dist/feature-assembly/as-of/refusal.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/refusal.js +13 -0
- package/dist/feature-assembly/as-of/refusal.js.map +1 -0
- package/dist/feature-assembly/as-of/series-features.d.ts +65 -0
- package/dist/feature-assembly/as-of/series-features.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/series-features.js +97 -0
- package/dist/feature-assembly/as-of/series-features.js.map +1 -0
- package/dist/feature-assembly/as-of/windowed-aggregate.d.ts +36 -0
- package/dist/feature-assembly/as-of/windowed-aggregate.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/windowed-aggregate.js +99 -0
- package/dist/feature-assembly/as-of/windowed-aggregate.js.map +1 -0
- package/dist/feature-assembly/as-of.d.ts +1 -9
- package/dist/feature-assembly/as-of.d.ts.map +1 -1
- package/dist/feature-assembly/as-of.js +2 -19
- package/dist/feature-assembly/as-of.js.map +1 -1
- package/dist/feature-assembly/assembly-metadata.d.ts +34 -0
- package/dist/feature-assembly/assembly-metadata.d.ts.map +1 -0
- package/dist/feature-assembly/assembly-metadata.js +26 -0
- package/dist/feature-assembly/assembly-metadata.js.map +1 -0
- package/dist/feature-assembly/data-access.d.ts +21 -2
- package/dist/feature-assembly/data-access.d.ts.map +1 -1
- package/dist/feature-assembly/data-access.js +14 -0
- package/dist/feature-assembly/data-access.js.map +1 -1
- package/dist/feature-assembly/feature-assembly-executor.d.ts.map +1 -1
- package/dist/feature-assembly/feature-assembly-executor.js +5 -2
- package/dist/feature-assembly/feature-assembly-executor.js.map +1 -1
- package/dist/feature-assembly/index.d.ts +3 -0
- package/dist/feature-assembly/index.d.ts.map +1 -1
- package/dist/feature-assembly/index.js +3 -0
- package/dist/feature-assembly/index.js.map +1 -1
- package/dist/feature-assembly/leakage-guard.d.ts +1 -1
- package/dist/feature-assembly/leakage-guard.js +1 -1
- package/dist/feature-assembly/read-policy.d.ts +27 -0
- package/dist/feature-assembly/read-policy.d.ts.map +1 -0
- package/dist/feature-assembly/read-policy.js +63 -0
- package/dist/feature-assembly/read-policy.js.map +1 -0
- package/dist/feature-pipelines/feature-pipeline-engine.d.ts.map +1 -1
- package/dist/feature-pipelines/feature-pipeline-engine.js +3 -1
- package/dist/feature-pipelines/feature-pipeline-engine.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/maintenance/index.d.ts +1 -0
- package/dist/maintenance/index.d.ts.map +1 -1
- package/dist/maintenance/index.js +1 -0
- package/dist/maintenance/index.js.map +1 -1
- package/dist/maintenance/maintenance-engine.d.ts +16 -19
- package/dist/maintenance/maintenance-engine.d.ts.map +1 -1
- package/dist/maintenance/maintenance-engine.js +53 -53
- package/dist/maintenance/maintenance-engine.js.map +1 -1
- package/dist/maintenance/metrics.d.ts +19 -15
- package/dist/maintenance/metrics.d.ts.map +1 -1
- package/dist/maintenance/metrics.js +29 -24
- package/dist/maintenance/metrics.js.map +1 -1
- package/dist/maintenance/psi-drift-detector.d.ts +246 -0
- package/dist/maintenance/psi-drift-detector.d.ts.map +1 -0
- package/dist/maintenance/psi-drift-detector.js +1002 -0
- package/dist/maintenance/psi-drift-detector.js.map +1 -0
- package/dist/maintenance/types.d.ts +11 -2
- package/dist/maintenance/types.d.ts.map +1 -1
- package/dist/maintenance/types.js.map +1 -1
- package/dist/migration/index.d.ts +8 -0
- package/dist/migration/index.d.ts.map +1 -0
- package/dist/migration/index.js +8 -0
- package/dist/migration/index.js.map +1 -0
- package/dist/migration/legacy-pipeline-migration.d.ts +138 -0
- package/dist/migration/legacy-pipeline-migration.d.ts.map +1 -0
- package/dist/migration/legacy-pipeline-migration.js +273 -0
- package/dist/migration/legacy-pipeline-migration.js.map +1 -0
- package/dist/operations/delegation.d.ts +58 -46
- package/dist/operations/delegation.d.ts.map +1 -1
- package/dist/operations/delegation.js +90 -77
- package/dist/operations/delegation.js.map +1 -1
- package/dist/operations/promote-model.operation.d.ts +2 -2
- package/dist/operations/promote-model.operation.d.ts.map +1 -1
- package/dist/operations/promote-model.operation.js +6 -2
- package/dist/operations/promote-model.operation.js.map +1 -1
- package/dist/operations/refusals.d.ts +5 -0
- package/dist/operations/refusals.d.ts.map +1 -1
- package/dist/operations/refusals.js +26 -1
- package/dist/operations/refusals.js.map +1 -1
- package/dist/operations/start-experiment-session.operation.js +3 -3
- package/dist/operations/train-model.mapping.d.ts +91 -0
- package/dist/operations/train-model.mapping.d.ts.map +1 -0
- package/dist/operations/train-model.mapping.js +145 -0
- package/dist/operations/train-model.mapping.js.map +1 -0
- package/dist/operations/train-model.operation.d.ts +14 -9
- package/dist/operations/train-model.operation.d.ts.map +1 -1
- package/dist/operations/train-model.operation.js +30 -51
- package/dist/operations/train-model.operation.js.map +1 -1
- package/dist/prediction-unit/decision-date-advance.d.ts +46 -0
- package/dist/prediction-unit/decision-date-advance.d.ts.map +1 -0
- package/dist/prediction-unit/decision-date-advance.js +79 -0
- package/dist/prediction-unit/decision-date-advance.js.map +1 -0
- package/dist/prediction-unit/index.d.ts +12 -0
- package/dist/prediction-unit/index.d.ts.map +1 -0
- package/dist/prediction-unit/index.js +12 -0
- package/dist/prediction-unit/index.js.map +1 -0
- package/dist/prediction-unit/target-validation.d.ts +21 -0
- package/dist/prediction-unit/target-validation.d.ts.map +1 -0
- package/dist/prediction-unit/target-validation.js +54 -0
- package/dist/prediction-unit/target-validation.js.map +1 -0
- package/dist/prediction-unit/unit-row-reader.d.ts +108 -0
- package/dist/prediction-unit/unit-row-reader.d.ts.map +1 -0
- package/dist/prediction-unit/unit-row-reader.js +348 -0
- package/dist/prediction-unit/unit-row-reader.js.map +1 -0
- package/dist/prediction-unit/unit-store.d.ts +28 -0
- package/dist/prediction-unit/unit-store.d.ts.map +1 -0
- package/dist/prediction-unit/unit-store.js +41 -0
- package/dist/prediction-unit/unit-store.js.map +1 -0
- package/dist/prediction-unit/unit-versioning.d.ts +43 -0
- package/dist/prediction-unit/unit-versioning.d.ts.map +1 -0
- package/dist/prediction-unit/unit-versioning.js +71 -0
- package/dist/prediction-unit/unit-versioning.js.map +1 -0
- package/dist/protocol/index.d.ts +9 -0
- package/dist/protocol/index.d.ts.map +1 -0
- package/dist/protocol/index.js +9 -0
- package/dist/protocol/index.js.map +1 -0
- package/dist/protocol/protocol-defaults.d.ts +37 -0
- package/dist/protocol/protocol-defaults.d.ts.map +1 -0
- package/dist/protocol/protocol-defaults.js +59 -0
- package/dist/protocol/protocol-defaults.js.map +1 -0
- package/dist/protocol/protocol-versioning.d.ts +46 -0
- package/dist/protocol/protocol-versioning.d.ts.map +1 -0
- package/dist/protocol/protocol-versioning.js +48 -0
- package/dist/protocol/protocol-versioning.js.map +1 -0
- package/dist/protocol/search-guard.d.ts +45 -0
- package/dist/protocol/search-guard.d.ts.map +1 -0
- package/dist/protocol/search-guard.js +50 -0
- package/dist/protocol/search-guard.js.map +1 -0
- package/dist/scoring/artifact-loader.d.ts +5 -32
- package/dist/scoring/artifact-loader.d.ts.map +1 -1
- package/dist/scoring/artifact-loader.js +4 -59
- package/dist/scoring/artifact-loader.js.map +1 -1
- package/dist/scoring/auto-train.d.ts +25 -5
- package/dist/scoring/auto-train.d.ts.map +1 -1
- package/dist/scoring/auto-train.js +48 -31
- package/dist/scoring/auto-train.js.map +1 -1
- package/dist/scoring/index.d.ts +3 -0
- package/dist/scoring/index.d.ts.map +1 -1
- package/dist/scoring/index.js +3 -0
- package/dist/scoring/index.js.map +1 -1
- package/dist/scoring/ml-model-inference-processor.d.ts +137 -10
- package/dist/scoring/ml-model-inference-processor.d.ts.map +1 -1
- package/dist/scoring/ml-model-inference-processor.js +383 -40
- package/dist/scoring/ml-model-inference-processor.js.map +1 -1
- package/dist/scoring/model-readiness.d.ts +45 -0
- package/dist/scoring/model-readiness.d.ts.map +1 -1
- package/dist/scoring/model-readiness.js +49 -0
- package/dist/scoring/model-readiness.js.map +1 -1
- package/dist/scoring/register.d.ts +8 -3
- package/dist/scoring/register.d.ts.map +1 -1
- package/dist/scoring/register.js +28 -4
- package/dist/scoring/register.js.map +1 -1
- package/dist/scoring/seams.d.ts +18 -2
- package/dist/scoring/seams.d.ts.map +1 -1
- package/dist/scoring/seams.js +35 -10
- package/dist/scoring/seams.js.map +1 -1
- package/dist/scoring/shadow-scoring.d.ts +245 -0
- package/dist/scoring/shadow-scoring.d.ts.map +1 -0
- package/dist/scoring/shadow-scoring.js +510 -0
- package/dist/scoring/shadow-scoring.js.map +1 -0
- package/dist/scoring/startup-register.d.ts +3 -3
- package/dist/scoring/startup-register.d.ts.map +1 -1
- package/dist/scoring/startup-register.js +10 -4
- package/dist/scoring/startup-register.js.map +1 -1
- package/dist/scoring/storage-provider-artifact-loader.d.ts +14 -0
- package/dist/scoring/storage-provider-artifact-loader.d.ts.map +1 -0
- package/dist/scoring/storage-provider-artifact-loader.js +47 -0
- package/dist/scoring/storage-provider-artifact-loader.js.map +1 -0
- package/dist/scoring/training-keys.d.ts +27 -0
- package/dist/scoring/training-keys.d.ts.map +1 -0
- package/dist/scoring/training-keys.js +54 -0
- package/dist/scoring/training-keys.js.map +1 -0
- package/dist/scoring/types.d.ts +72 -7
- package/dist/scoring/types.d.ts.map +1 -1
- package/dist/scoring/types.js +4 -0
- package/dist/scoring/types.js.map +1 -1
- package/dist/sidecar-provider.d.ts +2 -2
- package/dist/sidecar-provider.js +3 -3
- package/dist/snapshot/code-version.d.ts +16 -0
- package/dist/snapshot/code-version.d.ts.map +1 -0
- package/dist/snapshot/code-version.js +39 -0
- package/dist/snapshot/code-version.js.map +1 -0
- package/dist/snapshot/holdout-carver.d.ts +110 -0
- package/dist/snapshot/holdout-carver.d.ts.map +1 -0
- package/dist/snapshot/holdout-carver.js +171 -0
- package/dist/snapshot/holdout-carver.js.map +1 -0
- package/dist/snapshot/index.d.ts +17 -0
- package/dist/snapshot/index.d.ts.map +1 -0
- package/dist/snapshot/index.js +17 -0
- package/dist/snapshot/index.js.map +1 -0
- package/dist/snapshot/snapshot-builder.d.ts +152 -0
- package/dist/snapshot/snapshot-builder.d.ts.map +1 -0
- package/dist/snapshot/snapshot-builder.js +286 -0
- package/dist/snapshot/snapshot-builder.js.map +1 -0
- package/dist/snapshot/snapshot-file-store.d.ts +161 -0
- package/dist/snapshot/snapshot-file-store.d.ts.map +1 -0
- package/dist/snapshot/snapshot-file-store.js +204 -0
- package/dist/snapshot/snapshot-file-store.js.map +1 -0
- package/dist/snapshot/snapshot-hash.d.ts +6 -0
- package/dist/snapshot/snapshot-hash.d.ts.map +1 -0
- package/dist/snapshot/snapshot-hash.js +16 -0
- package/dist/snapshot/snapshot-hash.js.map +1 -0
- package/dist/snapshot/snapshot-manifest.d.ts +43 -0
- package/dist/snapshot/snapshot-manifest.d.ts.map +1 -0
- package/dist/snapshot/snapshot-manifest.js +43 -0
- package/dist/snapshot/snapshot-manifest.js.map +1 -0
- package/dist/snapshot/snapshot-retrainer.d.ts +107 -0
- package/dist/snapshot/snapshot-retrainer.d.ts.map +1 -0
- package/dist/snapshot/snapshot-retrainer.js +194 -0
- package/dist/snapshot/snapshot-retrainer.js.map +1 -0
- package/dist/snapshot/snapshot-serialization.d.ts +99 -0
- package/dist/snapshot/snapshot-serialization.d.ts.map +1 -0
- package/dist/snapshot/snapshot-serialization.js +191 -0
- package/dist/snapshot/snapshot-serialization.js.map +1 -0
- package/dist/snapshot/training-snapshot-store.d.ts +38 -0
- package/dist/snapshot/training-snapshot-store.d.ts.map +1 -0
- package/dist/snapshot/training-snapshot-store.js +41 -0
- package/dist/snapshot/training-snapshot-store.js.map +1 -0
- package/dist/storage/ps-storage-provider.d.ts +108 -0
- package/dist/storage/ps-storage-provider.d.ts.map +1 -0
- package/dist/storage/ps-storage-provider.js +154 -0
- package/dist/storage/ps-storage-provider.js.map +1 -0
- package/dist/training/artifact-store.d.ts +12 -103
- package/dist/training/artifact-store.d.ts.map +1 -1
- package/dist/training/artifact-store.js +13 -137
- package/dist/training/artifact-store.js.map +1 -1
- package/dist/training/compute-cost.d.ts +23 -0
- package/dist/training/compute-cost.d.ts.map +1 -0
- package/dist/training/compute-cost.js +36 -0
- package/dist/training/compute-cost.js.map +1 -0
- package/dist/training/evaluation-protocol-store.d.ts +53 -0
- package/dist/training/evaluation-protocol-store.d.ts.map +1 -0
- package/dist/training/evaluation-protocol-store.js +54 -0
- package/dist/training/evaluation-protocol-store.js.map +1 -0
- package/dist/training/index.d.ts +9 -1
- package/dist/training/index.d.ts.map +1 -1
- package/dist/training/index.js +9 -1
- package/dist/training/index.js.map +1 -1
- package/dist/training/locked-holdout.d.ts +19 -4
- package/dist/training/locked-holdout.d.ts.map +1 -1
- package/dist/training/locked-holdout.js +29 -5
- package/dist/training/locked-holdout.js.map +1 -1
- package/dist/training/seams.d.ts +34 -8
- package/dist/training/seams.d.ts.map +1 -1
- package/dist/training/seams.js +74 -18
- package/dist/training/seams.js.map +1 -1
- package/dist/training/storage-provider-artifact-store.d.ts +49 -0
- package/dist/training/storage-provider-artifact-store.d.ts.map +1 -0
- package/dist/training/storage-provider-artifact-store.js +147 -0
- package/dist/training/storage-provider-artifact-store.js.map +1 -0
- package/dist/training/trainer-model-lineage.d.ts +32 -0
- package/dist/training/trainer-model-lineage.d.ts.map +1 -0
- package/dist/training/trainer-model-lineage.js +62 -0
- package/dist/training/trainer-model-lineage.js.map +1 -0
- package/dist/training/trainer-request.d.ts +50 -0
- package/dist/training/trainer-request.d.ts.map +1 -0
- package/dist/training/trainer-request.js +65 -0
- package/dist/training/trainer-request.js.map +1 -0
- package/dist/training/trainer-result.d.ts +30 -0
- package/dist/training/trainer-result.d.ts.map +1 -0
- package/dist/training/trainer-result.js +40 -0
- package/dist/training/trainer-result.js.map +1 -0
- package/dist/training/training-engine.d.ts +417 -64
- package/dist/training/training-engine.d.ts.map +1 -1
- package/dist/training/training-engine.js +869 -178
- package/dist/training/training-engine.js.map +1 -1
- package/dist/training/training-refusal.d.ts +15 -0
- package/dist/training/training-refusal.d.ts.map +1 -0
- package/dist/training/training-refusal.js +62 -0
- package/dist/training/training-refusal.js.map +1 -0
- package/dist/training/types.d.ts +133 -41
- package/dist/training/types.d.ts.map +1 -1
- package/dist/training/types.js +4 -4
- package/dist/training/unit-model-lineage.d.ts +72 -0
- package/dist/training/unit-model-lineage.d.ts.map +1 -0
- package/dist/training/unit-model-lineage.js +288 -0
- package/dist/training/unit-model-lineage.js.map +1 -0
- package/package.json +16 -13
- package/dist/operations/__tests__/helpers.d.ts +0 -30
- package/dist/operations/__tests__/helpers.d.ts.map +0 -1
- package/dist/operations/__tests__/helpers.js +0 -44
- package/dist/operations/__tests__/helpers.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-by-keys.js","sourceRoot":"","sources":["../../../src/feature-assembly/as-of/read-by-keys.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD,wGAAwG;AACxG,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAYtC,iCAAiC;AACjC,MAAM,OAAO,WAAW;IACtB;;;;OAIG;IACI,MAAM,CAAC,KAAK,CAAC,iBAAiB,CACnC,UAA+B,EAAE,UAAkB,EAAE,QAAgB,EAAE,IAAuB,EAAE,MAAyB;QAEzH,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC,CAAG,wCAAwC;QACpF,KAAK,MAAM,CAAC,IAAI,IAAI;YAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;gBAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;QACvF,MAAM,SAAS,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QACvC,MAAM,OAAO,GAAe,EAAE,CAAC;QAC/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,IAAI,kBAAkB;YAAE,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC;QACxH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC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iB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACpG,IAAI,OAAO,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnC,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC;YACpE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;QACnI,CAAC;QACD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module feature-assembly/as-of/record-history
|
|
3
|
+
*
|
|
4
|
+
* Replays fields updated in place from `MJ: Record Changes`, so a feature read for a past decision date uses the value
|
|
5
|
+
* the record held then. A record's history counts only from its earliest Create or Snapshot row; before that a
|
|
6
|
+
* decision date cannot be replayed. Before each assembly the last replayed value of every covered record is compared
|
|
7
|
+
* with its stored value — a mismatch (a direct-SQL update, or a change made while tracking was off) marks that
|
|
8
|
+
* record-field uncovered. External-source rows are replayed at detection time or are ineligible, per the unit's
|
|
9
|
+
* ChangeHistoryPolicy. Today's value never fills a gap.
|
|
10
|
+
*/
|
|
11
|
+
import { type IMetadataProvider, type UserInfo } from '@memberjunction/core';
|
|
12
|
+
import type { MJRecordChangeEntity } from '@memberjunction/core-entities';
|
|
13
|
+
import type { CellValue, ChangeHistoryCoverage, ChangeHistoryPolicy, ReadPolicy } from '@memberjunction/predictive-studio-core';
|
|
14
|
+
import type { ICountingDataAccess } from '../data-access.js';
|
|
15
|
+
import type { AssemblyEntityInfo } from '../assembly-metadata.js';
|
|
16
|
+
export interface RecordChangeRow {
|
|
17
|
+
readonly ID: string;
|
|
18
|
+
readonly RecordID: string;
|
|
19
|
+
readonly Type: MJRecordChangeEntity['Type'];
|
|
20
|
+
readonly Source: MJRecordChangeEntity['Source'];
|
|
21
|
+
readonly ChangedAt: Date;
|
|
22
|
+
readonly ChangesJSON: string;
|
|
23
|
+
readonly FullRecordJSON: string;
|
|
24
|
+
}
|
|
25
|
+
export type HistoryValue = {
|
|
26
|
+
readonly Status: 'value';
|
|
27
|
+
readonly Value: CellValue;
|
|
28
|
+
readonly ChangeID: string;
|
|
29
|
+
readonly ChangedAt: Date;
|
|
30
|
+
} | {
|
|
31
|
+
readonly Status: 'uncovered';
|
|
32
|
+
readonly Reason: 'no-history' | 'before-history-start' | 'continuity-mismatch' | 'deleted' | 'external-ineligible';
|
|
33
|
+
};
|
|
34
|
+
/** A hard-deleted record as a read of its stored value sees it at one instant (see {@link EntityHistory.DeletedRecordAt}). */
|
|
35
|
+
export interface DeletedRecordRead {
|
|
36
|
+
/** `held` when the Delete is at or after the instant, so the record still stood then; `deleted` when it is before. */
|
|
37
|
+
readonly Status: 'held' | 'deleted';
|
|
38
|
+
/** The record as its Delete row recorded it, by field (the row's FullRecordJSON; a non-scalar value reads as null). */
|
|
39
|
+
readonly Row: ReadonlyMap<string, CellValue>;
|
|
40
|
+
/** The Delete change row. */
|
|
41
|
+
readonly ChangeID: string;
|
|
42
|
+
readonly ChangedAt: Date;
|
|
43
|
+
}
|
|
44
|
+
/** A child record whose change rows end in a Delete, as that Delete row recorded it (see {@link IRecordHistoryReader.LoadDeletedChildren}). */
|
|
45
|
+
export interface DeletedChildRecord {
|
|
46
|
+
/** The record's key, lower-cased, as {@link RecordHistory.KeyOfRecordID} reads it. */
|
|
47
|
+
readonly Key: string;
|
|
48
|
+
/** The record as its Delete row recorded it, by field (the row's FullRecordJSON; a non-scalar value reads as null). */
|
|
49
|
+
readonly Row: ReadonlyMap<string, CellValue>;
|
|
50
|
+
/** The Delete change row. */
|
|
51
|
+
readonly ChangeID: string;
|
|
52
|
+
readonly ChangedAt: Date;
|
|
53
|
+
}
|
|
54
|
+
export interface EntityHistory {
|
|
55
|
+
readonly Coverage: ChangeHistoryCoverage;
|
|
56
|
+
/** The field's value in force strictly before `before`. */
|
|
57
|
+
ValueAt(recordKey: string, field: string, before: Date): HistoryValue;
|
|
58
|
+
/**
|
|
59
|
+
* Change rows at or after `after` that changed `field` or replaced the record: an Update that lists the field, a
|
|
60
|
+
* Delete, and a row of any type whose recorded value of the field differs from the row before it (a Create or
|
|
61
|
+
* Snapshot written after an untracked change carries the new value without listing it). The final Delete of a
|
|
62
|
+
* hard-deleted record (see {@link DeletedRecordAt}) is where its stored value is read from, so it counts only when it
|
|
63
|
+
* records a different value of the field.
|
|
64
|
+
*/
|
|
65
|
+
ChangesAfter(recordKey: string, field: string, after: Date): number;
|
|
66
|
+
/**
|
|
67
|
+
* The number of the record's change rows strictly before `before`. Every verdict the history gives at `before` is
|
|
68
|
+
* fixed by this count, so callers judging many instants can judge each distinct count once.
|
|
69
|
+
*/
|
|
70
|
+
RowsBefore(recordKey: string, before: Date): number;
|
|
71
|
+
/**
|
|
72
|
+
* When the record's history starts with its own Create row, the instant of that row: the record did not exist before
|
|
73
|
+
* it. Null when the history starts with any other row (a Snapshot: the record is older than its history; an Update or a
|
|
74
|
+
* Delete: it was created before tracking) or there is no history. A re-created record keeps its first creation.
|
|
75
|
+
*/
|
|
76
|
+
CreatedAt(recordKey: string): Date | null;
|
|
77
|
+
/**
|
|
78
|
+
* A hard-deleted record — its change rows end in a Delete ({@link RecordHistory.KeysDeletedByHistory}) and the
|
|
79
|
+
* history was built with no current row for it — as a read of its stored value sees it at `before`: the record as
|
|
80
|
+
* its Delete row recorded it, `held` when the Delete is at or after `before` (not in force before `before`, as
|
|
81
|
+
* {@link ValueAt} reads an instant), `deleted` when it is before. Null for a record that is not hard-deleted, so a caller holding
|
|
82
|
+
* no current row for a key with a null here has a short read.
|
|
83
|
+
*/
|
|
84
|
+
DeletedRecordAt(recordKey: string, before: Date): DeletedRecordRead | null;
|
|
85
|
+
/**
|
|
86
|
+
* The Delete row that ended an earlier incarnation of a re-created record: the first Delete at or after `before`
|
|
87
|
+
* (not in force before `before`, as {@link ValueAt} reads an instant) when a later change row follows it. The
|
|
88
|
+
* record as that row recorded it is the incarnation that stood at `before` (status `held`). Null when no such Delete
|
|
89
|
+
* exists: the record was not re-created after `before` (a final Delete of a hard-deleted record is
|
|
90
|
+
* {@link DeletedRecordAt}'s).
|
|
91
|
+
*/
|
|
92
|
+
EarlierIncarnationEnd(recordKey: string, before: Date): DeletedRecordRead | null;
|
|
93
|
+
}
|
|
94
|
+
export interface IRecordHistoryReader {
|
|
95
|
+
Load(entity: AssemblyEntityInfo, keys: readonly string[], fields: readonly string[], policy: ChangeHistoryPolicy, now: Date): Promise<EntityHistory>;
|
|
96
|
+
/**
|
|
97
|
+
* The records of a child entity whose change rows end in a Delete and any of whose change rows records one of
|
|
98
|
+
* `ownerKeys` (compared lower-cased) in `foreignKeyField`: the children a windowed aggregate over those owners could
|
|
99
|
+
* have read on a past day although no current row is left. A record re-owned before its deletion is included when it
|
|
100
|
+
* was ever held by one of the owners, so the stable-value rule judges the move as it does a present child's. Whether
|
|
101
|
+
* a record still has a current row is the caller's to check.
|
|
102
|
+
*/
|
|
103
|
+
LoadDeletedChildren(entity: AssemblyEntityInfo, foreignKeyField: string, ownerKeys: readonly string[]): Promise<readonly DeletedChildRecord[]>;
|
|
104
|
+
}
|
|
105
|
+
/** The entity a history is built for: its name, and its fields, whose declared types decide how values compare. */
|
|
106
|
+
export type HistoryEntity = Pick<AssemblyEntityInfo, 'Name' | 'Fields'>;
|
|
107
|
+
/** Replay of `MJ: Record Changes` rows, and the snapshots that start a record's history. */
|
|
108
|
+
export declare class RecordHistory {
|
|
109
|
+
/**
|
|
110
|
+
* The primary-key value of a RecordID, lower-cased for in-memory matching. Parsed by MJ's own `CompositeKey` (the
|
|
111
|
+
* `Field|Value` URL-segment form Record Changes store); PS units have one key column, so the first pair is the key.
|
|
112
|
+
*/
|
|
113
|
+
static KeyOfRecordID(recordId: string): string;
|
|
114
|
+
/**
|
|
115
|
+
* The lower-cased keys whose latest change row is a Delete: records the history says were deleted, so a missing
|
|
116
|
+
* current row is explained rather than a short read. Asked only about keys with no current row, so each key's last
|
|
117
|
+
* instant is gone after it (a Delete there ends it) and earlier instants rank by the row that follows (see `indexByKey`).
|
|
118
|
+
*/
|
|
119
|
+
static KeysDeletedByHistory(changes: readonly RecordChangeRow[]): ReadonlySet<string>;
|
|
120
|
+
/** Pure: see {@link IRecordHistoryReader.LoadDeletedChildren}; `changes` are the child entity's change rows. */
|
|
121
|
+
static DeletedChildren(changes: readonly RecordChangeRow[], foreignKeyField: string, ownerKeys: readonly string[]): DeletedChildRecord[];
|
|
122
|
+
/**
|
|
123
|
+
* Pure: index the change rows, run the continuity check against the current values, and expose replay.
|
|
124
|
+
* `changes` is the history of the requested keys, and coverage and continuity are computed over exactly those keys: a
|
|
125
|
+
* caller holding an entity-wide read hands in only the requested keys' rows. `current` is keyed by the lower-cased record key, as `KeyedReader.ReadPresentByKeys` produces it; a hard-deleted
|
|
126
|
+
* record has no current row, so its Delete row stands in for it in the continuity check. The entity's field types
|
|
127
|
+
* decide how two values of a field compare (see {@link comparable}).
|
|
128
|
+
*/
|
|
129
|
+
static BuildEntityHistory(entity: HistoryEntity, changes: readonly RecordChangeRow[], current: ReadonlyMap<string, Readonly<Record<string, CellValue>>>, fields: readonly string[], policy: ChangeHistoryPolicy, now: Date): EntityHistory;
|
|
130
|
+
/**
|
|
131
|
+
* Starts the history of every record of `entityName` that has no complete Create or Snapshot change row, by saving
|
|
132
|
+
* one Snapshot row holding the record as stored now. This is how an entity loaded before change tracking enters
|
|
133
|
+
* coverage: its history starts now, so decision dates before now are still refused. Reads and saves run on
|
|
134
|
+
* `provider`; returns the number of snapshots written.
|
|
135
|
+
*/
|
|
136
|
+
static WriteHistorySnapshots(entityName: string, provider: IMetadataProvider, user: UserInfo): Promise<number>;
|
|
137
|
+
/** Lower-cased keys of the records that already have a complete Create or Snapshot row. */
|
|
138
|
+
private static readCoveredKeys;
|
|
139
|
+
/** Every record of the entity, every field, as plain rows (nothing read here is mutated). */
|
|
140
|
+
private static readRecords;
|
|
141
|
+
/**
|
|
142
|
+
* Saves one Snapshot row for `record`; null on success, else the failure naming the record. Never throws, so one
|
|
143
|
+
* record that cannot be snapshotted (a key holding the RecordID delimiter, a failed entity-object load) still lands in
|
|
144
|
+
* the caller's aggregate error instead of hiding every other failure.
|
|
145
|
+
*/
|
|
146
|
+
private static saveSnapshot;
|
|
147
|
+
/** The save itself; returns null on success, else the failure with the save's complete message. */
|
|
148
|
+
private static trySaveSnapshot;
|
|
149
|
+
/**
|
|
150
|
+
* Change rows per record key, in ChangedAt order. Rows of one key that share an instant are ranked by whether the
|
|
151
|
+
* record continues after that instant, then by ID (ordinal) within one rank:
|
|
152
|
+
* - no Delete at the instant: Create, Snapshot, Update (a record is created, then snapshotted or updated);
|
|
153
|
+
* - a Delete at the instant, and the record continues after it: Snapshot, Update, Delete, Create (the Delete ended
|
|
154
|
+
* the earlier incarnation and the Create re-created it);
|
|
155
|
+
* - a Delete at the instant, and the record is gone after it: Create, Snapshot, Update, Delete (the Delete ends the
|
|
156
|
+
* instant).
|
|
157
|
+
* The record continues after an instant when the first row after it (the next instant's first row, so ordered) is not
|
|
158
|
+
* a Create, or, at its last instant, when it has a current row; it is gone after the instant when that row is a Create
|
|
159
|
+
* (a later Create proves it was gone) or, at its last instant, when it has no current row. So the current row decides
|
|
160
|
+
* only the last instant. `hasCurrentRow` takes the lower-cased key;
|
|
161
|
+
* without it every key is read as having no current row (its last instant is gone), the order
|
|
162
|
+
* {@link KeysDeletedByHistory} and {@link DeletedChildren} need, since they are asked only about such keys.
|
|
163
|
+
*/
|
|
164
|
+
private static indexByKey;
|
|
165
|
+
/** One key's rows in ChangedAt order, the rows of each instant ranked as {@link indexByKey} describes. */
|
|
166
|
+
private static orderedRows;
|
|
167
|
+
/** The keys of `byKey` whose last row is a Delete. */
|
|
168
|
+
private static endingInDelete;
|
|
169
|
+
/** A record's history starts at its earliest Create or Snapshot row; a record without one has no history. */
|
|
170
|
+
private static historyStarts;
|
|
171
|
+
/**
|
|
172
|
+
* The Create instant of every record whose history starts with its own Create row: the first row in ChangedAt order
|
|
173
|
+
* is the Create (not a Snapshot, an Update or a Delete). A re-created record keeps its first creation; a history that
|
|
174
|
+
* opens with any other row has no known creation instant.
|
|
175
|
+
*/
|
|
176
|
+
private static creationInstants;
|
|
177
|
+
/**
|
|
178
|
+
* Replays every covered record to now and compares it with the stored value; a mismatch marks that record-field. A
|
|
179
|
+
* covered hard-deleted record (`hardDeleted`) has no stored value, so its Delete row is compared with the change row
|
|
180
|
+
* before it: a value the Delete recorded that no change row produced is the same untracked write.
|
|
181
|
+
*/
|
|
182
|
+
private static checkContinuity;
|
|
183
|
+
/**
|
|
184
|
+
* See {@link EntityHistory.ChangesAfter}; `list` is one record's rows in ChangedAt order, and `hardDeleted` says the
|
|
185
|
+
* record's last row is the Delete its stored value is read from, which then counts only for a moved value.
|
|
186
|
+
*/
|
|
187
|
+
private static changesAfter;
|
|
188
|
+
/** See {@link EntityHistory.DeletedRecordAt}; `hardDeleted` holds the lower-cased keys deleted with no current row. */
|
|
189
|
+
private static deletedRecordAt;
|
|
190
|
+
/** See {@link EntityHistory.EarlierIncarnationEnd}; `list` is one record's rows in ChangedAt order. */
|
|
191
|
+
private static earlierIncarnationEnd;
|
|
192
|
+
/** The number of rows of `list` (ChangedAt order) strictly before `before`, by binary search. */
|
|
193
|
+
private static rowsBefore;
|
|
194
|
+
/**
|
|
195
|
+
* The value in force strictly before `before`, or why it cannot be replayed. Today's value never fills a gap. A Delete
|
|
196
|
+
* in force before the instant reads as deleted whatever the record's history start.
|
|
197
|
+
*/
|
|
198
|
+
private static valueAt;
|
|
199
|
+
/** The scalar fields of a FullRecordJSON snapshot; a malformed snapshot reads as no fields, a non-scalar value as null. */
|
|
200
|
+
private static recordOf;
|
|
201
|
+
/** A field of a FullRecordJSON snapshot; a malformed snapshot, an absent field or a non-scalar value reads as null. */
|
|
202
|
+
private static fieldOf;
|
|
203
|
+
/** The field names a ChangesJSON lists; a malformed one lists none. */
|
|
204
|
+
private static changedFields;
|
|
205
|
+
/**
|
|
206
|
+
* A value in the form both sides of a comparison use, so one value written by two serializers (the Record Changes
|
|
207
|
+
* snapshot and the driver's current row, or two change rows) is one value: blank as '', dates and timestamp text as ISO
|
|
208
|
+
* instants, a date-only text (`2025-01-15`, how a SQL `date` column can serialize) as that day's UTC-midnight instant,
|
|
209
|
+
* 1/0 and true/false as one boolean on a field the metadata declares boolean, anything else as text. Text that only
|
|
210
|
+
* starts like a timestamp (a code such as `2025-01-15T-BATCH-1`) stays text. The midnight instant is written from the
|
|
211
|
+
* date text itself, never through a Date, which would roll a text that names no day (`2025-02-30`) into another day
|
|
212
|
+
* (2025-03-02) and equal it; written out, such a text can only equal itself.
|
|
213
|
+
*
|
|
214
|
+
* The boolean rule is scoped to boolean (bit) fields because only there is it safe: a bit column's serializers write
|
|
215
|
+
* it as 1/0 or as true/false, so the two are one value. On a numeric field 1 is a quantity, and a value that moved
|
|
216
|
+
* from 1 to `true` there was written by something other than the column's own type; equating them would hide that
|
|
217
|
+
* change, so a numeric field compares numbers and booleans as written.
|
|
218
|
+
*
|
|
219
|
+
* @throws AssemblyRefused `invalid-date-in-history` for timestamp text that names no valid instant (`2025-99-99T00:00`,
|
|
220
|
+
* or `2025-02-30T00:00`, whose date is no calendar day)
|
|
221
|
+
*/
|
|
222
|
+
private static comparable;
|
|
223
|
+
/**
|
|
224
|
+
* Whether the `YYYY-MM-DD` a timestamp text starts with is a calendar day. A Date does not reject `2025-02-30`: it
|
|
225
|
+
* rolls it to 2025-03-02, so the day is checked by reading it back.
|
|
226
|
+
*/
|
|
227
|
+
private static isCalendarDay;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Production reader: one complete read of an entity's Record Changes plus the current values of the requested keys.
|
|
231
|
+
* The change rows are read once per entity for the life of the reader, however many field lists and key sets load
|
|
232
|
+
* that entity's history; the current values are read on every load, since each load asks for its own keys and fields.
|
|
233
|
+
* Build one reader per assembly (as training and scoring do): a reader kept longer would replay change rows written
|
|
234
|
+
* after its first load as if they did not exist.
|
|
235
|
+
*/
|
|
236
|
+
export declare class RunViewRecordHistoryReader implements IRecordHistoryReader {
|
|
237
|
+
private readonly dataAccess;
|
|
238
|
+
private readonly read;
|
|
239
|
+
/** The complete change-row read of each entity, by entity ID; a refused read is kept and refuses again. */
|
|
240
|
+
private readonly changeRows;
|
|
241
|
+
constructor(dataAccess: ICountingDataAccess, read: ReadPolicy);
|
|
242
|
+
/**
|
|
243
|
+
* The entity's replayable history for `keys`. A key with no current row whose change rows end in a Delete is a
|
|
244
|
+
* deleted record and replays from its history (uncovered from the Delete on); a key with no current row and no such
|
|
245
|
+
* Delete, or a short read of the change rows, ends the assembly with its refusal.
|
|
246
|
+
*/
|
|
247
|
+
Load(entity: AssemblyEntityInfo, keys: readonly string[], fields: readonly string[], policy: ChangeHistoryPolicy, now: Date): Promise<EntityHistory>;
|
|
248
|
+
/** See {@link IRecordHistoryReader.LoadDeletedChildren}; reads the entity's change rows once, shared with {@link Load}. */
|
|
249
|
+
LoadDeletedChildren(entity: AssemblyEntityInfo, foreignKeyField: string, ownerKeys: readonly string[]): Promise<readonly DeletedChildRecord[]>;
|
|
250
|
+
/** The entity's complete change rows, read on the first load of the entity and shared by every later one. */
|
|
251
|
+
private changeRowsOf;
|
|
252
|
+
private readChangeRows;
|
|
253
|
+
/** A Record Changes row as read; an unknown Type/Source value falls back to the conservative Update/Internal. */
|
|
254
|
+
private static toChangeRow;
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=record-history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-history.d.ts","sourceRoot":"","sources":["../../../src/feature-assembly/as-of/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