clivly 0.19.0 → 0.21.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 +14 -4
- package/{adapter-BXykDFyG.d.mts → adapter-B4v4dwgD.d.mts} +1 -1
- package/{adapter-BiUN_I3u.d.cts → adapter-BK3gsby5.d.cts} +1 -1
- package/{auth-adapter-BNvri2gX.d.mts → auth-adapter-BIa-ZyVV.d.mts} +1 -1
- package/{auth-adapter-D2MUT1Hk.d.cts → auth-adapter-DwtMJb7D.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 +2 -1
- package/core-adapter.d.mts +2 -1
- package/core-auth-adapter.d.cts +2 -1
- package/core-auth-adapter.d.mts +2 -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 +2 -1
- package/core-entity-config.d.mts +2 -1
- package/core-entity-config.mjs +1 -1
- package/core-entity-heuristics.cjs +1 -1
- package/core-entity-heuristics.d.cts +1 -1
- package/core-entity-heuristics.d.mts +1 -1
- package/core-entity-heuristics.mjs +1 -1
- package/core-mapping-form.d.cts +2 -1
- package/core-mapping-form.d.mts +2 -1
- package/core-mappings-config.cjs +1 -1
- package/core-mappings-config.d.cts +2 -1
- package/core-mappings-config.d.mts +2 -1
- package/core-mappings-config.mjs +1 -1
- package/core-sync-engine.cjs +1 -1
- package/core-sync-engine.d.cts +2 -1
- package/core-sync-engine.d.mts +2 -1
- package/core-sync-engine.mjs +1 -1
- package/core-types.d.cts +2 -1
- package/core-types.d.mts +2 -1
- package/core-view-compiler.cjs +1 -1
- package/core-view-compiler.d.cts +2 -1
- package/core-view-compiler.d.mts +2 -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-B9cjBavj.d.cts → drizzle-BNHGQXiY.d.cts} +1 -1
- package/{drizzle-L5FOGe_-.d.mts → drizzle-DFe7ILmd.d.mts} +1 -1
- package/drizzle.cjs +2 -2
- package/drizzle.d.cts +4 -3
- package/drizzle.d.mts +4 -3
- package/drizzle.mjs +2 -2
- package/{entity-config-DiCJ6mhI.cjs → entity-config-BP8Cc_nC.cjs} +54 -53
- package/{entity-config-g_oMPXlN.mjs → entity-config-CI5CGfaN.mjs} +54 -53
- package/{entity-config-X-KlnYXX.d.mts → entity-config-CXpGowQa.d.cts} +339 -339
- package/{entity-config-dNclLyBM.d.cts → entity-config-CXpGowQa.d.mts} +339 -339
- package/{entity-heuristics-DE5ujoHw.mjs → entity-heuristics-DAxqagJA.mjs} +1 -1
- package/{entity-heuristics-CIParuQe.cjs → entity-heuristics-DNmrcd0b.cjs} +1 -1
- package/index-Bh7o2J7K.d.mts +308 -0
- package/index-DRRTE5IJ.d.cts +308 -0
- package/index.cjs +3 -3
- package/index.mjs +3 -3
- package/{internal-COALpgov.d.cts → internal-C8TGcv_X.d.mts} +2 -131
- package/{internal-9oDwwbNg.mjs → internal-DWpLw0t5.mjs} +5 -5
- package/{internal-BKYt5j0l.cjs → internal-G5tXjqwl.cjs} +5 -5
- package/{internal-D3q4FPcA.d.mts → internal-Nrhf76Jn.d.cts} +2 -131
- 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 +1 -1
- package/internal-entity-heuristics.d.cts +1 -1
- package/internal-entity-heuristics.d.mts +1 -1
- package/internal-entity-heuristics.mjs +1 -1
- package/internal-mapping-form.d.cts +1 -1
- package/internal-mapping-form.d.mts +1 -1
- package/internal-mappings-config.cjs +1 -1
- package/internal-mappings-config.d.cts +1 -1
- package/internal-mappings-config.d.mts +1 -1
- package/internal-mappings-config.mjs +1 -1
- package/internal-sync-engine.cjs +1 -1
- package/internal-sync-engine.d.cts +1 -1
- package/internal-sync-engine.d.mts +1 -1
- package/internal-sync-engine.mjs +1 -1
- package/internal-types.d.cts +1 -1
- package/internal-types.d.mts +1 -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 +7 -7
- package/internal.d.cts +10 -10
- package/internal.d.mts +10 -10
- package/internal.mjs +7 -7
- package/{mapping-form-Bpvgf5b8.d.mts → mapping-form-Bg_hgNoL.d.cts} +1 -1
- package/{mapping-form-CV7y6qox.d.cts → mapping-form-KHUlnC7A.d.mts} +1 -1
- package/{mappings-config-CNxBrbt9.cjs → mappings-config-CC-vltWb.cjs} +1 -1
- package/{mappings-config-BBppW9fp.d.cts → mappings-config-DNo_Cum_.d.cts} +1 -1
- package/{mappings-config-D_g20PyS.mjs → mappings-config-Opw7ZM6Y.mjs} +1 -1
- package/{mappings-config-Dmm0H6p_.d.mts → mappings-config-wAe-p1rG.d.mts} +1 -1
- package/{namespace-probe-C1tm5rGh.d.cts → namespace-probe-Dh6LFwfo.d.cts} +9 -2
- package/{namespace-probe-ah2awcHO.d.mts → namespace-probe-xESu83KG.d.mts} +9 -2
- package/package.json +6 -4
- package/projection-CzBI2NL8.mjs +95 -0
- package/{projection-sql-CHz7KzNS.cjs → projection-sql-BkrHR2ea.cjs} +1 -1
- package/{projection-sql-C3gZE3GS.mjs → projection-sql-DQQdjw9I.mjs} +1 -1
- package/projection-w4Z6vSL2.cjs +118 -0
- package/{sdk-ChyrSl32.mjs → sdk-DfdHv-S9.mjs} +154 -13
- package/{sdk-BEHVvB18.cjs → sdk-oUjl5HNU.cjs} +154 -13
- package/sdk.cjs +2 -2
- package/sdk.d.cts +2 -2
- package/sdk.d.mts +2 -2
- package/sdk.mjs +2 -2
- package/{sync-engine-C7W0Gkq0.d.cts → sync-engine-DCjTr2XQ.d.cts} +2 -2
- package/{sync-engine-Di-vF26b.cjs → sync-engine-DNSoZeo0.cjs} +1 -1
- package/{sync-engine-C9Q2FkR9.d.mts → sync-engine-UNORma7f.d.mts} +2 -2
- package/{sync-engine-CwdLkmch.mjs → sync-engine-yFLEyId3.mjs} +1 -1
- package/{types-C08UluBS.d.cts → types-BBfwsDxe.d.cts} +13 -7
- package/{types-CZsSYbeC.d.mts → types-BBfwsDxe.d.mts} +13 -7
- package/{view-compiler-M23WiVGG.d.mts → view-compiler-BDD93Luw.d.cts} +1 -1
- package/{view-compiler-CLTi1VL-.mjs → view-compiler-CSHSqZl7.mjs} +2 -2
- package/{view-compiler-cXqt4X-c.d.cts → view-compiler-CSNhmCY2.d.mts} +1 -1
- package/{view-compiler-DaOz5QVl.cjs → view-compiler-NqiortOA.cjs} +2 -2
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
- package/integration-state-xK4PLm5T.d.cts +0 -171
- package/integration-state-xK4PLm5T.d.mts +0 -171
- package/projection-BkYXvjTr.mjs +0 -5587
- package/projection-By63gMC-.cjs +0 -5670
- package/schemas-BSuo_eZQ.d.cts +0 -2160
- package/schemas-BSuo_eZQ.d.mts +0 -2160
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./index-Bh7o2J7K.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* Value derived as a flat fee plus a per-seat price that depends on the plan.
|
|
4
4
|
*
|
|
@@ -99,135 +99,6 @@ declare function rejectedCompanyFields(company: SourcedRecord, patch: Readonly<R
|
|
|
99
99
|
* they come from, so the reason is actionable rather than a bare "forbidden".
|
|
100
100
|
*/
|
|
101
101
|
declare function hostOwnedFieldMessage(fields: readonly string[]): string;
|
|
102
|
-
declare function joinFansOut(join: ProjectionJoin, joinTable: DiscoveredSchemaTable): boolean;
|
|
103
|
-
/** Every join in the projection that can multiply rows. */
|
|
104
|
-
declare function fanOutJoins(projection: ProjectionMapping, tablesByName: Map<string, DiscoveredSchemaTable>): ProjectionJoin[];
|
|
105
|
-
/**
|
|
106
|
-
* SQL generation for projection-backed entities.
|
|
107
|
-
*
|
|
108
|
-
* Base and joins are aliased by their ref key (`base`, then each join's `key`),
|
|
109
|
-
* which is what allows the same table to be joined twice and keeps generated
|
|
110
|
-
* SQL independent of host table names.
|
|
111
|
-
*
|
|
112
|
-
* Pure string generation — no DB access. Identifiers are escaped so output is
|
|
113
|
-
* deterministic and injection-safe.
|
|
114
|
-
*/
|
|
115
|
-
/** Quote a single identifier part, escaping embedded double-quotes. */
|
|
116
|
-
declare function quoteIdent(name: string): string;
|
|
117
|
-
/**
|
|
118
|
-
* The identity expression. Composite identities concatenate their parts with
|
|
119
|
-
* `::`; validation guarantees every part is NOT NULL and non-text, which is
|
|
120
|
-
* what makes the concatenation collision-free.
|
|
121
|
-
*
|
|
122
|
-
* Exported unaliased because two paths need the same expression under different
|
|
123
|
-
* names: the view compiler aliases it `id`, and the SDK's projection push source
|
|
124
|
-
* also orders and keyset-paginates by it. Sharing one definition is what keeps
|
|
125
|
-
* a pushed row's `id` identical to the one the view would have produced.
|
|
126
|
-
*/
|
|
127
|
-
declare function compileProjectionIdentity(projection: ProjectionMapping, basePkColumn: string): string;
|
|
128
|
-
declare function compileProjectionSelect(projection: ProjectionMapping, basePkColumn: string): {
|
|
129
|
-
columns: string[];
|
|
130
|
-
selectItems: string[];
|
|
131
|
-
};
|
|
132
|
-
declare function compileProjectionJoins(projection: ProjectionMapping): string[];
|
|
133
|
-
/** `FROM <baseTable> AS "base"` — the alias every ref resolves against. */
|
|
134
|
-
declare function compileProjectionFrom(projection: ProjectionMapping): string;
|
|
135
|
-
/**
|
|
136
|
-
* Hard ceiling on preview rows, regardless of what a caller asks for.
|
|
137
|
-
*
|
|
138
|
-
* A preview runs against a production database from a button a user can click
|
|
139
|
-
* as often as they like, so the cap belongs beside the query rather than in
|
|
140
|
-
* whichever caller happens to be passing a limit today.
|
|
141
|
-
*/
|
|
142
|
-
declare const PREVIEW_MAX_ROWS = 50;
|
|
143
|
-
/**
|
|
144
|
-
* One SELECT reading a few rows through an UNSAVED projection, for the derived
|
|
145
|
-
* object builder's preview.
|
|
146
|
-
*
|
|
147
|
-
* Lives here, beside the view compiler, because both sides of the round trip
|
|
148
|
-
* need the identical statement: an embedded org runs it against its own
|
|
149
|
-
* database from `@clivly.com/api`, and a cloud org's host app runs it from
|
|
150
|
-
* `@clivly/sdk`. Two copies would be free to disagree about what the user is
|
|
151
|
-
* being shown, which is the whole value of a preview.
|
|
152
|
-
*
|
|
153
|
-
* Columns are aliased by FIELD NAME, not by ref token. That is the deliberate
|
|
154
|
-
* difference from the push source, which aliases by token because cloud ingest
|
|
155
|
-
* reads `row[token]`; a preview is read by a person, in a table whose headers
|
|
156
|
-
* are the field names they just typed.
|
|
157
|
-
*/
|
|
158
|
-
declare function compileProjectionPreview(projection: ProjectionMapping, limit: number): string;
|
|
159
|
-
/**
|
|
160
|
-
* A derived object's filter is evaluated in the cloud against pushed rows, so
|
|
161
|
-
* it can only name columns of the base table.
|
|
162
|
-
*
|
|
163
|
-
* Every rejected shape here fails *silently* today, which is the whole reason
|
|
164
|
-
* the check exists — a filter that cannot be honoured must error, never quietly
|
|
165
|
-
* return the wrong rows. The three shapes fail in different directions:
|
|
166
|
-
*
|
|
167
|
-
* - `$raw` is opaque SQL meant for the embedded model. The cloud path cannot
|
|
168
|
-
* evaluate it and passes every row, so the filter is ignored and the object
|
|
169
|
-
* syncs UNFILTERED.
|
|
170
|
-
* - A joined-table column resolves to nothing on a pushed row, so under a
|
|
171
|
-
* positive operator (`eq`, `in`) no row matches and the object syncs EMPTY.
|
|
172
|
-
* - The same unresolvable column under a NEGATIVE operator (`ne`, `isNull`,
|
|
173
|
-
* `notIn`) is the dangerous one: the missing cell reads as null, so the
|
|
174
|
-
* predicate is true for every row and a filter meant to narrow the sync
|
|
175
|
-
* ADMITS EVERYTHING. Nobody notices extra rows arriving.
|
|
176
|
-
*
|
|
177
|
-
* Rejecting an unresolvable column closes the last two together.
|
|
178
|
-
*/
|
|
179
|
-
declare function validateProjectionFilter(filter: FilterExpr | undefined, projection: ProjectionMapping, schema: DiscoveredSchemaTable[], base: string): ConfigValidationError[];
|
|
180
|
-
/**
|
|
181
|
-
* Validate a projection against the discovered schema. Returns every error
|
|
182
|
-
* found (not just the first) so a builder UI can show them all at once.
|
|
183
|
-
*/
|
|
184
|
-
declare function validateProjection(projection: ProjectionMapping, schema: DiscoveredSchemaTable[], base: string): ConfigValidationError[];
|
|
185
|
-
/**
|
|
186
|
-
* Accessors over a discovered table's schema-v2 metadata.
|
|
187
|
-
*
|
|
188
|
-
* Every helper treats *absent* metadata as **unknown**, never as a negative
|
|
189
|
-
* fact. `coversUniqueKey` returning false on a v1 payload is what makes
|
|
190
|
-
* projection validation fail closed: we cannot prove a join is many-to-one, so
|
|
191
|
-
* we refuse to compile it rather than guess.
|
|
192
|
-
*/
|
|
193
|
-
declare function columnMetaFor(table: DiscoveredSchemaTable, column: string): DiscoveredColumnMeta | undefined;
|
|
194
|
-
/**
|
|
195
|
-
* Every primary-key column. More than one entry means a composite PK, which is
|
|
196
|
-
* why `base_pk` identity is rejected for such tables.
|
|
197
|
-
*/
|
|
198
|
-
declare function primaryKeyColumns(table: DiscoveredSchemaTable): string[];
|
|
199
|
-
/**
|
|
200
|
-
* Do `columns` contain every column of at least one unique key on `table`?
|
|
201
|
-
*
|
|
202
|
-
* This is the fan-out test. A join whose ON columns cover a unique key of the
|
|
203
|
-
* joined table matches at most one row per base row; one that does not can
|
|
204
|
-
* match many.
|
|
205
|
-
*/
|
|
206
|
-
declare function coversUniqueKey(table: DiscoveredSchemaTable, columns: string[]): boolean;
|
|
207
|
-
/**
|
|
208
|
-
* A discovered table whose enrichment metadata is known to be present.
|
|
209
|
-
*
|
|
210
|
-
* This narrows only the *presence* of the two optional fields. It says nothing
|
|
211
|
-
* about their contents — an empty `uniqueConstraints` is a known-empty fact
|
|
212
|
-
* (the table genuinely has no unique keys), which is exactly the distinction
|
|
213
|
-
* `hasRichMeta` has always drawn and must keep drawing.
|
|
214
|
-
*/
|
|
215
|
-
type RichMetaTable = DiscoveredSchemaTable & {
|
|
216
|
-
columnsMeta: DiscoveredColumnMeta[];
|
|
217
|
-
uniqueConstraints: string[][];
|
|
218
|
-
};
|
|
219
|
-
/**
|
|
220
|
-
* Is this table's payload rich enough to validate a projection against?
|
|
221
|
-
*
|
|
222
|
-
* A type predicate rather than a plain boolean so the narrowing is visible to
|
|
223
|
-
* the compiler: callers that guard on this can iterate `columnsMeta` directly
|
|
224
|
-
* instead of casting, and a cast that outlives its guard becomes a type error
|
|
225
|
-
* rather than a silent walk over `undefined`.
|
|
226
|
-
*
|
|
227
|
-
* The invariant is unchanged: this reports whether the metadata is *known*,
|
|
228
|
-
* never whether the table has keys. Absent metadata stays UNKNOWN.
|
|
229
|
-
*/
|
|
230
|
-
declare function hasRichMeta(table: DiscoveredSchemaTable): table is RichMetaTable;
|
|
231
102
|
/**
|
|
232
103
|
* The one `slugify`.
|
|
233
104
|
*
|
|
@@ -311,4 +182,4 @@ declare function matchesCondition(condition: Condition, fields: Record<string, s
|
|
|
311
182
|
* a half-written rule should do.
|
|
312
183
|
*/
|
|
313
184
|
declare function evaluateStage(rules: EvaluableRule[], fields: Record<string, string | null>, mappedFields: Set<string>): string | null;
|
|
314
|
-
export {
|
|
185
|
+
export { matchesCondition as a, HostOwnedCompanyField as c, hostOwnedFieldMessage as d, isHostOwned as f, computeDealValue as g, PerSeatValueSource as h, evaluateStage as i, HostOwnedContactField as l, rejectedContactFields as m, ConditionOp as n, slugify as o, rejectedCompanyFields as p, EvaluableRule as r, toObjectTypeSlug as s, Condition as t, SourcedRecord as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
// ../core/src/contact-segment.ts
|
|
3
3
|
/** AND conditions over deliberately mapped host fields, never SQL identifiers. */
|
|
4
|
-
const contactSegmentSchema = array(object({
|
|
5
|
-
field: string().min(1).max(160),
|
|
6
|
-
operator:
|
|
4
|
+
const contactSegmentSchema = z.array(z.object({
|
|
5
|
+
field: z.string().min(1).max(160),
|
|
6
|
+
operator: z.enum([
|
|
7
7
|
"equals",
|
|
8
8
|
"not_equals",
|
|
9
9
|
"contains",
|
|
@@ -14,7 +14,7 @@ const contactSegmentSchema = array(object({
|
|
|
14
14
|
"is_set",
|
|
15
15
|
"is_not_set"
|
|
16
16
|
]),
|
|
17
|
-
value: string().max(1e3).optional()
|
|
17
|
+
value: z.string().max(1e3).optional()
|
|
18
18
|
}).strict().superRefine((rule, ctx) => {
|
|
19
19
|
if (!["is_set", "is_not_set"].includes(rule.operator) && rule.value === void 0) ctx.addIssue({
|
|
20
20
|
code: "custom",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
let zod = require("zod");
|
|
2
2
|
// ../core/src/contact-segment.ts
|
|
3
3
|
/** AND conditions over deliberately mapped host fields, never SQL identifiers. */
|
|
4
|
-
const contactSegmentSchema =
|
|
5
|
-
field:
|
|
6
|
-
operator:
|
|
4
|
+
const contactSegmentSchema = zod.z.array(zod.z.object({
|
|
5
|
+
field: zod.z.string().min(1).max(160),
|
|
6
|
+
operator: zod.z.enum([
|
|
7
7
|
"equals",
|
|
8
8
|
"not_equals",
|
|
9
9
|
"contains",
|
|
@@ -14,7 +14,7 @@ const contactSegmentSchema = require_projection.array(require_projection.object(
|
|
|
14
14
|
"is_set",
|
|
15
15
|
"is_not_set"
|
|
16
16
|
]),
|
|
17
|
-
value:
|
|
17
|
+
value: zod.z.string().max(1e3).optional()
|
|
18
18
|
}).strict().superRefine((rule, ctx) => {
|
|
19
19
|
if (!["is_set", "is_not_set"].includes(rule.operator) && rule.value === void 0) ctx.addIssue({
|
|
20
20
|
code: "custom",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./index-DRRTE5IJ.cjs";
|
|
2
2
|
/**
|
|
3
3
|
* Value derived as a flat fee plus a per-seat price that depends on the plan.
|
|
4
4
|
*
|
|
@@ -99,135 +99,6 @@ declare function rejectedCompanyFields(company: SourcedRecord, patch: Readonly<R
|
|
|
99
99
|
* they come from, so the reason is actionable rather than a bare "forbidden".
|
|
100
100
|
*/
|
|
101
101
|
declare function hostOwnedFieldMessage(fields: readonly string[]): string;
|
|
102
|
-
declare function joinFansOut(join: ProjectionJoin, joinTable: DiscoveredSchemaTable): boolean;
|
|
103
|
-
/** Every join in the projection that can multiply rows. */
|
|
104
|
-
declare function fanOutJoins(projection: ProjectionMapping, tablesByName: Map<string, DiscoveredSchemaTable>): ProjectionJoin[];
|
|
105
|
-
/**
|
|
106
|
-
* SQL generation for projection-backed entities.
|
|
107
|
-
*
|
|
108
|
-
* Base and joins are aliased by their ref key (`base`, then each join's `key`),
|
|
109
|
-
* which is what allows the same table to be joined twice and keeps generated
|
|
110
|
-
* SQL independent of host table names.
|
|
111
|
-
*
|
|
112
|
-
* Pure string generation — no DB access. Identifiers are escaped so output is
|
|
113
|
-
* deterministic and injection-safe.
|
|
114
|
-
*/
|
|
115
|
-
/** Quote a single identifier part, escaping embedded double-quotes. */
|
|
116
|
-
declare function quoteIdent(name: string): string;
|
|
117
|
-
/**
|
|
118
|
-
* The identity expression. Composite identities concatenate their parts with
|
|
119
|
-
* `::`; validation guarantees every part is NOT NULL and non-text, which is
|
|
120
|
-
* what makes the concatenation collision-free.
|
|
121
|
-
*
|
|
122
|
-
* Exported unaliased because two paths need the same expression under different
|
|
123
|
-
* names: the view compiler aliases it `id`, and the SDK's projection push source
|
|
124
|
-
* also orders and keyset-paginates by it. Sharing one definition is what keeps
|
|
125
|
-
* a pushed row's `id` identical to the one the view would have produced.
|
|
126
|
-
*/
|
|
127
|
-
declare function compileProjectionIdentity(projection: ProjectionMapping, basePkColumn: string): string;
|
|
128
|
-
declare function compileProjectionSelect(projection: ProjectionMapping, basePkColumn: string): {
|
|
129
|
-
columns: string[];
|
|
130
|
-
selectItems: string[];
|
|
131
|
-
};
|
|
132
|
-
declare function compileProjectionJoins(projection: ProjectionMapping): string[];
|
|
133
|
-
/** `FROM <baseTable> AS "base"` — the alias every ref resolves against. */
|
|
134
|
-
declare function compileProjectionFrom(projection: ProjectionMapping): string;
|
|
135
|
-
/**
|
|
136
|
-
* Hard ceiling on preview rows, regardless of what a caller asks for.
|
|
137
|
-
*
|
|
138
|
-
* A preview runs against a production database from a button a user can click
|
|
139
|
-
* as often as they like, so the cap belongs beside the query rather than in
|
|
140
|
-
* whichever caller happens to be passing a limit today.
|
|
141
|
-
*/
|
|
142
|
-
declare const PREVIEW_MAX_ROWS = 50;
|
|
143
|
-
/**
|
|
144
|
-
* One SELECT reading a few rows through an UNSAVED projection, for the derived
|
|
145
|
-
* object builder's preview.
|
|
146
|
-
*
|
|
147
|
-
* Lives here, beside the view compiler, because both sides of the round trip
|
|
148
|
-
* need the identical statement: an embedded org runs it against its own
|
|
149
|
-
* database from `@clivly.com/api`, and a cloud org's host app runs it from
|
|
150
|
-
* `@clivly/sdk`. Two copies would be free to disagree about what the user is
|
|
151
|
-
* being shown, which is the whole value of a preview.
|
|
152
|
-
*
|
|
153
|
-
* Columns are aliased by FIELD NAME, not by ref token. That is the deliberate
|
|
154
|
-
* difference from the push source, which aliases by token because cloud ingest
|
|
155
|
-
* reads `row[token]`; a preview is read by a person, in a table whose headers
|
|
156
|
-
* are the field names they just typed.
|
|
157
|
-
*/
|
|
158
|
-
declare function compileProjectionPreview(projection: ProjectionMapping, limit: number): string;
|
|
159
|
-
/**
|
|
160
|
-
* A derived object's filter is evaluated in the cloud against pushed rows, so
|
|
161
|
-
* it can only name columns of the base table.
|
|
162
|
-
*
|
|
163
|
-
* Every rejected shape here fails *silently* today, which is the whole reason
|
|
164
|
-
* the check exists — a filter that cannot be honoured must error, never quietly
|
|
165
|
-
* return the wrong rows. The three shapes fail in different directions:
|
|
166
|
-
*
|
|
167
|
-
* - `$raw` is opaque SQL meant for the embedded model. The cloud path cannot
|
|
168
|
-
* evaluate it and passes every row, so the filter is ignored and the object
|
|
169
|
-
* syncs UNFILTERED.
|
|
170
|
-
* - A joined-table column resolves to nothing on a pushed row, so under a
|
|
171
|
-
* positive operator (`eq`, `in`) no row matches and the object syncs EMPTY.
|
|
172
|
-
* - The same unresolvable column under a NEGATIVE operator (`ne`, `isNull`,
|
|
173
|
-
* `notIn`) is the dangerous one: the missing cell reads as null, so the
|
|
174
|
-
* predicate is true for every row and a filter meant to narrow the sync
|
|
175
|
-
* ADMITS EVERYTHING. Nobody notices extra rows arriving.
|
|
176
|
-
*
|
|
177
|
-
* Rejecting an unresolvable column closes the last two together.
|
|
178
|
-
*/
|
|
179
|
-
declare function validateProjectionFilter(filter: FilterExpr | undefined, projection: ProjectionMapping, schema: DiscoveredSchemaTable[], base: string): ConfigValidationError[];
|
|
180
|
-
/**
|
|
181
|
-
* Validate a projection against the discovered schema. Returns every error
|
|
182
|
-
* found (not just the first) so a builder UI can show them all at once.
|
|
183
|
-
*/
|
|
184
|
-
declare function validateProjection(projection: ProjectionMapping, schema: DiscoveredSchemaTable[], base: string): ConfigValidationError[];
|
|
185
|
-
/**
|
|
186
|
-
* Accessors over a discovered table's schema-v2 metadata.
|
|
187
|
-
*
|
|
188
|
-
* Every helper treats *absent* metadata as **unknown**, never as a negative
|
|
189
|
-
* fact. `coversUniqueKey` returning false on a v1 payload is what makes
|
|
190
|
-
* projection validation fail closed: we cannot prove a join is many-to-one, so
|
|
191
|
-
* we refuse to compile it rather than guess.
|
|
192
|
-
*/
|
|
193
|
-
declare function columnMetaFor(table: DiscoveredSchemaTable, column: string): DiscoveredColumnMeta | undefined;
|
|
194
|
-
/**
|
|
195
|
-
* Every primary-key column. More than one entry means a composite PK, which is
|
|
196
|
-
* why `base_pk` identity is rejected for such tables.
|
|
197
|
-
*/
|
|
198
|
-
declare function primaryKeyColumns(table: DiscoveredSchemaTable): string[];
|
|
199
|
-
/**
|
|
200
|
-
* Do `columns` contain every column of at least one unique key on `table`?
|
|
201
|
-
*
|
|
202
|
-
* This is the fan-out test. A join whose ON columns cover a unique key of the
|
|
203
|
-
* joined table matches at most one row per base row; one that does not can
|
|
204
|
-
* match many.
|
|
205
|
-
*/
|
|
206
|
-
declare function coversUniqueKey(table: DiscoveredSchemaTable, columns: string[]): boolean;
|
|
207
|
-
/**
|
|
208
|
-
* A discovered table whose enrichment metadata is known to be present.
|
|
209
|
-
*
|
|
210
|
-
* This narrows only the *presence* of the two optional fields. It says nothing
|
|
211
|
-
* about their contents — an empty `uniqueConstraints` is a known-empty fact
|
|
212
|
-
* (the table genuinely has no unique keys), which is exactly the distinction
|
|
213
|
-
* `hasRichMeta` has always drawn and must keep drawing.
|
|
214
|
-
*/
|
|
215
|
-
type RichMetaTable = DiscoveredSchemaTable & {
|
|
216
|
-
columnsMeta: DiscoveredColumnMeta[];
|
|
217
|
-
uniqueConstraints: string[][];
|
|
218
|
-
};
|
|
219
|
-
/**
|
|
220
|
-
* Is this table's payload rich enough to validate a projection against?
|
|
221
|
-
*
|
|
222
|
-
* A type predicate rather than a plain boolean so the narrowing is visible to
|
|
223
|
-
* the compiler: callers that guard on this can iterate `columnsMeta` directly
|
|
224
|
-
* instead of casting, and a cast that outlives its guard becomes a type error
|
|
225
|
-
* rather than a silent walk over `undefined`.
|
|
226
|
-
*
|
|
227
|
-
* The invariant is unchanged: this reports whether the metadata is *known*,
|
|
228
|
-
* never whether the table has keys. Absent metadata stays UNKNOWN.
|
|
229
|
-
*/
|
|
230
|
-
declare function hasRichMeta(table: DiscoveredSchemaTable): table is RichMetaTable;
|
|
231
102
|
/**
|
|
232
103
|
* The one `slugify`.
|
|
233
104
|
*
|
|
@@ -311,4 +182,4 @@ declare function matchesCondition(condition: Condition, fields: Record<string, s
|
|
|
311
182
|
* a half-written rule should do.
|
|
312
183
|
*/
|
|
313
184
|
declare function evaluateStage(rules: EvaluableRule[], fields: Record<string, string | null>, mappedFields: Set<string>): string | null;
|
|
314
|
-
export {
|
|
185
|
+
export { matchesCondition as a, HostOwnedCompanyField as c, hostOwnedFieldMessage as d, isHostOwned as f, computeDealValue as g, PerSeatValueSource as h, evaluateStage as i, HostOwnedContactField as l, rejectedContactFields as m, ConditionOp as n, slugify as o, rejectedCompanyFields as p, EvaluableRule as r, toObjectTypeSlug as s, Condition as t, SourcedRecord as u };
|
package/internal-adapter.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CRMAdapter } from "./adapter-
|
|
1
|
+
import { t as CRMAdapter } from "./adapter-BK3gsby5.cjs";
|
|
2
2
|
export { CRMAdapter };
|
package/internal-adapter.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CRMAdapter } from "./adapter-
|
|
1
|
+
import { t as CRMAdapter } from "./adapter-B4v4dwgD.mjs";
|
|
2
2
|
export { CRMAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-
|
|
1
|
+
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-DwtMJb7D.cjs";
|
|
2
2
|
export { ClivlyAuthAdapter, ClivlyUser, CrmMembership, MembershipResolver, authCustom };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-
|
|
1
|
+
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-BIa-ZyVV.mjs";
|
|
2
2
|
export { ClivlyAuthAdapter, ClivlyUser, CrmMembership, MembershipResolver, authCustom };
|
package/internal-drizzle.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as buildUniqueConstraints, r as discoverFromDrizzle, t as buildColumnsMeta } from "./drizzle-
|
|
1
|
+
import { n as buildUniqueConstraints, r as discoverFromDrizzle, t as buildColumnsMeta } from "./drizzle-BNHGQXiY.cjs";
|
|
2
2
|
export { buildColumnsMeta, buildUniqueConstraints, discoverFromDrizzle };
|
package/internal-drizzle.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as buildUniqueConstraints, r as discoverFromDrizzle, t as buildColumnsMeta } from "./drizzle-
|
|
1
|
+
import { n as buildUniqueConstraints, r as discoverFromDrizzle, t as buildColumnsMeta } from "./drizzle-DFe7ILmd.mjs";
|
|
2
2
|
export { buildColumnsMeta, buildUniqueConstraints, discoverFromDrizzle };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_entity_config = require("./entity-config-
|
|
2
|
+
const require_entity_config = require("./entity-config-BP8Cc_nC.cjs");
|
|
3
3
|
exports.CANONICAL_FIELDS = require_entity_config.CANONICAL_FIELDS;
|
|
4
4
|
exports.CRM_CONCEPTS = require_entity_config.CRM_CONCEPTS;
|
|
5
5
|
exports.CUSTOM_CONCEPT = require_entity_config.CUSTOM_CONCEPT;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as relationshipsSchema, C as customObjectDeclarations, D as missingRequiredFields, E as filterSchema, M as validateEntitiesConfig, O as projectionFields, S as RelationshipsMap, T as entitiesConfigSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, 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, o as ClivlyEntitiesConfigInput, p as DiscoveredColumnMeta, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS } from "./entity-config-
|
|
1
|
+
import { A as relationshipsSchema, C as customObjectDeclarations, D as missingRequiredFields, E as filterSchema, M as validateEntitiesConfig, O as projectionFields, S as RelationshipsMap, T as entitiesConfigSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, 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, o as ClivlyEntitiesConfigInput, p as DiscoveredColumnMeta, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS } from "./entity-config-CXpGowQa.cjs";
|
|
2
2
|
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntitiesConfigInput, ClivlyEntityConfig, ClivlyEntityConfigInput, ConfigValidationError, ConfigValidationResult, CrmConcept, CustomObjectDeclaration, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, REQUIRED_FIELDS, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, missingRequiredFields, projectionFields, relationshipSchema, relationshipsSchema, requiredFieldsFor, validateEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as relationshipsSchema, C as customObjectDeclarations, D as missingRequiredFields, E as filterSchema, M as validateEntitiesConfig, O as projectionFields, S as RelationshipsMap, T as entitiesConfigSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, 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, o as ClivlyEntitiesConfigInput, p as DiscoveredColumnMeta, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS } from "./entity-config-
|
|
1
|
+
import { A as relationshipsSchema, C as customObjectDeclarations, D as missingRequiredFields, E as filterSchema, M as validateEntitiesConfig, O as projectionFields, S as RelationshipsMap, T as entitiesConfigSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, 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, o as ClivlyEntitiesConfigInput, p as DiscoveredColumnMeta, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS } from "./entity-config-CXpGowQa.mjs";
|
|
2
2
|
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntitiesConfigInput, ClivlyEntityConfig, ClivlyEntityConfigInput, ConfigValidationError, ConfigValidationResult, CrmConcept, CustomObjectDeclaration, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, REQUIRED_FIELDS, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, missingRequiredFields, projectionFields, relationshipSchema, relationshipsSchema, requiredFieldsFor, validateEntitiesConfig };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as CANONICAL_FIELDS, n as CRM_CONCEPTS, r as CUSTOM_CONCEPT, i as ClivlyConfigError, a as MATERIALIZING_CONCEPTS, o as REQUIRED_FIELDS, s as customObjectDeclarations, c as defineClivlyConfig, l as entitiesConfigSchema, u as filterSchema, d as missingRequiredFields, f as projectionFields, p as relationshipSchema, m as relationshipsSchema, h as requiredFieldsFor, g as validateEntitiesConfig } from "./entity-config-
|
|
1
|
+
export { t as CANONICAL_FIELDS, n as CRM_CONCEPTS, r as CUSTOM_CONCEPT, i as ClivlyConfigError, a as MATERIALIZING_CONCEPTS, o as REQUIRED_FIELDS, s as customObjectDeclarations, c as defineClivlyConfig, l as entitiesConfigSchema, u as filterSchema, d as missingRequiredFields, f as projectionFields, p as relationshipSchema, m as relationshipsSchema, h as requiredFieldsFor, g as validateEntitiesConfig } from "./entity-config-CI5CGfaN.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_entity_heuristics = require("./entity-heuristics-
|
|
2
|
+
const require_entity_heuristics = require("./entity-heuristics-DNmrcd0b.cjs");
|
|
3
3
|
exports.TARGET_CONCEPTS = require_entity_heuristics.TARGET_CONCEPTS;
|
|
4
4
|
exports.hasDefiningColumn = require_entity_heuristics.hasDefiningColumn;
|
|
5
5
|
exports.hasSensitiveColumns = require_entity_heuristics.hasSensitiveColumns;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as DiscoveredColumnMeta } from "./entity-config-
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-CXpGowQa.cjs";
|
|
2
2
|
import { a as Scored } from "./mapping-score-BKrxddz0.cjs";
|
|
3
3
|
export declare const TARGET_CONCEPTS: readonly ["contact", "company", "deal", "activity", "conversation", "note"];
|
|
4
4
|
export type TargetConcept = (typeof TARGET_CONCEPTS)[number];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as DiscoveredColumnMeta } from "./entity-config-
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-CXpGowQa.mjs";
|
|
2
2
|
import { a as Scored } from "./mapping-score-BKrxddz0.mjs";
|
|
3
3
|
export declare const TARGET_CONCEPTS: readonly ["contact", "company", "deal", "activity", "conversation", "note"];
|
|
4
4
|
export type TargetConcept = (typeof TARGET_CONCEPTS)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as TARGET_CONCEPTS, n as hasDefiningColumn, r as hasSensitiveColumns, i as isFrameworkTable, a as isSensitiveColumn, o as matchesConcept, s as requiredFieldsFor, c as scoreConcepts, l as scoreFieldMap, u as scoreRelationships, d as suggestCursorField, f as suggestDiscriminatorColumns, p as toFieldMap, m as topConcept, h as validateMapping } from "./entity-heuristics-
|
|
1
|
+
export { t as TARGET_CONCEPTS, n as hasDefiningColumn, r as hasSensitiveColumns, i as isFrameworkTable, a as isSensitiveColumn, o as matchesConcept, s as requiredFieldsFor, c as scoreConcepts, l as scoreFieldMap, u as scoreRelationships, d as suggestCursorField, f as suggestDiscriminatorColumns, p as toFieldMap, m as topConcept, h as validateMapping } from "./entity-heuristics-DAxqagJA.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
1
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-Bg_hgNoL.cjs";
|
|
2
2
|
export { RelationshipCandidate, buildFilterFromDiscriminator, buildRelationships, relationshipViaSignature };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
1
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-KHUlnC7A.mjs";
|
|
2
2
|
export { RelationshipCandidate, buildFilterFromDiscriminator, buildRelationships, relationshipViaSignature };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_mappings_config = require("./mappings-config-
|
|
2
|
+
const require_mappings_config = require("./mappings-config-CC-vltWb.cjs");
|
|
3
3
|
exports.entitiesToMappings = require_mappings_config.entitiesToMappings;
|
|
4
4
|
exports.mappingsToEntitiesConfig = require_mappings_config.mappingsToEntitiesConfig;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as mappingsToEntitiesConfig, n as MappingFromConfig, r as entitiesToMappings, t as EntityMappingRow } from "./mappings-config-
|
|
1
|
+
import { i as mappingsToEntitiesConfig, n as MappingFromConfig, r as entitiesToMappings, t as EntityMappingRow } from "./mappings-config-DNo_Cum_.cjs";
|
|
2
2
|
export { EntityMappingRow, MappingFromConfig, entitiesToMappings, mappingsToEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as mappingsToEntitiesConfig, n as MappingFromConfig, r as entitiesToMappings, t as EntityMappingRow } from "./mappings-config-
|
|
1
|
+
import { i as mappingsToEntitiesConfig, n as MappingFromConfig, r as entitiesToMappings, t as EntityMappingRow } from "./mappings-config-wAe-p1rG.mjs";
|
|
2
2
|
export { EntityMappingRow, MappingFromConfig, entitiesToMappings, mappingsToEntitiesConfig };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as entitiesToMappings, n as mappingsToEntitiesConfig } from "./mappings-config-
|
|
1
|
+
export { t as entitiesToMappings, n as mappingsToEntitiesConfig } from "./mappings-config-Opw7ZM6Y.mjs";
|
package/internal-sync-engine.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sync_engine = require("./sync-engine-
|
|
2
|
+
const require_sync_engine = require("./sync-engine-DNSoZeo0.cjs");
|
|
3
3
|
exports.computeSampleWarnings = require_sync_engine.computeSampleWarnings;
|
|
4
4
|
exports.isRemovalAction = require_sync_engine.isRemovalAction;
|
|
5
5
|
exports.previewSync = require_sync_engine.previewSync;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PreviewWarning, c as SyncAction, d as computeSampleWarnings, f as isRemovalAction, g as runSync, h as resolveActions, i as PreviewResult, l as SyncResult, m as reconcile, n as MirrorRecord, o as ResolvedMembership, p as previewSync, r as PersistAction, s as SourceRow, t as EntitySyncResult, u as SyncStore } from "./sync-engine-
|
|
1
|
+
import { a as PreviewWarning, c as SyncAction, d as computeSampleWarnings, f as isRemovalAction, g as runSync, h as resolveActions, i as PreviewResult, l as SyncResult, m as reconcile, n as MirrorRecord, o as ResolvedMembership, p as previewSync, r as PersistAction, s as SourceRow, t as EntitySyncResult, u as SyncStore } from "./sync-engine-DCjTr2XQ.cjs";
|
|
2
2
|
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, ResolvedMembership, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, isRemovalAction, previewSync, reconcile, resolveActions, runSync };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PreviewWarning, c as SyncAction, d as computeSampleWarnings, f as isRemovalAction, g as runSync, h as resolveActions, i as PreviewResult, l as SyncResult, m as reconcile, n as MirrorRecord, o as ResolvedMembership, p as previewSync, r as PersistAction, s as SourceRow, t as EntitySyncResult, u as SyncStore } from "./sync-engine-
|
|
1
|
+
import { a as PreviewWarning, c as SyncAction, d as computeSampleWarnings, f as isRemovalAction, g as runSync, h as resolveActions, i as PreviewResult, l as SyncResult, m as reconcile, n as MirrorRecord, o as ResolvedMembership, p as previewSync, r as PersistAction, s as SourceRow, t as EntitySyncResult, u as SyncStore } from "./sync-engine-UNORma7f.mjs";
|
|
2
2
|
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, ResolvedMembership, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, isRemovalAction, previewSync, reconcile, resolveActions, runSync };
|
package/internal-sync-engine.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as computeSampleWarnings, n as isRemovalAction, r as previewSync, i as reconcile, a as resolveActions, o as runSync } from "./sync-engine-
|
|
1
|
+
export { t as computeSampleWarnings, n as isRemovalAction, r as previewSync, i as reconcile, a as resolveActions, o as runSync } from "./sync-engine-yFLEyId3.mjs";
|
package/internal-types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as TaskStatus, C as PipelineStageConfig, D as TaskEntityType, E as Task, F as ValueInterval, I as isClosedStageType, M as UpdateContactInput, N as UpdateDealInput, O as TaskFilters, P as UpdateTaskInput, 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-
|
|
1
|
+
import { A as TaskStatus, C as PipelineStageConfig, D as TaskEntityType, E as Task, F as ValueInterval, I as isClosedStageType, M as UpdateContactInput, N as UpdateDealInput, O as TaskFilters, P as UpdateTaskInput, 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-BBfwsDxe.cjs";
|
|
2
2
|
export { Activity, ActivityType, Company, CompanyFilters, Contact, ContactFilters, ContactSource, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmRole, Deal, DealStage, Note, OPEN_STAGE_TYPE, Page, PageRequest, PipelineConfig, PipelineKind, PipelineStageConfig, RecordSource, StageType, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateCompanyInput, UpdateContactInput, UpdateDealInput, UpdateTaskInput, ValueInterval, isClosedStageType };
|
package/internal-types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as TaskStatus, C as PipelineStageConfig, D as TaskEntityType, E as Task, F as ValueInterval, I as isClosedStageType, M as UpdateContactInput, N as UpdateDealInput, O as TaskFilters, P as UpdateTaskInput, 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-
|
|
1
|
+
import { A as TaskStatus, C as PipelineStageConfig, D as TaskEntityType, E as Task, F as ValueInterval, I as isClosedStageType, M as UpdateContactInput, N as UpdateDealInput, O as TaskFilters, P as UpdateTaskInput, 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-BBfwsDxe.mjs";
|
|
2
2
|
export { Activity, ActivityType, Company, CompanyFilters, Contact, ContactFilters, ContactSource, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmRole, Deal, DealStage, Note, OPEN_STAGE_TYPE, Page, PageRequest, PipelineConfig, PipelineKind, PipelineStageConfig, RecordSource, StageType, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateCompanyInput, UpdateContactInput, UpdateDealInput, UpdateTaskInput, ValueInterval, isClosedStageType };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_view_compiler = require("./view-compiler-
|
|
2
|
+
const require_view_compiler = require("./view-compiler-NqiortOA.cjs");
|
|
3
3
|
exports.DEFAULT_VIEW_PREFIX = require_view_compiler.DEFAULT_VIEW_PREFIX;
|
|
4
4
|
exports.compileEntityView = require_view_compiler.compileEntityView;
|
|
5
5
|
exports.compileEntityViews = require_view_compiler.compileEntityViews;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as compileEntityView, c as explainViewExecutionError, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-
|
|
1
|
+
import { a as compileEntityView, c as explainViewExecutionError, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-BDD93Luw.cjs";
|
|
2
2
|
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as compileEntityView, c as explainViewExecutionError, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-
|
|
1
|
+
import { a as compileEntityView, c as explainViewExecutionError, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-CSNhmCY2.mjs";
|
|
2
2
|
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as DEFAULT_VIEW_PREFIX, n as compileEntityView, r as compileEntityViews, i as explainEntitiesConfig, a as explainViewExecutionError } from "./view-compiler-
|
|
1
|
+
export { t as DEFAULT_VIEW_PREFIX, n as compileEntityView, r as compileEntityViews, i as explainEntitiesConfig, a as explainViewExecutionError } from "./view-compiler-CSHSqZl7.mjs";
|
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-w4Z6vSL2.cjs");
|
|
3
|
+
const require_entity_config = require("./entity-config-BP8Cc_nC.cjs");
|
|
4
|
+
const require_mappings_config = require("./mappings-config-CC-vltWb.cjs");
|
|
5
5
|
const require_auth_adapter = require("./auth-adapter-CNVuxT9W.cjs");
|
|
6
|
-
const require_internal = require("./internal-
|
|
6
|
+
const require_internal = require("./internal-G5tXjqwl.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-BkrHR2ea.cjs");
|
|
9
|
+
const require_view_compiler = require("./view-compiler-NqiortOA.cjs");
|
|
10
|
+
const require_sync_engine = require("./sync-engine-DNSoZeo0.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 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-
|
|
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 {
|
|
10
|
-
import { a as IntegrationStep, c as
|
|
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-BBfwsDxe.cjs";
|
|
2
|
+
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-DwtMJb7D.cjs";
|
|
3
|
+
import { t as CRMAdapter } from "./adapter-BK3gsby5.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-CXpGowQa.cjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-Bg_hgNoL.cjs";
|
|
6
|
+
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-DNo_Cum_.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-BDD93Luw.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-DCjTr2XQ.cjs";
|
|
9
|
+
import { a as matchesCondition, c as HostOwnedCompanyField, d as hostOwnedFieldMessage, f as isHostOwned, g as computeDealValue, h as PerSeatValueSource, i as evaluateStage, l as HostOwnedContactField, m as rejectedContactFields, n as ConditionOp, o as slugify, p as rejectedCompanyFields, r as EvaluableRule, s as toObjectTypeSlug, t as Condition, u as SourcedRecord } from "./internal-Nrhf76Jn.cjs";
|
|
10
|
+
import { C as StepProblem, S as StepId, _ as IntegrationFacts, a as validateProjection, b as IntegrationStep, c as compileProjectionFrom, d as compileProjectionPreview, f as compileProjectionSelect, g as ConnectionLiveness, h as joinFansOut, i as primaryKeyColumns, l as compileProjectionIdentity, m as fanOutJoins, n as coversUniqueKey, o as validateProjectionFilter, p as quoteIdent, r as hasRichMeta, s as PREVIEW_MAX_ROWS, t as columnMetaFor, u as compileProjectionJoins, v as IntegrationState, w as StepState, x as NextAction, y as IntegrationStatus } from "./index-DRRTE5IJ.cjs";
|
|
11
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 };
|