clivly 0.11.0-next.0 → 0.12.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-DTMeGGsl.d.cts +101 -0
- package/adapter-DhPBRNpi.d.mts +101 -0
- package/{auth-adapter-B4vVyUiX.d.mts → auth-adapter-C6rDx3XH.d.mts} +1 -1
- package/{auth-adapter-Cvc_sOpY.d.cts → auth-adapter-Csk9KkvI.d.cts} +1 -1
- package/auth-better-auth.d.cts +6 -6
- package/auth-better-auth.d.mts +6 -6
- package/auth-clerk.d.cts +5 -5
- package/auth-clerk.d.mts +5 -5
- package/auth-workos.d.cts +5 -5
- package/auth-workos.d.mts +5 -5
- package/core-adapter.d.cts +1 -1
- package/core-adapter.d.mts +1 -1
- package/core-auth-adapter.d.cts +1 -1
- package/core-auth-adapter.d.mts +1 -1
- package/core-drizzle.d.cts +1 -1
- package/core-drizzle.d.mts +1 -1
- package/core-entity-config.cjs +1 -1
- package/core-entity-config.d.cts +1 -1
- package/core-entity-config.d.mts +1 -1
- package/core-entity-config.mjs +1 -1
- package/core-entity-heuristics.d.cts +1 -1
- package/core-entity-heuristics.d.mts +1 -1
- package/core-mapping-form.d.cts +1 -1
- package/core-mapping-form.d.mts +1 -1
- package/core-mappings-config.cjs +1 -1
- package/core-mappings-config.d.cts +1 -1
- package/core-mappings-config.d.mts +1 -1
- package/core-mappings-config.mjs +1 -1
- package/core-sync-engine.cjs +1 -1
- package/core-sync-engine.d.cts +1 -1
- package/core-sync-engine.d.mts +1 -1
- package/core-sync-engine.mjs +1 -1
- package/core-types.d.cts +2 -2
- package/core-types.d.mts +2 -2
- package/core-view-compiler.cjs +1 -1
- package/core-view-compiler.d.cts +1 -1
- package/core-view-compiler.d.mts +1 -1
- package/core-view-compiler.mjs +1 -1
- package/core.cjs +12 -7
- package/core.d.cts +10 -10
- package/core.d.mts +10 -10
- package/core.mjs +8 -8
- package/{drizzle-C_0pIDpx.d.mts → drizzle-CiK37zJm.d.cts} +1 -1
- package/{drizzle-D3DcaC2d.d.cts → drizzle-ehVWLSrN.d.mts} +1 -1
- package/drizzle.cjs +3 -2
- package/drizzle.d.cts +24 -9
- package/drizzle.d.mts +24 -9
- package/drizzle.mjs +3 -2
- package/{entity-config-CbS2DGmA.d.cts → entity-config-ApnT5j3X.d.cts} +1734 -16
- package/{entity-config-EZg9BtqD.cjs → entity-config-BI4RYNKL.cjs} +18 -2
- package/{entity-config-CbS2DGmA.d.mts → entity-config-CKcj4-M_.d.mts} +1735 -16
- package/{entity-config-CO0TEwZC.mjs → entity-config-Ccfb2IL9.mjs} +27 -3
- package/index.cjs +15 -11
- package/index.d.cts +10 -11
- package/index.d.mts +10 -11
- package/index.mjs +15 -11
- package/{internal-Cz59xMj8.cjs → internal-BxtvxF7Z.cjs} +136 -0
- package/{internal-B8cq-xP-.d.cts → internal-Cmx7Zevf.d.mts} +104 -2
- 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 +9 -7
- package/internal-entity-heuristics.d.cts +21 -21
- package/internal-entity-heuristics.d.mts +21 -21
- package/internal-entity-heuristics.mjs +9 -7
- package/internal-mapping-form.d.cts +1 -1
- package/internal-mapping-form.d.mts +1 -1
- package/internal-mappings-config.cjs +1 -1
- package/internal-mappings-config.d.cts +1 -1
- package/internal-mappings-config.d.mts +1 -1
- package/internal-mappings-config.mjs +1 -1
- package/internal-sync-engine.cjs +1 -1
- package/internal-sync-engine.d.cts +1 -1
- package/internal-sync-engine.d.mts +1 -1
- package/internal-sync-engine.mjs +1 -1
- package/internal-types.d.cts +2 -2
- package/internal-types.d.mts +2 -2
- package/{internal-Bgiimp5D.mjs → internal-u0Bks5Gr.mjs} +107 -1
- package/{internal-DEV1NCQc.d.mts → internal-vH5Rlg6Q.d.cts} +104 -2
- package/internal-view-compiler.cjs +1 -1
- package/internal-view-compiler.d.cts +1 -1
- package/internal-view-compiler.d.mts +1 -1
- package/internal-view-compiler.mjs +1 -1
- package/internal.cjs +12 -7
- package/internal.d.cts +10 -10
- package/internal.d.mts +10 -10
- package/internal.mjs +8 -8
- package/{mapping-form-BBgP1iEf.d.cts → mapping-form-Btn-7gzv.d.mts} +1 -1
- package/{mapping-form-B_vX_kZJ.d.mts → mapping-form-XsLLCqW_.d.cts} +1 -1
- package/{mappings-config-BRP_Dev5.cjs → mappings-config-BCsRLohT.cjs} +2 -1
- package/{mappings-config-fAfUoVuD.mjs → mappings-config-CwQNQ6bA.mjs} +2 -1
- package/{mappings-config-BXdSUl-K.d.mts → mappings-config-D6_oCi2Q.d.mts} +3 -1
- package/{mappings-config-Cvw7RDSb.d.cts → mappings-config-iJzbcUMp.d.cts} +3 -1
- package/{namespace-probe-DC4YsI6m.d.cts → namespace-probe-C5RLl74M.d.cts} +1 -1
- package/{namespace-probe-BWZ7f1fg.d.mts → namespace-probe-CNQKSmxz.d.mts} +1 -1
- package/package.json +1 -1
- package/{projection-Dz6_i1-w.cjs → projection-BELgANG2.cjs} +32 -23
- package/{projection-CSGJbZlZ.mjs → projection-DvNewmI1.mjs} +32 -23
- package/{projection-sql-CbXCKt3s.cjs → projection-sql-DuCtFE9t.cjs} +1 -1
- package/{projection-sql-iHoiYr1R.mjs → projection-sql-DweUaWRc.mjs} +1 -1
- package/{sdk-UCBezLoT.cjs → sdk-BvGSxBQc.cjs} +3 -3
- package/{sdk-CsR4W9QQ.mjs → sdk-C-Pjxj2y.mjs} +3 -3
- package/sdk.cjs +2 -2
- package/sdk.d.cts +10 -10
- package/sdk.d.mts +10 -10
- package/sdk.mjs +2 -2
- package/{sync-engine-BQRApDAG.d.mts → sync-engine--M9EaONC.d.mts} +2 -2
- package/{sync-engine-CTSIcLlZ.mjs → sync-engine-Df2MCs_n.mjs} +1 -1
- package/{sync-engine-B0FT1ax6.cjs → sync-engine-Dwm_KDUS.cjs} +1 -1
- package/{sync-engine-qxbrOEJX.d.cts → sync-engine-V3_UutGv.d.cts} +2 -2
- package/types-B17TWEOL.d.cts +288 -0
- package/types-B17TWEOL.d.mts +288 -0
- package/{view-compiler-BzKk8nY3.mjs → view-compiler-C-6RydKK.mjs} +2 -2
- package/{view-compiler-CdnLqPQx.d.mts → view-compiler-Cq8apvZ4.d.cts} +1 -1
- package/{view-compiler-P4GHpOHt.d.cts → view-compiler-CwKVoK1w.d.mts} +1 -1
- package/{view-compiler-ZKZbd3SK.cjs → view-compiler-xiwm5iar.cjs} +2 -2
- package/vite.d.cts +4 -5
- package/vite.d.mts +4 -5
- package/adapter-BQl13eS3.d.mts +0 -45
- package/adapter-CA8bA6o-.d.cts +0 -45
- package/types-S0N0hqOV.d.cts +0 -188
- package/types-S0N0hqOV.d.mts +0 -188
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { p as DiscoveredColumnMeta } from "./entity-config-
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-ApnT5j3X.cjs";
|
|
2
2
|
import { a as Scored } from "./mapping-score-D7Gzg7Ii.cjs";
|
|
3
3
|
//#region ../core/src/entity-heuristics.d.ts
|
|
4
|
-
declare const TARGET_CONCEPTS: readonly ["contact", "company", "deal", "activity", "conversation", "note"];
|
|
5
|
-
type TargetConcept = (typeof TARGET_CONCEPTS)[number];
|
|
6
|
-
declare function suggestCursorField(columnKeys: string[]): string | null;
|
|
7
|
-
declare function matchesConcept(tableName: string, concept: TargetConcept): {
|
|
4
|
+
export declare const TARGET_CONCEPTS: readonly ["contact", "company", "deal", "activity", "conversation", "note"];
|
|
5
|
+
export type TargetConcept = (typeof TARGET_CONCEPTS)[number];
|
|
6
|
+
export declare function suggestCursorField(columnKeys: string[]): string | null;
|
|
7
|
+
export declare function matchesConcept(tableName: string, concept: TargetConcept): {
|
|
8
8
|
exact: boolean;
|
|
9
9
|
} | null;
|
|
10
|
-
interface ScoredTable {
|
|
10
|
+
export interface ScoredTable {
|
|
11
11
|
columns: string[];
|
|
12
12
|
columnsMeta?: DiscoveredColumnMeta[];
|
|
13
13
|
name: string;
|
|
@@ -18,7 +18,7 @@ interface ScoredTable {
|
|
|
18
18
|
* and from bulk apply, so one click can never map an auth table into the CRM.
|
|
19
19
|
* They stay manually selectable — an explicit, informed choice is legitimate.
|
|
20
20
|
*/
|
|
21
|
-
declare function hasSensitiveColumns(columns: string[]): boolean;
|
|
21
|
+
export declare function hasSensitiveColumns(columns: string[]): boolean;
|
|
22
22
|
/**
|
|
23
23
|
* Is this table one your auth library created, rather than one you wrote?
|
|
24
24
|
*
|
|
@@ -26,20 +26,20 @@ declare function hasSensitiveColumns(columns: string[]): boolean;
|
|
|
26
26
|
* concept. Never to exclude them: mapping `user` as the contact entity is
|
|
27
27
|
* legitimate for plenty of apps, and it stays selectable.
|
|
28
28
|
*/
|
|
29
|
-
declare function isFrameworkTable(name: string): boolean;
|
|
30
|
-
declare function hasDefiningColumn(concept: TargetConcept, columns: string[]): boolean;
|
|
31
|
-
declare function scoreConcepts(table: ScoredTable): Scored<TargetConcept>[];
|
|
32
|
-
declare function topConcept(table: ScoredTable): {
|
|
29
|
+
export declare function isFrameworkTable(name: string): boolean;
|
|
30
|
+
export declare function hasDefiningColumn(concept: TargetConcept, columns: string[]): boolean;
|
|
31
|
+
export declare function scoreConcepts(table: ScoredTable): Scored<TargetConcept>[];
|
|
32
|
+
export declare function topConcept(table: ScoredTable): {
|
|
33
33
|
best: Scored<TargetConcept>;
|
|
34
34
|
ambiguous: boolean;
|
|
35
35
|
} | null;
|
|
36
|
-
declare function requiredFieldsFor(concept: TargetConcept | "custom"): string[];
|
|
37
|
-
declare function validateMapping(requiredFields: string[], fieldMap: Record<string, string>): {
|
|
36
|
+
export declare function requiredFieldsFor(concept: TargetConcept | "custom"): string[];
|
|
37
|
+
export declare function validateMapping(requiredFields: string[], fieldMap: Record<string, string>): {
|
|
38
38
|
valid: boolean;
|
|
39
39
|
missing: string[];
|
|
40
40
|
};
|
|
41
|
-
declare function suggestDiscriminatorColumns(columns: string[]): string[];
|
|
42
|
-
type SuggestedVia = {
|
|
41
|
+
export declare function suggestDiscriminatorColumns(columns: string[]): string[];
|
|
42
|
+
export type SuggestedVia = {
|
|
43
43
|
fkOn: "company" | "contact";
|
|
44
44
|
column: string;
|
|
45
45
|
} | {
|
|
@@ -47,7 +47,7 @@ type SuggestedVia = {
|
|
|
47
47
|
localKey: string;
|
|
48
48
|
foreignKey: string;
|
|
49
49
|
};
|
|
50
|
-
interface RelationshipSuggestion {
|
|
50
|
+
export interface RelationshipSuggestion {
|
|
51
51
|
/** The related host table. */
|
|
52
52
|
entityTable: string;
|
|
53
53
|
/** Suggested relationship name (defaults to the related concept). */
|
|
@@ -60,13 +60,13 @@ interface RelationshipSuggestion {
|
|
|
60
60
|
* that scores highest. Without metadata (v1 hosts) we fall back to the legacy
|
|
61
61
|
* FK-name hints at a lower tier.
|
|
62
62
|
*/
|
|
63
|
-
declare function scoreRelationships(source: ScoredTable, allTables: ScoredTable[]): Scored<RelationshipSuggestion>[];
|
|
64
|
-
interface FieldSuggestion {
|
|
63
|
+
export declare function scoreRelationships(source: ScoredTable, allTables: ScoredTable[]): Scored<RelationshipSuggestion>[];
|
|
64
|
+
export interface FieldSuggestion {
|
|
65
65
|
column: string;
|
|
66
66
|
field: string;
|
|
67
67
|
required: boolean;
|
|
68
68
|
}
|
|
69
|
-
declare function scoreFieldMap(concept: TargetConcept, table: ScoredTable): Scored<FieldSuggestion>[];
|
|
70
|
-
declare function toFieldMap(scored: Scored<FieldSuggestion>[]): Record<string, string>;
|
|
69
|
+
export declare function scoreFieldMap(concept: TargetConcept, table: ScoredTable): Scored<FieldSuggestion>[];
|
|
70
|
+
export declare function toFieldMap(scored: Scored<FieldSuggestion>[]): Record<string, string>;
|
|
71
71
|
//#endregion
|
|
72
|
-
export {
|
|
72
|
+
export type { DiscoveredColumnMeta };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { p as DiscoveredColumnMeta } from "./entity-config-
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-CKcj4-M_.mjs";
|
|
2
2
|
import { a as Scored } from "./mapping-score-D7Gzg7Ii.mjs";
|
|
3
3
|
//#region ../core/src/entity-heuristics.d.ts
|
|
4
|
-
declare const TARGET_CONCEPTS: readonly ["contact", "company", "deal", "activity", "conversation", "note"];
|
|
5
|
-
type TargetConcept = (typeof TARGET_CONCEPTS)[number];
|
|
6
|
-
declare function suggestCursorField(columnKeys: string[]): string | null;
|
|
7
|
-
declare function matchesConcept(tableName: string, concept: TargetConcept): {
|
|
4
|
+
export declare const TARGET_CONCEPTS: readonly ["contact", "company", "deal", "activity", "conversation", "note"];
|
|
5
|
+
export type TargetConcept = (typeof TARGET_CONCEPTS)[number];
|
|
6
|
+
export declare function suggestCursorField(columnKeys: string[]): string | null;
|
|
7
|
+
export declare function matchesConcept(tableName: string, concept: TargetConcept): {
|
|
8
8
|
exact: boolean;
|
|
9
9
|
} | null;
|
|
10
|
-
interface ScoredTable {
|
|
10
|
+
export interface ScoredTable {
|
|
11
11
|
columns: string[];
|
|
12
12
|
columnsMeta?: DiscoveredColumnMeta[];
|
|
13
13
|
name: string;
|
|
@@ -18,7 +18,7 @@ interface ScoredTable {
|
|
|
18
18
|
* and from bulk apply, so one click can never map an auth table into the CRM.
|
|
19
19
|
* They stay manually selectable — an explicit, informed choice is legitimate.
|
|
20
20
|
*/
|
|
21
|
-
declare function hasSensitiveColumns(columns: string[]): boolean;
|
|
21
|
+
export declare function hasSensitiveColumns(columns: string[]): boolean;
|
|
22
22
|
/**
|
|
23
23
|
* Is this table one your auth library created, rather than one you wrote?
|
|
24
24
|
*
|
|
@@ -26,20 +26,20 @@ declare function hasSensitiveColumns(columns: string[]): boolean;
|
|
|
26
26
|
* concept. Never to exclude them: mapping `user` as the contact entity is
|
|
27
27
|
* legitimate for plenty of apps, and it stays selectable.
|
|
28
28
|
*/
|
|
29
|
-
declare function isFrameworkTable(name: string): boolean;
|
|
30
|
-
declare function hasDefiningColumn(concept: TargetConcept, columns: string[]): boolean;
|
|
31
|
-
declare function scoreConcepts(table: ScoredTable): Scored<TargetConcept>[];
|
|
32
|
-
declare function topConcept(table: ScoredTable): {
|
|
29
|
+
export declare function isFrameworkTable(name: string): boolean;
|
|
30
|
+
export declare function hasDefiningColumn(concept: TargetConcept, columns: string[]): boolean;
|
|
31
|
+
export declare function scoreConcepts(table: ScoredTable): Scored<TargetConcept>[];
|
|
32
|
+
export declare function topConcept(table: ScoredTable): {
|
|
33
33
|
best: Scored<TargetConcept>;
|
|
34
34
|
ambiguous: boolean;
|
|
35
35
|
} | null;
|
|
36
|
-
declare function requiredFieldsFor(concept: TargetConcept | "custom"): string[];
|
|
37
|
-
declare function validateMapping(requiredFields: string[], fieldMap: Record<string, string>): {
|
|
36
|
+
export declare function requiredFieldsFor(concept: TargetConcept | "custom"): string[];
|
|
37
|
+
export declare function validateMapping(requiredFields: string[], fieldMap: Record<string, string>): {
|
|
38
38
|
valid: boolean;
|
|
39
39
|
missing: string[];
|
|
40
40
|
};
|
|
41
|
-
declare function suggestDiscriminatorColumns(columns: string[]): string[];
|
|
42
|
-
type SuggestedVia = {
|
|
41
|
+
export declare function suggestDiscriminatorColumns(columns: string[]): string[];
|
|
42
|
+
export type SuggestedVia = {
|
|
43
43
|
fkOn: "company" | "contact";
|
|
44
44
|
column: string;
|
|
45
45
|
} | {
|
|
@@ -47,7 +47,7 @@ type SuggestedVia = {
|
|
|
47
47
|
localKey: string;
|
|
48
48
|
foreignKey: string;
|
|
49
49
|
};
|
|
50
|
-
interface RelationshipSuggestion {
|
|
50
|
+
export interface RelationshipSuggestion {
|
|
51
51
|
/** The related host table. */
|
|
52
52
|
entityTable: string;
|
|
53
53
|
/** Suggested relationship name (defaults to the related concept). */
|
|
@@ -60,13 +60,13 @@ interface RelationshipSuggestion {
|
|
|
60
60
|
* that scores highest. Without metadata (v1 hosts) we fall back to the legacy
|
|
61
61
|
* FK-name hints at a lower tier.
|
|
62
62
|
*/
|
|
63
|
-
declare function scoreRelationships(source: ScoredTable, allTables: ScoredTable[]): Scored<RelationshipSuggestion>[];
|
|
64
|
-
interface FieldSuggestion {
|
|
63
|
+
export declare function scoreRelationships(source: ScoredTable, allTables: ScoredTable[]): Scored<RelationshipSuggestion>[];
|
|
64
|
+
export interface FieldSuggestion {
|
|
65
65
|
column: string;
|
|
66
66
|
field: string;
|
|
67
67
|
required: boolean;
|
|
68
68
|
}
|
|
69
|
-
declare function scoreFieldMap(concept: TargetConcept, table: ScoredTable): Scored<FieldSuggestion>[];
|
|
70
|
-
declare function toFieldMap(scored: Scored<FieldSuggestion>[]): Record<string, string>;
|
|
69
|
+
export declare function scoreFieldMap(concept: TargetConcept, table: ScoredTable): Scored<FieldSuggestion>[];
|
|
70
|
+
export declare function toFieldMap(scored: Scored<FieldSuggestion>[]): Record<string, string>;
|
|
71
71
|
//#endregion
|
|
72
|
-
export {
|
|
72
|
+
export type { DiscoveredColumnMeta };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MATERIALIZING_CONCEPTS } from "./entity-config-
|
|
1
|
+
import { a as MATERIALIZING_CONCEPTS } from "./entity-config-Ccfb2IL9.mjs";
|
|
2
2
|
import { a as W, c as isTextLike, i as RELATIONSHIP_TIERS, l as isTimestampLike, n as CONCEPT_TIERS, o as isAmbiguous, r as FIELD_TIERS, s as isNumericLike, u as tierFor } from "./mapping-score-C68uAqGB.mjs";
|
|
3
3
|
//#region ../core/src/entity-heuristics.ts
|
|
4
4
|
const TARGET_CONCEPTS = [
|
|
@@ -378,12 +378,14 @@ function scoreConcepts(table) {
|
|
|
378
378
|
score += W.hasPrimaryKey;
|
|
379
379
|
reasons.push("has primary key");
|
|
380
380
|
}
|
|
381
|
-
if (table.rowCount !== void 0)
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
381
|
+
if (table.rowCount !== void 0) {
|
|
382
|
+
if (table.rowCount === 0) {
|
|
383
|
+
score += W.emptyTable;
|
|
384
|
+
reasons.push("table is empty");
|
|
385
|
+
} else {
|
|
386
|
+
score += W.hasRows;
|
|
387
|
+
reasons.push(`${table.rowCount.toLocaleString("en-US")} rows`);
|
|
388
|
+
}
|
|
387
389
|
}
|
|
388
390
|
out.push({
|
|
389
391
|
value: concept,
|
|
@@ -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-XsLLCqW_.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-Btn-7gzv.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-BCsRLohT.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-iJzbcUMp.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-D6_oCi2Q.mjs";
|
|
2
2
|
export { EntityMappingRow, MappingFromConfig, entitiesToMappings, mappingsToEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as mappingsToEntitiesConfig, t as entitiesToMappings } from "./mappings-config-
|
|
1
|
+
import { n as mappingsToEntitiesConfig, t as entitiesToMappings } from "./mappings-config-CwQNQ6bA.mjs";
|
|
2
2
|
export { entitiesToMappings, mappingsToEntitiesConfig };
|
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-Dwm_KDUS.cjs");
|
|
3
3
|
exports.computeSampleWarnings = require_sync_engine.computeSampleWarnings;
|
|
4
4
|
exports.previewSync = require_sync_engine.previewSync;
|
|
5
5
|
exports.reconcile = require_sync_engine.reconcile;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PreviewWarning, c as SyncResult, d as previewSync, f as reconcile, i as PreviewResult, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult, u as computeSampleWarnings } from "./sync-engine-
|
|
1
|
+
import { a as PreviewWarning, c as SyncResult, d as previewSync, f as reconcile, i as PreviewResult, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult, u as computeSampleWarnings } from "./sync-engine-V3_UutGv.cjs";
|
|
2
2
|
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, previewSync, reconcile, runSync };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PreviewWarning, c as SyncResult, d as previewSync, f as reconcile, i as PreviewResult, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult, u as computeSampleWarnings } from "./sync-engine
|
|
1
|
+
import { a as PreviewWarning, c as SyncResult, d as previewSync, f as reconcile, i as PreviewResult, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult, u as computeSampleWarnings } from "./sync-engine--M9EaONC.mjs";
|
|
2
2
|
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, previewSync, reconcile, runSync };
|
package/internal-sync-engine.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as runSync, n as previewSync, r as reconcile, t as computeSampleWarnings } from "./sync-engine-
|
|
1
|
+
import { i as runSync, n as previewSync, r as reconcile, t as computeSampleWarnings } from "./sync-engine-Df2MCs_n.mjs";
|
|
2
2
|
export { computeSampleWarnings, previewSync, reconcile, runSync };
|
package/internal-types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { Activity, ActivityType, Company, Contact, ContactFilters, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmRole, Deal, DealStage, Note, OPEN_STAGE_TYPE, PipelineConfig, PipelineKind, PipelineStageConfig, RecordSource, StageType, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateContactInput, UpdateDealInput, UpdateTaskInput, ValueInterval, isClosedStageType };
|
|
1
|
+
import { A as UpdateCompanyInput, C as RecordSource, D as TaskFilters, E as TaskEntityType, F as isClosedStageType, M as UpdateDealInput, N as UpdateTaskInput, O as TaskPriority, P as ValueInterval, S as PipelineStageConfig, T as Task, _ as OPEN_STAGE_TYPE, a as Contact, b as PipelineConfig, c as CreateActivityInput, d as CreateDealInput, f as CreateTaskInput, g as Note, h as DealStage, i as CompanyFilters, j as UpdateContactInput, k as TaskStatus, l as CreateCompanyInput, m as Deal, n as ActivityType, o as ContactFilters, p as CrmRole, r as Company, s as ContactStatus, t as Activity, u as CreateContactInput, v as Page, w as StageType, x as PipelineKind, y as PageRequest } from "./types-B17TWEOL.cjs";
|
|
2
|
+
export { Activity, ActivityType, Company, CompanyFilters, Contact, ContactFilters, 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
|
|
2
|
-
export { Activity, ActivityType, Company, Contact, ContactFilters, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmRole, Deal, DealStage, Note, OPEN_STAGE_TYPE, PipelineConfig, PipelineKind, PipelineStageConfig, RecordSource, StageType, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateContactInput, UpdateDealInput, UpdateTaskInput, ValueInterval, isClosedStageType };
|
|
1
|
+
import { A as UpdateCompanyInput, C as RecordSource, D as TaskFilters, E as TaskEntityType, F as isClosedStageType, M as UpdateDealInput, N as UpdateTaskInput, O as TaskPriority, P as ValueInterval, S as PipelineStageConfig, T as Task, _ as OPEN_STAGE_TYPE, a as Contact, b as PipelineConfig, c as CreateActivityInput, d as CreateDealInput, f as CreateTaskInput, g as Note, h as DealStage, i as CompanyFilters, j as UpdateContactInput, k as TaskStatus, l as CreateCompanyInput, m as Deal, n as ActivityType, o as ContactFilters, p as CrmRole, r as Company, s as ContactStatus, t as Activity, u as CreateContactInput, v as Page, w as StageType, x as PipelineKind, y as PageRequest } from "./types-B17TWEOL.mjs";
|
|
2
|
+
export { Activity, ActivityType, Company, CompanyFilters, Contact, ContactFilters, 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,3 +1,109 @@
|
|
|
1
|
+
//#region ../core/src/deal-value.ts
|
|
2
|
+
const MONTHS_PER_YEAR = 12;
|
|
3
|
+
/** Only two decimal-free seat counts make sense; anything else is bad data. */
|
|
4
|
+
const SEAT_COUNT_REGEX = /^\d+$/;
|
|
5
|
+
/**
|
|
6
|
+
* The value one deal should have, in cents, or null to leave it alone.
|
|
7
|
+
*
|
|
8
|
+
* Returning null rather than 0 for unusable input is deliberate (D33). A
|
|
9
|
+
* renamed column would otherwise zero an entire pipeline silently, and a zeroed
|
|
10
|
+
* board reads as a business problem rather than a configuration problem. The
|
|
11
|
+
* unmapped case is surfaced through the rule-health warning surface instead of
|
|
12
|
+
* being written into the data — the same fail-safe `matchesCondition` applies.
|
|
13
|
+
*/
|
|
14
|
+
function computeDealValue(source, fields, mappedFields, stageType) {
|
|
15
|
+
if (source.zeroInStageTypes?.includes(stageType)) return 0;
|
|
16
|
+
if (!(mappedFields.has(source.seatField) && mappedFields.has(source.planField))) return null;
|
|
17
|
+
const planKey = fields[source.planField];
|
|
18
|
+
if (planKey == null || planKey === "") return null;
|
|
19
|
+
const unitPriceCents = source.plans[planKey];
|
|
20
|
+
if (unitPriceCents === void 0) return null;
|
|
21
|
+
const rawSeats = fields[source.seatField];
|
|
22
|
+
if (rawSeats == null || !SEAT_COUNT_REGEX.test(rawSeats)) return null;
|
|
23
|
+
const seats = Number(rawSeats);
|
|
24
|
+
if (!Number.isSafeInteger(seats)) return null;
|
|
25
|
+
const monthly = (source.baseFeeCents ?? 0) + seats * unitPriceCents;
|
|
26
|
+
return source.intervalField !== void 0 && mappedFields.has(source.intervalField) && fields[source.intervalField] === "year" ? Math.round(monthly / MONTHS_PER_YEAR) : monthly;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region ../core/src/host-owned-fields.ts
|
|
30
|
+
/**
|
|
31
|
+
* Which fields a CRM record lets a user edit.
|
|
32
|
+
*
|
|
33
|
+
* A record synced from the host app carries a `sourceRef`. Its identity fields
|
|
34
|
+
* are rewritten from the host view on every sync run, so an edit to one would
|
|
35
|
+
* be silently reverted minutes later — the user sees their change accepted,
|
|
36
|
+
* then gone, with nothing explaining why. That is worse than refusing it.
|
|
37
|
+
*
|
|
38
|
+
* So host-owned fields are rejected at the API, not merely disabled in the UI:
|
|
39
|
+
* the UI is not the security boundary, and the SDK and any future public API
|
|
40
|
+
* reach the same routers.
|
|
41
|
+
*
|
|
42
|
+
* Records created inside the CRM have no `sourceRef` and are fully editable —
|
|
43
|
+
* nothing else owns them.
|
|
44
|
+
*
|
|
45
|
+
* This is the cheap half of a capability matrix. It answers "may a user write
|
|
46
|
+
* this?" but not "may the sync engine write this?", which stays implicit
|
|
47
|
+
* because sync bypasses these routers entirely. An override model (the
|
|
48
|
+
* `stageOverrideAt` pattern on `crm_deals`) can replace this later without
|
|
49
|
+
* changing callers.
|
|
50
|
+
*/
|
|
51
|
+
/** Contact fields the host view owns when the row is synced. */
|
|
52
|
+
const HOST_OWNED_CONTACT_FIELDS = ["email", "name"];
|
|
53
|
+
/**
|
|
54
|
+
* Company fields the host view owns when the row is synced.
|
|
55
|
+
*
|
|
56
|
+
* `email` and `phone` joined this list in the same change that made them
|
|
57
|
+
* mappable (migration 0048). They are not identity fields, but ownership here
|
|
58
|
+
* follows what sync rewrites, not what feels identity-like: both flow from the
|
|
59
|
+
* host view on every run, exactly as `email` does for contacts above. Widening
|
|
60
|
+
* `CANONICAL_FIELDS.company` without widening this list is the specific bug
|
|
61
|
+
* this module's doc comment calls worse than refusing the edit.
|
|
62
|
+
*
|
|
63
|
+
* `primaryContactId` is deliberately absent: it is a CRM-side judgement about
|
|
64
|
+
* who to talk to, never sourced from the host, so it stays editable on synced
|
|
65
|
+
* rows.
|
|
66
|
+
*/
|
|
67
|
+
const HOST_OWNED_COMPANY_FIELDS = [
|
|
68
|
+
"domain",
|
|
69
|
+
"name",
|
|
70
|
+
"email",
|
|
71
|
+
"phone"
|
|
72
|
+
];
|
|
73
|
+
/**
|
|
74
|
+
* True when the record is owned by a host view rather than by the CRM.
|
|
75
|
+
*
|
|
76
|
+
* Deliberately keyed on `sourceRef` and not `entityRole`: `entityRole` is a
|
|
77
|
+
* mapping label that can be absent on a synced row, while `sourceRef` is the
|
|
78
|
+
* identity the sync engine reconciles against and is set for exactly the rows
|
|
79
|
+
* sync will rewrite.
|
|
80
|
+
*/
|
|
81
|
+
function isHostOwned(record) {
|
|
82
|
+
return Boolean(record.sourceRef);
|
|
83
|
+
}
|
|
84
|
+
function rejectedFields(record, patch, owned) {
|
|
85
|
+
if (!isHostOwned(record)) return [];
|
|
86
|
+
return owned.filter((field) => patch[field] !== void 0);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Host-owned contact fields this patch would change, or `[]` when the patch is
|
|
90
|
+
* allowed. Callers turn a non-empty result into a 400 naming the fields.
|
|
91
|
+
*/
|
|
92
|
+
function rejectedContactFields(contact, patch) {
|
|
93
|
+
return rejectedFields(contact, patch, HOST_OWNED_CONTACT_FIELDS);
|
|
94
|
+
}
|
|
95
|
+
/** Host-owned company fields this patch would change, or `[]`. */
|
|
96
|
+
function rejectedCompanyFields(company, patch) {
|
|
97
|
+
return rejectedFields(company, patch, HOST_OWNED_COMPANY_FIELDS);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The message shown when a write is refused. Names the fields and says where
|
|
101
|
+
* they come from, so the reason is actionable rather than a bare "forbidden".
|
|
102
|
+
*/
|
|
103
|
+
function hostOwnedFieldMessage(fields) {
|
|
104
|
+
return `The ${fields.join(", ")} ${fields.length > 1 ? "fields are" : "field is"} synced from your app and cannot be edited here. Change it in your app and it will update on the next sync.`;
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
1
107
|
//#region ../core/src/slug.ts
|
|
2
108
|
/**
|
|
3
109
|
* The one `slugify`.
|
|
@@ -141,4 +247,4 @@ function evaluateStage(rules, fields, mappedFields) {
|
|
|
141
247
|
return null;
|
|
142
248
|
}
|
|
143
249
|
//#endregion
|
|
144
|
-
export { toObjectTypeSlug as i, matchesCondition as n, slugify as r, evaluateStage as t };
|
|
250
|
+
export { hostOwnedFieldMessage as a, rejectedContactFields as c, toObjectTypeSlug as i, computeDealValue as l, matchesCondition as n, isHostOwned as o, slugify as r, rejectedCompanyFields as s, evaluateStage as t };
|
|
@@ -1,4 +1,106 @@
|
|
|
1
|
-
import { L as ProjectionJoin, R as ProjectionMapping, h as FilterExpr, l as ConfigValidationError, m as DiscoveredSchemaTable, p as DiscoveredColumnMeta } from "./entity-config-
|
|
1
|
+
import { L as ProjectionJoin, R as ProjectionMapping, h as FilterExpr, l as ConfigValidationError, m as DiscoveredSchemaTable, p as DiscoveredColumnMeta } from "./entity-config-ApnT5j3X.cjs";
|
|
2
|
+
//#region ../core/src/deal-value.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Value derived as a flat fee plus a per-seat price that depends on the plan.
|
|
5
|
+
*
|
|
6
|
+
* Every field name is configuration and every plan key is data, so a second
|
|
7
|
+
* subscription business configures this without a code change. The formula is
|
|
8
|
+
* fixed with named slots rather than an expression language — the same choice
|
|
9
|
+
* D8 made for stage-rule conditions.
|
|
10
|
+
*/
|
|
11
|
+
interface PerSeatValueSource {
|
|
12
|
+
/** Flat monthly fee in cents, added before the interval is normalised. */
|
|
13
|
+
baseFeeCents?: number;
|
|
14
|
+
/** Mapped column holding "month" or "year". Absent means always monthly. */
|
|
15
|
+
intervalField?: string;
|
|
16
|
+
kind: "per_seat";
|
|
17
|
+
/** Mapped column holding the plan key. */
|
|
18
|
+
planField: string;
|
|
19
|
+
/** Unit price in cents, keyed by the value found in `planField`. */
|
|
20
|
+
plans: Record<string, number>;
|
|
21
|
+
/** Mapped column holding the seat count. */
|
|
22
|
+
seatField: string;
|
|
23
|
+
/** Stage types whose deals are worth nothing (usually `["lost"]`). */
|
|
24
|
+
zeroInStageTypes?: string[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The value one deal should have, in cents, or null to leave it alone.
|
|
28
|
+
*
|
|
29
|
+
* Returning null rather than 0 for unusable input is deliberate (D33). A
|
|
30
|
+
* renamed column would otherwise zero an entire pipeline silently, and a zeroed
|
|
31
|
+
* board reads as a business problem rather than a configuration problem. The
|
|
32
|
+
* unmapped case is surfaced through the rule-health warning surface instead of
|
|
33
|
+
* being written into the data — the same fail-safe `matchesCondition` applies.
|
|
34
|
+
*/
|
|
35
|
+
declare function computeDealValue(source: PerSeatValueSource, fields: Record<string, string | null>, mappedFields: Set<string>, stageType: string): number | null;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region ../core/src/host-owned-fields.d.ts
|
|
38
|
+
/**
|
|
39
|
+
* Which fields a CRM record lets a user edit.
|
|
40
|
+
*
|
|
41
|
+
* A record synced from the host app carries a `sourceRef`. Its identity fields
|
|
42
|
+
* are rewritten from the host view on every sync run, so an edit to one would
|
|
43
|
+
* be silently reverted minutes later — the user sees their change accepted,
|
|
44
|
+
* then gone, with nothing explaining why. That is worse than refusing it.
|
|
45
|
+
*
|
|
46
|
+
* So host-owned fields are rejected at the API, not merely disabled in the UI:
|
|
47
|
+
* the UI is not the security boundary, and the SDK and any future public API
|
|
48
|
+
* reach the same routers.
|
|
49
|
+
*
|
|
50
|
+
* Records created inside the CRM have no `sourceRef` and are fully editable —
|
|
51
|
+
* nothing else owns them.
|
|
52
|
+
*
|
|
53
|
+
* This is the cheap half of a capability matrix. It answers "may a user write
|
|
54
|
+
* this?" but not "may the sync engine write this?", which stays implicit
|
|
55
|
+
* because sync bypasses these routers entirely. An override model (the
|
|
56
|
+
* `stageOverrideAt` pattern on `crm_deals`) can replace this later without
|
|
57
|
+
* changing callers.
|
|
58
|
+
*/
|
|
59
|
+
/** Contact fields the host view owns when the row is synced. */
|
|
60
|
+
declare const HOST_OWNED_CONTACT_FIELDS: readonly ["email", "name"];
|
|
61
|
+
/**
|
|
62
|
+
* Company fields the host view owns when the row is synced.
|
|
63
|
+
*
|
|
64
|
+
* `email` and `phone` joined this list in the same change that made them
|
|
65
|
+
* mappable (migration 0048). They are not identity fields, but ownership here
|
|
66
|
+
* follows what sync rewrites, not what feels identity-like: both flow from the
|
|
67
|
+
* host view on every run, exactly as `email` does for contacts above. Widening
|
|
68
|
+
* `CANONICAL_FIELDS.company` without widening this list is the specific bug
|
|
69
|
+
* this module's doc comment calls worse than refusing the edit.
|
|
70
|
+
*
|
|
71
|
+
* `primaryContactId` is deliberately absent: it is a CRM-side judgement about
|
|
72
|
+
* who to talk to, never sourced from the host, so it stays editable on synced
|
|
73
|
+
* rows.
|
|
74
|
+
*/
|
|
75
|
+
declare const HOST_OWNED_COMPANY_FIELDS: readonly ["domain", "name", "email", "phone"];
|
|
76
|
+
type HostOwnedContactField = (typeof HOST_OWNED_CONTACT_FIELDS)[number];
|
|
77
|
+
type HostOwnedCompanyField = (typeof HOST_OWNED_COMPANY_FIELDS)[number];
|
|
78
|
+
/** The subset of a record this module needs to make its decision. */
|
|
79
|
+
interface SourcedRecord {
|
|
80
|
+
sourceRef?: string | null;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* True when the record is owned by a host view rather than by the CRM.
|
|
84
|
+
*
|
|
85
|
+
* Deliberately keyed on `sourceRef` and not `entityRole`: `entityRole` is a
|
|
86
|
+
* mapping label that can be absent on a synced row, while `sourceRef` is the
|
|
87
|
+
* identity the sync engine reconciles against and is set for exactly the rows
|
|
88
|
+
* sync will rewrite.
|
|
89
|
+
*/
|
|
90
|
+
declare function isHostOwned(record: SourcedRecord): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Host-owned contact fields this patch would change, or `[]` when the patch is
|
|
93
|
+
* allowed. Callers turn a non-empty result into a 400 naming the fields.
|
|
94
|
+
*/
|
|
95
|
+
declare function rejectedContactFields(contact: SourcedRecord, patch: Readonly<Record<string, unknown>>): HostOwnedContactField[];
|
|
96
|
+
/** Host-owned company fields this patch would change, or `[]`. */
|
|
97
|
+
declare function rejectedCompanyFields(company: SourcedRecord, patch: Readonly<Record<string, unknown>>): HostOwnedCompanyField[];
|
|
98
|
+
/**
|
|
99
|
+
* The message shown when a write is refused. Names the fields and says where
|
|
100
|
+
* they come from, so the reason is actionable rather than a bare "forbidden".
|
|
101
|
+
*/
|
|
102
|
+
declare function hostOwnedFieldMessage(fields: readonly string[]): string;
|
|
103
|
+
//#endregion
|
|
2
104
|
//#region ../core/src/projection-cardinality.d.ts
|
|
3
105
|
declare function joinFansOut(join: ProjectionJoin, joinTable: DiscoveredSchemaTable): boolean;
|
|
4
106
|
/** Every join in the projection that can multiply rows. */
|
|
@@ -223,4 +325,4 @@ declare function matchesCondition(condition: Condition, fields: Record<string, s
|
|
|
223
325
|
*/
|
|
224
326
|
declare function evaluateStage(rules: EvaluableRule[], fields: Record<string, string | null>, mappedFields: Set<string>): string | null;
|
|
225
327
|
//#endregion
|
|
226
|
-
export { joinFansOut as S, compileProjectionJoins as _, matchesCondition as a, quoteIdent as b, columnMetaFor as c, primaryKeyColumns as d, validateProjection as f, compileProjectionIdentity as g, compileProjectionFrom as h, evaluateStage as i, coversUniqueKey as l, PREVIEW_MAX_ROWS as m, ConditionOp as n, slugify as o, validateProjectionFilter as p, EvaluableRule as r, toObjectTypeSlug as s, Condition as t, hasRichMeta as u, compileProjectionPreview as v, fanOutJoins as x, compileProjectionSelect as y };
|
|
328
|
+
export { PerSeatValueSource as A, HostOwnedCompanyField as C, isHostOwned as D, hostOwnedFieldMessage as E, rejectedCompanyFields as O, joinFansOut as S, SourcedRecord as T, compileProjectionJoins as _, matchesCondition as a, quoteIdent as b, columnMetaFor as c, primaryKeyColumns as d, validateProjection as f, compileProjectionIdentity as g, compileProjectionFrom as h, evaluateStage as i, computeDealValue as j, rejectedContactFields as k, coversUniqueKey as l, PREVIEW_MAX_ROWS as m, ConditionOp as n, slugify as o, validateProjectionFilter as p, EvaluableRule as r, toObjectTypeSlug as s, Condition as t, hasRichMeta as u, compileProjectionPreview as v, HostOwnedContactField as w, fanOutJoins as x, compileProjectionSelect as y };
|
|
@@ -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-xiwm5iar.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-Cq8apvZ4.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-CwKVoK1w.mjs";
|
|
2
2
|
export { CompileOptions, CompiledView, DEFAULT_VIEW_PREFIX, ExplainResult, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as explainViewExecutionError, i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-
|
|
1
|
+
import { a as explainViewExecutionError, i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-C-6RydKK.mjs";
|
|
2
2
|
export { DEFAULT_VIEW_PREFIX, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
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-BELgANG2.cjs");
|
|
3
|
+
const require_entity_config = require("./entity-config-BI4RYNKL.cjs");
|
|
4
|
+
const require_mappings_config = require("./mappings-config-BCsRLohT.cjs");
|
|
5
5
|
const require_auth_adapter = require("./auth-adapter-CiEXcweZ.cjs");
|
|
6
|
+
const require_internal = require("./internal-BxtvxF7Z.cjs");
|
|
6
7
|
const require_mapping_form = require("./mapping-form-BpfON_ME.cjs");
|
|
7
|
-
const require_projection_sql = require("./projection-sql-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const require_sync_engine = require("./sync-engine-B0FT1ax6.cjs");
|
|
8
|
+
const require_projection_sql = require("./projection-sql-DuCtFE9t.cjs");
|
|
9
|
+
const require_view_compiler = require("./view-compiler-xiwm5iar.cjs");
|
|
10
|
+
const require_sync_engine = require("./sync-engine-Dwm_KDUS.cjs");
|
|
11
11
|
const require_types = require("./types-Cq5gHCTq.cjs");
|
|
12
12
|
exports.BASE_REF = require_projection.BASE_REF;
|
|
13
13
|
exports.CANONICAL_FIELDS = require_entity_config.CANONICAL_FIELDS;
|
|
@@ -30,6 +30,7 @@ exports.compileProjectionIdentity = require_projection_sql.compileProjectionIden
|
|
|
30
30
|
exports.compileProjectionJoins = require_projection_sql.compileProjectionJoins;
|
|
31
31
|
exports.compileProjectionPreview = require_projection_sql.compileProjectionPreview;
|
|
32
32
|
exports.compileProjectionSelect = require_projection_sql.compileProjectionSelect;
|
|
33
|
+
exports.computeDealValue = require_internal.computeDealValue;
|
|
33
34
|
exports.coversUniqueKey = require_entity_config.coversUniqueKey;
|
|
34
35
|
exports.defineClivlyConfig = require_entity_config.defineClivlyConfig;
|
|
35
36
|
exports.entitiesConfigSchema = require_entity_config.entitiesConfigSchema;
|
|
@@ -38,8 +39,10 @@ exports.explainEntitiesConfig = require_view_compiler.explainEntitiesConfig;
|
|
|
38
39
|
exports.fanOutJoins = require_entity_config.fanOutJoins;
|
|
39
40
|
exports.filterSchema = require_entity_config.filterSchema;
|
|
40
41
|
exports.hasRichMeta = require_entity_config.hasRichMeta;
|
|
42
|
+
exports.hostOwnedFieldMessage = require_internal.hostOwnedFieldMessage;
|
|
41
43
|
exports.identityRefs = require_projection.identityRefs;
|
|
42
44
|
exports.isClosedStageType = require_types.isClosedStageType;
|
|
45
|
+
exports.isHostOwned = require_internal.isHostOwned;
|
|
43
46
|
exports.joinFansOut = require_entity_config.joinFansOut;
|
|
44
47
|
exports.mappingsToEntitiesConfig = require_mappings_config.mappingsToEntitiesConfig;
|
|
45
48
|
exports.matchesCondition = require_internal.matchesCondition;
|
|
@@ -49,6 +52,8 @@ exports.projectionFields = require_entity_config.projectionFields;
|
|
|
49
52
|
exports.projectionSchema = require_projection.projectionSchema;
|
|
50
53
|
exports.quoteIdent = require_projection_sql.quoteIdent;
|
|
51
54
|
exports.reconcile = require_sync_engine.reconcile;
|
|
55
|
+
exports.rejectedCompanyFields = require_internal.rejectedCompanyFields;
|
|
56
|
+
exports.rejectedContactFields = require_internal.rejectedContactFields;
|
|
52
57
|
exports.relationshipSchema = require_entity_config.relationshipSchema;
|
|
53
58
|
exports.relationshipViaSignature = require_mapping_form.relationshipViaSignature;
|
|
54
59
|
exports.relationshipsSchema = require_entity_config.relationshipsSchema;
|