clivly 0.9.1 → 0.9.2
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 +19 -7
- 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 +2 -1
- package/core-mappings-config.d.cts +2 -2
- package/core-mappings-config.d.mts +2 -2
- package/core-mappings-config.mjs +2 -2
- package/core-sync-engine.d.cts +1 -1
- package/core-sync-engine.d.mts +1 -1
- package/core-view-compiler.d.cts +1 -1
- package/core-view-compiler.d.mts +1 -1
- package/core.cjs +3 -3
- package/core.d.cts +6 -6
- package/core.d.mts +6 -6
- package/core.mjs +3 -3
- package/{drizzle-DooDUGqO.d.mts → drizzle-CiK8MMEZ.d.mts} +1 -1
- package/{drizzle-jz0lrAgl.d.cts → drizzle-DEtRrqtc.d.cts} +1 -1
- package/drizzle.d.cts +2 -2
- package/drizzle.d.mts +2 -2
- package/{entity-config-fKQhimtD.d.mts → entity-config-B2RA53nw.d.cts} +25 -1
- package/{entity-config-fKQhimtD.d.cts → entity-config-B2RA53nw.d.mts} +25 -1
- package/{entity-config-nuXge6rY.cjs → entity-config-DtBsl2MQ.cjs} +36 -12
- package/{entity-config-D08zAeFY.mjs → entity-config-kUHri9yA.mjs} +31 -13
- package/index.cjs +371 -27
- package/index.d.cts +1 -0
- package/index.d.mts +1 -0
- package/index.mjs +371 -27
- package/{internal-C-YBW2DB.d.cts → internal-CDY8g9Ic.d.mts} +1 -1
- package/{internal-D4HDi2GC.cjs → internal-CwnEG6Wl.cjs} +1 -1
- package/{internal-BLCK81kB.d.mts → internal-Da_dlcQ_.d.cts} +1 -1
- package/{internal-BGVUG312.mjs → internal-Df-PtOH_.mjs} +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 +2 -1
- package/internal-mappings-config.d.cts +2 -2
- package/internal-mappings-config.d.mts +2 -2
- package/internal-mappings-config.mjs +2 -2
- package/internal-sync-engine.d.cts +1 -1
- package/internal-sync-engine.d.mts +1 -1
- package/internal-view-compiler.d.cts +1 -1
- package/internal-view-compiler.d.mts +1 -1
- package/internal.cjs +3 -3
- package/internal.d.cts +6 -6
- package/internal.d.mts +6 -6
- package/internal.mjs +3 -3
- package/{mapping-form-Du36VZr1.d.mts → mapping-form-DH77BXLv.d.mts} +1 -1
- package/{mapping-form-DhY0iFmN.d.cts → mapping-form-J0aU6O7l.d.cts} +1 -1
- package/{mappings-config-C8ynKmDK.cjs → mappings-config-B0RqFLxu.cjs} +30 -1
- package/{mappings-config-DNaYGyKN.mjs → mappings-config-B1b1HVBg.mjs} +25 -2
- package/{mappings-config-B1qNM8VL.d.cts → mappings-config-D9dsonoi.d.mts} +40 -2
- package/{mappings-config-BChZsany.d.mts → mappings-config-RQLGx8ub.d.cts} +40 -2
- package/{namespace-probe-BkUs8raG.d.mts → namespace-probe-C6aHjedO.d.cts} +65 -3
- package/{namespace-probe-aRFmpU85.d.cts → namespace-probe-Dj-0Q3Hb.d.mts} +65 -3
- package/package.json +1 -1
- package/{sdk-Bj-ZDf4u.cjs → sdk-D4Wp_uxb.cjs} +754 -44
- package/{sdk-BvRD2jAp.mjs → sdk-DXV8M_Io.mjs} +754 -44
- package/sdk.cjs +4 -2
- package/sdk.d.cts +3 -3
- package/sdk.d.mts +3 -3
- package/sdk.mjs +3 -3
- package/{sync-engine-DHQ7rXZe.d.mts → sync-engine-BG2O1an2.d.cts} +2 -2
- package/{sync-engine-DiPjH53O.d.cts → sync-engine-DgQbrJON.d.mts} +2 -2
- package/{view-compiler-CcUwzZut.d.mts → view-compiler-Bo7pqXW3.d.mts} +1 -1
- package/{view-compiler-DqAdVxLq.d.cts → view-compiler-CmEdAMwj.d.cts} +1 -1
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
package/README.md
CHANGED
|
@@ -31,16 +31,23 @@ Published on npm's `latest` tag. Once installed, `npx clivly …` uses your loca
|
|
|
31
31
|
copy rather than re-fetching. Use `@next` only when deliberately testing a
|
|
32
32
|
prerelease cut.
|
|
33
33
|
|
|
34
|
+
> **If `npm audit` reports vulnerabilities after this install**, check what it
|
|
35
|
+
> actually names. `clivly` ships exactly one runtime dependency (`jiti`);
|
|
36
|
+
> `better-auth`, `drizzle-orm`, `vite` and the auth SDKs are *optional* peers,
|
|
37
|
+
> so npm attributes advisories from your app's existing copies of them through
|
|
38
|
+
> Clivly's dependency chain. Installing Clivly does not add them.
|
|
39
|
+
|
|
34
40
|
## Five-minute quick start
|
|
35
41
|
|
|
36
42
|
```bash
|
|
37
43
|
npm install clivly
|
|
38
44
|
npx clivly init # scaffold config + routes + .env, then pair this machine
|
|
39
|
-
|
|
45
|
+
npm run dev # starting the app runs the generated boot hook
|
|
40
46
|
```
|
|
41
47
|
|
|
42
|
-
`clivly init` writes
|
|
43
|
-
|
|
48
|
+
`clivly init` writes a `clivly.config.ts` you own, two route files Clivly
|
|
49
|
+
owns, and a framework boot hook where it can safely do so. Starting the app is
|
|
50
|
+
what connects it; `clivly status` is a read-only diagnostic. It creates no
|
|
44
51
|
database tables and does not modify your ORM schema.
|
|
45
52
|
|
|
46
53
|
---
|
|
@@ -401,6 +408,11 @@ resolves, and emits a one-time `process.emitWarning` naming the replacement (so
|
|
|
401
408
|
it stays off stdout and cannot corrupt machine-readable CLI output). See
|
|
402
409
|
[STABILITY.md](https://github.com/amani-joseph/clivly.com/blob/master/STABILITY.md).
|
|
403
410
|
|
|
411
|
+
For a long-lived Node host, the runtime can opt into WebSocket presence with
|
|
412
|
+
`presence: { transport: "websocket" }` in `clivly.config.ts`. It keeps
|
|
413
|
+
sync scheduling unchanged and resumes HTTP heartbeat automatically during a
|
|
414
|
+
socket reconnect. The CLI does not enable this setting on your behalf.
|
|
415
|
+
|
|
404
416
|
---
|
|
405
417
|
|
|
406
418
|
## Common errors
|
|
@@ -422,10 +434,10 @@ The full troubleshooting table is in the
|
|
|
422
434
|
|
|
423
435
|
## Telemetry
|
|
424
436
|
|
|
425
|
-
|
|
426
|
-
Clivly API you point it at, and only to do what you asked:
|
|
427
|
-
schema pushes, and status checks.
|
|
428
|
-
|
|
437
|
+
The CLI itself emits no usage analytics or crash reports. It makes network
|
|
438
|
+
requests only to the Clivly API you point it at, and only to do what you asked:
|
|
439
|
+
pairing, heartbeats, schema pushes, and status checks. Opt-in SDK WebSocket
|
|
440
|
+
presence records bounded reliability metrics; see
|
|
429
441
|
[SECURITY.md](https://github.com/amani-joseph/clivly.com/blob/master/SECURITY.md#telemetry).
|
|
430
442
|
|
|
431
443
|
## Related documentation
|
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-DEtRrqtc.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-CiK8MMEZ.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-DtBsl2MQ.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
|
|
@@ -8,6 +8,7 @@ exports.CRM_CONCEPTS = require_entity_config.CRM_CONCEPTS;
|
|
|
8
8
|
exports.CUSTOM_CONCEPT = require_entity_config.CUSTOM_CONCEPT;
|
|
9
9
|
exports.ClivlyConfigError = require_entity_config.ClivlyConfigError;
|
|
10
10
|
exports.MATERIALIZING_CONCEPTS = require_entity_config.MATERIALIZING_CONCEPTS;
|
|
11
|
+
exports.customObjectDeclarations = require_entity_config.customObjectDeclarations;
|
|
11
12
|
exports.defineClivlyConfig = require_entity_config.defineClivlyConfig;
|
|
12
13
|
exports.entitiesConfigSchema = require_entity_config.entitiesConfigSchema;
|
|
13
14
|
exports.filterSchema = require_entity_config.filterSchema;
|
package/core-entity-config.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
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 };
|
|
1
|
+
import { C as defineClivlyConfig, D as relationshipSchema, E as projectionFields, O as relationshipsSchema, S as customObjectDeclarations, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, k as validateEntitiesConfig, l as ConfigValidationError, m as DiscoveredSchemaTable, n as CRM_CONCEPTS, o as ClivlyEntitiesConfigInput, p as DiscoveredColumnMeta, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-B2RA53nw.cjs";
|
|
2
|
+
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntitiesConfigInput, ClivlyEntityConfig, ClivlyEntityConfigInput, ConfigValidationError, ConfigValidationResult, CrmConcept, CustomObjectDeclaration, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
package/core-entity-config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
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 };
|
|
1
|
+
import { C as defineClivlyConfig, D as relationshipSchema, E as projectionFields, O as relationshipsSchema, S as customObjectDeclarations, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, k as validateEntitiesConfig, l as ConfigValidationError, m as DiscoveredSchemaTable, n as CRM_CONCEPTS, o as ClivlyEntitiesConfigInput, p as DiscoveredColumnMeta, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-B2RA53nw.mjs";
|
|
2
|
+
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntitiesConfigInput, ClivlyEntityConfig, ClivlyEntityConfigInput, ConfigValidationError, ConfigValidationResult, CrmConcept, CustomObjectDeclaration, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, 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
|
|
1
|
+
import { a as MATERIALIZING_CONCEPTS, c as entitiesConfigSchema, d as relationshipSchema, f as relationshipsSchema, i as ClivlyConfigError, l as filterSchema, n as CRM_CONCEPTS, o as customObjectDeclarations, p as validateEntitiesConfig, r as CUSTOM_CONCEPT, s as defineClivlyConfig, t as CANONICAL_FIELDS, u as projectionFields } from "./entity-config-kUHri9yA.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, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
6
|
+
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, MATERIALIZING_CONCEPTS, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-B2RA53nw.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 { p as DiscoveredColumnMeta } from "./entity-config-B2RA53nw.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-J0aU6O7l.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-DH77BXLv.mjs";
|
|
2
2
|
export { RelationshipCandidate, buildFilterFromDiscriminator, buildRelationships, relationshipViaSignature };
|
package/core-mappings-config.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_mappings_config = require("./mappings-config-B0RqFLxu.cjs");
|
|
2
3
|
const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
|
|
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");
|
|
7
7
|
//#endregion
|
|
8
|
+
exports.entitiesToMappings = require_mappings_config.entitiesToMappings;
|
|
8
9
|
exports.mappingsToEntitiesConfig = require_mappings_config.mappingsToEntitiesConfig;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { EntityMappingRow, mappingsToEntitiesConfig };
|
|
1
|
+
import { i as mappingsToEntitiesConfig, n as MappingFromConfig, r as entitiesToMappings, t as EntityMappingRow } from "./mappings-config-RQLGx8ub.cjs";
|
|
2
|
+
export { EntityMappingRow, MappingFromConfig, entitiesToMappings, mappingsToEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { EntityMappingRow, mappingsToEntitiesConfig };
|
|
1
|
+
import { i as mappingsToEntitiesConfig, n as MappingFromConfig, r as entitiesToMappings, t as EntityMappingRow } from "./mappings-config-D9dsonoi.mjs";
|
|
2
|
+
export { EntityMappingRow, MappingFromConfig, entitiesToMappings, mappingsToEntitiesConfig };
|
package/core-mappings-config.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { n as mappingsToEntitiesConfig, t as entitiesToMappings } from "./mappings-config-B1b1HVBg.mjs";
|
|
1
2
|
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
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");
|
|
6
6
|
//#endregion
|
|
7
|
-
export { mappingsToEntitiesConfig };
|
|
7
|
+
export { entitiesToMappings, mappingsToEntitiesConfig };
|
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-BG2O1an2.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-DgQbrJON.mjs";
|
|
2
2
|
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, previewSync, reconcile, runSync };
|
package/core-view-compiler.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-CmEdAMwj.cjs";
|
|
2
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, 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-
|
|
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-Bo7pqXW3.mjs";
|
|
2
2
|
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
package/core.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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-DtBsl2MQ.cjs");
|
|
4
|
+
const require_mappings_config = require("./mappings-config-B0RqFLxu.cjs");
|
|
4
5
|
const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
|
|
5
6
|
const require_auth_adapter = require("./auth-adapter-CiEXcweZ.cjs");
|
|
6
7
|
const require_mapping_form = require("./mapping-form-BpfON_ME.cjs");
|
|
7
|
-
const
|
|
8
|
-
const require_internal = require("./internal-D4HDi2GC.cjs");
|
|
8
|
+
const require_internal = require("./internal-CwnEG6Wl.cjs");
|
|
9
9
|
const require_view_compiler = require("./view-compiler-Blu4OXJ7.cjs");
|
|
10
10
|
const require_sync_engine = require("./sync-engine-abE94g6X.cjs");
|
|
11
11
|
//#region src/core.ts
|
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 { A 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 BASE_REF, C as defineClivlyConfig, D as relationshipSchema, F as ProjectionRef, I as identityRefs, L as projectionSchema, M as ProjectionIdentity, N as ProjectionJoin, O as relationshipsSchema, P as ProjectionMapping, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, d as CrmConcept, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as ProjectionFieldBinding, k as validateEntitiesConfig, l as ConfigValidationError, m as DiscoveredSchemaTable, n as CRM_CONCEPTS, p as DiscoveredColumnMeta, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-B2RA53nw.cjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-J0aU6O7l.cjs";
|
|
6
|
+
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-RQLGx8ub.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-CmEdAMwj.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-BG2O1an2.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-Da_dlcQ_.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 { A 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 BASE_REF, C as defineClivlyConfig, D as relationshipSchema, F as ProjectionRef, I as identityRefs, L as projectionSchema, M as ProjectionIdentity, N as ProjectionJoin, O as relationshipsSchema, P as ProjectionMapping, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, d as CrmConcept, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as ProjectionFieldBinding, k as validateEntitiesConfig, l as ConfigValidationError, m as DiscoveredSchemaTable, n as CRM_CONCEPTS, p as DiscoveredColumnMeta, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-B2RA53nw.mjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-DH77BXLv.mjs";
|
|
6
|
+
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-D9dsonoi.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-Bo7pqXW3.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-DgQbrJON.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-CDY8g9Ic.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,10 +1,10 @@
|
|
|
1
1
|
import { i as projectionSchema, r as identityRefs, t as BASE_REF } from "./projection-D7xmQP4S.mjs";
|
|
2
|
-
import { _ as
|
|
2
|
+
import { _ as columnMetaFor, a as MATERIALIZING_CONCEPTS, b as primaryKeyColumns, c as entitiesConfigSchema, d as relationshipSchema, f as relationshipsSchema, g as joinFansOut, h as fanOutJoins, i as ClivlyConfigError, l as filterSchema, m as validateProjection, n as CRM_CONCEPTS, p as validateEntitiesConfig, s as defineClivlyConfig, t as CANONICAL_FIELDS, v as coversUniqueKey, y as hasRichMeta } from "./entity-config-kUHri9yA.mjs";
|
|
3
|
+
import { n as mappingsToEntitiesConfig } from "./mappings-config-B1b1HVBg.mjs";
|
|
3
4
|
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
4
5
|
import { t as authCustom } from "./auth-adapter-gfVDxf3d.mjs";
|
|
5
6
|
import { n as buildRelationships, r as relationshipViaSignature, t as buildFilterFromDiscriminator } from "./mapping-form-DigkuvFc.mjs";
|
|
6
|
-
import { t as
|
|
7
|
-
import { a as suggestJoinConditions, i as emptyProjectionDraft, n as draftErrors, r as draftToProjection, t as describeCardinality } from "./internal-BGVUG312.mjs";
|
|
7
|
+
import { a as suggestJoinConditions, i as emptyProjectionDraft, n as draftErrors, r as draftToProjection, t as describeCardinality } from "./internal-Df-PtOH_.mjs";
|
|
8
8
|
import { i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-CQx8TRrW.mjs";
|
|
9
9
|
import { i as runSync, r as reconcile } from "./sync-engine-SuxSzbZ4.mjs";
|
|
10
10
|
//#region src/core.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as DiscoveredSchemaTable, p as DiscoveredColumnMeta } from "./entity-config-B2RA53nw.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 { m as DiscoveredSchemaTable, p as DiscoveredColumnMeta } from "./entity-config-B2RA53nw.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 {
|
|
1
|
+
import { n as buildUniqueConstraints, r as discoverFromDrizzle } from "./drizzle-DEtRrqtc.cjs";
|
|
2
|
+
import { _ as SyncSource, t as NamespaceIntrospector } from "./namespace-probe-C6aHjedO.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 {
|
|
1
|
+
import { n as buildUniqueConstraints, r as discoverFromDrizzle } from "./drizzle-CiK8MMEZ.mjs";
|
|
2
|
+
import { _ as SyncSource, t as NamespaceIntrospector } from "./namespace-probe-Dj-0Q3Hb.mjs";
|
|
3
3
|
import { Table } from "drizzle-orm";
|
|
4
4
|
//#region ../sdk/src/drizzle.d.ts
|
|
5
5
|
interface DrizzleDb {
|
|
@@ -2432,6 +2432,11 @@ declare const entitySchema: ZodObject<{
|
|
|
2432
2432
|
}, $strict>]>;
|
|
2433
2433
|
}, $strict>>>;
|
|
2434
2434
|
targetObjectTypeId: ZodOptional<ZodString>;
|
|
2435
|
+
objectType: ZodOptional<ZodObject<{
|
|
2436
|
+
name: ZodString;
|
|
2437
|
+
pluralName: ZodOptional<ZodString>;
|
|
2438
|
+
iconKey: ZodOptional<ZodString>;
|
|
2439
|
+
}, $strict>>;
|
|
2435
2440
|
projection: ZodOptional<ZodObject<{
|
|
2436
2441
|
version: ZodLiteral<1>;
|
|
2437
2442
|
kind: ZodLiteral<"projection">;
|
|
@@ -2527,6 +2532,11 @@ declare const entitiesConfigSchema: ZodObject<{
|
|
|
2527
2532
|
}, $strict>]>;
|
|
2528
2533
|
}, $strict>>>;
|
|
2529
2534
|
targetObjectTypeId: ZodOptional<ZodString>;
|
|
2535
|
+
objectType: ZodOptional<ZodObject<{
|
|
2536
|
+
name: ZodString;
|
|
2537
|
+
pluralName: ZodOptional<ZodString>;
|
|
2538
|
+
iconKey: ZodOptional<ZodString>;
|
|
2539
|
+
}, $strict>>;
|
|
2530
2540
|
projection: ZodOptional<ZodObject<{
|
|
2531
2541
|
version: ZodLiteral<1>;
|
|
2532
2542
|
kind: ZodLiteral<"projection">;
|
|
@@ -2609,6 +2619,20 @@ declare class ClivlyConfigError extends Error {
|
|
|
2609
2619
|
* a `ClivlyConfigError` instead. Does NOT validate against the host schema — that
|
|
2610
2620
|
* needs the discovered schema; see `validateEntitiesConfig`.
|
|
2611
2621
|
*/
|
|
2622
|
+
/** A custom object the host declares in config, for `push-schema` to ensure. */
|
|
2623
|
+
interface CustomObjectDeclaration {
|
|
2624
|
+
iconKey?: string;
|
|
2625
|
+
name: string;
|
|
2626
|
+
pluralName?: string;
|
|
2627
|
+
/** Unique per org and immutable — the entity key. */
|
|
2628
|
+
slug: string;
|
|
2629
|
+
}
|
|
2630
|
+
/**
|
|
2631
|
+
* The custom objects a config declares, keyed by entity slug. Entities that
|
|
2632
|
+
* already carry an explicit `targetObjectTypeId` are omitted: their object type
|
|
2633
|
+
* exists server-side and re-declaring it would be a no-op at best.
|
|
2634
|
+
*/
|
|
2635
|
+
declare function customObjectDeclarations(config: ClivlyEntitiesConfig): CustomObjectDeclaration[];
|
|
2612
2636
|
/**
|
|
2613
2637
|
* The `fields` entry a projection binding implies, qualified as `ref.column`.
|
|
2614
2638
|
* Qualified rather than bare: two bindings can pull the same column name from
|
|
@@ -2674,4 +2698,4 @@ interface ConfigValidationResult {
|
|
|
2674
2698
|
*/
|
|
2675
2699
|
declare function validateEntitiesConfig(config: ClivlyEntitiesConfig, schema: DiscoveredSchemaTable[]): ConfigValidationResult;
|
|
2676
2700
|
//#endregion
|
|
2677
|
-
export {
|
|
2701
|
+
export { BASE_REF as A, defineClivlyConfig as C, relationshipSchema as D, projectionFields as E, ProjectionRef as F, identityRefs as I, projectionSchema as L, ProjectionIdentity as M, ProjectionJoin as N, relationshipsSchema as O, ProjectionMapping as P, customObjectDeclarations as S, filterSchema as T, MATERIALIZING_CONCEPTS as _, ClivlyEntitiesConfig as a, RelationshipVia as b, ClivlyEntityConfigInput as c, CrmConcept as d, CustomObjectDeclaration as f, FilterValue as g, FilterExpr as h, ClivlyConfigError as i, ProjectionFieldBinding as j, validateEntitiesConfig as k, ConfigValidationError as l, DiscoveredSchemaTable as m, CRM_CONCEPTS as n, ClivlyEntitiesConfigInput as o, DiscoveredColumnMeta as p, CUSTOM_CONCEPT as r, ClivlyEntityConfig as s, CANONICAL_FIELDS as t, ConfigValidationResult as u, MaterializingConcept as v, entitiesConfigSchema as w, RelationshipsMap as x, RelationshipSpec as y };
|
|
@@ -2432,6 +2432,11 @@ declare const entitySchema: ZodObject<{
|
|
|
2432
2432
|
}, $strict>]>;
|
|
2433
2433
|
}, $strict>>>;
|
|
2434
2434
|
targetObjectTypeId: ZodOptional<ZodString>;
|
|
2435
|
+
objectType: ZodOptional<ZodObject<{
|
|
2436
|
+
name: ZodString;
|
|
2437
|
+
pluralName: ZodOptional<ZodString>;
|
|
2438
|
+
iconKey: ZodOptional<ZodString>;
|
|
2439
|
+
}, $strict>>;
|
|
2435
2440
|
projection: ZodOptional<ZodObject<{
|
|
2436
2441
|
version: ZodLiteral<1>;
|
|
2437
2442
|
kind: ZodLiteral<"projection">;
|
|
@@ -2527,6 +2532,11 @@ declare const entitiesConfigSchema: ZodObject<{
|
|
|
2527
2532
|
}, $strict>]>;
|
|
2528
2533
|
}, $strict>>>;
|
|
2529
2534
|
targetObjectTypeId: ZodOptional<ZodString>;
|
|
2535
|
+
objectType: ZodOptional<ZodObject<{
|
|
2536
|
+
name: ZodString;
|
|
2537
|
+
pluralName: ZodOptional<ZodString>;
|
|
2538
|
+
iconKey: ZodOptional<ZodString>;
|
|
2539
|
+
}, $strict>>;
|
|
2530
2540
|
projection: ZodOptional<ZodObject<{
|
|
2531
2541
|
version: ZodLiteral<1>;
|
|
2532
2542
|
kind: ZodLiteral<"projection">;
|
|
@@ -2609,6 +2619,20 @@ declare class ClivlyConfigError extends Error {
|
|
|
2609
2619
|
* a `ClivlyConfigError` instead. Does NOT validate against the host schema — that
|
|
2610
2620
|
* needs the discovered schema; see `validateEntitiesConfig`.
|
|
2611
2621
|
*/
|
|
2622
|
+
/** A custom object the host declares in config, for `push-schema` to ensure. */
|
|
2623
|
+
interface CustomObjectDeclaration {
|
|
2624
|
+
iconKey?: string;
|
|
2625
|
+
name: string;
|
|
2626
|
+
pluralName?: string;
|
|
2627
|
+
/** Unique per org and immutable — the entity key. */
|
|
2628
|
+
slug: string;
|
|
2629
|
+
}
|
|
2630
|
+
/**
|
|
2631
|
+
* The custom objects a config declares, keyed by entity slug. Entities that
|
|
2632
|
+
* already carry an explicit `targetObjectTypeId` are omitted: their object type
|
|
2633
|
+
* exists server-side and re-declaring it would be a no-op at best.
|
|
2634
|
+
*/
|
|
2635
|
+
declare function customObjectDeclarations(config: ClivlyEntitiesConfig): CustomObjectDeclaration[];
|
|
2612
2636
|
/**
|
|
2613
2637
|
* The `fields` entry a projection binding implies, qualified as `ref.column`.
|
|
2614
2638
|
* Qualified rather than bare: two bindings can pull the same column name from
|
|
@@ -2674,4 +2698,4 @@ interface ConfigValidationResult {
|
|
|
2674
2698
|
*/
|
|
2675
2699
|
declare function validateEntitiesConfig(config: ClivlyEntitiesConfig, schema: DiscoveredSchemaTable[]): ConfigValidationResult;
|
|
2676
2700
|
//#endregion
|
|
2677
|
-
export {
|
|
2701
|
+
export { BASE_REF as A, defineClivlyConfig as C, relationshipSchema as D, projectionFields as E, ProjectionRef as F, identityRefs as I, projectionSchema as L, ProjectionIdentity as M, ProjectionJoin as N, relationshipsSchema as O, ProjectionMapping as P, customObjectDeclarations as S, filterSchema as T, MATERIALIZING_CONCEPTS as _, ClivlyEntitiesConfig as a, RelationshipVia as b, ClivlyEntityConfigInput as c, CrmConcept as d, CustomObjectDeclaration as f, FilterValue as g, FilterExpr as h, ClivlyConfigError as i, ProjectionFieldBinding as j, validateEntitiesConfig as k, ConfigValidationError as l, DiscoveredSchemaTable as m, CRM_CONCEPTS as n, ClivlyEntitiesConfigInput as o, DiscoveredColumnMeta as p, CUSTOM_CONCEPT as r, ClivlyEntityConfig as s, CANONICAL_FIELDS as t, ConfigValidationResult as u, MaterializingConcept as v, entitiesConfigSchema as w, RelationshipsMap as x, RelationshipSpec as y };
|
|
@@ -437,10 +437,23 @@ const entitySchema = require_projection.strictObject({
|
|
|
437
437
|
relationships: require_projection.record(require_projection.string(), relationshipSchema).optional(),
|
|
438
438
|
/**
|
|
439
439
|
* For a "custom" entity, the crm_object_types row this materializes into.
|
|
440
|
-
*
|
|
440
|
+
* Server-generated, so pasting one into config couples the file to a
|
|
441
|
+
* specific workspace. Prefer declaring `objectType` and letting
|
|
442
|
+
* `clivly push-schema` resolve the id by slug.
|
|
441
443
|
*/
|
|
442
444
|
targetObjectTypeId: require_projection.string().min(1).optional(),
|
|
443
445
|
/**
|
|
446
|
+
* Declares the custom object this entity materializes into, so config is
|
|
447
|
+
* self-contained: the entity key is the slug (unique per org and immutable),
|
|
448
|
+
* and `clivly push-schema` creates the object type if the workspace does not
|
|
449
|
+
* have it yet. An alternative to pasting a `targetObjectTypeId`.
|
|
450
|
+
*/
|
|
451
|
+
objectType: require_projection.strictObject({
|
|
452
|
+
name: require_projection.string().min(1),
|
|
453
|
+
pluralName: require_projection.string().min(1).optional(),
|
|
454
|
+
iconKey: require_projection.string().min(1).optional()
|
|
455
|
+
}).optional(),
|
|
456
|
+
/**
|
|
444
457
|
* Advanced mapping: derive this entity from a base table plus explicit joins
|
|
445
458
|
* instead of a single source table. Valid only for `concept: "custom"`.
|
|
446
459
|
*
|
|
@@ -482,17 +495,22 @@ function defaultWarn(message) {
|
|
|
482
495
|
console.warn(message);
|
|
483
496
|
}
|
|
484
497
|
/**
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
* It also catches the silent-data-loss footgun: a non-canonical field key for a
|
|
490
|
-
* materialised concept (e.g. `fullName` instead of `name` on a `contact`) has no
|
|
491
|
-
* destination column, so the store would write an empty value. By default these
|
|
492
|
-
* are reported via `onWarn` (a `console.warn`); pass `{ strict: true }` to throw
|
|
493
|
-
* a `ClivlyConfigError` instead. Does NOT validate against the host schema — that
|
|
494
|
-
* needs the discovered schema; see `validateEntitiesConfig`.
|
|
498
|
+
* The custom objects a config declares, keyed by entity slug. Entities that
|
|
499
|
+
* already carry an explicit `targetObjectTypeId` are omitted: their object type
|
|
500
|
+
* exists server-side and re-declaring it would be a no-op at best.
|
|
495
501
|
*/
|
|
502
|
+
function customObjectDeclarations(config) {
|
|
503
|
+
const declarations = [];
|
|
504
|
+
for (const [slug, entity] of Object.entries(config.entities)) {
|
|
505
|
+
if (entity.concept !== "custom" || entity.targetObjectTypeId) continue;
|
|
506
|
+
if (!entity.objectType) continue;
|
|
507
|
+
declarations.push({
|
|
508
|
+
slug,
|
|
509
|
+
...entity.objectType
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
return declarations;
|
|
513
|
+
}
|
|
496
514
|
/**
|
|
497
515
|
* The `fields` entry a projection binding implies, qualified as `ref.column`.
|
|
498
516
|
* Qualified rather than bare: two bindings can pull the same column name from
|
|
@@ -632,7 +650,7 @@ function validateEntity(v, config, key, entity, schema) {
|
|
|
632
650
|
}
|
|
633
651
|
if (entity.projection) {
|
|
634
652
|
if (entity.concept !== "custom") v.report(`${base}.projection`, `projection mappings are only supported for concept "${CUSTOM_CONCEPT}"`);
|
|
635
|
-
if (!entity.targetObjectTypeId) v.report(`${base}.targetObjectTypeId`, "a projection mapping must target a custom object type");
|
|
653
|
+
if (!(entity.targetObjectTypeId || entity.objectType)) v.report(`${base}.targetObjectTypeId`, "a projection mapping must target a custom object type — declare `objectType: { name: \"…\" }` (recommended: the entity key becomes its slug) or set an explicit `targetObjectTypeId`");
|
|
636
654
|
if (entity.source !== entity.projection.baseTable) v.report(`${base}.source`, `"source" ("${entity.source}") must match "projection.baseTable" ("${entity.projection.baseTable}") — the view compiler reads baseTable and the sync engine reads source, so a mismatch makes them disagree about which table this entity is`);
|
|
637
655
|
for (const error of validateProjection(entity.projection, schema, base)) v.report(error.path, error.message);
|
|
638
656
|
validateReadOnly(v, base, entity);
|
|
@@ -704,6 +722,12 @@ Object.defineProperty(exports, "coversUniqueKey", {
|
|
|
704
722
|
return coversUniqueKey;
|
|
705
723
|
}
|
|
706
724
|
});
|
|
725
|
+
Object.defineProperty(exports, "customObjectDeclarations", {
|
|
726
|
+
enumerable: true,
|
|
727
|
+
get: function() {
|
|
728
|
+
return customObjectDeclarations;
|
|
729
|
+
}
|
|
730
|
+
});
|
|
707
731
|
Object.defineProperty(exports, "defineClivlyConfig", {
|
|
708
732
|
enumerable: true,
|
|
709
733
|
get: function() {
|
|
@@ -429,10 +429,23 @@ const entitySchema = strictObject({
|
|
|
429
429
|
relationships: record(string(), relationshipSchema).optional(),
|
|
430
430
|
/**
|
|
431
431
|
* For a "custom" entity, the crm_object_types row this materializes into.
|
|
432
|
-
*
|
|
432
|
+
* Server-generated, so pasting one into config couples the file to a
|
|
433
|
+
* specific workspace. Prefer declaring `objectType` and letting
|
|
434
|
+
* `clivly push-schema` resolve the id by slug.
|
|
433
435
|
*/
|
|
434
436
|
targetObjectTypeId: string().min(1).optional(),
|
|
435
437
|
/**
|
|
438
|
+
* Declares the custom object this entity materializes into, so config is
|
|
439
|
+
* self-contained: the entity key is the slug (unique per org and immutable),
|
|
440
|
+
* and `clivly push-schema` creates the object type if the workspace does not
|
|
441
|
+
* have it yet. An alternative to pasting a `targetObjectTypeId`.
|
|
442
|
+
*/
|
|
443
|
+
objectType: strictObject({
|
|
444
|
+
name: string().min(1),
|
|
445
|
+
pluralName: string().min(1).optional(),
|
|
446
|
+
iconKey: string().min(1).optional()
|
|
447
|
+
}).optional(),
|
|
448
|
+
/**
|
|
436
449
|
* Advanced mapping: derive this entity from a base table plus explicit joins
|
|
437
450
|
* instead of a single source table. Valid only for `concept: "custom"`.
|
|
438
451
|
*
|
|
@@ -474,17 +487,22 @@ function defaultWarn(message) {
|
|
|
474
487
|
console.warn(message);
|
|
475
488
|
}
|
|
476
489
|
/**
|
|
477
|
-
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
* It also catches the silent-data-loss footgun: a non-canonical field key for a
|
|
482
|
-
* materialised concept (e.g. `fullName` instead of `name` on a `contact`) has no
|
|
483
|
-
* destination column, so the store would write an empty value. By default these
|
|
484
|
-
* are reported via `onWarn` (a `console.warn`); pass `{ strict: true }` to throw
|
|
485
|
-
* a `ClivlyConfigError` instead. Does NOT validate against the host schema — that
|
|
486
|
-
* needs the discovered schema; see `validateEntitiesConfig`.
|
|
490
|
+
* The custom objects a config declares, keyed by entity slug. Entities that
|
|
491
|
+
* already carry an explicit `targetObjectTypeId` are omitted: their object type
|
|
492
|
+
* exists server-side and re-declaring it would be a no-op at best.
|
|
487
493
|
*/
|
|
494
|
+
function customObjectDeclarations(config) {
|
|
495
|
+
const declarations = [];
|
|
496
|
+
for (const [slug, entity] of Object.entries(config.entities)) {
|
|
497
|
+
if (entity.concept !== "custom" || entity.targetObjectTypeId) continue;
|
|
498
|
+
if (!entity.objectType) continue;
|
|
499
|
+
declarations.push({
|
|
500
|
+
slug,
|
|
501
|
+
...entity.objectType
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
return declarations;
|
|
505
|
+
}
|
|
488
506
|
/**
|
|
489
507
|
* The `fields` entry a projection binding implies, qualified as `ref.column`.
|
|
490
508
|
* Qualified rather than bare: two bindings can pull the same column name from
|
|
@@ -624,7 +642,7 @@ function validateEntity(v, config, key, entity, schema) {
|
|
|
624
642
|
}
|
|
625
643
|
if (entity.projection) {
|
|
626
644
|
if (entity.concept !== "custom") v.report(`${base}.projection`, `projection mappings are only supported for concept "${CUSTOM_CONCEPT}"`);
|
|
627
|
-
if (!entity.targetObjectTypeId) v.report(`${base}.targetObjectTypeId`, "a projection mapping must target a custom object type");
|
|
645
|
+
if (!(entity.targetObjectTypeId || entity.objectType)) v.report(`${base}.targetObjectTypeId`, "a projection mapping must target a custom object type — declare `objectType: { name: \"…\" }` (recommended: the entity key becomes its slug) or set an explicit `targetObjectTypeId`");
|
|
628
646
|
if (entity.source !== entity.projection.baseTable) v.report(`${base}.source`, `"source" ("${entity.source}") must match "projection.baseTable" ("${entity.projection.baseTable}") — the view compiler reads baseTable and the sync engine reads source, so a mismatch makes them disagree about which table this entity is`);
|
|
629
647
|
for (const error of validateProjection(entity.projection, schema, base)) v.report(error.path, error.message);
|
|
630
648
|
validateReadOnly(v, base, entity);
|
|
@@ -654,4 +672,4 @@ function validateEntitiesConfig(config, schema) {
|
|
|
654
672
|
};
|
|
655
673
|
}
|
|
656
674
|
//#endregion
|
|
657
|
-
export {
|
|
675
|
+
export { columnMetaFor as _, MATERIALIZING_CONCEPTS as a, primaryKeyColumns as b, entitiesConfigSchema as c, relationshipSchema as d, relationshipsSchema as f, joinFansOut as g, fanOutJoins as h, ClivlyConfigError as i, filterSchema as l, validateProjection as m, CRM_CONCEPTS as n, customObjectDeclarations as o, validateEntitiesConfig as p, CUSTOM_CONCEPT as r, defineClivlyConfig as s, CANONICAL_FIELDS as t, projectionFields as u, coversUniqueKey as v, hasRichMeta as y };
|