clivly 0.9.7 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/{adapter-C2eRbBfo.d.cts → adapter-1TN0zohk.d.cts} +1 -1
- package/{adapter-D5LRa-NA.d.mts → adapter-uxirB88i.d.mts} +1 -1
- package/{auth-adapter-Bjgo8LhN.d.mts → auth-adapter-CXTiW3Mb.d.cts} +1 -1
- package/{auth-adapter-DWzgl5Yq.d.cts → auth-adapter-DSuYwv1c.d.mts} +1 -1
- package/auth-better-auth.d.cts +1 -1
- package/auth-better-auth.d.mts +1 -1
- package/auth-clerk.d.cts +1 -1
- package/auth-clerk.d.mts +1 -1
- package/auth-workos.d.cts +1 -1
- package/auth-workos.d.mts +1 -1
- package/core-adapter.d.cts +1 -1
- package/core-adapter.d.mts +1 -1
- package/core-auth-adapter.d.cts +1 -1
- package/core-auth-adapter.d.mts +1 -1
- package/core-drizzle.d.cts +1 -1
- package/core-drizzle.d.mts +1 -1
- package/core-entity-config.cjs +1 -1
- package/core-entity-config.d.cts +1 -1
- package/core-entity-config.d.mts +1 -1
- package/core-entity-config.mjs +1 -1
- package/core-entity-heuristics.cjs +1 -0
- package/core-entity-heuristics.d.cts +3 -3
- package/core-entity-heuristics.d.mts +3 -3
- package/core-entity-heuristics.mjs +2 -2
- package/core-mapping-form.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.cjs +4 -0
- package/core-types.d.cts +2 -2
- package/core-types.d.mts +2 -2
- package/core-types.mjs +2 -1
- package/core-view-compiler.cjs +1 -1
- package/core-view-compiler.d.cts +1 -1
- package/core-view-compiler.d.mts +1 -1
- package/core-view-compiler.mjs +1 -1
- package/core.cjs +17 -15
- package/core.d.cts +10 -10
- package/core.d.mts +10 -10
- package/core.mjs +9 -8
- package/{drizzle-BmDDgAIF.d.mts → drizzle-DTOuGXEn.d.cts} +1 -1
- package/{drizzle-ixVV4pPN.d.cts → drizzle-SGapoly2.d.mts} +1 -1
- package/drizzle.cjs +2 -2
- package/drizzle.d.cts +3 -3
- package/drizzle.d.mts +3 -3
- package/drizzle.mjs +2 -2
- package/{entity-config-C8IIkrmX.mjs → entity-config-C4d3K9CP.mjs} +81 -4
- package/{entity-config-B2RA53nw.d.cts → entity-config-DNQAMbMS.d.cts} +27 -1
- package/{entity-config-B2RA53nw.d.mts → entity-config-DNQAMbMS.d.mts} +27 -1
- package/{entity-config-CPM-Tp-d.cjs → entity-config-DgAe0_YD.cjs} +86 -3
- package/index.cjs +24 -14
- package/index.mjs +24 -14
- package/internal-BAOG5eE4.d.mts +226 -0
- package/internal-BHJ0X3fC.d.cts +226 -0
- package/internal-Bgiimp5D.mjs +144 -0
- package/internal-Cz59xMj8.cjs +167 -0
- package/internal-adapter.d.cts +1 -1
- package/internal-adapter.d.mts +1 -1
- package/internal-auth-adapter.d.cts +1 -1
- package/internal-auth-adapter.d.mts +1 -1
- package/internal-drizzle.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 +34 -1
- package/internal-entity-heuristics.d.cts +8 -2
- package/internal-entity-heuristics.d.mts +8 -2
- package/internal-entity-heuristics.mjs +34 -2
- package/internal-mapping-form.d.cts +1 -1
- package/internal-mapping-form.d.mts +1 -1
- package/internal-mappings-config.cjs +1 -1
- package/internal-mappings-config.d.cts +1 -1
- package/internal-mappings-config.d.mts +1 -1
- package/internal-mappings-config.mjs +1 -1
- package/internal-sync-engine.cjs +1 -1
- package/internal-sync-engine.d.cts +1 -1
- package/internal-sync-engine.d.mts +1 -1
- package/internal-sync-engine.mjs +1 -1
- package/internal-types.cjs +4 -0
- package/internal-types.d.cts +2 -2
- package/internal-types.d.mts +2 -2
- package/internal-types.mjs +2 -1
- package/internal-view-compiler.cjs +1 -1
- package/internal-view-compiler.d.cts +1 -1
- package/internal-view-compiler.d.mts +1 -1
- package/internal-view-compiler.mjs +1 -1
- package/internal.cjs +17 -15
- package/internal.d.cts +10 -10
- package/internal.d.mts +10 -10
- package/internal.mjs +9 -8
- package/{mapping-form-DH77BXLv.d.mts → mapping-form-Cc7Ewv8c.d.mts} +1 -1
- package/{mapping-form-J0aU6O7l.d.cts → mapping-form-DwdbYAfR.d.cts} +1 -1
- package/{mappings-config-D9dsonoi.d.mts → mappings-config-Be9D43Np.d.mts} +1 -1
- package/{mappings-config-RQLGx8ub.d.cts → mappings-config-DUt4-9iO.d.cts} +1 -1
- package/{mappings-config-CBwL3FVh.cjs → mappings-config-Dx9ldgdf.cjs} +2 -16
- package/{mappings-config-DUKBe6OS.mjs → mappings-config-MoXBeI8p.mjs} +1 -15
- package/{namespace-probe-BQ4imnV7.d.mts → namespace-probe-9ScMDR0t.d.mts} +1 -1
- package/{namespace-probe-DZIGdvlm.d.cts → namespace-probe-DC4tbmLj.d.cts} +1 -1
- package/package.json +1 -1
- package/{projection-hnPSgH6G.mjs → projection-CSGJbZlZ.mjs} +1 -1
- package/{projection-DEwL-D8R.cjs → projection-Dz6_i1-w.cjs} +0 -6
- package/{projection-sql-iHy-Cx6V.cjs → projection-sql-CbXCKt3s.cjs} +1 -1
- package/{projection-sql-9zzTVGvf.mjs → projection-sql-iHoiYr1R.mjs} +1 -1
- package/{sdk-BL9BCzyD.cjs → sdk-B1vX4kUJ.cjs} +26 -6
- package/{sdk-CubnsyD9.mjs → sdk-D6gX0TXS.mjs} +26 -6
- 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-BLgwLpR6.cjs → sync-engine-B0FT1ax6.cjs} +1 -1
- package/{sync-engine-B_IzoUSx.mjs → sync-engine-CTSIcLlZ.mjs} +1 -1
- package/{sync-engine-BG2O1an2.d.cts → sync-engine-Df0kHAoJ.d.cts} +2 -2
- package/{sync-engine-DgQbrJON.d.mts → sync-engine-ugFacJ6G.d.mts} +2 -2
- package/{types-B1oRXdNP.d.mts → types-Cq1uHUKp.d.cts} +28 -2
- package/{types-B1oRXdNP.d.cts → types-Cq1uHUKp.d.mts} +28 -2
- package/types-Cq5gHCTq.cjs +20 -0
- package/types-YJTkXKzU.mjs +9 -0
- package/{view-compiler-D_6gfXFr.mjs → view-compiler-BzKk8nY3.mjs} +2 -2
- package/{view-compiler-Bo7pqXW3.d.mts → view-compiler-D3zp9S3K.d.cts} +1 -1
- package/{view-compiler-CmEdAMwj.d.cts → view-compiler-TpzDTu7z.d.mts} +1 -1
- package/{view-compiler-BHI5E4QI.cjs → view-compiler-ZKZbd3SK.cjs} +2 -2
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
- package/internal-BLKMnIIZ.cjs +0 -259
- package/internal-BpVh_J77.mjs +0 -212
- package/internal-CvlFk3KC.d.mts +0 -180
- package/internal-DGUOLQAq.d.cts +0 -180
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
//#region ../core/src/slug.ts
|
|
2
|
+
/**
|
|
3
|
+
* The one `slugify`.
|
|
4
|
+
*
|
|
5
|
+
* Three byte-identical copies existed before this module — in `@clivly/api`
|
|
6
|
+
* (the custom object-type slug), in `apps/web`'s onboarding route (the
|
|
7
|
+
* organisation slug), and in `@clivly/sdk`. The first two now import this; the
|
|
8
|
+
* SDK's copy stays where it is on purpose, because `@clivly/sdk` cannot depend
|
|
9
|
+
* on this package and its own comment records that its pattern is deliberately
|
|
10
|
+
* kept in step with the server's by hand.
|
|
11
|
+
*
|
|
12
|
+
* Note that the two callers this replaces slug *different things* — an
|
|
13
|
+
* object type and an organisation. They share a transform, not a namespace.
|
|
14
|
+
* Sharing the function stops the transform drifting; it does not make those two
|
|
15
|
+
* identifiers the same identifier.
|
|
16
|
+
*/
|
|
17
|
+
const NON_ALNUM = /[^a-z0-9]+/g;
|
|
18
|
+
const EDGE_HYPHENS = /(^-|-$)/g;
|
|
19
|
+
/**
|
|
20
|
+
* Lowercase, trim, collapse every run of non-alphanumerics to one hyphen, and
|
|
21
|
+
* drop leading/trailing hyphens. `"Participant Info"` becomes
|
|
22
|
+
* `"participant-info"`.
|
|
23
|
+
*
|
|
24
|
+
* The result is NOT guaranteed to be an acceptable slug. Both
|
|
25
|
+
* `OBJECT_TYPE_SLUG_PATTERN` (server) and `PROJECTION_KEY_PATTERN` (this
|
|
26
|
+
* package) require a leading letter, and this function happily returns
|
|
27
|
+
* `"2024-invoices"` for `"2024 Invoices"`. Callers that need an
|
|
28
|
+
* acceptance-guaranteed identifier want `toObjectTypeSlug`.
|
|
29
|
+
*/
|
|
30
|
+
function slugify(value) {
|
|
31
|
+
return value.toLowerCase().trim().replace(NON_ALNUM, "-").replace(EDGE_HYPHENS, "");
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Prefixed onto a slug that would otherwise not start with a letter.
|
|
35
|
+
*
|
|
36
|
+
* Chosen over trimming the offending characters because dropping them loses
|
|
37
|
+
* information the user typed: `"2024 Invoices"` would become `"invoices"`,
|
|
38
|
+
* which collides with a genuinely different object of that name.
|
|
39
|
+
*/
|
|
40
|
+
const LEADING_DIGIT_PREFIX = "obj-";
|
|
41
|
+
/** Mirrors `PROJECTION_KEY_PATTERN` / the server's `OBJECT_TYPE_SLUG_PATTERN`. */
|
|
42
|
+
const MUST_START_WITH_LETTER = /^[a-z]/;
|
|
43
|
+
/**
|
|
44
|
+
* A slug the server will accept, derived from a display name.
|
|
45
|
+
*
|
|
46
|
+
* `slugify` alone is not enough: the server's `OBJECT_TYPE_SLUG_PATTERN`
|
|
47
|
+
* (`apps/server/src/index.ts`) demands a leading letter, so a name beginning
|
|
48
|
+
* with a digit slugs to something the platform rejects at push time — long
|
|
49
|
+
* after the object was authored. `@clivly/sdk`'s `custom-slug.ts` already knows
|
|
50
|
+
* this case and deliberately withholds `"2024-invoices"` as a suggestion
|
|
51
|
+
* because it would be rejected too.
|
|
52
|
+
*
|
|
53
|
+
* The prefix is applied ONLY when the derived slug does not already start with
|
|
54
|
+
* a letter, so the overwhelmingly common name is untouched.
|
|
55
|
+
*
|
|
56
|
+
* This value must be shown to whoever authored the name. It is the identifier
|
|
57
|
+
* the host app declares as its `objectType`, so a slug derived silently is a
|
|
58
|
+
* slug the developer cannot copy into their config.
|
|
59
|
+
*
|
|
60
|
+
* Returns an empty string for a name with no alphanumerics at all — the caller
|
|
61
|
+
* decides whether that is "keep typing" or an error, since only it knows
|
|
62
|
+
* whether the field is still being edited.
|
|
63
|
+
*/
|
|
64
|
+
function toObjectTypeSlug(displayName) {
|
|
65
|
+
const slug = slugify(displayName);
|
|
66
|
+
if (slug === "") return "";
|
|
67
|
+
return MUST_START_WITH_LETTER.test(slug) ? slug : `${LEADING_DIGIT_PREFIX}${slug}`;
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region ../core/src/stage-rules.ts
|
|
71
|
+
const CONDITION_OPS = /* @__PURE__ */ new Set([
|
|
72
|
+
"is_empty",
|
|
73
|
+
"is_not_empty",
|
|
74
|
+
"equals",
|
|
75
|
+
"not_equals",
|
|
76
|
+
"greater_than",
|
|
77
|
+
"less_than",
|
|
78
|
+
"before",
|
|
79
|
+
"after"
|
|
80
|
+
]);
|
|
81
|
+
function isCondition(value) {
|
|
82
|
+
if (!value || typeof value !== "object") return false;
|
|
83
|
+
const condition = value;
|
|
84
|
+
return typeof condition.field === "string" && condition.field.length > 0 && typeof condition.op === "string" && CONDITION_OPS.has(condition.op) && (condition.value === void 0 || typeof condition.value === "string");
|
|
85
|
+
}
|
|
86
|
+
/** Host fields arrive as strings; null and "" are both absent. */
|
|
87
|
+
function isEmpty(value) {
|
|
88
|
+
return value === null || value === void 0 || value === "";
|
|
89
|
+
}
|
|
90
|
+
function compareNumbers(raw, operand, op) {
|
|
91
|
+
const left = Number(raw);
|
|
92
|
+
const right = Number(operand);
|
|
93
|
+
if (Number.isNaN(left) || Number.isNaN(right)) return false;
|
|
94
|
+
return op === "greater_than" ? left > right : left < right;
|
|
95
|
+
}
|
|
96
|
+
function compareDates(raw, operand, op) {
|
|
97
|
+
const left = new Date(raw).getTime();
|
|
98
|
+
const right = new Date(operand ?? "").getTime();
|
|
99
|
+
if (Number.isNaN(left) || Number.isNaN(right)) return false;
|
|
100
|
+
return op === "before" ? left < right : left > right;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Whether one condition holds for a host row.
|
|
104
|
+
*
|
|
105
|
+
* `mappedFields` is the set of columns the organization actually exposed. A
|
|
106
|
+
* condition naming anything outside it never matches, whatever the operator: a
|
|
107
|
+
* rule referencing a dropped column must fail safe, because treating the field
|
|
108
|
+
* as null would make `is_empty` match every deal.
|
|
109
|
+
*/
|
|
110
|
+
function matchesCondition(condition, fields, mappedFields) {
|
|
111
|
+
if (!mappedFields.has(condition.field)) return false;
|
|
112
|
+
const raw = fields[condition.field] ?? null;
|
|
113
|
+
if (condition.op === "is_empty") return isEmpty(raw);
|
|
114
|
+
if (condition.op === "is_not_empty") return !isEmpty(raw);
|
|
115
|
+
if (isEmpty(raw)) return false;
|
|
116
|
+
const value = raw;
|
|
117
|
+
if (condition.op === "equals") return value === condition.value;
|
|
118
|
+
if (condition.op === "not_equals") return value !== condition.value;
|
|
119
|
+
if (condition.op === "greater_than" || condition.op === "less_than") return compareNumbers(value, condition.value, condition.op);
|
|
120
|
+
return compareDates(value, condition.value, condition.op);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The id of the first rule whose conditions all hold, or null when none do.
|
|
124
|
+
*
|
|
125
|
+
* Returns a rule id rather than a stage key because the caller needs the
|
|
126
|
+
* matched rule's `allowClose` before it may move a deal into a closed stage.
|
|
127
|
+
*
|
|
128
|
+
* `rules` must arrive already ordered — stage position first, then rule
|
|
129
|
+
* position within a stage. Sorting needs stage rows this module deliberately
|
|
130
|
+
* does not see.
|
|
131
|
+
*
|
|
132
|
+
* A rule with no conditions never matches: an empty list would otherwise
|
|
133
|
+
* vacuously AND to true and capture every deal, which is the opposite of what
|
|
134
|
+
* a half-written rule should do.
|
|
135
|
+
*/
|
|
136
|
+
function evaluateStage(rules, fields, mappedFields) {
|
|
137
|
+
for (const rule of rules) {
|
|
138
|
+
if (!Array.isArray(rule.conditions) || rule.conditions.length === 0 || !rule.conditions.every(isCondition)) continue;
|
|
139
|
+
if (rule.conditions.every((condition) => matchesCondition(condition, fields, mappedFields))) return rule.id;
|
|
140
|
+
}
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
Object.defineProperty(exports, "evaluateStage", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function() {
|
|
147
|
+
return evaluateStage;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
Object.defineProperty(exports, "matchesCondition", {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
get: function() {
|
|
153
|
+
return matchesCondition;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(exports, "slugify", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function() {
|
|
159
|
+
return slugify;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
Object.defineProperty(exports, "toObjectTypeSlug", {
|
|
163
|
+
enumerable: true,
|
|
164
|
+
get: function() {
|
|
165
|
+
return toObjectTypeSlug;
|
|
166
|
+
}
|
|
167
|
+
});
|
package/internal-adapter.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CRMAdapter } from "./adapter-
|
|
1
|
+
import { t as CRMAdapter } from "./adapter-1TN0zohk.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-uxirB88i.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-CXTiW3Mb.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-DSuYwv1c.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-DTOuGXEn.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-SGapoly2.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-DgAe0_YD.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 { C as defineClivlyConfig, D as relationshipSchema, E as projectionFields, O as relationshipsSchema, S as customObjectDeclarations, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, k as validateEntitiesConfig, 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 entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-
|
|
1
|
+
import { C as defineClivlyConfig, D as relationshipSchema, E as projectionFields, O as relationshipsSchema, S as customObjectDeclarations, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, k as validateEntitiesConfig, 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 entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-DNQAMbMS.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, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as defineClivlyConfig, D as relationshipSchema, E as projectionFields, O as relationshipsSchema, S as customObjectDeclarations, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, k as validateEntitiesConfig, 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 entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-
|
|
1
|
+
import { C as defineClivlyConfig, D as relationshipSchema, E as projectionFields, O as relationshipsSchema, S as customObjectDeclarations, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, k as validateEntitiesConfig, 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 entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-DNQAMbMS.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, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MATERIALIZING_CONCEPTS, c as entitiesConfigSchema, d as relationshipSchema, f as relationshipsSchema, i as ClivlyConfigError, l as filterSchema, n as CRM_CONCEPTS, o as customObjectDeclarations, p as validateEntitiesConfig, r as CUSTOM_CONCEPT, s as defineClivlyConfig, t as CANONICAL_FIELDS, u as projectionFields } from "./entity-config-
|
|
1
|
+
import { a as MATERIALIZING_CONCEPTS, c as entitiesConfigSchema, d as relationshipSchema, f as relationshipsSchema, i as ClivlyConfigError, l as filterSchema, n as CRM_CONCEPTS, o as customObjectDeclarations, p as validateEntitiesConfig, r as CUSTOM_CONCEPT, s as defineClivlyConfig, t as CANONICAL_FIELDS, u as projectionFields } from "./entity-config-C4d3K9CP.mjs";
|
|
2
2
|
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, MATERIALIZING_CONCEPTS, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, projectionFields, relationshipSchema, relationshipsSchema, validateEntitiesConfig };
|
|
@@ -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-DgAe0_YD.cjs");
|
|
3
3
|
const require_mapping_score = require("./mapping-score-CaB3F4Uu.cjs");
|
|
4
4
|
//#region ../core/src/entity-heuristics.ts
|
|
5
5
|
const TARGET_CONCEPTS = [
|
|
@@ -251,6 +251,38 @@ function matchesConcept(tableName, concept) {
|
|
|
251
251
|
if (entry.names.some((name) => candidates.some((candidate) => candidate.includes(name)))) return { exact: false };
|
|
252
252
|
return null;
|
|
253
253
|
}
|
|
254
|
+
const SENSITIVE_COLUMNS = /* @__PURE__ */ new Set([
|
|
255
|
+
"password",
|
|
256
|
+
"password_hash",
|
|
257
|
+
"passwordhash",
|
|
258
|
+
"access_token",
|
|
259
|
+
"accesstoken",
|
|
260
|
+
"api_key",
|
|
261
|
+
"apikey",
|
|
262
|
+
"client_secret",
|
|
263
|
+
"clientsecret",
|
|
264
|
+
"encrypted_password",
|
|
265
|
+
"encryptedpassword",
|
|
266
|
+
"refresh_token",
|
|
267
|
+
"refreshtoken",
|
|
268
|
+
"id_token",
|
|
269
|
+
"idtoken",
|
|
270
|
+
"password_digest",
|
|
271
|
+
"passworddigest",
|
|
272
|
+
"private_key",
|
|
273
|
+
"privatekey",
|
|
274
|
+
"secret",
|
|
275
|
+
"session_token",
|
|
276
|
+
"sessiontoken"
|
|
277
|
+
]);
|
|
278
|
+
/**
|
|
279
|
+
* Does this table carry credentials? Such tables are withheld from suggestions
|
|
280
|
+
* and from bulk apply, so one click can never map an auth table into the CRM.
|
|
281
|
+
* They stay manually selectable — an explicit, informed choice is legitimate.
|
|
282
|
+
*/
|
|
283
|
+
function hasSensitiveColumns(columns) {
|
|
284
|
+
return columns.some((column) => SENSITIVE_COLUMNS.has(column.toLowerCase().replaceAll("-", "_")));
|
|
285
|
+
}
|
|
254
286
|
function metaFor(table, column) {
|
|
255
287
|
return table.columnsMeta?.find((c) => c.name === column);
|
|
256
288
|
}
|
|
@@ -463,6 +495,7 @@ function toFieldMap(scored) {
|
|
|
463
495
|
}
|
|
464
496
|
//#endregion
|
|
465
497
|
exports.TARGET_CONCEPTS = TARGET_CONCEPTS;
|
|
498
|
+
exports.hasSensitiveColumns = hasSensitiveColumns;
|
|
466
499
|
exports.matchesConcept = matchesConcept;
|
|
467
500
|
exports.requiredFieldsFor = requiredFieldsFor;
|
|
468
501
|
exports.scoreConcepts = scoreConcepts;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as DiscoveredColumnMeta } from "./entity-config-
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-DNQAMbMS.cjs";
|
|
2
2
|
import { a as Scored } from "./mapping-score-D7Gzg7Ii.cjs";
|
|
3
3
|
//#region ../core/src/entity-heuristics.d.ts
|
|
4
4
|
declare const TARGET_CONCEPTS: readonly ["contact", "company", "deal", "activity", "conversation", "note"];
|
|
@@ -13,6 +13,12 @@ interface ScoredTable {
|
|
|
13
13
|
name: string;
|
|
14
14
|
rowCount?: number;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Does this table carry credentials? Such tables are withheld from suggestions
|
|
18
|
+
* and from bulk apply, so one click can never map an auth table into the CRM.
|
|
19
|
+
* They stay manually selectable — an explicit, informed choice is legitimate.
|
|
20
|
+
*/
|
|
21
|
+
declare function hasSensitiveColumns(columns: string[]): boolean;
|
|
16
22
|
declare function scoreConcepts(table: ScoredTable): Scored<TargetConcept>[];
|
|
17
23
|
declare function topConcept(table: ScoredTable): {
|
|
18
24
|
best: Scored<TargetConcept>;
|
|
@@ -54,4 +60,4 @@ interface FieldSuggestion {
|
|
|
54
60
|
declare function scoreFieldMap(concept: TargetConcept, table: ScoredTable): Scored<FieldSuggestion>[];
|
|
55
61
|
declare function toFieldMap(scored: Scored<FieldSuggestion>[]): Record<string, string>;
|
|
56
62
|
//#endregion
|
|
57
|
-
export { type DiscoveredColumnMeta, FieldSuggestion, RelationshipSuggestion, ScoredTable, SuggestedVia, TARGET_CONCEPTS, TargetConcept, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping };
|
|
63
|
+
export { type DiscoveredColumnMeta, FieldSuggestion, RelationshipSuggestion, ScoredTable, SuggestedVia, TARGET_CONCEPTS, TargetConcept, hasSensitiveColumns, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as DiscoveredColumnMeta } from "./entity-config-
|
|
1
|
+
import { p as DiscoveredColumnMeta } from "./entity-config-DNQAMbMS.mjs";
|
|
2
2
|
import { a as Scored } from "./mapping-score-D7Gzg7Ii.mjs";
|
|
3
3
|
//#region ../core/src/entity-heuristics.d.ts
|
|
4
4
|
declare const TARGET_CONCEPTS: readonly ["contact", "company", "deal", "activity", "conversation", "note"];
|
|
@@ -13,6 +13,12 @@ interface ScoredTable {
|
|
|
13
13
|
name: string;
|
|
14
14
|
rowCount?: number;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Does this table carry credentials? Such tables are withheld from suggestions
|
|
18
|
+
* and from bulk apply, so one click can never map an auth table into the CRM.
|
|
19
|
+
* They stay manually selectable — an explicit, informed choice is legitimate.
|
|
20
|
+
*/
|
|
21
|
+
declare function hasSensitiveColumns(columns: string[]): boolean;
|
|
16
22
|
declare function scoreConcepts(table: ScoredTable): Scored<TargetConcept>[];
|
|
17
23
|
declare function topConcept(table: ScoredTable): {
|
|
18
24
|
best: Scored<TargetConcept>;
|
|
@@ -54,4 +60,4 @@ interface FieldSuggestion {
|
|
|
54
60
|
declare function scoreFieldMap(concept: TargetConcept, table: ScoredTable): Scored<FieldSuggestion>[];
|
|
55
61
|
declare function toFieldMap(scored: Scored<FieldSuggestion>[]): Record<string, string>;
|
|
56
62
|
//#endregion
|
|
57
|
-
export { type DiscoveredColumnMeta, FieldSuggestion, RelationshipSuggestion, ScoredTable, SuggestedVia, TARGET_CONCEPTS, TargetConcept, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping };
|
|
63
|
+
export { type DiscoveredColumnMeta, FieldSuggestion, RelationshipSuggestion, ScoredTable, SuggestedVia, TARGET_CONCEPTS, TargetConcept, hasSensitiveColumns, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MATERIALIZING_CONCEPTS } from "./entity-config-
|
|
1
|
+
import { a as MATERIALIZING_CONCEPTS } from "./entity-config-C4d3K9CP.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 = [
|
|
@@ -250,6 +250,38 @@ function matchesConcept(tableName, concept) {
|
|
|
250
250
|
if (entry.names.some((name) => candidates.some((candidate) => candidate.includes(name)))) return { exact: false };
|
|
251
251
|
return null;
|
|
252
252
|
}
|
|
253
|
+
const SENSITIVE_COLUMNS = /* @__PURE__ */ new Set([
|
|
254
|
+
"password",
|
|
255
|
+
"password_hash",
|
|
256
|
+
"passwordhash",
|
|
257
|
+
"access_token",
|
|
258
|
+
"accesstoken",
|
|
259
|
+
"api_key",
|
|
260
|
+
"apikey",
|
|
261
|
+
"client_secret",
|
|
262
|
+
"clientsecret",
|
|
263
|
+
"encrypted_password",
|
|
264
|
+
"encryptedpassword",
|
|
265
|
+
"refresh_token",
|
|
266
|
+
"refreshtoken",
|
|
267
|
+
"id_token",
|
|
268
|
+
"idtoken",
|
|
269
|
+
"password_digest",
|
|
270
|
+
"passworddigest",
|
|
271
|
+
"private_key",
|
|
272
|
+
"privatekey",
|
|
273
|
+
"secret",
|
|
274
|
+
"session_token",
|
|
275
|
+
"sessiontoken"
|
|
276
|
+
]);
|
|
277
|
+
/**
|
|
278
|
+
* Does this table carry credentials? Such tables are withheld from suggestions
|
|
279
|
+
* and from bulk apply, so one click can never map an auth table into the CRM.
|
|
280
|
+
* They stay manually selectable — an explicit, informed choice is legitimate.
|
|
281
|
+
*/
|
|
282
|
+
function hasSensitiveColumns(columns) {
|
|
283
|
+
return columns.some((column) => SENSITIVE_COLUMNS.has(column.toLowerCase().replaceAll("-", "_")));
|
|
284
|
+
}
|
|
253
285
|
function metaFor(table, column) {
|
|
254
286
|
return table.columnsMeta?.find((c) => c.name === column);
|
|
255
287
|
}
|
|
@@ -461,4 +493,4 @@ function toFieldMap(scored) {
|
|
|
461
493
|
return map;
|
|
462
494
|
}
|
|
463
495
|
//#endregion
|
|
464
|
-
export { TARGET_CONCEPTS, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping };
|
|
496
|
+
export { TARGET_CONCEPTS, hasSensitiveColumns, matchesConcept, requiredFieldsFor, scoreConcepts, scoreFieldMap, scoreRelationships, suggestCursorField, suggestDiscriminatorColumns, toFieldMap, topConcept, validateMapping };
|
|
@@ -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-DwdbYAfR.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-Cc7Ewv8c.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-Dx9ldgdf.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-DUt4-9iO.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-Be9D43Np.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-MoXBeI8p.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-B0FT1ax6.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-Df0kHAoJ.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-ugFacJ6G.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-CTSIcLlZ.mjs";
|
|
2
2
|
export { computeSampleWarnings, previewSync, reconcile, runSync };
|
package/internal-types.cjs
CHANGED
package/internal-types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as UpdateDealInput, S as
|
|
2
|
-
export { Activity, ActivityType, Company, Contact, ContactFilters, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmRole, Deal, DealStage, Note, RecordSource, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateContactInput, UpdateDealInput, UpdateTaskInput };
|
|
1
|
+
import { A as ValueInterval, C as TaskEntityType, D as UpdateContactInput, E as TaskStatus, O as UpdateDealInput, S as Task, T as TaskPriority, _ as PipelineConfig, a as ContactFilters, b as RecordSource, c as CreateCompanyInput, d as CreateTaskInput, f as CrmRole, g as OPEN_STAGE_TYPE, h as Note, i as Contact, j as isClosedStageType, k as UpdateTaskInput, l as CreateContactInput, m as DealStage, n as ActivityType, o as ContactStatus, p as Deal, r as Company, s as CreateActivityInput, t as Activity, u as CreateDealInput, v as PipelineKind, w as TaskFilters, x as StageType, y as PipelineStageConfig } from "./types-Cq1uHUKp.cjs";
|
|
2
|
+
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 };
|
package/internal-types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as UpdateDealInput, S as
|
|
2
|
-
export { Activity, ActivityType, Company, Contact, ContactFilters, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmRole, Deal, DealStage, Note, RecordSource, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateContactInput, UpdateDealInput, UpdateTaskInput };
|
|
1
|
+
import { A as ValueInterval, C as TaskEntityType, D as UpdateContactInput, E as TaskStatus, O as UpdateDealInput, S as Task, T as TaskPriority, _ as PipelineConfig, a as ContactFilters, b as RecordSource, c as CreateCompanyInput, d as CreateTaskInput, f as CrmRole, g as OPEN_STAGE_TYPE, h as Note, i as Contact, j as isClosedStageType, k as UpdateTaskInput, l as CreateContactInput, m as DealStage, n as ActivityType, o as ContactStatus, p as Deal, r as Company, s as CreateActivityInput, t as Activity, u as CreateDealInput, v as PipelineKind, w as TaskFilters, x as StageType, y as PipelineStageConfig } from "./types-Cq1uHUKp.mjs";
|
|
2
|
+
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 };
|
package/internal-types.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { n as isClosedStageType, t as OPEN_STAGE_TYPE } from "./types-YJTkXKzU.mjs";
|
|
2
|
+
export { OPEN_STAGE_TYPE, 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-ZKZbd3SK.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-D3zp9S3K.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-TpzDTu7z.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-BzKk8nY3.mjs";
|
|
2
2
|
export { DEFAULT_VIEW_PREFIX, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
package/internal.cjs
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
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-Dz6_i1-w.cjs");
|
|
3
|
+
const require_entity_config = require("./entity-config-DgAe0_YD.cjs");
|
|
4
|
+
const require_mappings_config = require("./mappings-config-Dx9ldgdf.cjs");
|
|
5
5
|
const require_auth_adapter = require("./auth-adapter-CiEXcweZ.cjs");
|
|
6
6
|
const require_mapping_form = require("./mapping-form-BpfON_ME.cjs");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const require_view_compiler = require("./view-compiler-
|
|
10
|
-
const require_sync_engine = require("./sync-engine-
|
|
7
|
+
const require_projection_sql = require("./projection-sql-CbXCKt3s.cjs");
|
|
8
|
+
const require_internal = require("./internal-Cz59xMj8.cjs");
|
|
9
|
+
const require_view_compiler = require("./view-compiler-ZKZbd3SK.cjs");
|
|
10
|
+
const require_sync_engine = require("./sync-engine-B0FT1ax6.cjs");
|
|
11
|
+
const require_types = require("./types-Cq5gHCTq.cjs");
|
|
11
12
|
exports.BASE_REF = require_projection.BASE_REF;
|
|
12
13
|
exports.CANONICAL_FIELDS = require_entity_config.CANONICAL_FIELDS;
|
|
13
14
|
exports.CRM_CONCEPTS = require_entity_config.CRM_CONCEPTS;
|
|
14
15
|
exports.ClivlyConfigError = require_entity_config.ClivlyConfigError;
|
|
15
16
|
exports.DEFAULT_VIEW_PREFIX = require_view_compiler.DEFAULT_VIEW_PREFIX;
|
|
16
17
|
exports.MATERIALIZING_CONCEPTS = require_entity_config.MATERIALIZING_CONCEPTS;
|
|
18
|
+
exports.OPEN_STAGE_TYPE = require_types.OPEN_STAGE_TYPE;
|
|
17
19
|
exports.PREVIEW_MAX_ROWS = require_projection_sql.PREVIEW_MAX_ROWS;
|
|
18
|
-
exports.
|
|
20
|
+
exports.PROJECTION_KEY_PATTERN = require_projection.PROJECTION_KEY_PATTERN;
|
|
19
21
|
exports.authCustom = require_auth_adapter.authCustom;
|
|
20
22
|
exports.buildFilterFromDiscriminator = require_mapping_form.buildFilterFromDiscriminator;
|
|
21
23
|
exports.buildRelationships = require_mapping_form.buildRelationships;
|
|
@@ -29,28 +31,28 @@ exports.compileProjectionPreview = require_projection_sql.compileProjectionPrevi
|
|
|
29
31
|
exports.compileProjectionSelect = require_projection_sql.compileProjectionSelect;
|
|
30
32
|
exports.coversUniqueKey = require_entity_config.coversUniqueKey;
|
|
31
33
|
exports.defineClivlyConfig = require_entity_config.defineClivlyConfig;
|
|
32
|
-
exports.describeCardinality = require_internal.describeCardinality;
|
|
33
|
-
exports.draftErrors = require_internal.draftErrors;
|
|
34
|
-
exports.draftRefOptions = require_internal.draftRefOptions;
|
|
35
|
-
exports.draftToProjection = require_internal.draftToProjection;
|
|
36
|
-
exports.emptyProjectionDraft = require_internal.emptyProjectionDraft;
|
|
37
34
|
exports.entitiesConfigSchema = require_entity_config.entitiesConfigSchema;
|
|
35
|
+
exports.evaluateStage = require_internal.evaluateStage;
|
|
38
36
|
exports.explainEntitiesConfig = require_view_compiler.explainEntitiesConfig;
|
|
39
37
|
exports.fanOutJoins = require_entity_config.fanOutJoins;
|
|
40
38
|
exports.filterSchema = require_entity_config.filterSchema;
|
|
41
39
|
exports.hasRichMeta = require_entity_config.hasRichMeta;
|
|
42
40
|
exports.identityRefs = require_projection.identityRefs;
|
|
41
|
+
exports.isClosedStageType = require_types.isClosedStageType;
|
|
43
42
|
exports.joinFansOut = require_entity_config.joinFansOut;
|
|
44
43
|
exports.mappingsToEntitiesConfig = require_mappings_config.mappingsToEntitiesConfig;
|
|
44
|
+
exports.matchesCondition = require_internal.matchesCondition;
|
|
45
45
|
exports.primaryKeyColumns = require_entity_config.primaryKeyColumns;
|
|
46
|
+
exports.projectionFields = require_entity_config.projectionFields;
|
|
46
47
|
exports.projectionSchema = require_projection.projectionSchema;
|
|
47
48
|
exports.quoteIdent = require_projection_sql.quoteIdent;
|
|
48
49
|
exports.reconcile = require_sync_engine.reconcile;
|
|
49
50
|
exports.relationshipSchema = require_entity_config.relationshipSchema;
|
|
50
51
|
exports.relationshipViaSignature = require_mapping_form.relationshipViaSignature;
|
|
51
52
|
exports.relationshipsSchema = require_entity_config.relationshipsSchema;
|
|
52
|
-
exports.removeDraftJoin = require_internal.removeDraftJoin;
|
|
53
53
|
exports.runSync = require_sync_engine.runSync;
|
|
54
|
-
exports.
|
|
54
|
+
exports.slugify = require_internal.slugify;
|
|
55
|
+
exports.toObjectTypeSlug = require_internal.toObjectTypeSlug;
|
|
55
56
|
exports.validateEntitiesConfig = require_entity_config.validateEntitiesConfig;
|
|
56
57
|
exports.validateProjection = require_entity_config.validateProjection;
|
|
58
|
+
exports.validateProjectionFilter = require_entity_config.validateProjectionFilter;
|
package/internal.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { C as UpdateDealInput, S as
|
|
2
|
-
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-
|
|
3
|
-
import { t as CRMAdapter } from "./adapter-
|
|
4
|
-
import { A as BASE_REF, C as defineClivlyConfig, D as relationshipSchema, F as
|
|
5
|
-
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-
|
|
6
|
-
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-
|
|
7
|
-
import { a as compileEntityView, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-
|
|
8
|
-
import { c as SyncResult, f as reconcile, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult } from "./sync-engine-
|
|
1
|
+
import { A as ValueInterval, C as TaskEntityType, D as UpdateContactInput, E as TaskStatus, O as UpdateDealInput, S as Task, T as TaskPriority, _ as PipelineConfig, a as ContactFilters, b as RecordSource, c as CreateCompanyInput, d as CreateTaskInput, f as CrmRole, g as OPEN_STAGE_TYPE, h as Note, i as Contact, j as isClosedStageType, k as UpdateTaskInput, l as CreateContactInput, m as DealStage, n as ActivityType, o as ContactStatus, p as Deal, r as Company, s as CreateActivityInput, t as Activity, u as CreateDealInput, v as PipelineKind, w as TaskFilters, x as StageType, y as PipelineStageConfig } from "./types-Cq1uHUKp.cjs";
|
|
2
|
+
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-CXTiW3Mb.cjs";
|
|
3
|
+
import { t as CRMAdapter } from "./adapter-1TN0zohk.cjs";
|
|
4
|
+
import { A as BASE_REF, C as defineClivlyConfig, D as relationshipSchema, E as projectionFields, F as ProjectionMapping, I as ProjectionRef, L as identityRefs, M as ProjectionFieldBinding, N as ProjectionIdentity, O as relationshipsSchema, P as ProjectionJoin, R as projectionSchema, T as filterSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipVia, d as CrmConcept, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as PROJECTION_KEY_PATTERN, k as validateEntitiesConfig, l as ConfigValidationError, m as DiscoveredSchemaTable, n as CRM_CONCEPTS, p as DiscoveredColumnMeta, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as entitiesConfigSchema, x as RelationshipsMap, y as RelationshipSpec } from "./entity-config-DNQAMbMS.cjs";
|
|
5
|
+
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-DwdbYAfR.cjs";
|
|
6
|
+
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-DUt4-9iO.cjs";
|
|
7
|
+
import { a as compileEntityView, i as ExplainResult, n as CompiledView, o as compileEntityViews, r as DEFAULT_VIEW_PREFIX, s as explainEntitiesConfig, t as CompileOptions } from "./view-compiler-D3zp9S3K.cjs";
|
|
8
|
+
import { c as SyncResult, f as reconcile, l as SyncStore, n as MirrorRecord, o as SourceRow, p as runSync, r as PersistAction, s as SyncAction, t as EntitySyncResult } from "./sync-engine-Df0kHAoJ.cjs";
|
|
9
9
|
import { a as IntegrationStep, c as StepProblem, i as IntegrationStatus, l as StepState, n as IntegrationFacts, o as NextAction, r as IntegrationState, s as StepId, t as ConnectionLiveness } from "./integration-state-BK-riZnm.cjs";
|
|
10
|
-
import {
|
|
11
|
-
export { type Activity, type ActivityType, BASE_REF, CANONICAL_FIELDS, type CRMAdapter, CRM_CONCEPTS, type ClivlyAuthAdapter, ClivlyConfigError, type ClivlyEntitiesConfig, type ClivlyEntityConfig, type ClivlyUser, type Company, type CompileOptions, type CompiledView, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, type Contact, type ContactFilters, type ContactStatus, type CreateActivityInput, type CreateCompanyInput, type CreateContactInput, type CreateDealInput, type CreateTaskInput, type CrmConcept, type CrmMembership, type CrmRole, DEFAULT_VIEW_PREFIX, type Deal, type DealStage, type DiscoveredColumnMeta, type DiscoveredSchemaTable, type
|
|
10
|
+
import { S as joinFansOut, _ as compileProjectionJoins, a as matchesCondition, b as quoteIdent, c as columnMetaFor, d as primaryKeyColumns, f as validateProjection, g as compileProjectionIdentity, h as compileProjectionFrom, i as evaluateStage, l as coversUniqueKey, m as PREVIEW_MAX_ROWS, n as ConditionOp, o as slugify, p as validateProjectionFilter, r as EvaluableRule, s as toObjectTypeSlug, t as Condition, u as hasRichMeta, v as compileProjectionPreview, x as fanOutJoins, y as compileProjectionSelect } from "./internal-BHJ0X3fC.cjs";
|
|
11
|
+
export { type Activity, type ActivityType, BASE_REF, CANONICAL_FIELDS, type CRMAdapter, CRM_CONCEPTS, type ClivlyAuthAdapter, ClivlyConfigError, type ClivlyEntitiesConfig, type ClivlyEntityConfig, type ClivlyUser, type Company, type CompileOptions, type CompiledView, type Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, type Contact, type ContactFilters, type ContactStatus, type CreateActivityInput, type CreateCompanyInput, type CreateContactInput, type CreateDealInput, type CreateTaskInput, type CrmConcept, type CrmMembership, type CrmRole, DEFAULT_VIEW_PREFIX, type Deal, type DealStage, type DiscoveredColumnMeta, type DiscoveredSchemaTable, type EntityMappingRow, type EntitySyncResult, type EvaluableRule, type ExplainResult, type FilterExpr, type FilterValue, type IntegrationFacts, type IntegrationState, type IntegrationStatus, type IntegrationStep, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type NextAction, type Note, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, type StageType, type StepId, type StepProblem, type StepState, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, isClosedStageType, joinFansOut, mappingsToEntitiesConfig, matchesCondition, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|