clivly 0.9.0 → 0.9.1
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/core-drizzle.d.cts +1 -1
- package/core-drizzle.d.mts +1 -1
- package/core-entity-config.cjs +2 -1
- package/core-entity-config.d.cts +2 -2
- package/core-entity-config.d.mts +2 -2
- package/core-entity-config.mjs +2 -2
- package/core-entity-heuristics.d.cts +1 -1
- package/core-entity-heuristics.d.mts +1 -1
- package/core-mapping-form.d.cts +1 -1
- package/core-mapping-form.d.mts +1 -1
- package/core-mappings-config.cjs +1 -1
- package/core-mappings-config.d.cts +1 -1
- package/core-mappings-config.d.mts +1 -1
- package/core-mappings-config.mjs +1 -1
- package/core-sync-engine.cjs +1 -1
- package/core-sync-engine.d.cts +1 -1
- package/core-sync-engine.d.mts +1 -1
- package/core-sync-engine.mjs +1 -1
- package/core-view-compiler.cjs +2 -1
- package/core-view-compiler.d.cts +2 -2
- package/core-view-compiler.d.mts +2 -2
- package/core-view-compiler.mjs +2 -2
- package/core.cjs +5 -5
- package/core.d.cts +6 -6
- package/core.d.mts +6 -6
- package/core.mjs +5 -5
- package/{drizzle-BhN5M9zt.d.cts → drizzle-DooDUGqO.d.mts} +1 -1
- package/{drizzle-kBULBAOa.d.mts → drizzle-jz0lrAgl.d.cts} +1 -1
- package/drizzle.d.cts +2 -2
- package/drizzle.d.mts +2 -2
- package/{entity-config-D3LmzgLb.mjs → entity-config-D08zAeFY.mjs} +47 -2
- package/{entity-config-C4Yf_fPj.d.cts → entity-config-fKQhimtD.d.cts} +144 -2
- package/{entity-config-C4Yf_fPj.d.mts → entity-config-fKQhimtD.d.mts} +144 -2
- package/{entity-config-CsLl-ftC.cjs → entity-config-nuXge6rY.cjs} +52 -1
- package/index.cjs +5 -3
- package/index.mjs +5 -3
- package/{internal-DMySVbM0.mjs → internal-BGVUG312.mjs} +1 -1
- package/{internal-MBkNo3bw.d.mts → internal-BLCK81kB.d.mts} +1 -2
- package/{internal-B8ydhsKd.d.cts → internal-C-YBW2DB.d.cts} +1 -2
- package/{internal-BARjyN4n.cjs → internal-D4HDi2GC.cjs} +1 -1
- package/internal-drizzle.d.cts +1 -1
- package/internal-drizzle.d.mts +1 -1
- package/internal-entity-config.cjs +2 -1
- package/internal-entity-config.d.cts +2 -2
- package/internal-entity-config.d.mts +2 -2
- package/internal-entity-config.mjs +2 -2
- package/internal-entity-heuristics.cjs +1 -1
- package/internal-entity-heuristics.d.cts +1 -1
- package/internal-entity-heuristics.d.mts +1 -1
- package/internal-entity-heuristics.mjs +1 -1
- package/internal-mapping-form.d.cts +1 -1
- package/internal-mapping-form.d.mts +1 -1
- package/internal-mappings-config.cjs +1 -1
- package/internal-mappings-config.d.cts +1 -1
- package/internal-mappings-config.d.mts +1 -1
- package/internal-mappings-config.mjs +1 -1
- package/internal-sync-engine.cjs +1 -1
- package/internal-sync-engine.d.cts +1 -1
- package/internal-sync-engine.d.mts +1 -1
- package/internal-sync-engine.mjs +1 -1
- package/internal-view-compiler.cjs +2 -1
- package/internal-view-compiler.d.cts +2 -2
- package/internal-view-compiler.d.mts +2 -2
- package/internal-view-compiler.mjs +2 -2
- package/internal.cjs +5 -5
- package/internal.d.cts +6 -6
- package/internal.d.mts +6 -6
- package/internal.mjs +5 -5
- package/{mapping-form-43bwOTat.d.cts → mapping-form-DhY0iFmN.d.cts} +1 -1
- package/{mapping-form-DUvWUYCo.d.mts → mapping-form-Du36VZr1.d.mts} +1 -1
- package/mappings-config-B1qNM8VL.d.cts +47 -0
- package/mappings-config-BChZsany.d.mts +47 -0
- package/{mappings-config-BSSwdHiq.cjs → mappings-config-C8ynKmDK.cjs} +1 -1
- package/{mappings-config-bJQT_gSa.mjs → mappings-config-DNaYGyKN.mjs} +1 -1
- package/{namespace-probe-BSH_p9TK.d.cts → namespace-probe-BkUs8raG.d.mts} +1 -1
- package/{namespace-probe-Dsp5uNkS.d.mts → namespace-probe-aRFmpU85.d.cts} +1 -1
- package/package.json +1 -1
- package/sdk.cjs +1 -1
- package/sdk.d.cts +2 -2
- package/sdk.d.mts +2 -2
- package/sdk.mjs +1 -1
- package/{sync-engine-GNqRB8eS.d.cts → sync-engine-DHQ7rXZe.d.mts} +2 -2
- package/{sync-engine-ZsusW-q_.d.mts → sync-engine-DiPjH53O.d.cts} +2 -2
- package/{sync-engine-Bg6-SznL.mjs → sync-engine-SuxSzbZ4.mjs} +1 -1
- package/{sync-engine-DEJvKw6E.cjs → sync-engine-abE94g6X.cjs} +1 -1
- package/{view-compiler-DplczSjF.cjs → view-compiler-Blu4OXJ7.cjs} +22 -0
- package/{view-compiler-DlTpOfZi.mjs → view-compiler-CQx8TRrW.mjs} +17 -1
- package/{view-compiler-Cin0neDO.d.mts → view-compiler-CcUwzZut.d.mts} +12 -2
- package/{view-compiler-Ll9cbIJz.d.cts → view-compiler-DqAdVxLq.d.cts} +12 -2
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
- package/mappings-config-BpcR8bBo.d.mts +0 -167
- package/mappings-config-xsLMn3I-.d.cts +0 -167
package/core-drizzle.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as buildUniqueConstraints, r as discoverFromDrizzle, t as buildColumnsMeta } from "./drizzle-
|
|
1
|
+
import { n as buildUniqueConstraints, r as discoverFromDrizzle, t as buildColumnsMeta } from "./drizzle-jz0lrAgl.cjs";
|
|
2
2
|
import "./internal-drizzle.cjs";
|
|
3
3
|
export { buildColumnsMeta, buildUniqueConstraints, discoverFromDrizzle };
|
package/core-drizzle.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as buildUniqueConstraints, r as discoverFromDrizzle, t as buildColumnsMeta } from "./drizzle-
|
|
1
|
+
import { n as buildUniqueConstraints, r as discoverFromDrizzle, t as buildColumnsMeta } from "./drizzle-DooDUGqO.mjs";
|
|
2
2
|
import "./internal-drizzle.mjs";
|
|
3
3
|
export { buildColumnsMeta, buildUniqueConstraints, discoverFromDrizzle };
|
package/core-entity-config.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_entity_config = require("./entity-config-
|
|
2
|
+
const require_entity_config = require("./entity-config-nuXge6rY.cjs");
|
|
3
3
|
//#region src/core-entity-config.ts
|
|
4
4
|
require("./deprecate-subpath-B9ngvizt.cjs").warnDeprecatedSubpath("clivly/core/entity-config", "clivly/internal/entity-config");
|
|
5
5
|
//#endregion
|
|
@@ -11,6 +11,7 @@ exports.MATERIALIZING_CONCEPTS = require_entity_config.MATERIALIZING_CONCEPTS;
|
|
|
11
11
|
exports.defineClivlyConfig = require_entity_config.defineClivlyConfig;
|
|
12
12
|
exports.entitiesConfigSchema = require_entity_config.entitiesConfigSchema;
|
|
13
13
|
exports.filterSchema = require_entity_config.filterSchema;
|
|
14
|
+
exports.projectionFields = require_entity_config.projectionFields;
|
|
14
15
|
exports.relationshipSchema = require_entity_config.relationshipSchema;
|
|
15
16
|
exports.relationshipsSchema = require_entity_config.relationshipsSchema;
|
|
16
17
|
exports.validateEntitiesConfig = require_entity_config.validateEntitiesConfig;
|
package/core-entity-config.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as relationshipsSchema, S as relationshipSchema, _ as
|
|
2
|
-
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntityConfig, ConfigValidationError, ConfigValidationResult, CrmConcept, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, defineClivlyConfig, entitiesConfigSchema, filterSchema, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
1
|
+
import { C as filterSchema, D as validateEntitiesConfig, E as relationshipsSchema, S as entitiesConfigSchema, T as relationshipSchema, _ as MaterializingConcept, a as ClivlyEntitiesConfig, b as RelationshipsMap, c as ClivlyEntityConfigInput, d as CrmConcept, f as DiscoveredColumnMeta, g as MATERIALIZING_CONCEPTS, h as FilterValue, i as ClivlyConfigError, l as ConfigValidationError, m as FilterExpr, n as CRM_CONCEPTS, o as ClivlyEntitiesConfigInput, p as DiscoveredSchemaTable, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as RelationshipSpec, w as projectionFields, x as defineClivlyConfig, y as RelationshipVia } from "./entity-config-fKQhimtD.cjs";
|
|
2
|
+
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntitiesConfigInput, ClivlyEntityConfig, ClivlyEntityConfigInput, ConfigValidationError, ConfigValidationResult, CrmConcept, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
package/core-entity-config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as relationshipsSchema, S as relationshipSchema, _ as
|
|
2
|
-
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntityConfig, ConfigValidationError, ConfigValidationResult, CrmConcept, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, defineClivlyConfig, entitiesConfigSchema, filterSchema, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
1
|
+
import { C as filterSchema, D as validateEntitiesConfig, E as relationshipsSchema, S as entitiesConfigSchema, T as relationshipSchema, _ as MaterializingConcept, a as ClivlyEntitiesConfig, b as RelationshipsMap, c as ClivlyEntityConfigInput, d as CrmConcept, f as DiscoveredColumnMeta, g as MATERIALIZING_CONCEPTS, h as FilterValue, i as ClivlyConfigError, l as ConfigValidationError, m as FilterExpr, n as CRM_CONCEPTS, o as ClivlyEntitiesConfigInput, p as DiscoveredSchemaTable, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as RelationshipSpec, w as projectionFields, x as defineClivlyConfig, y as RelationshipVia } from "./entity-config-fKQhimtD.mjs";
|
|
2
|
+
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntitiesConfigInput, ClivlyEntityConfig, ClivlyEntityConfigInput, ConfigValidationError, ConfigValidationResult, CrmConcept, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
package/core-entity-config.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as MATERIALIZING_CONCEPTS, c as filterSchema, d as validateEntitiesConfig, i as ClivlyConfigError, l as
|
|
1
|
+
import { a as MATERIALIZING_CONCEPTS, c as filterSchema, d as relationshipsSchema, f as validateEntitiesConfig, i as ClivlyConfigError, l as projectionFields, n as CRM_CONCEPTS, o as defineClivlyConfig, r as CUSTOM_CONCEPT, s as entitiesConfigSchema, t as CANONICAL_FIELDS, u as relationshipSchema } from "./entity-config-D08zAeFY.mjs";
|
|
2
2
|
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
3
3
|
//#region src/core-entity-config.ts
|
|
4
4
|
warnDeprecatedSubpath("clivly/core/entity-config", "clivly/internal/entity-config");
|
|
5
5
|
//#endregion
|
|
6
|
-
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, MATERIALIZING_CONCEPTS, defineClivlyConfig, entitiesConfigSchema, filterSchema, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
6
|
+
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, MATERIALIZING_CONCEPTS, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as DiscoveredColumnMeta } from "./entity-config-fKQhimtD.cjs";
|
|
2
2
|
import { FieldSuggestion, RelationshipSuggestion, ScoredTable, SuggestedVia, TARGET_CONCEPTS, TargetConcept, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping } from "./internal-entity-heuristics.cjs";
|
|
3
3
|
export { type DiscoveredColumnMeta, FieldSuggestion, RelationshipSuggestion, ScoredTable, SuggestedVia, TARGET_CONCEPTS, TargetConcept, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as DiscoveredColumnMeta } from "./entity-config-fKQhimtD.mjs";
|
|
2
2
|
import { FieldSuggestion, RelationshipSuggestion, ScoredTable, SuggestedVia, TARGET_CONCEPTS, TargetConcept, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping } from "./internal-entity-heuristics.mjs";
|
|
3
3
|
export { type DiscoveredColumnMeta, FieldSuggestion, RelationshipSuggestion, ScoredTable, SuggestedVia, TARGET_CONCEPTS, TargetConcept, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping };
|
package/core-mapping-form.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
1
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-DhY0iFmN.cjs";
|
|
2
2
|
export { RelationshipCandidate, buildFilterFromDiscriminator, buildRelationships, relationshipViaSignature };
|
package/core-mapping-form.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
1
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-Du36VZr1.mjs";
|
|
2
2
|
export { RelationshipCandidate, buildFilterFromDiscriminator, buildRelationships, relationshipViaSignature };
|
package/core-mappings-config.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
|
|
3
|
-
const require_mappings_config = require("./mappings-config-
|
|
3
|
+
const require_mappings_config = require("./mappings-config-C8ynKmDK.cjs");
|
|
4
4
|
require("./internal-mappings-config.cjs");
|
|
5
5
|
//#region src/core-mappings-config.ts
|
|
6
6
|
require_deprecate_subpath.warnDeprecatedSubpath("clivly/core/mappings-config", "clivly/internal/mappings-config");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-
|
|
1
|
+
import { n as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-B1qNM8VL.cjs";
|
|
2
2
|
export { EntityMappingRow, mappingsToEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-
|
|
1
|
+
import { n as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-BChZsany.mjs";
|
|
2
2
|
export { EntityMappingRow, mappingsToEntitiesConfig };
|
package/core-mappings-config.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
2
|
-
import { t as mappingsToEntitiesConfig } from "./mappings-config-
|
|
2
|
+
import { t as mappingsToEntitiesConfig } from "./mappings-config-DNaYGyKN.mjs";
|
|
3
3
|
import "./internal-mappings-config.mjs";
|
|
4
4
|
//#region src/core-mappings-config.ts
|
|
5
5
|
warnDeprecatedSubpath("clivly/core/mappings-config", "clivly/internal/mappings-config");
|
package/core-sync-engine.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
|
|
3
|
-
const require_sync_engine = require("./sync-engine-
|
|
3
|
+
const require_sync_engine = require("./sync-engine-abE94g6X.cjs");
|
|
4
4
|
require("./internal-sync-engine.cjs");
|
|
5
5
|
//#region src/core-sync-engine.ts
|
|
6
6
|
require_deprecate_subpath.warnDeprecatedSubpath("clivly/core/sync-engine", "clivly/internal/sync-engine");
|
package/core-sync-engine.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PreviewWarning, c as SyncResult, d as previewSync, f as reconcile, i as PreviewResult, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult, u as computeSampleWarnings } from "./sync-engine-
|
|
1
|
+
import { a as PreviewWarning, c as SyncResult, d as previewSync, f as reconcile, i as PreviewResult, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult, u as computeSampleWarnings } from "./sync-engine-DiPjH53O.cjs";
|
|
2
2
|
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, previewSync, reconcile, runSync };
|
package/core-sync-engine.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PreviewWarning, c as SyncResult, d as previewSync, f as reconcile, i as PreviewResult, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult, u as computeSampleWarnings } from "./sync-engine-
|
|
1
|
+
import { a as PreviewWarning, c as SyncResult, d as previewSync, f as reconcile, i as PreviewResult, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult, u as computeSampleWarnings } from "./sync-engine-DHQ7rXZe.mjs";
|
|
2
2
|
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, previewSync, reconcile, runSync };
|
package/core-sync-engine.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
2
|
-
import { i as runSync, n as previewSync, r as reconcile, t as computeSampleWarnings } from "./sync-engine-
|
|
2
|
+
import { i as runSync, n as previewSync, r as reconcile, t as computeSampleWarnings } from "./sync-engine-SuxSzbZ4.mjs";
|
|
3
3
|
import "./internal-sync-engine.mjs";
|
|
4
4
|
//#region src/core-sync-engine.ts
|
|
5
5
|
warnDeprecatedSubpath("clivly/core/sync-engine", "clivly/internal/sync-engine");
|
package/core-view-compiler.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
|
|
3
|
-
const require_view_compiler = require("./view-compiler-
|
|
3
|
+
const require_view_compiler = require("./view-compiler-Blu4OXJ7.cjs");
|
|
4
4
|
require("./internal-view-compiler.cjs");
|
|
5
5
|
//#region src/core-view-compiler.ts
|
|
6
6
|
require_deprecate_subpath.warnDeprecatedSubpath("clivly/core/view-compiler", "clivly/internal/view-compiler");
|
|
@@ -9,3 +9,4 @@ exports.DEFAULT_VIEW_PREFIX = require_view_compiler.DEFAULT_VIEW_PREFIX;
|
|
|
9
9
|
exports.compileEntityView = require_view_compiler.compileEntityView;
|
|
10
10
|
exports.compileEntityViews = require_view_compiler.compileEntityViews;
|
|
11
11
|
exports.explainEntitiesConfig = require_view_compiler.explainEntitiesConfig;
|
|
12
|
+
exports.explainViewExecutionError = require_view_compiler.explainViewExecutionError;
|
package/core-view-compiler.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as compileEntityView, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-
|
|
2
|
-
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig };
|
|
1
|
+
import { a as compileEntityView, c as explainViewExecutionError, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-DqAdVxLq.cjs";
|
|
2
|
+
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
package/core-view-compiler.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as compileEntityView, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-
|
|
2
|
-
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig };
|
|
1
|
+
import { a as compileEntityView, c as explainViewExecutionError, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-CcUwzZut.mjs";
|
|
2
|
+
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
package/core-view-compiler.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
2
|
-
import { i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-
|
|
2
|
+
import { a as explainViewExecutionError, i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-CQx8TRrW.mjs";
|
|
3
3
|
import "./internal-view-compiler.mjs";
|
|
4
4
|
//#region src/core-view-compiler.ts
|
|
5
5
|
warnDeprecatedSubpath("clivly/core/view-compiler", "clivly/internal/view-compiler");
|
|
6
6
|
//#endregion
|
|
7
|
-
export { DEFAULT_VIEW_PREFIX, compileEntityView, compileEntityViews, explainEntitiesConfig };
|
|
7
|
+
export { DEFAULT_VIEW_PREFIX, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
package/core.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_projection = require("./projection-C5244vGa.cjs");
|
|
3
|
-
const require_entity_config = require("./entity-config-
|
|
3
|
+
const require_entity_config = require("./entity-config-nuXge6rY.cjs");
|
|
4
4
|
const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
|
|
5
5
|
const require_auth_adapter = require("./auth-adapter-CiEXcweZ.cjs");
|
|
6
6
|
const require_mapping_form = require("./mapping-form-BpfON_ME.cjs");
|
|
7
|
-
const require_mappings_config = require("./mappings-config-
|
|
8
|
-
const require_internal = require("./internal-
|
|
9
|
-
const require_view_compiler = require("./view-compiler-
|
|
10
|
-
const require_sync_engine = require("./sync-engine-
|
|
7
|
+
const require_mappings_config = require("./mappings-config-C8ynKmDK.cjs");
|
|
8
|
+
const require_internal = require("./internal-D4HDi2GC.cjs");
|
|
9
|
+
const require_view_compiler = require("./view-compiler-Blu4OXJ7.cjs");
|
|
10
|
+
const require_sync_engine = require("./sync-engine-abE94g6X.cjs");
|
|
11
11
|
//#region src/core.ts
|
|
12
12
|
require_deprecate_subpath.warnDeprecatedSubpath("clivly/core", "clivly/sdk", "Import \"defineClivlyConfig\" and its config types from \"clivly/sdk\"; import everything else from \"clivly/internal\" (no stability guarantee — see STABILITY.md).");
|
|
13
13
|
//#endregion
|
package/core.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { C as UpdateDealInput, S as UpdateContactInput, _ as Task, a as ContactFilters, b as TaskPriority, c as CreateCompanyInput, d as CreateTaskInput, f as CrmRole, g as RecordSource, h as Note, i as Contact, l as CreateContactInput, m as DealStage, n as ActivityType, o as ContactStatus, p as Deal, r as Company, s as CreateActivityInput, t as Activity, u as CreateDealInput, v as TaskEntityType, w as UpdateTaskInput, x as TaskStatus, y as TaskFilters } from "./types-B1oRXdNP.cjs";
|
|
2
2
|
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-DWzgl5Yq.cjs";
|
|
3
3
|
import { t as CRMAdapter } from "./adapter-C2eRbBfo.cjs";
|
|
4
|
-
import { C as relationshipsSchema, S as relationshipSchema, _ as
|
|
5
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
6
|
-
import {
|
|
7
|
-
import { a as compileEntityView, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-
|
|
8
|
-
import { c as SyncResult, f as reconcile, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult } from "./sync-engine-
|
|
9
|
-
import { a as validateProjection, c as draftErrors, d as suggestJoinConditions, f as fanOutJoins, i as primaryKeyColumns, l as draftToProjection, n as coversUniqueKey, o as ProjectionDraft, p as joinFansOut, r as hasRichMeta, s as describeCardinality, t as columnMetaFor, u as emptyProjectionDraft } from "./internal-
|
|
4
|
+
import { A as ProjectionIdentity, C as filterSchema, D as validateEntitiesConfig, E as relationshipsSchema, F as projectionSchema, M as ProjectionMapping, N as ProjectionRef, O as BASE_REF, P as identityRefs, S as entitiesConfigSchema, T as relationshipSchema, _ as MaterializingConcept, a as ClivlyEntitiesConfig, b as RelationshipsMap, d as CrmConcept, f as DiscoveredColumnMeta, g as MATERIALIZING_CONCEPTS, h as FilterValue, i as ClivlyConfigError, j as ProjectionJoin, k as ProjectionFieldBinding, l as ConfigValidationError, m as FilterExpr, n as CRM_CONCEPTS, p as DiscoveredSchemaTable, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as RelationshipSpec, x as defineClivlyConfig, y as RelationshipVia } from "./entity-config-fKQhimtD.cjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-DhY0iFmN.cjs";
|
|
6
|
+
import { n as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-B1qNM8VL.cjs";
|
|
7
|
+
import { a as compileEntityView, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-DqAdVxLq.cjs";
|
|
8
|
+
import { c as SyncResult, f as reconcile, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult } from "./sync-engine-DiPjH53O.cjs";
|
|
9
|
+
import { a as validateProjection, c as draftErrors, d as suggestJoinConditions, f as fanOutJoins, i as primaryKeyColumns, l as draftToProjection, n as coversUniqueKey, o as ProjectionDraft, p as joinFansOut, r as hasRichMeta, s as describeCardinality, t as columnMetaFor, u as emptyProjectionDraft } from "./internal-C-YBW2DB.cjs";
|
|
10
10
|
export { type Activity, type ActivityType, BASE_REF, CANONICAL_FIELDS, type CRMAdapter, CRM_CONCEPTS, type ClivlyAuthAdapter, ClivlyConfigError, type ClivlyEntitiesConfig, type ClivlyEntityConfig, type ClivlyUser, type Company, type CompileOptions, type CompiledView, type ConfigValidationError, type ConfigValidationResult, type Contact, type ContactFilters, type ContactStatus, type CreateActivityInput, type CreateCompanyInput, type CreateContactInput, type CreateDealInput, type CreateTaskInput, type CrmConcept, type CrmMembership, type CrmRole, DEFAULT_VIEW_PREFIX, type Deal, type DealStage, type DiscoveredColumnMeta, type DiscoveredSchemaTable, type EntityMappingRow, type EntitySyncResult, type ExplainResult, type FilterExpr, type FilterValue, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type Note, type PersistAction, type ProjectionDraft, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, coversUniqueKey, defineClivlyConfig, describeCardinality, draftErrors, draftToProjection, emptyProjectionDraft, entitiesConfigSchema, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, joinFansOut, mappingsToEntitiesConfig, primaryKeyColumns, projectionSchema, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, suggestJoinConditions, validateEntitiesConfig, validateProjection };
|
package/core.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { C as UpdateDealInput, S as UpdateContactInput, _ as Task, a as ContactFilters, b as TaskPriority, c as CreateCompanyInput, d as CreateTaskInput, f as CrmRole, g as RecordSource, h as Note, i as Contact, l as CreateContactInput, m as DealStage, n as ActivityType, o as ContactStatus, p as Deal, r as Company, s as CreateActivityInput, t as Activity, u as CreateDealInput, v as TaskEntityType, w as UpdateTaskInput, x as TaskStatus, y as TaskFilters } from "./types-B1oRXdNP.mjs";
|
|
2
2
|
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-Bjgo8LhN.mjs";
|
|
3
3
|
import { t as CRMAdapter } from "./adapter-D5LRa-NA.mjs";
|
|
4
|
-
import { C as relationshipsSchema, S as relationshipSchema, _ as
|
|
5
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
6
|
-
import {
|
|
7
|
-
import { a as compileEntityView, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-
|
|
8
|
-
import { c as SyncResult, f as reconcile, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult } from "./sync-engine-
|
|
9
|
-
import { a as validateProjection, c as draftErrors, d as suggestJoinConditions, f as fanOutJoins, i as primaryKeyColumns, l as draftToProjection, n as coversUniqueKey, o as ProjectionDraft, p as joinFansOut, r as hasRichMeta, s as describeCardinality, t as columnMetaFor, u as emptyProjectionDraft } from "./internal-
|
|
4
|
+
import { A as ProjectionIdentity, C as filterSchema, D as validateEntitiesConfig, E as relationshipsSchema, F as projectionSchema, M as ProjectionMapping, N as ProjectionRef, O as BASE_REF, P as identityRefs, S as entitiesConfigSchema, T as relationshipSchema, _ as MaterializingConcept, a as ClivlyEntitiesConfig, b as RelationshipsMap, d as CrmConcept, f as DiscoveredColumnMeta, g as MATERIALIZING_CONCEPTS, h as FilterValue, i as ClivlyConfigError, j as ProjectionJoin, k as ProjectionFieldBinding, l as ConfigValidationError, m as FilterExpr, n as CRM_CONCEPTS, p as DiscoveredSchemaTable, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as RelationshipSpec, x as defineClivlyConfig, y as RelationshipVia } from "./entity-config-fKQhimtD.mjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-Du36VZr1.mjs";
|
|
6
|
+
import { n as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-BChZsany.mjs";
|
|
7
|
+
import { a as compileEntityView, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-CcUwzZut.mjs";
|
|
8
|
+
import { c as SyncResult, f as reconcile, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult } from "./sync-engine-DHQ7rXZe.mjs";
|
|
9
|
+
import { a as validateProjection, c as draftErrors, d as suggestJoinConditions, f as fanOutJoins, i as primaryKeyColumns, l as draftToProjection, n as coversUniqueKey, o as ProjectionDraft, p as joinFansOut, r as hasRichMeta, s as describeCardinality, t as columnMetaFor, u as emptyProjectionDraft } from "./internal-BLCK81kB.mjs";
|
|
10
10
|
export { type Activity, type ActivityType, BASE_REF, CANONICAL_FIELDS, type CRMAdapter, CRM_CONCEPTS, type ClivlyAuthAdapter, ClivlyConfigError, type ClivlyEntitiesConfig, type ClivlyEntityConfig, type ClivlyUser, type Company, type CompileOptions, type CompiledView, type ConfigValidationError, type ConfigValidationResult, type Contact, type ContactFilters, type ContactStatus, type CreateActivityInput, type CreateCompanyInput, type CreateContactInput, type CreateDealInput, type CreateTaskInput, type CrmConcept, type CrmMembership, type CrmRole, DEFAULT_VIEW_PREFIX, type Deal, type DealStage, type DiscoveredColumnMeta, type DiscoveredSchemaTable, type EntityMappingRow, type EntitySyncResult, type ExplainResult, type FilterExpr, type FilterValue, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type Note, type PersistAction, type ProjectionDraft, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, coversUniqueKey, defineClivlyConfig, describeCardinality, draftErrors, draftToProjection, emptyProjectionDraft, entitiesConfigSchema, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, joinFansOut, mappingsToEntitiesConfig, primaryKeyColumns, projectionSchema, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, suggestJoinConditions, validateEntitiesConfig, validateProjection };
|
package/core.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { i as projectionSchema, r as identityRefs, t as BASE_REF } from "./projection-D7xmQP4S.mjs";
|
|
2
|
-
import { _ as
|
|
2
|
+
import { _ as coversUniqueKey, a as MATERIALIZING_CONCEPTS, c as filterSchema, d as relationshipsSchema, f as validateEntitiesConfig, g as columnMetaFor, h as joinFansOut, i as ClivlyConfigError, m as fanOutJoins, n as CRM_CONCEPTS, o as defineClivlyConfig, p as validateProjection, s as entitiesConfigSchema, t as CANONICAL_FIELDS, u as relationshipSchema, v as hasRichMeta, y as primaryKeyColumns } from "./entity-config-D08zAeFY.mjs";
|
|
3
3
|
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
4
4
|
import { t as authCustom } from "./auth-adapter-gfVDxf3d.mjs";
|
|
5
5
|
import { n as buildRelationships, r as relationshipViaSignature, t as buildFilterFromDiscriminator } from "./mapping-form-DigkuvFc.mjs";
|
|
6
|
-
import { t as mappingsToEntitiesConfig } from "./mappings-config-
|
|
7
|
-
import { a as suggestJoinConditions, i as emptyProjectionDraft, n as draftErrors, r as draftToProjection, t as describeCardinality } from "./internal-
|
|
8
|
-
import { i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-
|
|
9
|
-
import { i as runSync, r as reconcile } from "./sync-engine-
|
|
6
|
+
import { t as mappingsToEntitiesConfig } from "./mappings-config-DNaYGyKN.mjs";
|
|
7
|
+
import { a as suggestJoinConditions, i as emptyProjectionDraft, n as draftErrors, r as draftToProjection, t as describeCardinality } from "./internal-BGVUG312.mjs";
|
|
8
|
+
import { i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-CQx8TRrW.mjs";
|
|
9
|
+
import { i as runSync, r as reconcile } from "./sync-engine-SuxSzbZ4.mjs";
|
|
10
10
|
//#region src/core.ts
|
|
11
11
|
warnDeprecatedSubpath("clivly/core", "clivly/sdk", "Import \"defineClivlyConfig\" and its config types from \"clivly/sdk\"; import everything else from \"clivly/internal\" (no stability guarantee — see STABILITY.md).");
|
|
12
12
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as DiscoveredColumnMeta, p as DiscoveredSchemaTable } from "./entity-config-fKQhimtD.mjs";
|
|
2
2
|
import { Table } from "drizzle-orm";
|
|
3
3
|
//#region ../core/src/drizzle.d.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as DiscoveredColumnMeta, p as DiscoveredSchemaTable } from "./entity-config-fKQhimtD.cjs";
|
|
2
2
|
import { Table } from "drizzle-orm";
|
|
3
3
|
//#region ../core/src/drizzle.d.ts
|
|
4
4
|
/**
|
package/drizzle.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as buildUniqueConstraints, r as discoverFromDrizzle } from "./drizzle-
|
|
2
|
-
import { m as SyncSource, t as NamespaceIntrospector } from "./namespace-probe-
|
|
1
|
+
import { n as buildUniqueConstraints, r as discoverFromDrizzle } from "./drizzle-jz0lrAgl.cjs";
|
|
2
|
+
import { m as SyncSource, t as NamespaceIntrospector } from "./namespace-probe-aRFmpU85.cjs";
|
|
3
3
|
import { Table } from "drizzle-orm";
|
|
4
4
|
//#region ../sdk/src/drizzle.d.ts
|
|
5
5
|
interface DrizzleDb {
|
package/drizzle.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as buildUniqueConstraints, r as discoverFromDrizzle } from "./drizzle-
|
|
2
|
-
import { m as SyncSource, t as NamespaceIntrospector } from "./namespace-probe-
|
|
1
|
+
import { n as buildUniqueConstraints, r as discoverFromDrizzle } from "./drizzle-DooDUGqO.mjs";
|
|
2
|
+
import { m as SyncSource, t as NamespaceIntrospector } from "./namespace-probe-BkUs8raG.mjs";
|
|
3
3
|
import { Table } from "drizzle-orm";
|
|
4
4
|
//#region ../sdk/src/drizzle.d.ts
|
|
5
5
|
interface DrizzleDb {
|
|
@@ -485,8 +485,53 @@ function defaultWarn(message) {
|
|
|
485
485
|
* a `ClivlyConfigError` instead. Does NOT validate against the host schema — that
|
|
486
486
|
* needs the discovered schema; see `validateEntitiesConfig`.
|
|
487
487
|
*/
|
|
488
|
+
/**
|
|
489
|
+
* The `fields` entry a projection binding implies, qualified as `ref.column`.
|
|
490
|
+
* Qualified rather than bare: two bindings can pull the same column name from
|
|
491
|
+
* different tables (`cl.full_name` and `adv.full_name`), which a bare column
|
|
492
|
+
* name cannot tell apart.
|
|
493
|
+
*/
|
|
494
|
+
function projectionFields(projection) {
|
|
495
|
+
const fields = {};
|
|
496
|
+
for (const [name, binding] of Object.entries(projection.fieldBindings)) fields[name] = `${binding.from.table}.${binding.from.column}`;
|
|
497
|
+
return fields;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* `fields` duplicates `projection.fieldBindings`, and only the bindings are
|
|
501
|
+
* compiled — so a hand-written `fields` that drifts is both silent and
|
|
502
|
+
* invisible. Derive it when omitted, and reject it when it disagrees.
|
|
503
|
+
*/
|
|
504
|
+
function normalizeProjectionFields(config) {
|
|
505
|
+
const entities = {};
|
|
506
|
+
for (const [key, entity] of Object.entries(config.entities ?? {})) {
|
|
507
|
+
const projection = entity?.projection;
|
|
508
|
+
if (!projection?.fieldBindings) {
|
|
509
|
+
entities[key] = entity;
|
|
510
|
+
continue;
|
|
511
|
+
}
|
|
512
|
+
const derived = projectionFields(projection);
|
|
513
|
+
const declared = entity.fields;
|
|
514
|
+
if (!declared) {
|
|
515
|
+
entities[key] = {
|
|
516
|
+
...entity,
|
|
517
|
+
fields: derived
|
|
518
|
+
};
|
|
519
|
+
continue;
|
|
520
|
+
}
|
|
521
|
+
const drifted = [.../* @__PURE__ */ new Set([...Object.keys(derived), ...Object.keys(declared)])].filter((name) => declared[name] !== derived[name]).sort();
|
|
522
|
+
if (drifted.length > 0) {
|
|
523
|
+
const detail = drifted.map((name) => `"${name}": fields has ${declared[name] === void 0 ? "no entry" : `"${declared[name]}"`}, bindings imply ${derived[name] === void 0 ? "no entry" : `"${derived[name]}"`}`).join("; ");
|
|
524
|
+
throw new Error(`Clivly config: entity "${key}" has a \`fields\` map that disagrees with \`projection.fieldBindings\` — ${detail}. Only the bindings are compiled, so the \`fields\` copy would be silently ignored. Omit \`fields\` entirely and it will be derived.`);
|
|
525
|
+
}
|
|
526
|
+
entities[key] = entity;
|
|
527
|
+
}
|
|
528
|
+
return {
|
|
529
|
+
...config,
|
|
530
|
+
entities
|
|
531
|
+
};
|
|
532
|
+
}
|
|
488
533
|
function defineClivlyConfig(config, options) {
|
|
489
|
-
const parsed = entitiesConfigSchema.parse(config);
|
|
534
|
+
const parsed = entitiesConfigSchema.parse(normalizeProjectionFields(config));
|
|
490
535
|
const issues = canonicalFieldIssues(parsed);
|
|
491
536
|
if (issues.length > 0) {
|
|
492
537
|
if (options?.strict) throw new ClivlyConfigError(issues);
|
|
@@ -609,4 +654,4 @@ function validateEntitiesConfig(config, schema) {
|
|
|
609
654
|
};
|
|
610
655
|
}
|
|
611
656
|
//#endregion
|
|
612
|
-
export {
|
|
657
|
+
export { coversUniqueKey as _, MATERIALIZING_CONCEPTS as a, filterSchema as c, relationshipsSchema as d, validateEntitiesConfig as f, columnMetaFor as g, joinFansOut as h, ClivlyConfigError as i, projectionFields as l, fanOutJoins as m, CRM_CONCEPTS as n, defineClivlyConfig as o, validateProjection as p, CUSTOM_CONCEPT as r, entitiesConfigSchema as s, CANONICAL_FIELDS as t, relationshipSchema as u, hasRichMeta as v, primaryKeyColumns as y };
|
|
@@ -2120,6 +2120,126 @@ interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadon
|
|
|
2120
2120
|
}
|
|
2121
2121
|
declare const ZodReadonly: $constructor<ZodReadonly>;
|
|
2122
2122
|
//#endregion
|
|
2123
|
+
//#region ../core/src/projection.d.ts
|
|
2124
|
+
/**
|
|
2125
|
+
* Projection-backed custom mappings — one custom object derived from a base
|
|
2126
|
+
* table plus explicit joins.
|
|
2127
|
+
*
|
|
2128
|
+
* A projection is deliberately narrow: equality joins only, direct column
|
|
2129
|
+
* bindings only, no expressions and no aggregation. Everything a user can
|
|
2130
|
+
* express here compiles to a single read-only view whose `id` column is
|
|
2131
|
+
* provably unique per row, which is what lets the sync engine consume it
|
|
2132
|
+
* unchanged.
|
|
2133
|
+
*
|
|
2134
|
+
* Refs address tables symbolically: `"base"` for the base table, or a join's
|
|
2135
|
+
* `key`. Raw table names are never accepted in a ref, so a projection can
|
|
2136
|
+
* never reach a table it did not declare.
|
|
2137
|
+
*/
|
|
2138
|
+
/** The reserved ref name for the projection's base table. */
|
|
2139
|
+
declare const BASE_REF = "base";
|
|
2140
|
+
declare const projectionRefSchema: ZodObject<{
|
|
2141
|
+
table: ZodString;
|
|
2142
|
+
column: ZodString;
|
|
2143
|
+
}, $strict>;
|
|
2144
|
+
type ProjectionRef = output<typeof projectionRefSchema>;
|
|
2145
|
+
declare const projectionJoinSchema: ZodObject<{
|
|
2146
|
+
key: ZodString;
|
|
2147
|
+
table: ZodString;
|
|
2148
|
+
type: ZodEnum<{
|
|
2149
|
+
inner: "inner";
|
|
2150
|
+
left: "left";
|
|
2151
|
+
}>;
|
|
2152
|
+
on: ZodArray<ZodObject<{
|
|
2153
|
+
left: ZodObject<{
|
|
2154
|
+
table: ZodString;
|
|
2155
|
+
column: ZodString;
|
|
2156
|
+
}, $strict>;
|
|
2157
|
+
op: ZodLiteral<"eq">;
|
|
2158
|
+
right: ZodObject<{
|
|
2159
|
+
table: ZodString;
|
|
2160
|
+
column: ZodString;
|
|
2161
|
+
}, $strict>;
|
|
2162
|
+
}, $strict>>;
|
|
2163
|
+
}, $strict>;
|
|
2164
|
+
type ProjectionJoin = output<typeof projectionJoinSchema>;
|
|
2165
|
+
declare const projectionFieldBindingSchema: ZodObject<{
|
|
2166
|
+
from: ZodObject<{
|
|
2167
|
+
table: ZodString;
|
|
2168
|
+
column: ZodString;
|
|
2169
|
+
}, $strict>;
|
|
2170
|
+
}, $strict>;
|
|
2171
|
+
type ProjectionFieldBinding = output<typeof projectionFieldBindingSchema>;
|
|
2172
|
+
declare const projectionIdentitySchema: ZodUnion<readonly [ZodObject<{
|
|
2173
|
+
kind: ZodLiteral<"base_pk">;
|
|
2174
|
+
column: ZodOptional<ZodString>;
|
|
2175
|
+
}, $strict>, ZodObject<{
|
|
2176
|
+
kind: ZodLiteral<"column">;
|
|
2177
|
+
from: ZodObject<{
|
|
2178
|
+
table: ZodString;
|
|
2179
|
+
column: ZodString;
|
|
2180
|
+
}, $strict>;
|
|
2181
|
+
}, $strict>, ZodObject<{
|
|
2182
|
+
kind: ZodLiteral<"composite">;
|
|
2183
|
+
parts: ZodArray<ZodObject<{
|
|
2184
|
+
table: ZodString;
|
|
2185
|
+
column: ZodString;
|
|
2186
|
+
}, $strict>>;
|
|
2187
|
+
}, $strict>]>;
|
|
2188
|
+
type ProjectionIdentity = output<typeof projectionIdentitySchema>;
|
|
2189
|
+
declare const projectionSchema: ZodObject<{
|
|
2190
|
+
version: ZodLiteral<1>;
|
|
2191
|
+
kind: ZodLiteral<"projection">;
|
|
2192
|
+
entityKey: ZodString;
|
|
2193
|
+
baseTable: ZodString;
|
|
2194
|
+
joins: ZodArray<ZodObject<{
|
|
2195
|
+
key: ZodString;
|
|
2196
|
+
table: ZodString;
|
|
2197
|
+
type: ZodEnum<{
|
|
2198
|
+
inner: "inner";
|
|
2199
|
+
left: "left";
|
|
2200
|
+
}>;
|
|
2201
|
+
on: ZodArray<ZodObject<{
|
|
2202
|
+
left: ZodObject<{
|
|
2203
|
+
table: ZodString;
|
|
2204
|
+
column: ZodString;
|
|
2205
|
+
}, $strict>;
|
|
2206
|
+
op: ZodLiteral<"eq">;
|
|
2207
|
+
right: ZodObject<{
|
|
2208
|
+
table: ZodString;
|
|
2209
|
+
column: ZodString;
|
|
2210
|
+
}, $strict>;
|
|
2211
|
+
}, $strict>>;
|
|
2212
|
+
}, $strict>>;
|
|
2213
|
+
fieldBindings: ZodRecord<ZodString, ZodObject<{
|
|
2214
|
+
from: ZodObject<{
|
|
2215
|
+
table: ZodString;
|
|
2216
|
+
column: ZodString;
|
|
2217
|
+
}, $strict>;
|
|
2218
|
+
}, $strict>>;
|
|
2219
|
+
identity: ZodUnion<readonly [ZodObject<{
|
|
2220
|
+
kind: ZodLiteral<"base_pk">;
|
|
2221
|
+
column: ZodOptional<ZodString>;
|
|
2222
|
+
}, $strict>, ZodObject<{
|
|
2223
|
+
kind: ZodLiteral<"column">;
|
|
2224
|
+
from: ZodObject<{
|
|
2225
|
+
table: ZodString;
|
|
2226
|
+
column: ZodString;
|
|
2227
|
+
}, $strict>;
|
|
2228
|
+
}, $strict>, ZodObject<{
|
|
2229
|
+
kind: ZodLiteral<"composite">;
|
|
2230
|
+
parts: ZodArray<ZodObject<{
|
|
2231
|
+
table: ZodString;
|
|
2232
|
+
column: ZodString;
|
|
2233
|
+
}, $strict>>;
|
|
2234
|
+
}, $strict>]>;
|
|
2235
|
+
}, $strict>;
|
|
2236
|
+
type ProjectionMapping = output<typeof projectionSchema>;
|
|
2237
|
+
/**
|
|
2238
|
+
* Every column ref an identity depends on. `basePkColumn` is the base table's
|
|
2239
|
+
* discovered PK, used only when a `base_pk` identity omits an explicit column.
|
|
2240
|
+
*/
|
|
2241
|
+
declare function identityRefs(identity: ProjectionIdentity, basePkColumn: string): ProjectionRef[];
|
|
2242
|
+
//#endregion
|
|
2123
2243
|
//#region ../core/src/entity-config.d.ts
|
|
2124
2244
|
/**
|
|
2125
2245
|
* Entity Config v2 — the declarative contract that turns Clivly's "schema-aware"
|
|
@@ -2457,6 +2577,21 @@ declare const entitiesConfigSchema: ZodObject<{
|
|
|
2457
2577
|
}, $strict>>;
|
|
2458
2578
|
}, $strict>;
|
|
2459
2579
|
type ClivlyEntitiesConfig = output<typeof entitiesConfigSchema>;
|
|
2580
|
+
/**
|
|
2581
|
+
* What an author may hand to `defineClivlyConfig`. Identical to
|
|
2582
|
+
* `ClivlyEntityConfig` except that a projection entity may omit `fields` —
|
|
2583
|
+
* it is derived from `projection.fieldBindings`. Without a projection `fields`
|
|
2584
|
+
* stays required, so the looser input never weakens the ordinary case.
|
|
2585
|
+
*/
|
|
2586
|
+
type ClivlyEntityConfigInput = (ClivlyEntityConfig & {
|
|
2587
|
+
projection?: undefined;
|
|
2588
|
+
}) | (Omit<ClivlyEntityConfig, "fields"> & {
|
|
2589
|
+
fields?: Record<string, string>;
|
|
2590
|
+
projection: ProjectionMapping;
|
|
2591
|
+
});
|
|
2592
|
+
type ClivlyEntitiesConfigInput = Omit<ClivlyEntitiesConfig, "entities"> & {
|
|
2593
|
+
entities: Record<string, ClivlyEntityConfigInput>;
|
|
2594
|
+
};
|
|
2460
2595
|
/** Thrown by `defineClivlyConfig({ strict: true })` on non-canonical field keys. */
|
|
2461
2596
|
declare class ClivlyConfigError extends Error {
|
|
2462
2597
|
readonly issues: ConfigValidationError[];
|
|
@@ -2474,7 +2609,14 @@ declare class ClivlyConfigError extends Error {
|
|
|
2474
2609
|
* a `ClivlyConfigError` instead. Does NOT validate against the host schema — that
|
|
2475
2610
|
* needs the discovered schema; see `validateEntitiesConfig`.
|
|
2476
2611
|
*/
|
|
2477
|
-
|
|
2612
|
+
/**
|
|
2613
|
+
* The `fields` entry a projection binding implies, qualified as `ref.column`.
|
|
2614
|
+
* Qualified rather than bare: two bindings can pull the same column name from
|
|
2615
|
+
* different tables (`cl.full_name` and `adv.full_name`), which a bare column
|
|
2616
|
+
* name cannot tell apart.
|
|
2617
|
+
*/
|
|
2618
|
+
declare function projectionFields(projection: ProjectionMapping): Record<string, string>;
|
|
2619
|
+
declare function defineClivlyConfig(config: ClivlyEntitiesConfigInput, options?: {
|
|
2478
2620
|
strict?: boolean;
|
|
2479
2621
|
onWarn?: (message: string) => void;
|
|
2480
2622
|
}): ClivlyEntitiesConfig;
|
|
@@ -2532,4 +2674,4 @@ interface ConfigValidationResult {
|
|
|
2532
2674
|
*/
|
|
2533
2675
|
declare function validateEntitiesConfig(config: ClivlyEntitiesConfig, schema: DiscoveredSchemaTable[]): ConfigValidationResult;
|
|
2534
2676
|
//#endregion
|
|
2535
|
-
export {
|
|
2677
|
+
export { ProjectionIdentity as A, filterSchema as C, validateEntitiesConfig as D, relationshipsSchema as E, projectionSchema as F, ProjectionMapping as M, ProjectionRef as N, BASE_REF as O, identityRefs as P, entitiesConfigSchema as S, relationshipSchema as T, MaterializingConcept as _, ClivlyEntitiesConfig as a, RelationshipsMap as b, ClivlyEntityConfigInput as c, CrmConcept as d, DiscoveredColumnMeta as f, MATERIALIZING_CONCEPTS as g, FilterValue as h, ClivlyConfigError as i, ProjectionJoin as j, ProjectionFieldBinding as k, ConfigValidationError as l, FilterExpr as m, CRM_CONCEPTS as n, ClivlyEntitiesConfigInput as o, DiscoveredSchemaTable as p, CUSTOM_CONCEPT as r, ClivlyEntityConfig as s, CANONICAL_FIELDS as t, ConfigValidationResult as u, RelationshipSpec as v, projectionFields as w, defineClivlyConfig as x, RelationshipVia as y };
|