clivly 0.20.0 → 0.22.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/{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 +11 -11
- package/core.d.mts +11 -11
- 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 +53 -8
- package/index.mjs +53 -8
- package/{internal-9oDwwbNg.mjs → internal-BAw1MCMV.mjs} +99 -10
- package/{internal-COALpgov.d.cts → internal-CdfVkh4O.d.mts} +46 -132
- package/{internal-D3q4FPcA.d.mts → internal-D7qVRIFb.d.cts} +46 -132
- package/{internal-BKYt5j0l.cjs → internal-D88LTRlu.cjs} +99 -10
- 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 +11 -11
- package/internal.d.mts +11 -11
- 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-DRRTE5IJ.cjs";
|
|
2
2
|
/**
|
|
3
3
|
* Value derived as a flat fee plus a per-seat price that depends on the plan.
|
|
4
4
|
*
|
|
@@ -21,9 +21,52 @@ interface PerSeatValueSource {
|
|
|
21
21
|
priceBasis?: "monthly" | "billing_interval";
|
|
22
22
|
/** Mapped column holding the seat count. */
|
|
23
23
|
seatField: string;
|
|
24
|
+
/**
|
|
25
|
+
* Annual flat fee in cents, for rows billed yearly at a yearly price. When
|
|
26
|
+
* absent, an annual row with a yearly plan price uses twelve times
|
|
27
|
+
* `baseFeeCents`, which is a monthly fee.
|
|
28
|
+
*/
|
|
29
|
+
yearlyBaseFeeCents?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Annual list price per seat in cents, keyed like `plans`. A row billed
|
|
32
|
+
* yearly whose plan has one is valued at (annual fee + seats × this) ÷ 12.
|
|
33
|
+
* One `plans` map cannot be both a monthly and a yearly price, which is why
|
|
34
|
+
* an annual plan that is not simply twelve months needs its own number.
|
|
35
|
+
*/
|
|
36
|
+
yearlyPlans?: Record<string, number>;
|
|
24
37
|
/** Stage types whose deals are worth nothing (usually `["lost"]`). */
|
|
25
38
|
zeroInStageTypes?: string[];
|
|
26
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Value read from an amount the host's billing system already knows.
|
|
42
|
+
*
|
|
43
|
+
* The recommended source whenever the host has it: negotiated prices,
|
|
44
|
+
* discounts and multi-item subscriptions are all already in the billed
|
|
45
|
+
* amount, so Clivly does not have to model a price book to get them right.
|
|
46
|
+
*/
|
|
47
|
+
interface MappedAmountValueSource {
|
|
48
|
+
/** Mapped column holding the amount charged each billing period. */
|
|
49
|
+
amountField: string;
|
|
50
|
+
/**
|
|
51
|
+
* How the amount is written: `cents` for minor units (Stripe's `amount`,
|
|
52
|
+
* `1250`), `units` for a decimal amount (`12.50`).
|
|
53
|
+
*/
|
|
54
|
+
amountUnit: "cents" | "units";
|
|
55
|
+
/**
|
|
56
|
+
* Mapped column holding how many intervals one charge covers (Stripe's
|
|
57
|
+
* `interval_count`: 3 with `month` is quarterly). Absent means 1.
|
|
58
|
+
*/
|
|
59
|
+
intervalCountField?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Mapped column holding the billing interval: month, quarter, year or week.
|
|
62
|
+
* Absent means every amount is already monthly.
|
|
63
|
+
*/
|
|
64
|
+
intervalField?: string;
|
|
65
|
+
kind: "mapped_amount";
|
|
66
|
+
/** Stage types whose deals are worth nothing (usually `["lost"]`). */
|
|
67
|
+
zeroInStageTypes?: string[];
|
|
68
|
+
}
|
|
69
|
+
type DealValueSource = PerSeatValueSource | MappedAmountValueSource;
|
|
27
70
|
/**
|
|
28
71
|
* The value one deal should have, in cents, or null to leave it alone.
|
|
29
72
|
*
|
|
@@ -33,7 +76,7 @@ interface PerSeatValueSource {
|
|
|
33
76
|
* unmapped case is surfaced through the rule-health warning surface instead of
|
|
34
77
|
* being written into the data — the same fail-safe `matchesCondition` applies.
|
|
35
78
|
*/
|
|
36
|
-
declare function computeDealValue(source:
|
|
79
|
+
declare function computeDealValue(source: DealValueSource, fields: Record<string, string | null>, mappedFields: Set<string>, stageType: string): number | null;
|
|
37
80
|
/**
|
|
38
81
|
* Which fields a CRM record lets a user edit.
|
|
39
82
|
*
|
|
@@ -99,135 +142,6 @@ declare function rejectedCompanyFields(company: SourcedRecord, patch: Readonly<R
|
|
|
99
142
|
* they come from, so the reason is actionable rather than a bare "forbidden".
|
|
100
143
|
*/
|
|
101
144
|
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
145
|
/**
|
|
232
146
|
* The one `slugify`.
|
|
233
147
|
*
|
|
@@ -311,4 +225,4 @@ declare function matchesCondition(condition: Condition, fields: Record<string, s
|
|
|
311
225
|
* a half-written rule should do.
|
|
312
226
|
*/
|
|
313
227
|
declare function evaluateStage(rules: EvaluableRule[], fields: Record<string, string | null>, mappedFields: Set<string>): string | null;
|
|
314
|
-
export { PerSeatValueSource as
|
|
228
|
+
export { PerSeatValueSource as _, matchesCondition as a, HostOwnedCompanyField as c, hostOwnedFieldMessage as d, isHostOwned as f, MappedAmountValueSource as g, DealValueSource 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, computeDealValue as v };
|
|
@@ -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",
|
|
@@ -32,8 +32,57 @@ const contactSegmentSchema = require_projection.array(require_projection.object(
|
|
|
32
32
|
})).max(20);
|
|
33
33
|
// ../core/src/deal-value.ts
|
|
34
34
|
const MONTHS_PER_YEAR = 12;
|
|
35
|
+
const MONTHS_PER_QUARTER = 3;
|
|
36
|
+
const WEEKS_PER_YEAR = 52;
|
|
35
37
|
/** Only two decimal-free seat counts make sense; anything else is bad data. */
|
|
36
38
|
const SEAT_COUNT_REGEX = /^\d+$/;
|
|
39
|
+
const WHOLE_NUMBER_REGEX = /^\d+$/;
|
|
40
|
+
const DECIMAL_AMOUNT_REGEX = /^(\d+)(?:\.(\d{1,2}))?$/;
|
|
41
|
+
const INTERVAL_SYNONYMS = {
|
|
42
|
+
annual: "year",
|
|
43
|
+
annually: "year",
|
|
44
|
+
month: "month",
|
|
45
|
+
monthly: "month",
|
|
46
|
+
quarter: "quarter",
|
|
47
|
+
quarterly: "quarter",
|
|
48
|
+
week: "week",
|
|
49
|
+
weekly: "week",
|
|
50
|
+
year: "year",
|
|
51
|
+
yearly: "year"
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Monthly share of one charge, as a fraction so the division happens once.
|
|
55
|
+
* A week is 52/12 of a month's worth per month: 52 charges a year, spread
|
|
56
|
+
* over twelve months.
|
|
57
|
+
*/
|
|
58
|
+
const MONTHLY_FRACTION = {
|
|
59
|
+
month: {
|
|
60
|
+
denominator: 1,
|
|
61
|
+
numerator: 1
|
|
62
|
+
},
|
|
63
|
+
quarter: {
|
|
64
|
+
denominator: MONTHS_PER_QUARTER,
|
|
65
|
+
numerator: 1
|
|
66
|
+
},
|
|
67
|
+
week: {
|
|
68
|
+
denominator: MONTHS_PER_YEAR,
|
|
69
|
+
numerator: WEEKS_PER_YEAR
|
|
70
|
+
},
|
|
71
|
+
year: {
|
|
72
|
+
denominator: MONTHS_PER_YEAR,
|
|
73
|
+
numerator: 1
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* The billing interval a row names. `undefined` when no interval column is
|
|
78
|
+
* configured or mapped; `null` when it holds something unrecognised.
|
|
79
|
+
*/
|
|
80
|
+
function readInterval(intervalField, fields, mappedFields) {
|
|
81
|
+
if (intervalField === void 0 || !mappedFields.has(intervalField)) return;
|
|
82
|
+
const raw = fields[intervalField]?.trim().toLowerCase();
|
|
83
|
+
if (!raw) return null;
|
|
84
|
+
return INTERVAL_SYNONYMS[raw] ?? null;
|
|
85
|
+
}
|
|
37
86
|
/**
|
|
38
87
|
* The value one deal should have, in cents, or null to leave it alone.
|
|
39
88
|
*
|
|
@@ -45,15 +94,25 @@ const SEAT_COUNT_REGEX = /^\d+$/;
|
|
|
45
94
|
*/
|
|
46
95
|
function computeDealValue(source, fields, mappedFields, stageType) {
|
|
47
96
|
if (source.zeroInStageTypes?.includes(stageType)) return 0;
|
|
97
|
+
if (source.kind === "mapped_amount") return computeMappedAmount(source, fields, mappedFields);
|
|
98
|
+
return computePerSeat(source, fields, mappedFields);
|
|
99
|
+
}
|
|
100
|
+
function computePerSeat(source, fields, mappedFields) {
|
|
48
101
|
if (!(mappedFields.has(source.seatField) && mappedFields.has(source.planField))) return null;
|
|
49
102
|
const planKey = fields[source.planField];
|
|
50
103
|
if (planKey == null || planKey === "") return null;
|
|
51
|
-
const unitPriceCents = source.plans[planKey];
|
|
52
|
-
if (unitPriceCents === void 0) return null;
|
|
53
104
|
const rawSeats = fields[source.seatField];
|
|
54
105
|
if (rawSeats == null || !SEAT_COUNT_REGEX.test(rawSeats)) return null;
|
|
55
106
|
const seats = Number(rawSeats);
|
|
56
107
|
if (!Number.isSafeInteger(seats)) return null;
|
|
108
|
+
const yearlyPrice = source.yearlyPlans?.[planKey];
|
|
109
|
+
if (yearlyPrice !== void 0 && readInterval(source.intervalField, fields, mappedFields) === "year") {
|
|
110
|
+
const yearly = (source.yearlyBaseFeeCents ?? (source.baseFeeCents ?? 0) * MONTHS_PER_YEAR) + seats * yearlyPrice;
|
|
111
|
+
if (!Number.isSafeInteger(yearly) || yearly < 0) return null;
|
|
112
|
+
return Math.round(yearly / MONTHS_PER_YEAR);
|
|
113
|
+
}
|
|
114
|
+
const unitPriceCents = source.plans[planKey];
|
|
115
|
+
if (unitPriceCents === void 0) return null;
|
|
57
116
|
const monthly = (source.baseFeeCents ?? 0) + seats * unitPriceCents;
|
|
58
117
|
if (!Number.isSafeInteger(monthly) || monthly < 0) return null;
|
|
59
118
|
return normalizePrice(monthly, source, fields, mappedFields);
|
|
@@ -62,13 +121,43 @@ function computeDealValue(source, fields, mappedFields, stageType) {
|
|
|
62
121
|
function normalizePrice(monthly, source, fields, mappedFields) {
|
|
63
122
|
if (source.priceBasis === "monthly") return monthly;
|
|
64
123
|
if (source.priceBasis === "billing_interval") {
|
|
65
|
-
const interval = source.intervalField
|
|
66
|
-
if (interval === "month"
|
|
67
|
-
if (interval === "year"
|
|
124
|
+
const interval = readInterval(source.intervalField, fields, mappedFields);
|
|
125
|
+
if (interval === "month") return monthly;
|
|
126
|
+
if (interval === "year") return Math.round(monthly / MONTHS_PER_YEAR);
|
|
68
127
|
return null;
|
|
69
128
|
}
|
|
70
129
|
return source.intervalField !== void 0 && mappedFields.has(source.intervalField) && fields[source.intervalField] === "year" ? Math.round(monthly / MONTHS_PER_YEAR) : monthly;
|
|
71
130
|
}
|
|
131
|
+
/** A host amount in cents, or null when it is not one. */
|
|
132
|
+
function parseAmount(raw, unit) {
|
|
133
|
+
const text = raw?.trim();
|
|
134
|
+
if (!text) return null;
|
|
135
|
+
if (unit === "cents") return WHOLE_NUMBER_REGEX.test(text) ? Number(text) : null;
|
|
136
|
+
const match = DECIMAL_AMOUNT_REGEX.exec(text);
|
|
137
|
+
if (!match) return null;
|
|
138
|
+
const [, whole, fraction = ""] = match;
|
|
139
|
+
return Number(whole) * 100 + Number(fraction.padEnd(2, "0"));
|
|
140
|
+
}
|
|
141
|
+
function computeMappedAmount(source, fields, mappedFields) {
|
|
142
|
+
if (!mappedFields.has(source.amountField)) return null;
|
|
143
|
+
const amount = parseAmount(fields[source.amountField], source.amountUnit);
|
|
144
|
+
if (amount === null || !Number.isSafeInteger(amount)) return null;
|
|
145
|
+
const interval = source.intervalField === void 0 ? "month" : readInterval(source.intervalField, fields, mappedFields);
|
|
146
|
+
if (!interval) return null;
|
|
147
|
+
let count = 1;
|
|
148
|
+
if (source.intervalCountField !== void 0) {
|
|
149
|
+
if (!mappedFields.has(source.intervalCountField)) return null;
|
|
150
|
+
const rawCount = fields[source.intervalCountField]?.trim();
|
|
151
|
+
if (rawCount) {
|
|
152
|
+
if (!WHOLE_NUMBER_REGEX.test(rawCount) || Number(rawCount) < 1) return null;
|
|
153
|
+
count = Number(rawCount);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
const { denominator, numerator } = MONTHLY_FRACTION[interval];
|
|
157
|
+
const scaled = amount * numerator;
|
|
158
|
+
if (!Number.isSafeInteger(scaled)) return null;
|
|
159
|
+
return Math.round(scaled / (denominator * count));
|
|
160
|
+
}
|
|
72
161
|
// ../core/src/host-owned-fields.ts
|
|
73
162
|
/**
|
|
74
163
|
* Which fields a CRM record lets a user edit.
|
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-D88LTRlu.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;
|