clivly 0.9.6 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -12
- package/{adapter-C2eRbBfo.d.cts → adapter-1TN0zohk.d.cts} +1 -1
- package/{adapter-D5LRa-NA.d.mts → adapter-uxirB88i.d.mts} +1 -1
- package/{auth-adapter-Bjgo8LhN.d.mts → auth-adapter-CXTiW3Mb.d.cts} +1 -1
- package/{auth-adapter-DWzgl5Yq.d.cts → auth-adapter-DSuYwv1c.d.mts} +1 -1
- package/auth-better-auth.d.cts +1 -1
- package/auth-better-auth.d.mts +1 -1
- package/auth-clerk.d.cts +1 -1
- package/auth-clerk.d.mts +1 -1
- package/auth-workos.d.cts +1 -1
- package/auth-workos.d.mts +1 -1
- package/core-adapter.d.cts +1 -1
- package/core-adapter.d.mts +1 -1
- package/core-auth-adapter.cjs +1 -1
- package/core-auth-adapter.d.cts +1 -1
- package/core-auth-adapter.d.mts +1 -1
- package/core-auth-adapter.mjs +1 -1
- package/core-drizzle.cjs +1 -1
- package/core-drizzle.d.cts +1 -1
- package/core-drizzle.d.mts +1 -1
- package/core-drizzle.mjs +1 -1
- package/core-entity-config.cjs +1 -1
- package/core-entity-config.d.cts +1 -1
- package/core-entity-config.d.mts +1 -1
- package/core-entity-config.mjs +1 -1
- package/core-entity-heuristics.cjs +1 -0
- package/core-entity-heuristics.d.cts +3 -3
- package/core-entity-heuristics.d.mts +3 -3
- package/core-entity-heuristics.mjs +2 -2
- package/core-mapping-form.cjs +1 -1
- package/core-mapping-form.d.cts +1 -1
- package/core-mapping-form.d.mts +1 -1
- package/core-mapping-form.mjs +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-types.cjs +4 -0
- package/core-types.d.cts +2 -2
- package/core-types.d.mts +2 -2
- package/core-types.mjs +2 -1
- package/core-view-compiler.cjs +1 -1
- package/core-view-compiler.d.cts +1 -1
- package/core-view-compiler.d.mts +1 -1
- package/core-view-compiler.mjs +1 -1
- package/core.cjs +18 -17
- package/core.d.cts +10 -10
- package/core.d.mts +10 -10
- package/core.mjs +10 -9
- package/{drizzle-DEtRrqtc.d.cts → drizzle-DTOuGXEn.d.cts} +4 -2
- package/{drizzle-bfjVzYR6.cjs → drizzle-DcB7OfBp.cjs} +9 -1
- package/{drizzle-CiK8MMEZ.d.mts → drizzle-SGapoly2.d.mts} +4 -2
- package/{drizzle-3kvhkwO7.mjs → drizzle-wbcuG-cy.mjs} +9 -1
- package/drizzle.cjs +58 -24
- package/drizzle.d.cts +10 -4
- package/drizzle.d.mts +10 -4
- package/drizzle.mjs +58 -24
- package/{entity-config-CusbTOJ1.mjs → entity-config-C4d3K9CP.mjs} +114 -8
- package/{entity-config-B2RA53nw.d.cts → entity-config-DNQAMbMS.d.cts} +27 -1
- package/{entity-config-B2RA53nw.d.mts → entity-config-DNQAMbMS.d.mts} +27 -1
- package/{entity-config-DE30_RpU.cjs → entity-config-DgAe0_YD.cjs} +119 -7
- package/index.cjs +56 -15
- package/index.mjs +56 -15
- package/internal-BAOG5eE4.d.mts +226 -0
- package/internal-BHJ0X3fC.d.cts +226 -0
- package/internal-Bgiimp5D.mjs +144 -0
- package/internal-Cz59xMj8.cjs +167 -0
- package/internal-adapter.d.cts +1 -1
- package/internal-adapter.d.mts +1 -1
- package/internal-auth-adapter.d.cts +1 -1
- package/internal-auth-adapter.d.mts +1 -1
- package/internal-drizzle.cjs +1 -1
- package/internal-drizzle.d.cts +1 -1
- package/internal-drizzle.d.mts +1 -1
- package/internal-drizzle.mjs +1 -1
- package/internal-entity-config.cjs +1 -1
- package/internal-entity-config.d.cts +1 -1
- package/internal-entity-config.d.mts +1 -1
- package/internal-entity-config.mjs +1 -1
- package/internal-entity-heuristics.cjs +34 -1
- package/internal-entity-heuristics.d.cts +8 -2
- package/internal-entity-heuristics.d.mts +8 -2
- package/internal-entity-heuristics.mjs +34 -2
- 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-types.cjs +4 -0
- package/internal-types.d.cts +2 -2
- package/internal-types.d.mts +2 -2
- package/internal-types.mjs +2 -1
- package/internal-view-compiler.cjs +1 -1
- package/internal-view-compiler.d.cts +1 -1
- package/internal-view-compiler.d.mts +1 -1
- package/internal-view-compiler.mjs +1 -1
- package/internal.cjs +17 -15
- package/internal.d.cts +10 -10
- package/internal.d.mts +10 -10
- package/internal.mjs +9 -8
- package/{mapping-form-DH77BXLv.d.mts → mapping-form-Cc7Ewv8c.d.mts} +1 -1
- package/{mapping-form-J0aU6O7l.d.cts → mapping-form-DwdbYAfR.d.cts} +1 -1
- package/{mappings-config-D9dsonoi.d.mts → mappings-config-Be9D43Np.d.mts} +1 -1
- package/{mappings-config-RQLGx8ub.d.cts → mappings-config-DUt4-9iO.d.cts} +1 -1
- package/{mappings-config-CjCmT-aU.cjs → mappings-config-Dx9ldgdf.cjs} +2 -16
- package/{mappings-config-7qQ47p9K.mjs → mappings-config-MoXBeI8p.mjs} +1 -15
- package/{namespace-probe-Ckn9yJ6F.d.mts → namespace-probe-9ScMDR0t.d.mts} +42 -2
- package/{namespace-probe-DaTJINS-.d.cts → namespace-probe-DC4tbmLj.d.cts} +42 -2
- package/package.json +1 -1
- package/{projection-hnPSgH6G.mjs → projection-CSGJbZlZ.mjs} +1 -1
- package/{projection-DEwL-D8R.cjs → projection-Dz6_i1-w.cjs} +0 -6
- package/{projection-sql-iHy-Cx6V.cjs → projection-sql-CbXCKt3s.cjs} +1 -1
- package/{projection-sql-9zzTVGvf.mjs → projection-sql-iHoiYr1R.mjs} +1 -1
- package/{sdk-w8Kv_XnW.cjs → sdk-B1vX4kUJ.cjs} +347 -17
- package/{sdk-Dkq6ELkf.mjs → sdk-D6gX0TXS.mjs} +347 -17
- package/sdk.cjs +2 -2
- package/sdk.d.cts +3 -3
- package/sdk.d.mts +3 -3
- package/sdk.mjs +2 -2
- package/{sync-engine-BLgwLpR6.cjs → sync-engine-B0FT1ax6.cjs} +1 -1
- package/{sync-engine-B_IzoUSx.mjs → sync-engine-CTSIcLlZ.mjs} +1 -1
- package/{sync-engine-BG2O1an2.d.cts → sync-engine-Df0kHAoJ.d.cts} +2 -2
- package/{sync-engine-DgQbrJON.d.mts → sync-engine-ugFacJ6G.d.mts} +2 -2
- package/{types-B1oRXdNP.d.cts → types-Cq1uHUKp.d.cts} +28 -2
- package/{types-B1oRXdNP.d.mts → types-Cq1uHUKp.d.mts} +28 -2
- package/types-Cq5gHCTq.cjs +20 -0
- package/types-YJTkXKzU.mjs +9 -0
- package/{view-compiler-D_6gfXFr.mjs → view-compiler-BzKk8nY3.mjs} +2 -2
- package/{view-compiler-CmEdAMwj.d.cts → view-compiler-D3zp9S3K.d.cts} +1 -1
- package/{view-compiler-Bo7pqXW3.d.mts → view-compiler-TpzDTu7z.d.mts} +1 -1
- package/{view-compiler-BHI5E4QI.cjs → view-compiler-ZKZbd3SK.cjs} +2 -2
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
- package/internal-BQ47iN6f.cjs +0 -259
- package/internal-ChufvXE6.mjs +0 -212
- package/internal-CvlFk3KC.d.mts +0 -180
- package/internal-DGUOLQAq.d.cts +0 -180
package/internal.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { C as UpdateDealInput, S as
|
|
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 { A as BASE_REF, C as defineClivlyConfig, D as relationshipSchema, F as
|
|
5
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
6
|
-
import { i 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-
|
|
1
|
+
import { A as ValueInterval, C as TaskEntityType, D as UpdateContactInput, E as TaskStatus, O as UpdateDealInput, S as Task, T as TaskPriority, _ as PipelineConfig, a as ContactFilters, b as RecordSource, c as CreateCompanyInput, d as CreateTaskInput, f as CrmRole, g as OPEN_STAGE_TYPE, h as Note, i as Contact, j as isClosedStageType, k as UpdateTaskInput, 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 PipelineKind, w as TaskFilters, x as StageType, y as PipelineStageConfig } from "./types-Cq1uHUKp.cjs";
|
|
2
|
+
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-CXTiW3Mb.cjs";
|
|
3
|
+
import { t as CRMAdapter } from "./adapter-1TN0zohk.cjs";
|
|
4
|
+
import { A as BASE_REF, C as defineClivlyConfig, D as relationshipSchema, E as projectionFields, F as ProjectionMapping, I as ProjectionRef, L as identityRefs, M as ProjectionFieldBinding, N as ProjectionIdentity, O as relationshipsSchema, P as ProjectionJoin, R as projectionSchema, 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 PROJECTION_KEY_PATTERN, 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-DNQAMbMS.cjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-DwdbYAfR.cjs";
|
|
6
|
+
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-DUt4-9iO.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-D3zp9S3K.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-Df0kHAoJ.cjs";
|
|
9
9
|
import { a as IntegrationStep, c as StepProblem, i as IntegrationStatus, l as StepState, n as IntegrationFacts, o as NextAction, r as IntegrationState, s as StepId, t as ConnectionLiveness } from "./integration-state-BK-riZnm.cjs";
|
|
10
|
-
import {
|
|
11
|
-
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 ConnectionLiveness, 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
|
|
10
|
+
import { S as joinFansOut, _ as compileProjectionJoins, a as matchesCondition, b as quoteIdent, c as columnMetaFor, d as primaryKeyColumns, f as validateProjection, g as compileProjectionIdentity, h as compileProjectionFrom, i as evaluateStage, l as coversUniqueKey, m as PREVIEW_MAX_ROWS, n as ConditionOp, o as slugify, p as validateProjectionFilter, r as EvaluableRule, s as toObjectTypeSlug, t as Condition, u as hasRichMeta, v as compileProjectionPreview, x as fanOutJoins, y as compileProjectionSelect } from "./internal-BHJ0X3fC.cjs";
|
|
11
|
+
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 Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, 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 EvaluableRule, type ExplainResult, type FilterExpr, type FilterValue, type IntegrationFacts, type IntegrationState, type IntegrationStatus, type IntegrationStep, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type NextAction, type Note, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, type StageType, type StepId, type StepProblem, type StepState, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, isClosedStageType, joinFansOut, mappingsToEntitiesConfig, matchesCondition, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
package/internal.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { C as UpdateDealInput, S as
|
|
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 { A as BASE_REF, C as defineClivlyConfig, D as relationshipSchema, F as
|
|
5
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
6
|
-
import { i 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-
|
|
1
|
+
import { A as ValueInterval, C as TaskEntityType, D as UpdateContactInput, E as TaskStatus, O as UpdateDealInput, S as Task, T as TaskPriority, _ as PipelineConfig, a as ContactFilters, b as RecordSource, c as CreateCompanyInput, d as CreateTaskInput, f as CrmRole, g as OPEN_STAGE_TYPE, h as Note, i as Contact, j as isClosedStageType, k as UpdateTaskInput, 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 PipelineKind, w as TaskFilters, x as StageType, y as PipelineStageConfig } from "./types-Cq1uHUKp.mjs";
|
|
2
|
+
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-DSuYwv1c.mjs";
|
|
3
|
+
import { t as CRMAdapter } from "./adapter-uxirB88i.mjs";
|
|
4
|
+
import { A as BASE_REF, C as defineClivlyConfig, D as relationshipSchema, E as projectionFields, F as ProjectionMapping, I as ProjectionRef, L as identityRefs, M as ProjectionFieldBinding, N as ProjectionIdentity, O as relationshipsSchema, P as ProjectionJoin, R as projectionSchema, 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 PROJECTION_KEY_PATTERN, 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-DNQAMbMS.mjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-Cc7Ewv8c.mjs";
|
|
6
|
+
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-Be9D43Np.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-TpzDTu7z.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-ugFacJ6G.mjs";
|
|
9
9
|
import { a as IntegrationStep, c as StepProblem, i as IntegrationStatus, l as StepState, n as IntegrationFacts, o as NextAction, r as IntegrationState, s as StepId, t as ConnectionLiveness } from "./integration-state-BK-riZnm.mjs";
|
|
10
|
-
import {
|
|
11
|
-
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 ConnectionLiveness, 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
|
|
10
|
+
import { S as joinFansOut, _ as compileProjectionJoins, a as matchesCondition, b as quoteIdent, c as columnMetaFor, d as primaryKeyColumns, f as validateProjection, g as compileProjectionIdentity, h as compileProjectionFrom, i as evaluateStage, l as coversUniqueKey, m as PREVIEW_MAX_ROWS, n as ConditionOp, o as slugify, p as validateProjectionFilter, r as EvaluableRule, s as toObjectTypeSlug, t as Condition, u as hasRichMeta, v as compileProjectionPreview, x as fanOutJoins, y as compileProjectionSelect } from "./internal-BAOG5eE4.mjs";
|
|
11
|
+
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 Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, 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 EvaluableRule, type ExplainResult, type FilterExpr, type FilterValue, type IntegrationFacts, type IntegrationState, type IntegrationStatus, type IntegrationStep, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type NextAction, type Note, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, type StageType, type StepId, type StepProblem, type StepState, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, isClosedStageType, joinFansOut, mappingsToEntitiesConfig, matchesCondition, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
package/internal.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as
|
|
3
|
-
import { n as mappingsToEntitiesConfig } from "./mappings-config-
|
|
1
|
+
import { i as projectionSchema, n as PROJECTION_KEY_PATTERN, r as identityRefs, t as BASE_REF } from "./projection-CSGJbZlZ.mjs";
|
|
2
|
+
import { _ as joinFansOut, a as MATERIALIZING_CONCEPTS, b as hasRichMeta, c as entitiesConfigSchema, d as relationshipSchema, f as relationshipsSchema, g as fanOutJoins, h as validateProjectionFilter, i as ClivlyConfigError, l as filterSchema, m as validateProjection, n as CRM_CONCEPTS, p as validateEntitiesConfig, s as defineClivlyConfig, t as CANONICAL_FIELDS, u as projectionFields, v as columnMetaFor, x as primaryKeyColumns, y as coversUniqueKey } from "./entity-config-C4d3K9CP.mjs";
|
|
3
|
+
import { n as mappingsToEntitiesConfig } from "./mappings-config-MoXBeI8p.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 { a as
|
|
7
|
-
import {
|
|
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-
|
|
10
|
-
|
|
6
|
+
import { a as compileProjectionPreview, i as compileProjectionJoins, n as compileProjectionFrom, o as compileProjectionSelect, r as compileProjectionIdentity, s as quoteIdent, t as PREVIEW_MAX_ROWS } from "./projection-sql-iHoiYr1R.mjs";
|
|
7
|
+
import { i as toObjectTypeSlug, n as matchesCondition, r as slugify, t as evaluateStage } from "./internal-Bgiimp5D.mjs";
|
|
8
|
+
import { i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-BzKk8nY3.mjs";
|
|
9
|
+
import { i as runSync, r as reconcile } from "./sync-engine-CTSIcLlZ.mjs";
|
|
10
|
+
import { n as isClosedStageType, t as OPEN_STAGE_TYPE } from "./types-YJTkXKzU.mjs";
|
|
11
|
+
export { BASE_REF, CANONICAL_FIELDS, CRM_CONCEPTS, ClivlyConfigError, DEFAULT_VIEW_PREFIX, MATERIALIZING_CONCEPTS, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, isClosedStageType, joinFansOut, mappingsToEntitiesConfig, matchesCondition, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as RelationshipVia, h as FilterExpr, x as RelationshipsMap } from "./entity-config-
|
|
1
|
+
import { b as RelationshipVia, h as FilterExpr, x as RelationshipsMap } from "./entity-config-DNQAMbMS.mjs";
|
|
2
2
|
//#region ../core/src/mapping-form.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* A relationship the mapping UI can offer or has configured, in the shape the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as RelationshipVia, h as FilterExpr, x as RelationshipsMap } from "./entity-config-
|
|
1
|
+
import { b as RelationshipVia, h as FilterExpr, x as RelationshipsMap } from "./entity-config-DNQAMbMS.cjs";
|
|
2
2
|
//#region ../core/src/mapping-form.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* A relationship the mapping UI can offer or has configured, in the shape the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as ProjectionMapping, a as ClivlyEntitiesConfig, h as FilterExpr, x as RelationshipsMap } from "./entity-config-DNQAMbMS.mjs";
|
|
2
2
|
//#region ../core/src/mappings-config.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Mappings → Entity Config bridge.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as ProjectionMapping, a as ClivlyEntitiesConfig, h as FilterExpr, x as RelationshipsMap } from "./entity-config-DNQAMbMS.cjs";
|
|
2
2
|
//#region ../core/src/mappings-config.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Mappings → Entity Config bridge.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_entity_config = require("./entity-config-
|
|
1
|
+
const require_entity_config = require("./entity-config-DgAe0_YD.cjs");
|
|
2
2
|
//#region ../core/src/mappings-config.ts
|
|
3
3
|
const RESERVED_FIELD = "id";
|
|
4
4
|
/**
|
|
@@ -47,26 +47,12 @@ function uniquify(base, used) {
|
|
|
47
47
|
used.add(key);
|
|
48
48
|
return key;
|
|
49
49
|
}
|
|
50
|
-
/**
|
|
51
|
-
* A projection's `fields` map, derived mechanically from its bindings.
|
|
52
|
-
*
|
|
53
|
-
* `ClivlyEntityConfig.fields` is required and read by existing consumers, so a
|
|
54
|
-
* projection entity must populate it. The values are ref *tokens*
|
|
55
|
-
* (`"base.full_name"`), never host column names — the compiler reads
|
|
56
|
-
* `projection.fieldBindings`, and `validateEntitiesConfig` skips the legacy
|
|
57
|
-
* column check for projection entities precisely because of this.
|
|
58
|
-
*/
|
|
59
|
-
function projectionFields(projection) {
|
|
60
|
-
const fields = {};
|
|
61
|
-
for (const [field, binding] of Object.entries(projection.fieldBindings)) fields[field] = `${binding.from.table}.${binding.from.column}`;
|
|
62
|
-
return fields;
|
|
63
|
-
}
|
|
64
50
|
function buildEntity(row, refIndex) {
|
|
65
51
|
const entity = {
|
|
66
52
|
concept: row.targetConcept,
|
|
67
53
|
source: row.projection?.baseTable ?? row.sourceTable,
|
|
68
54
|
role: row.role ?? DEFAULT_ROLE,
|
|
69
|
-
fields: row.projection ? projectionFields(row.projection) : canonicalFields(row.targetConcept, row.fieldMap)
|
|
55
|
+
fields: row.projection ? require_entity_config.projectionFields(row.projection) : canonicalFields(row.targetConcept, row.fieldMap)
|
|
70
56
|
};
|
|
71
57
|
if (row.projection) entity.projection = row.projection;
|
|
72
58
|
if (row.targetConcept === "custom" && row.targetObjectTypeId) entity.targetObjectTypeId = row.targetObjectTypeId;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as CANONICAL_FIELDS } from "./entity-config-
|
|
1
|
+
import { t as CANONICAL_FIELDS, u as projectionFields } from "./entity-config-C4d3K9CP.mjs";
|
|
2
2
|
//#region ../core/src/mappings-config.ts
|
|
3
3
|
const RESERVED_FIELD = "id";
|
|
4
4
|
/**
|
|
@@ -47,20 +47,6 @@ function uniquify(base, used) {
|
|
|
47
47
|
used.add(key);
|
|
48
48
|
return key;
|
|
49
49
|
}
|
|
50
|
-
/**
|
|
51
|
-
* A projection's `fields` map, derived mechanically from its bindings.
|
|
52
|
-
*
|
|
53
|
-
* `ClivlyEntityConfig.fields` is required and read by existing consumers, so a
|
|
54
|
-
* projection entity must populate it. The values are ref *tokens*
|
|
55
|
-
* (`"base.full_name"`), never host column names — the compiler reads
|
|
56
|
-
* `projection.fieldBindings`, and `validateEntitiesConfig` skips the legacy
|
|
57
|
-
* column check for projection entities precisely because of this.
|
|
58
|
-
*/
|
|
59
|
-
function projectionFields(projection) {
|
|
60
|
-
const fields = {};
|
|
61
|
-
for (const [field, binding] of Object.entries(projection.fieldBindings)) fields[field] = `${binding.from.table}.${binding.from.column}`;
|
|
62
|
-
return fields;
|
|
63
|
-
}
|
|
64
50
|
function buildEntity(row, refIndex) {
|
|
65
51
|
const entity = {
|
|
66
52
|
concept: row.targetConcept,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as ProjectionMapping, a as ClivlyEntitiesConfig } from "./entity-config-DNQAMbMS.mjs";
|
|
2
2
|
import { r as IntegrationState } from "./integration-state-BK-riZnm.mjs";
|
|
3
3
|
//#region ../sdk/src/drizzle-meta.d.ts
|
|
4
4
|
declare const DRIZZLE_META: "__clivly_drizzle_source_meta__";
|
|
@@ -354,6 +354,17 @@ interface SyncTriggerDescription {
|
|
|
354
354
|
*/
|
|
355
355
|
resolved?: string;
|
|
356
356
|
}
|
|
357
|
+
/** @see ClivlySDK.describeRemoteProjections */
|
|
358
|
+
interface RemoteProjectionsDescription {
|
|
359
|
+
/** False when no `introspector` is configured — nothing can run. */
|
|
360
|
+
capable: boolean;
|
|
361
|
+
failed: number;
|
|
362
|
+
invalid: number;
|
|
363
|
+
ok: number;
|
|
364
|
+
/** False until a sync has run in this process. */
|
|
365
|
+
ran: boolean;
|
|
366
|
+
skipped: number;
|
|
367
|
+
}
|
|
357
368
|
interface ClivlySDK {
|
|
358
369
|
/**
|
|
359
370
|
* Send a single heartbeat and report the outcome richly: `ok`, the HTTP
|
|
@@ -389,6 +400,15 @@ interface ClivlySDK {
|
|
|
389
400
|
* anyone who can reach it — set a secret if it's publicly routable.
|
|
390
401
|
*/
|
|
391
402
|
createClivlyHandler(): (req: Request) => Promise<Response>;
|
|
403
|
+
/**
|
|
404
|
+
* What this app would tell Clivly about dashboard-authored derived objects,
|
|
405
|
+
* right now. Counts rather than the outcomes themselves: this reports
|
|
406
|
+
* health, and the per-object reasons already travel to the dashboard, which
|
|
407
|
+
* is where an author fixes them.
|
|
408
|
+
*
|
|
409
|
+
* Read by `clivly status`.
|
|
410
|
+
*/
|
|
411
|
+
describeRemoteProjections(): RemoteProjectionsDescription;
|
|
392
412
|
/**
|
|
393
413
|
* What this app would tell Clivly about its sync trigger route, right now.
|
|
394
414
|
*
|
|
@@ -477,6 +497,26 @@ interface ClivlySDK {
|
|
|
477
497
|
interface NamespaceIntrospector {
|
|
478
498
|
/** All base table names in the reachable schema. */
|
|
479
499
|
listTables(): Promise<string[]>;
|
|
500
|
+
/**
|
|
501
|
+
* Build a runnable sync source from a projection, for derived objects
|
|
502
|
+
* authored in the dashboard rather than in `clivly.config.ts`.
|
|
503
|
+
*
|
|
504
|
+
* Optional for the same reason `runProjection` is: an introspector may be
|
|
505
|
+
* hand-written. Absent, remote projections report `skipped` with a reason
|
|
506
|
+
* naming this method, rather than failing the run.
|
|
507
|
+
*
|
|
508
|
+
* This is deliberately the only route to a database handle for remote
|
|
509
|
+
* projections. `drizzleIntrospector(db)` already closes over the
|
|
510
|
+
* connection, so `introspector:` is the single config line that turns
|
|
511
|
+
* dashboard-authored objects on — and the SDK core never holds a raw
|
|
512
|
+
* client.
|
|
513
|
+
*/
|
|
514
|
+
projectionSource?(projection: ProjectionMapping, opts: {
|
|
515
|
+
basePkColumn?: string;
|
|
516
|
+
objectType: string;
|
|
517
|
+
}): SyncSource & {
|
|
518
|
+
objectType: string;
|
|
519
|
+
};
|
|
480
520
|
/**
|
|
481
521
|
* Read a few rows through an unsaved projection, for the dashboard's derived
|
|
482
522
|
* object preview. Rows are keyed by field name.
|
|
@@ -498,4 +538,4 @@ interface NamespaceIntrospector {
|
|
|
498
538
|
sampleSelect(table: string): Promise<void>;
|
|
499
539
|
}
|
|
500
540
|
//#endregion
|
|
501
|
-
export {
|
|
541
|
+
export { RemoteProjectionsDescription as _, ClivlyConnectResult as a, ClivlyUser as c, DiscoveredTable as d, DoctorCheck as f, EnsuredObjectTypeResult as g, EnsuredMappingResult as h, ClivlyConnectReason as i, CreateChatSessionHandlerOptions as l, EnsureSchemaResult as m, ChatSessionRequestBody as n, ClivlySDK as o, DoctorReport as p, ChatWidgetVisitor as r, ClivlySDKConfig as s, NamespaceIntrospector as t, CursorStore as u, SyncSource as v, SyncTriggerDescription as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as ProjectionMapping, a as ClivlyEntitiesConfig } from "./entity-config-DNQAMbMS.cjs";
|
|
2
2
|
import { r as IntegrationState } from "./integration-state-BK-riZnm.cjs";
|
|
3
3
|
//#region ../sdk/src/drizzle-meta.d.ts
|
|
4
4
|
declare const DRIZZLE_META: "__clivly_drizzle_source_meta__";
|
|
@@ -354,6 +354,17 @@ interface SyncTriggerDescription {
|
|
|
354
354
|
*/
|
|
355
355
|
resolved?: string;
|
|
356
356
|
}
|
|
357
|
+
/** @see ClivlySDK.describeRemoteProjections */
|
|
358
|
+
interface RemoteProjectionsDescription {
|
|
359
|
+
/** False when no `introspector` is configured — nothing can run. */
|
|
360
|
+
capable: boolean;
|
|
361
|
+
failed: number;
|
|
362
|
+
invalid: number;
|
|
363
|
+
ok: number;
|
|
364
|
+
/** False until a sync has run in this process. */
|
|
365
|
+
ran: boolean;
|
|
366
|
+
skipped: number;
|
|
367
|
+
}
|
|
357
368
|
interface ClivlySDK {
|
|
358
369
|
/**
|
|
359
370
|
* Send a single heartbeat and report the outcome richly: `ok`, the HTTP
|
|
@@ -389,6 +400,15 @@ interface ClivlySDK {
|
|
|
389
400
|
* anyone who can reach it — set a secret if it's publicly routable.
|
|
390
401
|
*/
|
|
391
402
|
createClivlyHandler(): (req: Request) => Promise<Response>;
|
|
403
|
+
/**
|
|
404
|
+
* What this app would tell Clivly about dashboard-authored derived objects,
|
|
405
|
+
* right now. Counts rather than the outcomes themselves: this reports
|
|
406
|
+
* health, and the per-object reasons already travel to the dashboard, which
|
|
407
|
+
* is where an author fixes them.
|
|
408
|
+
*
|
|
409
|
+
* Read by `clivly status`.
|
|
410
|
+
*/
|
|
411
|
+
describeRemoteProjections(): RemoteProjectionsDescription;
|
|
392
412
|
/**
|
|
393
413
|
* What this app would tell Clivly about its sync trigger route, right now.
|
|
394
414
|
*
|
|
@@ -477,6 +497,26 @@ interface ClivlySDK {
|
|
|
477
497
|
interface NamespaceIntrospector {
|
|
478
498
|
/** All base table names in the reachable schema. */
|
|
479
499
|
listTables(): Promise<string[]>;
|
|
500
|
+
/**
|
|
501
|
+
* Build a runnable sync source from a projection, for derived objects
|
|
502
|
+
* authored in the dashboard rather than in `clivly.config.ts`.
|
|
503
|
+
*
|
|
504
|
+
* Optional for the same reason `runProjection` is: an introspector may be
|
|
505
|
+
* hand-written. Absent, remote projections report `skipped` with a reason
|
|
506
|
+
* naming this method, rather than failing the run.
|
|
507
|
+
*
|
|
508
|
+
* This is deliberately the only route to a database handle for remote
|
|
509
|
+
* projections. `drizzleIntrospector(db)` already closes over the
|
|
510
|
+
* connection, so `introspector:` is the single config line that turns
|
|
511
|
+
* dashboard-authored objects on — and the SDK core never holds a raw
|
|
512
|
+
* client.
|
|
513
|
+
*/
|
|
514
|
+
projectionSource?(projection: ProjectionMapping, opts: {
|
|
515
|
+
basePkColumn?: string;
|
|
516
|
+
objectType: string;
|
|
517
|
+
}): SyncSource & {
|
|
518
|
+
objectType: string;
|
|
519
|
+
};
|
|
480
520
|
/**
|
|
481
521
|
* Read a few rows through an unsaved projection, for the dashboard's derived
|
|
482
522
|
* object preview. Rows are keyed by field name.
|
|
@@ -498,4 +538,4 @@ interface NamespaceIntrospector {
|
|
|
498
538
|
sampleSelect(table: string): Promise<void>;
|
|
499
539
|
}
|
|
500
540
|
//#endregion
|
|
501
|
-
export {
|
|
541
|
+
export { RemoteProjectionsDescription as _, ClivlyConnectResult as a, ClivlyUser as c, DiscoveredTable as d, DoctorCheck as f, EnsuredObjectTypeResult as g, EnsuredMappingResult as h, ClivlyConnectReason as i, CreateChatSessionHandlerOptions as l, EnsureSchemaResult as m, ChatSessionRequestBody as n, ClivlySDK as o, DoctorReport as p, ChatWidgetVisitor as r, ClivlySDKConfig as s, NamespaceIntrospector as t, CursorStore as u, SyncSource as v, SyncTriggerDescription as y };
|
package/package.json
CHANGED
|
@@ -4297,4 +4297,4 @@ function identityRefs(identity, basePkColumn) {
|
|
|
4297
4297
|
return identity.parts;
|
|
4298
4298
|
}
|
|
4299
4299
|
//#endregion
|
|
4300
|
-
export {
|
|
4300
|
+
export { _enum as a, literal as c, strictObject as d, string as f, projectionSchema as i, number as l, PROJECTION_KEY_PATTERN as n, array as o, union as p, identityRefs as r, boolean as s, BASE_REF as t, record as u };
|
|
@@ -4303,12 +4303,6 @@ Object.defineProperty(exports, "BASE_REF", {
|
|
|
4303
4303
|
return BASE_REF;
|
|
4304
4304
|
}
|
|
4305
4305
|
});
|
|
4306
|
-
Object.defineProperty(exports, "PROJECTION_KEY_MESSAGE", {
|
|
4307
|
-
enumerable: true,
|
|
4308
|
-
get: function() {
|
|
4309
|
-
return PROJECTION_KEY_MESSAGE;
|
|
4310
|
-
}
|
|
4311
|
-
});
|
|
4312
4306
|
Object.defineProperty(exports, "PROJECTION_KEY_PATTERN", {
|
|
4313
4307
|
enumerable: true,
|
|
4314
4308
|
get: function() {
|