clivly 0.17.0 → 0.18.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 +36 -33
- package/{adapter-BpAfha3z.d.mts → adapter-BXykDFyG.d.mts} +1 -1
- package/{adapter-BvSigBPG.d.cts → adapter-BiUN_I3u.d.cts} +1 -1
- package/{auth-adapter-CsZE4ugg.d.cts → auth-adapter-BNvri2gX.d.mts} +1 -1
- package/{auth-adapter-Q6CL2VHr.d.mts → auth-adapter-D2MUT1Hk.d.cts} +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.d.cts +1 -1
- package/core-auth-adapter.d.mts +1 -1
- package/core-drizzle.d.cts +1 -1
- package/core-drizzle.d.mts +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 +16 -15
- package/core-entity-heuristics.d.cts +3 -3
- package/core-entity-heuristics.d.mts +3 -3
- package/core-entity-heuristics.mjs +1 -1
- package/core-mapping-form.d.cts +1 -1
- package/core-mapping-form.d.mts +1 -1
- package/core-mappings-config.cjs +1 -1
- package/core-mappings-config.d.cts +1 -1
- package/core-mappings-config.d.mts +1 -1
- package/core-mappings-config.mjs +1 -1
- package/core-sync-engine.cjs +1 -1
- package/core-sync-engine.d.cts +1 -1
- package/core-sync-engine.d.mts +1 -1
- package/core-sync-engine.mjs +1 -1
- package/core-types.d.cts +2 -2
- package/core-types.d.mts +2 -2
- 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 +7 -7
- package/core.d.cts +10 -10
- package/core.d.mts +10 -10
- package/core.mjs +7 -7
- package/{drizzle-MUNZgh1l.d.cts → drizzle-B9cjBavj.d.cts} +1 -1
- package/{drizzle-UJbPCzPJ.d.mts → drizzle-L5FOGe_-.d.mts} +1 -1
- package/drizzle.cjs +2 -2
- package/drizzle.d.cts +3 -3
- package/drizzle.d.mts +3 -3
- package/drizzle.mjs +2 -2
- package/{entity-config-nWWgJXLw.cjs → entity-config-DiCJ6mhI.cjs} +1 -1
- package/{entity-config-BF7pcXFB.d.cts → entity-config-X-KlnYXX.d.mts} +1 -1
- package/{entity-config-pzamFSKw.d.mts → entity-config-dNclLyBM.d.cts} +1 -1
- package/{entity-config-DQVSprlG.mjs → entity-config-g_oMPXlN.mjs} +1 -1
- package/entity-heuristics-CIParuQe.cjs +655 -0
- package/entity-heuristics-DE5ujoHw.mjs +566 -0
- package/index.cjs +69 -20
- package/index.mjs +57 -8
- package/{internal-DtLZyjf8.mjs → internal-9oDwwbNg.mjs} +1 -1
- package/{internal-CjJy-cy1.cjs → internal-BKYt5j0l.cjs} +1 -1
- package/{internal-Gie7hCpK.d.mts → internal-COALpgov.d.cts} +1 -1
- package/{internal-C-uvosSL.d.cts → internal-D3q4FPcA.d.mts} +1 -1
- 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.d.cts +1 -1
- package/internal-drizzle.d.mts +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 +16 -575
- package/internal-entity-heuristics.d.cts +3 -1
- package/internal-entity-heuristics.d.mts +3 -1
- package/internal-entity-heuristics.mjs +1 -562
- 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.d.cts +2 -2
- package/internal-types.d.mts +2 -2
- 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 +7 -7
- package/internal.d.cts +10 -10
- package/internal.d.mts +10 -10
- package/internal.mjs +7 -7
- package/{mapping-form-BymksK7h.d.mts → mapping-form-Bpvgf5b8.d.mts} +1 -1
- package/{mapping-form-Cmf8y-1m.d.cts → mapping-form-CV7y6qox.d.cts} +1 -1
- package/{mappings-config-Dsz6rcJb.d.cts → mappings-config-BBppW9fp.d.cts} +1 -1
- package/{mappings-config-DBG-KnYl.cjs → mappings-config-CNxBrbt9.cjs} +1 -1
- package/{mappings-config-C7FPwrJT.mjs → mappings-config-D_g20PyS.mjs} +1 -1
- package/{mappings-config-ktJhxmHm.d.mts → mappings-config-Dmm0H6p_.d.mts} +1 -1
- package/{namespace-probe-By8SCnym.d.mts → namespace-probe-BAXprXQh.d.mts} +49 -5
- package/{namespace-probe-CTkb35Ro.d.cts → namespace-probe-qgjiudCo.d.cts} +49 -5
- package/package.json +1 -7
- package/{projection-DNi_2dVa.mjs → projection-BkYXvjTr.mjs} +2434 -1147
- package/{projection-B8RtxuEq.cjs → projection-By63gMC-.cjs} +2434 -1147
- package/{projection-sql-BYv40Hen.mjs → projection-sql-C3gZE3GS.mjs} +1 -1
- package/{projection-sql-SuhzhsMe.cjs → projection-sql-CHz7KzNS.cjs} +1 -1
- package/{schemas-DySv963y.d.cts → schemas-BSuo_eZQ.d.cts} +97 -35
- package/{schemas-DySv963y.d.mts → schemas-BSuo_eZQ.d.mts} +97 -35
- package/{sdk-BJ3OkhCq.cjs → sdk-D53fH4uu.cjs} +164 -28
- package/{sdk-CXrarwvs.mjs → sdk-D5J7kRQm.mjs} +164 -28
- package/sdk.cjs +2 -2
- package/sdk.d.cts +4 -4
- package/sdk.d.mts +4 -4
- package/sdk.mjs +2 -2
- package/{sync-engine-D9ltfqkD.d.cts → sync-engine-C7W0Gkq0.d.cts} +2 -2
- package/{sync-engine-C_SwnFgF.d.mts → sync-engine-C9Q2FkR9.d.mts} +2 -2
- package/{sync-engine-BTUoH82k.mjs → sync-engine-CwdLkmch.mjs} +1 -1
- package/{sync-engine-DBlSP9r2.cjs → sync-engine-Di-vF26b.cjs} +1 -1
- package/{types-BtQCi_qP.d.cts → types-C08UluBS.d.cts} +23 -2
- package/{types-CTOl3pAX.d.mts → types-CZsSYbeC.d.mts} +23 -2
- package/{view-compiler-B8tJ5IGw.mjs → view-compiler-CLTi1VL-.mjs} +2 -2
- package/{view-compiler-Ce_QE3dh.cjs → view-compiler-DaOz5QVl.cjs} +2 -2
- package/{view-compiler-BZgZisTG.d.mts → view-compiler-M23WiVGG.d.mts} +1 -1
- package/{view-compiler-D7GLf1n8.d.cts → view-compiler-cXqt4X-c.d.cts} +1 -1
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
package/internal.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_projection = require("./projection-
|
|
3
|
-
const require_entity_config = require("./entity-config-
|
|
4
|
-
const require_mappings_config = require("./mappings-config-
|
|
2
|
+
const require_projection = require("./projection-By63gMC-.cjs");
|
|
3
|
+
const require_entity_config = require("./entity-config-DiCJ6mhI.cjs");
|
|
4
|
+
const require_mappings_config = require("./mappings-config-CNxBrbt9.cjs");
|
|
5
5
|
const require_auth_adapter = require("./auth-adapter-CNVuxT9W.cjs");
|
|
6
|
-
const require_internal = require("./internal-
|
|
6
|
+
const require_internal = require("./internal-BKYt5j0l.cjs");
|
|
7
7
|
const require_mapping_form = require("./mapping-form-Bs6JQurC.cjs");
|
|
8
|
-
const require_projection_sql = require("./projection-sql-
|
|
9
|
-
const require_view_compiler = require("./view-compiler-
|
|
10
|
-
const require_sync_engine = require("./sync-engine-
|
|
8
|
+
const require_projection_sql = require("./projection-sql-CHz7KzNS.cjs");
|
|
9
|
+
const require_view_compiler = require("./view-compiler-DaOz5QVl.cjs");
|
|
10
|
+
const require_sync_engine = require("./sync-engine-Di-vF26b.cjs");
|
|
11
11
|
const require_types = require("./types-B8m39L1s.cjs");
|
|
12
12
|
exports.BASE_REF = require_projection.BASE_REF;
|
|
13
13
|
exports.CANONICAL_FIELDS = require_entity_config.CANONICAL_FIELDS;
|
package/internal.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A 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 relationshipsSchema, B as identityRefs, D as missingRequiredFields, E as filterSchema, F as ProjectionFieldBinding, I as ProjectionIdentity, L as ProjectionJoin, M as validateEntitiesConfig, N as BASE_REF, O as projectionFields, P as PROJECTION_KEY_PATTERN, R as ProjectionMapping, S as RelationshipsMap, T as entitiesConfigSchema, V as projectionSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, d as CrmConcept, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as requiredFieldsFor, k as relationshipSchema, 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 defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS, z as ProjectionRef } from "./entity-config-
|
|
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 SyncAction, f as isRemovalAction, g as runSync, h as resolveActions, l as SyncResult, m as reconcile, n as MirrorRecord, o as ResolvedMembership, r as PersistAction, s as SourceRow, t as EntitySyncResult, u as SyncStore } from "./sync-engine-
|
|
9
|
-
import { A as PerSeatValueSource, C as HostOwnedCompanyField, D as isHostOwned, E as hostOwnedFieldMessage, O as rejectedCompanyFields, S as joinFansOut, T as SourcedRecord, _ 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, j as computeDealValue, k as rejectedContactFields, 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, w as HostOwnedContactField, x as fanOutJoins, y as compileProjectionSelect } from "./internal-
|
|
1
|
+
import { A as TaskStatus, C as PipelineStageConfig, D as TaskEntityType, E as Task, F as ValueInterval, I as isClosedStageType, L as ContactSegment, M as UpdateContactInput, N as UpdateDealInput, O as TaskFilters, P as UpdateTaskInput, R as contactSegmentSchema, S as PipelineKind, T as StageType, _ as Note, a as Contact, b as PageRequest, c as ContactStatus, d as CreateContactInput, f as CreateDealInput, g as DealStage, h as Deal, i as CompanyFilters, j as UpdateCompanyInput, k as TaskPriority, l as CreateActivityInput, m as CrmRole, n as ActivityType, o as ContactFilters, p as CreateTaskInput, r as Company, s as ContactSource, t as Activity, u as CreateCompanyInput, v as OPEN_STAGE_TYPE, w as RecordSource, x as PipelineConfig, y as Page } from "./types-C08UluBS.cjs";
|
|
2
|
+
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-D2MUT1Hk.cjs";
|
|
3
|
+
import { t as CRMAdapter } from "./adapter-BiUN_I3u.cjs";
|
|
4
|
+
import { A as relationshipsSchema, B as identityRefs, D as missingRequiredFields, E as filterSchema, F as ProjectionFieldBinding, I as ProjectionIdentity, L as ProjectionJoin, M as validateEntitiesConfig, N as BASE_REF, O as projectionFields, P as PROJECTION_KEY_PATTERN, R as ProjectionMapping, S as RelationshipsMap, T as entitiesConfigSchema, V as projectionSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, d as CrmConcept, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as requiredFieldsFor, k as relationshipSchema, 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 defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS, z as ProjectionRef } from "./entity-config-dNclLyBM.cjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-CV7y6qox.cjs";
|
|
6
|
+
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-BBppW9fp.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-cXqt4X-c.cjs";
|
|
8
|
+
import { c as SyncAction, f as isRemovalAction, g as runSync, h as resolveActions, l as SyncResult, m as reconcile, n as MirrorRecord, o as ResolvedMembership, r as PersistAction, s as SourceRow, t as EntitySyncResult, u as SyncStore } from "./sync-engine-C7W0Gkq0.cjs";
|
|
9
|
+
import { A as PerSeatValueSource, C as HostOwnedCompanyField, D as isHostOwned, E as hostOwnedFieldMessage, O as rejectedCompanyFields, S as joinFansOut, T as SourcedRecord, _ 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, j as computeDealValue, k as rejectedContactFields, 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, w as HostOwnedContactField, x as fanOutJoins, y as compileProjectionSelect } from "./internal-COALpgov.cjs";
|
|
10
10
|
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-xK4PLm5T.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 CompanyFilters, type CompileOptions, type CompiledView, type Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, type Contact, type ContactFilters, type ContactSegment, 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 HostOwnedCompanyField, type HostOwnedContactField, 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 Page, type PageRequest, type PerSeatValueSource, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, REQUIRED_FIELDS, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type ResolvedMembership, type SourceRow, type SourcedRecord, 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 UpdateCompanyInput, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, computeDealValue, contactSegmentSchema, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, hostOwnedFieldMessage, identityRefs, isClosedStageType, isHostOwned, isRemovalAction, joinFansOut, mappingsToEntitiesConfig, matchesCondition, missingRequiredFields, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, rejectedCompanyFields, rejectedContactFields, relationshipSchema, relationshipViaSignature, relationshipsSchema, requiredFieldsFor, resolveActions, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
|
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 CompanyFilters, type CompileOptions, type CompiledView, type Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, type Contact, type ContactFilters, type ContactSegment, type ContactSource, 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 HostOwnedCompanyField, type HostOwnedContactField, 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 Page, type PageRequest, type PerSeatValueSource, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, REQUIRED_FIELDS, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type ResolvedMembership, type SourceRow, type SourcedRecord, 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 UpdateCompanyInput, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, computeDealValue, contactSegmentSchema, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, hostOwnedFieldMessage, identityRefs, isClosedStageType, isHostOwned, isRemovalAction, joinFansOut, mappingsToEntitiesConfig, matchesCondition, missingRequiredFields, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, rejectedCompanyFields, rejectedContactFields, relationshipSchema, relationshipViaSignature, relationshipsSchema, requiredFieldsFor, resolveActions, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
package/internal.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A 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 relationshipsSchema, B as identityRefs, D as missingRequiredFields, E as filterSchema, F as ProjectionFieldBinding, I as ProjectionIdentity, L as ProjectionJoin, M as validateEntitiesConfig, N as BASE_REF, O as projectionFields, P as PROJECTION_KEY_PATTERN, R as ProjectionMapping, S as RelationshipsMap, T as entitiesConfigSchema, V as projectionSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, d as CrmConcept, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as requiredFieldsFor, k as relationshipSchema, 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 defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS, z as ProjectionRef } from "./entity-config-
|
|
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 SyncAction, f as isRemovalAction, g as runSync, h as resolveActions, l as SyncResult, m as reconcile, n as MirrorRecord, o as ResolvedMembership, r as PersistAction, s as SourceRow, t as EntitySyncResult, u as SyncStore } from "./sync-engine-
|
|
9
|
-
import { A as PerSeatValueSource, C as HostOwnedCompanyField, D as isHostOwned, E as hostOwnedFieldMessage, O as rejectedCompanyFields, S as joinFansOut, T as SourcedRecord, _ 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, j as computeDealValue, k as rejectedContactFields, 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, w as HostOwnedContactField, x as fanOutJoins, y as compileProjectionSelect } from "./internal-
|
|
1
|
+
import { A as TaskStatus, C as PipelineStageConfig, D as TaskEntityType, E as Task, F as ValueInterval, I as isClosedStageType, L as ContactSegment, M as UpdateContactInput, N as UpdateDealInput, O as TaskFilters, P as UpdateTaskInput, R as contactSegmentSchema, S as PipelineKind, T as StageType, _ as Note, a as Contact, b as PageRequest, c as ContactStatus, d as CreateContactInput, f as CreateDealInput, g as DealStage, h as Deal, i as CompanyFilters, j as UpdateCompanyInput, k as TaskPriority, l as CreateActivityInput, m as CrmRole, n as ActivityType, o as ContactFilters, p as CreateTaskInput, r as Company, s as ContactSource, t as Activity, u as CreateCompanyInput, v as OPEN_STAGE_TYPE, w as RecordSource, x as PipelineConfig, y as Page } from "./types-CZsSYbeC.mjs";
|
|
2
|
+
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-BNvri2gX.mjs";
|
|
3
|
+
import { t as CRMAdapter } from "./adapter-BXykDFyG.mjs";
|
|
4
|
+
import { A as relationshipsSchema, B as identityRefs, D as missingRequiredFields, E as filterSchema, F as ProjectionFieldBinding, I as ProjectionIdentity, L as ProjectionJoin, M as validateEntitiesConfig, N as BASE_REF, O as projectionFields, P as PROJECTION_KEY_PATTERN, R as ProjectionMapping, S as RelationshipsMap, T as entitiesConfigSchema, V as projectionSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, d as CrmConcept, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as requiredFieldsFor, k as relationshipSchema, 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 defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS, z as ProjectionRef } from "./entity-config-X-KlnYXX.mjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-Bpvgf5b8.mjs";
|
|
6
|
+
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-Dmm0H6p_.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-M23WiVGG.mjs";
|
|
8
|
+
import { c as SyncAction, f as isRemovalAction, g as runSync, h as resolveActions, l as SyncResult, m as reconcile, n as MirrorRecord, o as ResolvedMembership, r as PersistAction, s as SourceRow, t as EntitySyncResult, u as SyncStore } from "./sync-engine-C9Q2FkR9.mjs";
|
|
9
|
+
import { A as PerSeatValueSource, C as HostOwnedCompanyField, D as isHostOwned, E as hostOwnedFieldMessage, O as rejectedCompanyFields, S as joinFansOut, T as SourcedRecord, _ 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, j as computeDealValue, k as rejectedContactFields, 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, w as HostOwnedContactField, x as fanOutJoins, y as compileProjectionSelect } from "./internal-D3q4FPcA.mjs";
|
|
10
10
|
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-xK4PLm5T.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 CompanyFilters, type CompileOptions, type CompiledView, type Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, type Contact, type ContactFilters, type ContactSegment, 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 HostOwnedCompanyField, type HostOwnedContactField, 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 Page, type PageRequest, type PerSeatValueSource, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, REQUIRED_FIELDS, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type ResolvedMembership, type SourceRow, type SourcedRecord, 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 UpdateCompanyInput, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, computeDealValue, contactSegmentSchema, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, hostOwnedFieldMessage, identityRefs, isClosedStageType, isHostOwned, isRemovalAction, joinFansOut, mappingsToEntitiesConfig, matchesCondition, missingRequiredFields, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, rejectedCompanyFields, rejectedContactFields, relationshipSchema, relationshipViaSignature, relationshipsSchema, requiredFieldsFor, resolveActions, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
|
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 CompanyFilters, type CompileOptions, type CompiledView, type Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, type Contact, type ContactFilters, type ContactSegment, type ContactSource, 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 HostOwnedCompanyField, type HostOwnedContactField, 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 Page, type PageRequest, type PerSeatValueSource, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, REQUIRED_FIELDS, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type ResolvedMembership, type SourceRow, type SourcedRecord, 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 UpdateCompanyInput, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, computeDealValue, contactSegmentSchema, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, hostOwnedFieldMessage, identityRefs, isClosedStageType, isHostOwned, isRemovalAction, joinFansOut, mappingsToEntitiesConfig, matchesCondition, missingRequiredFields, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, rejectedCompanyFields, rejectedContactFields, relationshipSchema, relationshipViaSignature, relationshipsSchema, requiredFieldsFor, resolveActions, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
package/internal.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { i as projectionSchema, n as PROJECTION_KEY_PATTERN, r as identityRefs, t as BASE_REF } from "./projection-
|
|
2
|
-
import { C as hasRichMeta, S as coversUniqueKey, _ as validateProjection, a as MATERIALIZING_CONCEPTS, b as joinFansOut, c as defineClivlyConfig, d as missingRequiredFields, f as projectionFields, g as validateEntitiesConfig, h as requiredFieldsFor, i as ClivlyConfigError, l as entitiesConfigSchema, m as relationshipsSchema, n as CRM_CONCEPTS, o as REQUIRED_FIELDS, p as relationshipSchema, t as CANONICAL_FIELDS, u as filterSchema, v as validateProjectionFilter, w as primaryKeyColumns, x as columnMetaFor, y as fanOutJoins } from "./entity-config-
|
|
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-BkYXvjTr.mjs";
|
|
2
|
+
import { C as hasRichMeta, S as coversUniqueKey, _ as validateProjection, a as MATERIALIZING_CONCEPTS, b as joinFansOut, c as defineClivlyConfig, d as missingRequiredFields, f as projectionFields, g as validateEntitiesConfig, h as requiredFieldsFor, i as ClivlyConfigError, l as entitiesConfigSchema, m as relationshipsSchema, n as CRM_CONCEPTS, o as REQUIRED_FIELDS, p as relationshipSchema, t as CANONICAL_FIELDS, u as filterSchema, v as validateProjectionFilter, w as primaryKeyColumns, x as columnMetaFor, y as fanOutJoins } from "./entity-config-g_oMPXlN.mjs";
|
|
3
|
+
import { n as mappingsToEntitiesConfig } from "./mappings-config-D_g20PyS.mjs";
|
|
4
4
|
import { t as authCustom } from "./auth-adapter-u91PByaw.mjs";
|
|
5
|
-
import { a as hostOwnedFieldMessage, c as rejectedContactFields, i as toObjectTypeSlug, l as computeDealValue, n as matchesCondition, o as isHostOwned, r as slugify, s as rejectedCompanyFields, t as evaluateStage, u as contactSegmentSchema } from "./internal-
|
|
5
|
+
import { a as hostOwnedFieldMessage, c as rejectedContactFields, i as toObjectTypeSlug, l as computeDealValue, n as matchesCondition, o as isHostOwned, r as slugify, s as rejectedCompanyFields, t as evaluateStage, u as contactSegmentSchema } from "./internal-9oDwwbNg.mjs";
|
|
6
6
|
import { n as buildRelationships, r as relationshipViaSignature, t as buildFilterFromDiscriminator } from "./mapping-form-C7kDMWzp.mjs";
|
|
7
|
-
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-
|
|
8
|
-
import { i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-
|
|
9
|
-
import { a as resolveActions, i as reconcile, n as isRemovalAction, o as runSync } from "./sync-engine-
|
|
7
|
+
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-C3gZE3GS.mjs";
|
|
8
|
+
import { i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-CLTi1VL-.mjs";
|
|
9
|
+
import { a as resolveActions, i as reconcile, n as isRemovalAction, o as runSync } from "./sync-engine-CwdLkmch.mjs";
|
|
10
10
|
import { n as isClosedStageType, t as OPEN_STAGE_TYPE } from "./types-8KSw2AWg.mjs";
|
|
11
11
|
export { BASE_REF, CANONICAL_FIELDS, CRM_CONCEPTS, ClivlyConfigError, DEFAULT_VIEW_PREFIX, MATERIALIZING_CONCEPTS, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, REQUIRED_FIELDS, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, computeDealValue, contactSegmentSchema, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, hostOwnedFieldMessage, identityRefs, isClosedStageType, isHostOwned, isRemovalAction, joinFansOut, mappingsToEntitiesConfig, matchesCondition, missingRequiredFields, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, rejectedCompanyFields, rejectedContactFields, relationshipSchema, relationshipViaSignature, relationshipsSchema, requiredFieldsFor, resolveActions, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as RelationshipsMap, h as FilterExpr, x as RelationshipVia } from "./entity-config-
|
|
1
|
+
import { S as RelationshipsMap, h as FilterExpr, x as RelationshipVia } from "./entity-config-X-KlnYXX.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* A relationship the mapping UI can offer or has configured, in the shape the
|
|
4
4
|
* heuristic suggester produces. `entityTable` is the *host table name*; the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as RelationshipsMap, h as FilterExpr, x as RelationshipVia } from "./entity-config-
|
|
1
|
+
import { S as RelationshipsMap, h as FilterExpr, x as RelationshipVia } from "./entity-config-dNclLyBM.cjs";
|
|
2
2
|
/**
|
|
3
3
|
* A relationship the mapping UI can offer or has configured, in the shape the
|
|
4
4
|
* heuristic suggester produces. `entityTable` is the *host table name*; the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as ProjectionMapping, S as RelationshipsMap, a as ClivlyEntitiesConfig, h as FilterExpr } from "./entity-config-
|
|
1
|
+
import { R as ProjectionMapping, S as RelationshipsMap, a as ClivlyEntitiesConfig, h as FilterExpr } from "./entity-config-dNclLyBM.cjs";
|
|
2
2
|
/**
|
|
3
3
|
* Mappings → Entity Config bridge.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as ProjectionMapping, S as RelationshipsMap, a as ClivlyEntitiesConfig, h as FilterExpr } from "./entity-config-
|
|
1
|
+
import { R as ProjectionMapping, S as RelationshipsMap, a as ClivlyEntitiesConfig, h as FilterExpr } from "./entity-config-X-KlnYXX.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* Mappings → Entity Config bridge.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as ProjectionMapping, a as ClivlyEntitiesConfig } from "./entity-config-
|
|
1
|
+
import { R as ProjectionMapping, a as ClivlyEntitiesConfig } from "./entity-config-X-KlnYXX.mjs";
|
|
2
2
|
import { r as IntegrationState } from "./integration-state-xK4PLm5T.mjs";
|
|
3
3
|
declare const DRIZZLE_META: "__clivly_drizzle_source_meta__";
|
|
4
4
|
interface DrizzleSourceMeta {
|
|
@@ -13,6 +13,18 @@ interface DrizzleSourceMeta {
|
|
|
13
13
|
/** Every unique key on the table, each as its DB column names. */
|
|
14
14
|
uniqueConstraints?: string[][];
|
|
15
15
|
}
|
|
16
|
+
interface ExposurePolicy {
|
|
17
|
+
/**
|
|
18
|
+
* `"table.column"` refs that are credentials by name but genuinely safe to
|
|
19
|
+
* sync. Each one is an explicit, reviewed decision.
|
|
20
|
+
*/
|
|
21
|
+
allowSensitive?: readonly string[];
|
|
22
|
+
/**
|
|
23
|
+
* Allowlist of what projections may read: a table name maps to its readable
|
|
24
|
+
* columns, or `"*"` for every non-credential column. Unset means any table.
|
|
25
|
+
*/
|
|
26
|
+
tables?: Readonly<Record<string, readonly string[] | "*">>;
|
|
27
|
+
}
|
|
16
28
|
interface DiscoveredColumn {
|
|
17
29
|
isForeignKey?: boolean;
|
|
18
30
|
isPrimaryKey?: boolean;
|
|
@@ -98,6 +110,15 @@ interface ClivlySDKConfig {
|
|
|
98
110
|
tables?: string[];
|
|
99
111
|
};
|
|
100
112
|
};
|
|
113
|
+
/**
|
|
114
|
+
* What dashboard-authored projections and previews may read from this
|
|
115
|
+
* database. Credential columns (`password`, `access_token`, `secret`, …)
|
|
116
|
+
* and the auth library's session, token and key tables are always refused;
|
|
117
|
+
* `allowSensitive` names reviewed exceptions as `"table.column"` (or
|
|
118
|
+
* `"table.*"`). `tables`, when set, is an allowlist of tables and their
|
|
119
|
+
* readable columns (`"*"` for all non-credential columns).
|
|
120
|
+
*/
|
|
121
|
+
exposure?: ExposurePolicy;
|
|
101
122
|
/** Reported to the portal so it can show the detected stack. */
|
|
102
123
|
framework?: string;
|
|
103
124
|
/** Heartbeat cadence in ms. Defaults to 60s. */
|
|
@@ -207,11 +228,19 @@ interface ClivlySDKConfig {
|
|
|
207
228
|
path?: string;
|
|
208
229
|
/**
|
|
209
230
|
* Signing secret (`whsec_…`) issued by Clivly under Integrations → Remote
|
|
210
|
-
* sync.
|
|
211
|
-
*
|
|
212
|
-
*
|
|
231
|
+
* sync. Required: without it `createClivlyHandler()` refuses every request
|
|
232
|
+
* (403 `signature_required`), including Clivly's own "Run sync". With it,
|
|
233
|
+
* any request that isn't validly signed is rejected.
|
|
213
234
|
*/
|
|
214
235
|
secret?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Let an empty-body request run a tick without a signature when no
|
|
238
|
+
* `secret` is set — the shape a host's own cron or uptime ping sends.
|
|
239
|
+
* Off by default: an unsigned route lets anyone who finds the URL make
|
|
240
|
+
* this app scan its database. Requests with a body (everything Clivly
|
|
241
|
+
* sends) still need a signature. Ignored when `secret` is set.
|
|
242
|
+
*/
|
|
243
|
+
allowUnsigned?: boolean;
|
|
215
244
|
};
|
|
216
245
|
/**
|
|
217
246
|
* Shared secret Clivly Cloud presents (as `Authorization: Bearer <token>`) when
|
|
@@ -248,6 +277,14 @@ interface CreateChatSessionHandlerOptions {
|
|
|
248
277
|
* the visitor stays self-reported. Never fails the session.
|
|
249
278
|
*/
|
|
250
279
|
resolveUser?: (req: Request) => Promise<ClivlyUser | null> | ClivlyUser | null;
|
|
280
|
+
/**
|
|
281
|
+
* The browser visitor's IP address, reported to Clivly so new chats are
|
|
282
|
+
* rate-limited per visitor rather than per host server. Defaults to the
|
|
283
|
+
* address your platform puts in `cf-connecting-ip`, `x-real-ip` or the first
|
|
284
|
+
* `x-forwarded-for` entry. Override it if your proxy uses another header, or
|
|
285
|
+
* return null to report none.
|
|
286
|
+
*/
|
|
287
|
+
resolveVisitorIp?: (req: Request) => string | null;
|
|
251
288
|
}
|
|
252
289
|
/** One object type ensured by `ensureSchema`. */
|
|
253
290
|
interface EnsuredObjectTypeResult {
|
|
@@ -372,12 +409,19 @@ interface CursorStore {
|
|
|
372
409
|
}
|
|
373
410
|
/** @see ClivlySDK.describeSyncTrigger */
|
|
374
411
|
interface SyncTriggerDescription {
|
|
412
|
+
/** Is `syncTrigger.allowUnsigned` set? Meaningless when `hasSecret` is. */
|
|
413
|
+
allowUnsigned?: boolean;
|
|
375
414
|
/**
|
|
376
415
|
* `syncTrigger.url` exactly as configured, placeholder and all. The raw
|
|
377
416
|
* value, so a caller can say what is in the file rather than what survived
|
|
378
417
|
* resolution.
|
|
379
418
|
*/
|
|
380
419
|
configured?: string;
|
|
420
|
+
/**
|
|
421
|
+
* Is `syncTrigger.secret` set in this process? Optional only because an
|
|
422
|
+
* older SDK never reported it.
|
|
423
|
+
*/
|
|
424
|
+
hasSecret?: boolean;
|
|
381
425
|
/**
|
|
382
426
|
* The URL that would be reported to Clivly on the next heartbeat, or
|
|
383
427
|
* `undefined` when nothing resolves. An unedited placeholder never resolves.
|
|
@@ -590,4 +634,4 @@ interface NamespaceIntrospector {
|
|
|
590
634
|
/** Prove a table is genuinely selectable (SELECT ... LIMIT 1). Throws if unreachable/denied. */
|
|
591
635
|
sampleSelect(table: string): Promise<void>;
|
|
592
636
|
}
|
|
593
|
-
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 };
|
|
637
|
+
export { RemoteProjectionsDescription as _, ClivlyConnectResult as a, ExposurePolicy as b, 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 { R as ProjectionMapping, a as ClivlyEntitiesConfig } from "./entity-config-
|
|
1
|
+
import { R as ProjectionMapping, a as ClivlyEntitiesConfig } from "./entity-config-dNclLyBM.cjs";
|
|
2
2
|
import { r as IntegrationState } from "./integration-state-xK4PLm5T.cjs";
|
|
3
3
|
declare const DRIZZLE_META: "__clivly_drizzle_source_meta__";
|
|
4
4
|
interface DrizzleSourceMeta {
|
|
@@ -13,6 +13,18 @@ interface DrizzleSourceMeta {
|
|
|
13
13
|
/** Every unique key on the table, each as its DB column names. */
|
|
14
14
|
uniqueConstraints?: string[][];
|
|
15
15
|
}
|
|
16
|
+
interface ExposurePolicy {
|
|
17
|
+
/**
|
|
18
|
+
* `"table.column"` refs that are credentials by name but genuinely safe to
|
|
19
|
+
* sync. Each one is an explicit, reviewed decision.
|
|
20
|
+
*/
|
|
21
|
+
allowSensitive?: readonly string[];
|
|
22
|
+
/**
|
|
23
|
+
* Allowlist of what projections may read: a table name maps to its readable
|
|
24
|
+
* columns, or `"*"` for every non-credential column. Unset means any table.
|
|
25
|
+
*/
|
|
26
|
+
tables?: Readonly<Record<string, readonly string[] | "*">>;
|
|
27
|
+
}
|
|
16
28
|
interface DiscoveredColumn {
|
|
17
29
|
isForeignKey?: boolean;
|
|
18
30
|
isPrimaryKey?: boolean;
|
|
@@ -98,6 +110,15 @@ interface ClivlySDKConfig {
|
|
|
98
110
|
tables?: string[];
|
|
99
111
|
};
|
|
100
112
|
};
|
|
113
|
+
/**
|
|
114
|
+
* What dashboard-authored projections and previews may read from this
|
|
115
|
+
* database. Credential columns (`password`, `access_token`, `secret`, …)
|
|
116
|
+
* and the auth library's session, token and key tables are always refused;
|
|
117
|
+
* `allowSensitive` names reviewed exceptions as `"table.column"` (or
|
|
118
|
+
* `"table.*"`). `tables`, when set, is an allowlist of tables and their
|
|
119
|
+
* readable columns (`"*"` for all non-credential columns).
|
|
120
|
+
*/
|
|
121
|
+
exposure?: ExposurePolicy;
|
|
101
122
|
/** Reported to the portal so it can show the detected stack. */
|
|
102
123
|
framework?: string;
|
|
103
124
|
/** Heartbeat cadence in ms. Defaults to 60s. */
|
|
@@ -207,11 +228,19 @@ interface ClivlySDKConfig {
|
|
|
207
228
|
path?: string;
|
|
208
229
|
/**
|
|
209
230
|
* Signing secret (`whsec_…`) issued by Clivly under Integrations → Remote
|
|
210
|
-
* sync.
|
|
211
|
-
*
|
|
212
|
-
*
|
|
231
|
+
* sync. Required: without it `createClivlyHandler()` refuses every request
|
|
232
|
+
* (403 `signature_required`), including Clivly's own "Run sync". With it,
|
|
233
|
+
* any request that isn't validly signed is rejected.
|
|
213
234
|
*/
|
|
214
235
|
secret?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Let an empty-body request run a tick without a signature when no
|
|
238
|
+
* `secret` is set — the shape a host's own cron or uptime ping sends.
|
|
239
|
+
* Off by default: an unsigned route lets anyone who finds the URL make
|
|
240
|
+
* this app scan its database. Requests with a body (everything Clivly
|
|
241
|
+
* sends) still need a signature. Ignored when `secret` is set.
|
|
242
|
+
*/
|
|
243
|
+
allowUnsigned?: boolean;
|
|
215
244
|
};
|
|
216
245
|
/**
|
|
217
246
|
* Shared secret Clivly Cloud presents (as `Authorization: Bearer <token>`) when
|
|
@@ -248,6 +277,14 @@ interface CreateChatSessionHandlerOptions {
|
|
|
248
277
|
* the visitor stays self-reported. Never fails the session.
|
|
249
278
|
*/
|
|
250
279
|
resolveUser?: (req: Request) => Promise<ClivlyUser | null> | ClivlyUser | null;
|
|
280
|
+
/**
|
|
281
|
+
* The browser visitor's IP address, reported to Clivly so new chats are
|
|
282
|
+
* rate-limited per visitor rather than per host server. Defaults to the
|
|
283
|
+
* address your platform puts in `cf-connecting-ip`, `x-real-ip` or the first
|
|
284
|
+
* `x-forwarded-for` entry. Override it if your proxy uses another header, or
|
|
285
|
+
* return null to report none.
|
|
286
|
+
*/
|
|
287
|
+
resolveVisitorIp?: (req: Request) => string | null;
|
|
251
288
|
}
|
|
252
289
|
/** One object type ensured by `ensureSchema`. */
|
|
253
290
|
interface EnsuredObjectTypeResult {
|
|
@@ -372,12 +409,19 @@ interface CursorStore {
|
|
|
372
409
|
}
|
|
373
410
|
/** @see ClivlySDK.describeSyncTrigger */
|
|
374
411
|
interface SyncTriggerDescription {
|
|
412
|
+
/** Is `syncTrigger.allowUnsigned` set? Meaningless when `hasSecret` is. */
|
|
413
|
+
allowUnsigned?: boolean;
|
|
375
414
|
/**
|
|
376
415
|
* `syncTrigger.url` exactly as configured, placeholder and all. The raw
|
|
377
416
|
* value, so a caller can say what is in the file rather than what survived
|
|
378
417
|
* resolution.
|
|
379
418
|
*/
|
|
380
419
|
configured?: string;
|
|
420
|
+
/**
|
|
421
|
+
* Is `syncTrigger.secret` set in this process? Optional only because an
|
|
422
|
+
* older SDK never reported it.
|
|
423
|
+
*/
|
|
424
|
+
hasSecret?: boolean;
|
|
381
425
|
/**
|
|
382
426
|
* The URL that would be reported to Clivly on the next heartbeat, or
|
|
383
427
|
* `undefined` when nothing resolves. An unedited placeholder never resolves.
|
|
@@ -590,4 +634,4 @@ interface NamespaceIntrospector {
|
|
|
590
634
|
/** Prove a table is genuinely selectable (SELECT ... LIMIT 1). Throws if unreachable/denied. */
|
|
591
635
|
sampleSelect(table: string): Promise<void>;
|
|
592
636
|
}
|
|
593
|
-
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 };
|
|
637
|
+
export { RemoteProjectionsDescription as _, ClivlyConnectResult as a, ExposurePolicy as b, 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clivly",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Clivly CLI — scaffold a CRM into your app (clivly init).",
|
|
@@ -392,11 +392,6 @@
|
|
|
392
392
|
"engines": {
|
|
393
393
|
"node": ">=22"
|
|
394
394
|
},
|
|
395
|
-
"repository": {
|
|
396
|
-
"type": "git",
|
|
397
|
-
"url": "git+https://github.com/amani-joseph/clivly.com.git",
|
|
398
|
-
"directory": "packages/cli"
|
|
399
|
-
},
|
|
400
395
|
"homepage": "https://clivly.com",
|
|
401
396
|
"bugs": {
|
|
402
397
|
"url": "https://github.com/amani-joseph/clivly.com/issues"
|
|
@@ -408,7 +403,6 @@
|
|
|
408
403
|
"typescript",
|
|
409
404
|
"tanstack-start",
|
|
410
405
|
"nextjs",
|
|
411
|
-
"self-hosted",
|
|
412
406
|
"embedded-crm",
|
|
413
407
|
"postgres"
|
|
414
408
|
]
|