clivly 0.4.1 → 0.7.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/README.md +89 -10
- package/{adapter-CXr12l4K.d.cts → adapter-C2eRbBfo.d.cts} +1 -2
- package/{adapter-CvNBD_3y.d.mts → adapter-D5LRa-NA.d.mts} +1 -2
- package/{auth-adapter-CdLODn2p.d.cts → auth-adapter-Bjgo8LhN.d.mts} +1 -2
- package/{auth-adapter-CRBW4elj.d.mts → auth-adapter-DWzgl5Yq.d.cts} +1 -2
- package/auth-better-auth.d.cts +1 -2
- package/auth-better-auth.d.mts +1 -2
- package/auth-clerk.d.cts +1 -2
- package/auth-clerk.d.mts +1 -2
- package/auth-workos.d.cts +1 -2
- package/auth-workos.d.mts +1 -2
- package/core-adapter.cjs +5 -0
- package/core-adapter.d.cts +1 -1
- package/core-adapter.d.mts +1 -1
- package/core-adapter.mjs +5 -0
- package/core-auth-adapter.cjs +6 -1
- package/core-auth-adapter.d.cts +1 -1
- package/core-auth-adapter.d.mts +1 -1
- package/core-auth-adapter.mjs +6 -1
- package/core-drizzle.cjs +6 -30
- package/core-drizzle.d.cts +1 -20
- package/core-drizzle.d.mts +1 -20
- package/core-drizzle.mjs +5 -29
- package/core-entity-config.cjs +4 -1
- package/core-entity-config.d.cts +1 -1
- package/core-entity-config.d.mts +1 -1
- package/core-entity-config.mjs +5 -1
- package/core-entity-heuristics.cjs +14 -453
- package/core-entity-heuristics.d.cts +1 -67
- package/core-entity-heuristics.d.mts +1 -67
- package/core-entity-heuristics.mjs +4 -442
- package/core-mapping-form.cjs +6 -1
- package/core-mapping-form.d.cts +1 -1
- package/core-mapping-form.d.mts +1 -1
- package/core-mapping-form.mjs +6 -1
- package/core-mapping-score.cjs +4 -1
- package/core-mapping-score.d.cts +1 -1
- package/core-mapping-score.d.mts +1 -1
- package/core-mapping-score.mjs +5 -1
- package/core-mappings-config.cjs +6 -1
- package/core-mappings-config.d.cts +1 -1
- package/core-mappings-config.d.mts +1 -1
- package/core-mappings-config.mjs +6 -1
- package/core-sync-engine.cjs +6 -1
- package/core-sync-engine.d.cts +1 -1
- package/core-sync-engine.d.mts +1 -1
- package/core-sync-engine.mjs +6 -1
- package/core-types.cjs +5 -0
- package/core-types.d.cts +1 -1
- package/core-types.d.mts +1 -1
- package/core-types.mjs +5 -0
- package/core-view-compiler.cjs +6 -1
- package/core-view-compiler.d.cts +1 -1
- package/core-view-compiler.d.mts +1 -1
- package/core-view-compiler.mjs +6 -1
- package/core.cjs +11 -6
- package/core.d.cts +9 -9
- package/core.d.mts +9 -9
- package/core.mjs +11 -6
- package/deprecate-subpath-B9ngvizt.cjs +30 -0
- package/deprecate-subpath-CmvZtCpE.mjs +25 -0
- package/drizzle-B89tLo4T.mjs +31 -0
- package/drizzle-CFOr9dU9.d.mts +20 -0
- package/drizzle-DiReZf6d.cjs +36 -0
- package/drizzle-DmeKSqeF.d.cts +20 -0
- package/drizzle.cjs +3 -1
- package/drizzle.d.cts +11 -3
- package/drizzle.d.mts +11 -3
- package/drizzle.mjs +3 -2
- package/{entity-config-DMuZpchz.cjs → entity-config-D87rV-tE.cjs} +194 -192
- package/{entity-config-D1DFyeUp.d.mts → entity-config-DoUCXtq5.d.cts} +48 -35
- package/{entity-config-GczjD3y8.d.cts → entity-config-DoUCXtq5.d.mts} +48 -35
- package/{entity-config-D3YpQB0z.mjs → entity-config-va2bkH5o.mjs} +194 -192
- package/index.cjs +910 -234
- package/index.d.cts +30 -2
- package/index.d.mts +30 -2
- package/index.mjs +900 -226
- package/internal-adapter.cjs +0 -0
- package/internal-adapter.d.cts +2 -0
- package/internal-adapter.d.mts +2 -0
- package/internal-adapter.mjs +1 -0
- package/internal-auth-adapter.cjs +3 -0
- package/internal-auth-adapter.d.cts +2 -0
- package/internal-auth-adapter.d.mts +2 -0
- package/internal-auth-adapter.mjs +2 -0
- package/internal-drizzle.cjs +3 -0
- package/internal-drizzle.d.cts +2 -0
- package/internal-drizzle.d.mts +2 -0
- package/internal-drizzle.mjs +2 -0
- package/internal-entity-config.cjs +13 -0
- package/internal-entity-config.d.cts +2 -0
- package/internal-entity-config.d.mts +2 -0
- package/internal-entity-config.mjs +2 -0
- package/internal-entity-heuristics.cjs +455 -0
- package/internal-entity-heuristics.d.cts +67 -0
- package/internal-entity-heuristics.d.mts +67 -0
- package/internal-entity-heuristics.mjs +444 -0
- package/internal-mapping-form.cjs +5 -0
- package/internal-mapping-form.d.cts +2 -0
- package/internal-mapping-form.d.mts +2 -0
- package/internal-mapping-form.mjs +2 -0
- package/internal-mapping-score.cjs +12 -0
- package/internal-mapping-score.d.cts +2 -0
- package/internal-mapping-score.d.mts +2 -0
- package/internal-mapping-score.mjs +2 -0
- package/internal-mappings-config.cjs +3 -0
- package/internal-mappings-config.d.cts +2 -0
- package/internal-mappings-config.d.mts +2 -0
- package/internal-mappings-config.mjs +2 -0
- package/internal-sync-engine.cjs +6 -0
- package/internal-sync-engine.d.cts +2 -0
- package/internal-sync-engine.d.mts +2 -0
- package/internal-sync-engine.mjs +2 -0
- package/internal-types.cjs +0 -0
- package/internal-types.d.cts +2 -0
- package/internal-types.d.mts +2 -0
- package/internal-types.mjs +1 -0
- package/internal-view-compiler.cjs +6 -0
- package/internal-view-compiler.d.cts +2 -0
- package/internal-view-compiler.d.mts +2 -0
- package/internal-view-compiler.mjs +2 -0
- package/internal.cjs +28 -0
- package/internal.d.cts +9 -0
- package/internal.d.mts +9 -0
- package/internal.mjs +7 -0
- package/{mapping-form-CUlFVfG8.d.cts → mapping-form-D93lhHEc.d.mts} +1 -2
- package/{mapping-form-kjSiJaCX.d.mts → mapping-form-lfyEE7EJ.d.cts} +1 -2
- package/{mappings-config-DYZ_uOOB.cjs → mappings-config-BsRADNRv.cjs} +1 -1
- package/{mappings-config-CNTZRD4g.mjs → mappings-config-Dbgxx3Nv.mjs} +1 -1
- package/{mappings-config-DjRLCb2Q.d.cts → mappings-config-DsUa7-1w.d.mts} +1 -2
- package/{mappings-config-GxiYsSBQ.d.mts → mappings-config-XmzB4dag.d.cts} +1 -2
- package/package.json +152 -4
- package/{sdk-DdzBxgMx.mjs → sdk-C6WANW8M.mjs} +173 -34
- package/{sdk-D1BHQDf5.cjs → sdk-iqOXeWIp.cjs} +173 -34
- package/sdk.cjs +3 -1
- package/sdk.d.cts +1 -41
- package/sdk.d.mts +1 -41
- package/sdk.mjs +3 -2
- package/{sync-engine-DIVMG9EV.d.cts → sync-engine-B7QIbXro.d.cts} +6 -5
- package/{sync-engine-BtzkzKmY.cjs → sync-engine-CzEbpQGv.cjs} +1 -1
- package/{sync-engine-DLx243iw.d.mts → sync-engine-DGk_AeHJ.d.mts} +6 -5
- package/{sync-engine-D9vghQab.mjs → sync-engine-Do5ru3WF.mjs} +1 -1
- package/types-CsL0rFYh.d.cts +155 -0
- package/types-CsL0rFYh.d.mts +155 -0
- package/{view-compiler-4HsRUTWH.d.cts → view-compiler-BWz0sGdm.d.cts} +1 -2
- package/{view-compiler-BpIDExjd.d.mts → view-compiler-Bn_EJJMO.d.mts} +1 -2
- package/vite.d.cts +1 -2
- package/vite.d.mts +1 -2
- package/namespace-probe-CA4Vj40g.d.mts +0 -331
- package/namespace-probe-CkHCj9tQ.d.cts +0 -331
- /package/{auth-adapter-CBOKDhlc.cjs → auth-adapter-CiEXcweZ.cjs} +0 -0
- /package/{auth-adapter-wqnnEjo3.mjs → auth-adapter-gfVDxf3d.mjs} +0 -0
- /package/{drizzle-meta-BVR1qiyu.cjs → drizzle-meta-Bb1JWYqf.cjs} +0 -0
- /package/{drizzle-meta-DpMKataU.mjs → drizzle-meta-D-5k3n0i.mjs} +0 -0
- /package/{mapping-form-DdmDebC3.cjs → mapping-form-BpfON_ME.cjs} +0 -0
- /package/{mapping-form-BHtPexzI.mjs → mapping-form-DigkuvFc.mjs} +0 -0
- /package/{mapping-score-CPPvwoZC.mjs → mapping-score-C68uAqGB.mjs} +0 -0
- /package/{mapping-score-i3p8LWDF.cjs → mapping-score-CaB3F4Uu.cjs} +0 -0
- /package/{mapping-score-A2lRnlpk.d.mts → mapping-score-D7Gzg7Ii.d.cts} +0 -0
- /package/{mapping-score-BcjC0ZQs.d.cts → mapping-score-D7Gzg7Ii.d.mts} +0 -0
- /package/{types-BpsKVccL.d.cts → types-B1oRXdNP.d.cts} +0 -0
- /package/{types-_qbJXMt_.d.mts → types-B1oRXdNP.d.mts} +0 -0
- /package/{view-compiler-BcgJINr7.cjs → view-compiler-BIwvm-o2.cjs} +0 -0
- /package/{view-compiler-DeZzx_jn.mjs → view-compiler-ChWr_Lml.mjs} +0 -0
package/core.cjs
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_entity_config = require("./entity-config-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
2
|
+
const require_entity_config = require("./entity-config-D87rV-tE.cjs");
|
|
3
|
+
const require_deprecate_subpath = require("./deprecate-subpath-B9ngvizt.cjs");
|
|
4
|
+
const require_auth_adapter = require("./auth-adapter-CiEXcweZ.cjs");
|
|
5
|
+
const require_mapping_form = require("./mapping-form-BpfON_ME.cjs");
|
|
6
|
+
const require_mappings_config = require("./mappings-config-BsRADNRv.cjs");
|
|
7
|
+
const require_view_compiler = require("./view-compiler-BIwvm-o2.cjs");
|
|
8
|
+
const require_sync_engine = require("./sync-engine-CzEbpQGv.cjs");
|
|
9
|
+
require("./internal.cjs");
|
|
10
|
+
//#region src/core.ts
|
|
11
|
+
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).");
|
|
12
|
+
//#endregion
|
|
8
13
|
exports.CANONICAL_FIELDS = require_entity_config.CANONICAL_FIELDS;
|
|
9
14
|
exports.CRM_CONCEPTS = require_entity_config.CRM_CONCEPTS;
|
|
10
15
|
exports.ClivlyConfigError = require_entity_config.ClivlyConfigError;
|
package/core.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
2
|
-
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-
|
|
3
|
-
import { t as CRMAdapter } from "./adapter-
|
|
4
|
-
import { C as validateEntitiesConfig, S as relationshipsSchema, _ as RelationshipsMap, a as ClivlyEntitiesConfig, b as filterSchema, c as ConfigValidationResult, d as FilterExpr, f as FilterValue, g as RelationshipVia, h as RelationshipSpec, i as ClivlyConfigError, l as CrmConcept, m as MaterializingConcept, n as CRM_CONCEPTS, o as ClivlyEntityConfig, p as MATERIALIZING_CONCEPTS, s as ConfigValidationError, t as CANONICAL_FIELDS, u as DiscoveredSchemaTable, v as defineClivlyConfig, x as relationshipSchema, y as entitiesConfigSchema } from "./entity-config-
|
|
5
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
6
|
-
import { n as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-
|
|
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
|
-
export { Activity, ActivityType, CANONICAL_FIELDS, CRMAdapter, CRM_CONCEPTS, ClivlyAuthAdapter, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntityConfig, ClivlyUser, Company, CompileOptions, CompiledView, ConfigValidationError, ConfigValidationResult, Contact, ContactFilters, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmConcept, CrmMembership, CrmRole, DEFAULT_VIEW_PREFIX, Deal, DealStage, DiscoveredSchemaTable, EntityMappingRow, EntitySyncResult, ExplainResult, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, MembershipResolver, MirrorRecord, Note, PersistAction, RecordSource, RelationshipCandidate, RelationshipSpec, RelationshipVia, RelationshipsMap, SourceRow, SyncAction, SyncResult, SyncStore, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateContactInput, UpdateDealInput, UpdateTaskInput, authCustom, buildFilterFromDiscriminator, buildRelationships, compileEntityView, compileEntityViews, defineClivlyConfig, entitiesConfigSchema, explainEntitiesConfig, filterSchema, mappingsToEntitiesConfig, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, validateEntitiesConfig };
|
|
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
|
+
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-DWzgl5Yq.cjs";
|
|
3
|
+
import { t as CRMAdapter } from "./adapter-C2eRbBfo.cjs";
|
|
4
|
+
import { C as validateEntitiesConfig, S as relationshipsSchema, _ as RelationshipsMap, a as ClivlyEntitiesConfig, b as filterSchema, c as ConfigValidationResult, d as FilterExpr, f as FilterValue, g as RelationshipVia, h as RelationshipSpec, i as ClivlyConfigError, l as CrmConcept, m as MaterializingConcept, n as CRM_CONCEPTS, o as ClivlyEntityConfig, p as MATERIALIZING_CONCEPTS, s as ConfigValidationError, t as CANONICAL_FIELDS, u as DiscoveredSchemaTable, v as defineClivlyConfig, x as relationshipSchema, y as entitiesConfigSchema } from "./entity-config-DoUCXtq5.cjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-lfyEE7EJ.cjs";
|
|
6
|
+
import { n as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-XmzB4dag.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-BWz0sGdm.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-B7QIbXro.cjs";
|
|
9
|
+
export { type Activity, type ActivityType, 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 DiscoveredSchemaTable, type EntityMappingRow, type EntitySyncResult, type ExplainResult, type FilterExpr, type FilterValue, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type Note, type PersistAction, 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, compileEntityView, compileEntityViews, defineClivlyConfig, entitiesConfigSchema, explainEntitiesConfig, filterSchema, mappingsToEntitiesConfig, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, validateEntitiesConfig };
|
package/core.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
2
|
-
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-
|
|
3
|
-
import { t as CRMAdapter } from "./adapter-
|
|
4
|
-
import { C as validateEntitiesConfig, S as relationshipsSchema, _ as RelationshipsMap, a as ClivlyEntitiesConfig, b as filterSchema, c as ConfigValidationResult, d as FilterExpr, f as FilterValue, g as RelationshipVia, h as RelationshipSpec, i as ClivlyConfigError, l as CrmConcept, m as MaterializingConcept, n as CRM_CONCEPTS, o as ClivlyEntityConfig, p as MATERIALIZING_CONCEPTS, s as ConfigValidationError, t as CANONICAL_FIELDS, u as DiscoveredSchemaTable, v as defineClivlyConfig, x as relationshipSchema, y as entitiesConfigSchema } from "./entity-config-
|
|
5
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
6
|
-
import { n as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-
|
|
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
|
-
export { Activity, ActivityType, CANONICAL_FIELDS, CRMAdapter, CRM_CONCEPTS, ClivlyAuthAdapter, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntityConfig, ClivlyUser, Company, CompileOptions, CompiledView, ConfigValidationError, ConfigValidationResult, Contact, ContactFilters, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmConcept, CrmMembership, CrmRole, DEFAULT_VIEW_PREFIX, Deal, DealStage, DiscoveredSchemaTable, EntityMappingRow, EntitySyncResult, ExplainResult, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, MembershipResolver, MirrorRecord, Note, PersistAction, RecordSource, RelationshipCandidate, RelationshipSpec, RelationshipVia, RelationshipsMap, SourceRow, SyncAction, SyncResult, SyncStore, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateContactInput, UpdateDealInput, UpdateTaskInput, authCustom, buildFilterFromDiscriminator, buildRelationships, compileEntityView, compileEntityViews, defineClivlyConfig, entitiesConfigSchema, explainEntitiesConfig, filterSchema, mappingsToEntitiesConfig, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, validateEntitiesConfig };
|
|
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
|
+
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-Bjgo8LhN.mjs";
|
|
3
|
+
import { t as CRMAdapter } from "./adapter-D5LRa-NA.mjs";
|
|
4
|
+
import { C as validateEntitiesConfig, S as relationshipsSchema, _ as RelationshipsMap, a as ClivlyEntitiesConfig, b as filterSchema, c as ConfigValidationResult, d as FilterExpr, f as FilterValue, g as RelationshipVia, h as RelationshipSpec, i as ClivlyConfigError, l as CrmConcept, m as MaterializingConcept, n as CRM_CONCEPTS, o as ClivlyEntityConfig, p as MATERIALIZING_CONCEPTS, s as ConfigValidationError, t as CANONICAL_FIELDS, u as DiscoveredSchemaTable, v as defineClivlyConfig, x as relationshipSchema, y as entitiesConfigSchema } from "./entity-config-DoUCXtq5.mjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-D93lhHEc.mjs";
|
|
6
|
+
import { n as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-DsUa7-1w.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-Bn_EJJMO.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-DGk_AeHJ.mjs";
|
|
9
|
+
export { type Activity, type ActivityType, 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 DiscoveredSchemaTable, type EntityMappingRow, type EntitySyncResult, type ExplainResult, type FilterExpr, type FilterValue, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type Note, type PersistAction, 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, compileEntityView, compileEntityViews, defineClivlyConfig, entitiesConfigSchema, explainEntitiesConfig, filterSchema, mappingsToEntitiesConfig, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, validateEntitiesConfig };
|
package/core.mjs
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { a as MATERIALIZING_CONCEPTS, c as filterSchema, d as validateEntitiesConfig, i as ClivlyConfigError, l as relationshipSchema, n as CRM_CONCEPTS, o as defineClivlyConfig, s as entitiesConfigSchema, t as CANONICAL_FIELDS, u as relationshipsSchema } from "./entity-config-
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { i as
|
|
1
|
+
import { a as MATERIALIZING_CONCEPTS, c as filterSchema, d as validateEntitiesConfig, i as ClivlyConfigError, l as relationshipSchema, n as CRM_CONCEPTS, o as defineClivlyConfig, s as entitiesConfigSchema, t as CANONICAL_FIELDS, u as relationshipsSchema } from "./entity-config-va2bkH5o.mjs";
|
|
2
|
+
import { t as warnDeprecatedSubpath } from "./deprecate-subpath-CmvZtCpE.mjs";
|
|
3
|
+
import { t as authCustom } from "./auth-adapter-gfVDxf3d.mjs";
|
|
4
|
+
import { n as buildRelationships, r as relationshipViaSignature, t as buildFilterFromDiscriminator } from "./mapping-form-DigkuvFc.mjs";
|
|
5
|
+
import { t as mappingsToEntitiesConfig } from "./mappings-config-Dbgxx3Nv.mjs";
|
|
6
|
+
import { i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-ChWr_Lml.mjs";
|
|
7
|
+
import { i as runSync, r as reconcile } from "./sync-engine-Do5ru3WF.mjs";
|
|
8
|
+
import "./internal.mjs";
|
|
9
|
+
//#region src/core.ts
|
|
10
|
+
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).");
|
|
11
|
+
//#endregion
|
|
7
12
|
export { CANONICAL_FIELDS, CRM_CONCEPTS, ClivlyConfigError, DEFAULT_VIEW_PREFIX, MATERIALIZING_CONCEPTS, authCustom, buildFilterFromDiscriminator, buildRelationships, compileEntityView, compileEntityViews, defineClivlyConfig, entitiesConfigSchema, explainEntitiesConfig, filterSchema, mappingsToEntitiesConfig, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, validateEntitiesConfig };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/deprecate-subpath.ts
|
|
2
|
+
const warned = /* @__PURE__ */ new Set();
|
|
3
|
+
/**
|
|
4
|
+
* Warn once per process that a deprecated subpath was imported.
|
|
5
|
+
*
|
|
6
|
+
* `process.emitWarning` rather than `console.warn`: it is suppressible with
|
|
7
|
+
* `--no-deprecation`, honours `--throw-deprecation` in CI, and stays off stdout,
|
|
8
|
+
* so it cannot corrupt a CLI that pipes machine-readable output.
|
|
9
|
+
*
|
|
10
|
+
* Once per specifier, because a warning that repeats per import site trains
|
|
11
|
+
* people to filter it out.
|
|
12
|
+
*
|
|
13
|
+
* `newSpecifier` doubles as the default replacement clause ("Import X
|
|
14
|
+
* instead."). Pass `replacementClause` to override it when a single target
|
|
15
|
+
* can't describe the migration — e.g. bare `clivly/core`, whose ~39 exports
|
|
16
|
+
* split across two destinations depending on which one you used.
|
|
17
|
+
*/
|
|
18
|
+
function warnDeprecatedSubpath(oldSpecifier, newSpecifier, replacementClause) {
|
|
19
|
+
if (warned.has(oldSpecifier)) return;
|
|
20
|
+
warned.add(oldSpecifier);
|
|
21
|
+
const clause = replacementClause ?? `Import "${newSpecifier}" instead.`;
|
|
22
|
+
process.emitWarning(`"${oldSpecifier}" is deprecated and will be removed in a future release. ${clause}`, "DeprecationWarning");
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
Object.defineProperty(exports, "warnDeprecatedSubpath", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function() {
|
|
28
|
+
return warnDeprecatedSubpath;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/deprecate-subpath.ts
|
|
2
|
+
const warned = /* @__PURE__ */ new Set();
|
|
3
|
+
/**
|
|
4
|
+
* Warn once per process that a deprecated subpath was imported.
|
|
5
|
+
*
|
|
6
|
+
* `process.emitWarning` rather than `console.warn`: it is suppressible with
|
|
7
|
+
* `--no-deprecation`, honours `--throw-deprecation` in CI, and stays off stdout,
|
|
8
|
+
* so it cannot corrupt a CLI that pipes machine-readable output.
|
|
9
|
+
*
|
|
10
|
+
* Once per specifier, because a warning that repeats per import site trains
|
|
11
|
+
* people to filter it out.
|
|
12
|
+
*
|
|
13
|
+
* `newSpecifier` doubles as the default replacement clause ("Import X
|
|
14
|
+
* instead."). Pass `replacementClause` to override it when a single target
|
|
15
|
+
* can't describe the migration — e.g. bare `clivly/core`, whose ~39 exports
|
|
16
|
+
* split across two destinations depending on which one you used.
|
|
17
|
+
*/
|
|
18
|
+
function warnDeprecatedSubpath(oldSpecifier, newSpecifier, replacementClause) {
|
|
19
|
+
if (warned.has(oldSpecifier)) return;
|
|
20
|
+
warned.add(oldSpecifier);
|
|
21
|
+
const clause = replacementClause ?? `Import "${newSpecifier}" instead.`;
|
|
22
|
+
process.emitWarning(`"${oldSpecifier}" is deprecated and will be removed in a future release. ${clause}`, "DeprecationWarning");
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { warnDeprecatedSubpath as t };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Table, getTableColumns, getTableName, is } from "drizzle-orm";
|
|
2
|
+
//#region ../core/src/drizzle.ts
|
|
3
|
+
/**
|
|
4
|
+
* Derive Clivly's discovery shape (table + column names) from a Drizzle schema
|
|
5
|
+
* object — the `* as schema` you pass to `drizzle(client, { schema })`. This
|
|
6
|
+
* delivers the "reads your schema" promise for Drizzle hosts: no hand-authored
|
|
7
|
+
* `DiscoveredTable[]`. Feed the result to the SDK's `schema` option, or diff it
|
|
8
|
+
* against your entity config.
|
|
9
|
+
*
|
|
10
|
+
* Column names are the real database column names (e.g. `full_name`), not the
|
|
11
|
+
* Drizzle property keys (`fullName`). Non-table values in the schema object
|
|
12
|
+
* (relations, enums, helpers) are ignored.
|
|
13
|
+
*
|
|
14
|
+
* `drizzle-orm` is an **optional peer dependency** — you only need it installed
|
|
15
|
+
* when you import this entry (`@clivly/core/drizzle`); the rest of `@clivly/core`
|
|
16
|
+
* stays dependency-free.
|
|
17
|
+
*/
|
|
18
|
+
function discoverFromDrizzle(schema) {
|
|
19
|
+
const tables = [];
|
|
20
|
+
for (const value of Object.values(schema)) {
|
|
21
|
+
if (!is(value, Table)) continue;
|
|
22
|
+
const columns = getTableColumns(value);
|
|
23
|
+
tables.push({
|
|
24
|
+
name: getTableName(value),
|
|
25
|
+
columns: Object.values(columns).map((column) => column.name)
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return tables;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { discoverFromDrizzle as t };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { u as DiscoveredSchemaTable } from "./entity-config-DoUCXtq5.mjs";
|
|
2
|
+
//#region ../core/src/drizzle.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Derive Clivly's discovery shape (table + column names) from a Drizzle schema
|
|
5
|
+
* object — the `* as schema` you pass to `drizzle(client, { schema })`. This
|
|
6
|
+
* delivers the "reads your schema" promise for Drizzle hosts: no hand-authored
|
|
7
|
+
* `DiscoveredTable[]`. Feed the result to the SDK's `schema` option, or diff it
|
|
8
|
+
* against your entity config.
|
|
9
|
+
*
|
|
10
|
+
* Column names are the real database column names (e.g. `full_name`), not the
|
|
11
|
+
* Drizzle property keys (`fullName`). Non-table values in the schema object
|
|
12
|
+
* (relations, enums, helpers) are ignored.
|
|
13
|
+
*
|
|
14
|
+
* `drizzle-orm` is an **optional peer dependency** — you only need it installed
|
|
15
|
+
* when you import this entry (`@clivly/core/drizzle`); the rest of `@clivly/core`
|
|
16
|
+
* stays dependency-free.
|
|
17
|
+
*/
|
|
18
|
+
declare function discoverFromDrizzle(schema: Record<string, unknown>): DiscoveredSchemaTable[];
|
|
19
|
+
//#endregion
|
|
20
|
+
export { discoverFromDrizzle as t };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
let drizzle_orm = require("drizzle-orm");
|
|
2
|
+
//#region ../core/src/drizzle.ts
|
|
3
|
+
/**
|
|
4
|
+
* Derive Clivly's discovery shape (table + column names) from a Drizzle schema
|
|
5
|
+
* object — the `* as schema` you pass to `drizzle(client, { schema })`. This
|
|
6
|
+
* delivers the "reads your schema" promise for Drizzle hosts: no hand-authored
|
|
7
|
+
* `DiscoveredTable[]`. Feed the result to the SDK's `schema` option, or diff it
|
|
8
|
+
* against your entity config.
|
|
9
|
+
*
|
|
10
|
+
* Column names are the real database column names (e.g. `full_name`), not the
|
|
11
|
+
* Drizzle property keys (`fullName`). Non-table values in the schema object
|
|
12
|
+
* (relations, enums, helpers) are ignored.
|
|
13
|
+
*
|
|
14
|
+
* `drizzle-orm` is an **optional peer dependency** — you only need it installed
|
|
15
|
+
* when you import this entry (`@clivly/core/drizzle`); the rest of `@clivly/core`
|
|
16
|
+
* stays dependency-free.
|
|
17
|
+
*/
|
|
18
|
+
function discoverFromDrizzle(schema) {
|
|
19
|
+
const tables = [];
|
|
20
|
+
for (const value of Object.values(schema)) {
|
|
21
|
+
if (!(0, drizzle_orm.is)(value, drizzle_orm.Table)) continue;
|
|
22
|
+
const columns = (0, drizzle_orm.getTableColumns)(value);
|
|
23
|
+
tables.push({
|
|
24
|
+
name: (0, drizzle_orm.getTableName)(value),
|
|
25
|
+
columns: Object.values(columns).map((column) => column.name)
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return tables;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
Object.defineProperty(exports, "discoverFromDrizzle", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function() {
|
|
34
|
+
return discoverFromDrizzle;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { u as DiscoveredSchemaTable } from "./entity-config-DoUCXtq5.cjs";
|
|
2
|
+
//#region ../core/src/drizzle.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Derive Clivly's discovery shape (table + column names) from a Drizzle schema
|
|
5
|
+
* object — the `* as schema` you pass to `drizzle(client, { schema })`. This
|
|
6
|
+
* delivers the "reads your schema" promise for Drizzle hosts: no hand-authored
|
|
7
|
+
* `DiscoveredTable[]`. Feed the result to the SDK's `schema` option, or diff it
|
|
8
|
+
* against your entity config.
|
|
9
|
+
*
|
|
10
|
+
* Column names are the real database column names (e.g. `full_name`), not the
|
|
11
|
+
* Drizzle property keys (`fullName`). Non-table values in the schema object
|
|
12
|
+
* (relations, enums, helpers) are ignored.
|
|
13
|
+
*
|
|
14
|
+
* `drizzle-orm` is an **optional peer dependency** — you only need it installed
|
|
15
|
+
* when you import this entry (`@clivly/core/drizzle`); the rest of `@clivly/core`
|
|
16
|
+
* stays dependency-free.
|
|
17
|
+
*/
|
|
18
|
+
declare function discoverFromDrizzle(schema: Record<string, unknown>): DiscoveredSchemaTable[];
|
|
19
|
+
//#endregion
|
|
20
|
+
export { discoverFromDrizzle as t };
|
package/drizzle.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_drizzle_meta = require("./drizzle-meta-
|
|
2
|
+
const require_drizzle_meta = require("./drizzle-meta-Bb1JWYqf.cjs");
|
|
3
|
+
const require_drizzle = require("./drizzle-DiReZf6d.cjs");
|
|
3
4
|
let drizzle_orm = require("drizzle-orm");
|
|
4
5
|
let drizzle_orm_pg_core = require("drizzle-orm/pg-core");
|
|
5
6
|
//#region ../sdk/src/drizzle.ts
|
|
@@ -103,5 +104,6 @@ function drizzleIntrospector(db) {
|
|
|
103
104
|
};
|
|
104
105
|
}
|
|
105
106
|
//#endregion
|
|
107
|
+
exports.discoverFromDrizzle = require_drizzle.discoverFromDrizzle;
|
|
106
108
|
exports.drizzleIntrospector = drizzleIntrospector;
|
|
107
109
|
exports.fromDrizzle = fromDrizzle;
|
package/drizzle.d.cts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as discoverFromDrizzle } from "./drizzle-DmeKSqeF.cjs";
|
|
2
|
+
import { n as SyncSource } from "./types-CsL0rFYh.cjs";
|
|
2
3
|
import { Table } from "drizzle-orm";
|
|
3
|
-
|
|
4
|
+
//#region ../sdk/src/namespace-probe.d.ts
|
|
5
|
+
interface NamespaceIntrospector {
|
|
6
|
+
/** All base table names in the reachable schema. */
|
|
7
|
+
listTables(): Promise<string[]>;
|
|
8
|
+
/** Prove a table is genuinely selectable (SELECT ... LIMIT 1). Throws if unreachable/denied. */
|
|
9
|
+
sampleSelect(table: string): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
4
12
|
//#region ../sdk/src/drizzle.d.ts
|
|
5
13
|
interface DrizzleDb {
|
|
6
14
|
select: (...args: any[]) => any;
|
|
@@ -25,4 +33,4 @@ declare function fromDrizzle(db: DrizzleDb, table: Table, opts: {
|
|
|
25
33
|
*/
|
|
26
34
|
declare function drizzleIntrospector(db: unknown): NamespaceIntrospector;
|
|
27
35
|
//#endregion
|
|
28
|
-
export { drizzleIntrospector, fromDrizzle };
|
|
36
|
+
export { discoverFromDrizzle, drizzleIntrospector, fromDrizzle };
|
package/drizzle.d.mts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as discoverFromDrizzle } from "./drizzle-CFOr9dU9.mjs";
|
|
2
|
+
import { n as SyncSource } from "./types-CsL0rFYh.mjs";
|
|
2
3
|
import { Table } from "drizzle-orm";
|
|
3
|
-
|
|
4
|
+
//#region ../sdk/src/namespace-probe.d.ts
|
|
5
|
+
interface NamespaceIntrospector {
|
|
6
|
+
/** All base table names in the reachable schema. */
|
|
7
|
+
listTables(): Promise<string[]>;
|
|
8
|
+
/** Prove a table is genuinely selectable (SELECT ... LIMIT 1). Throws if unreachable/denied. */
|
|
9
|
+
sampleSelect(table: string): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
4
12
|
//#region ../sdk/src/drizzle.d.ts
|
|
5
13
|
interface DrizzleDb {
|
|
6
14
|
select: (...args: any[]) => any;
|
|
@@ -25,4 +33,4 @@ declare function fromDrizzle(db: DrizzleDb, table: Table, opts: {
|
|
|
25
33
|
*/
|
|
26
34
|
declare function drizzleIntrospector(db: unknown): NamespaceIntrospector;
|
|
27
35
|
//#endregion
|
|
28
|
-
export { drizzleIntrospector, fromDrizzle };
|
|
36
|
+
export { discoverFromDrizzle, drizzleIntrospector, fromDrizzle };
|
package/drizzle.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { t as DRIZZLE_META } from "./drizzle-meta-
|
|
1
|
+
import { t as DRIZZLE_META } from "./drizzle-meta-D-5k3n0i.mjs";
|
|
2
|
+
import { t as discoverFromDrizzle } from "./drizzle-B89tLo4T.mjs";
|
|
2
3
|
import { asc, getTableColumns, getTableName, sql } from "drizzle-orm";
|
|
3
4
|
import { getTableConfig } from "drizzle-orm/pg-core";
|
|
4
5
|
//#region ../sdk/src/drizzle.ts
|
|
@@ -102,4 +103,4 @@ function drizzleIntrospector(db) {
|
|
|
102
103
|
};
|
|
103
104
|
}
|
|
104
105
|
//#endregion
|
|
105
|
-
export { drizzleIntrospector, fromDrizzle };
|
|
106
|
+
export { discoverFromDrizzle, drizzleIntrospector, fromDrizzle };
|