clivly 0.10.9 → 0.11.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-BWrOtOw5.d.mts +83 -0
- package/adapter-Bd5HjLYa.d.cts +83 -0
- package/{auth-adapter-CXTiW3Mb.d.cts → auth-adapter-C3BQpc-q.d.cts} +1 -1
- package/{auth-adapter-DSuYwv1c.d.mts → auth-adapter-D54ajbl7.d.mts} +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 +11 -7
- package/core.d.cts +10 -10
- package/core.d.mts +10 -10
- package/core.mjs +8 -8
- package/{drizzle-SD8WCvYj.d.cts → drizzle-CiK37zJm.d.cts} +1 -1
- package/{drizzle-axugRJ0u.d.mts → drizzle-ehVWLSrN.d.mts} +1 -1
- package/drizzle.cjs +2 -2
- package/drizzle.d.cts +9 -9
- package/drizzle.d.mts +9 -9
- package/drizzle.mjs +2 -2
- package/{entity-config-w8oMBWf8.d.cts → entity-config-ApnT5j3X.d.cts} +1735 -17
- package/{entity-config-C2MfIDL2.cjs → entity-config-BI4RYNKL.cjs} +19 -2
- package/{entity-config-w8oMBWf8.d.mts → entity-config-CKcj4-M_.d.mts} +1736 -17
- package/{entity-config-bC3DX9f1.mjs → entity-config-Ccfb2IL9.mjs} +28 -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-CHvZMvxC.d.cts → internal-Bjpq7S2G.d.mts} +69 -2
- package/{internal-Cz59xMj8.cjs → internal-CRIgf9jS.cjs} +102 -0
- package/{internal-WximMGmH.d.mts → internal-D9kqkhPs.d.cts} +69 -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 +43 -24
- package/internal-entity-heuristics.d.cts +21 -21
- package/internal-entity-heuristics.d.mts +21 -21
- package/internal-entity-heuristics.mjs +43 -24
- 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-v6P9MZY1.mjs} +79 -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 +11 -7
- package/internal.d.cts +10 -10
- package/internal.d.mts +10 -10
- package/internal.mjs +8 -8
- package/{mapping-form-BsTxv8w3.d.cts → mapping-form-Btn-7gzv.d.mts} +1 -1
- package/{mapping-form-OTFwr1sN.d.mts → mapping-form-XsLLCqW_.d.cts} +1 -1
- package/{mappings-config-Dpv08-x4.cjs → mappings-config-BCsRLohT.cjs} +2 -1
- package/{mappings-config-CRSL9dzw.mjs → mappings-config-CwQNQ6bA.mjs} +2 -1
- package/{mappings-config-DbznSjTX.d.cts → mappings-config-D6_oCi2Q.d.mts} +3 -1
- package/{mappings-config-SXu_zlmp.d.mts → mappings-config-iJzbcUMp.d.cts} +3 -1
- package/{namespace-probe-C3xMOqWE.d.cts → namespace-probe-C5RLl74M.d.cts} +1 -1
- package/{namespace-probe-BmxtnOfc.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-BIYu0N3V.cjs → sdk-BvGSxBQc.cjs} +3 -3
- package/{sdk-DofHordq.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-CUKWXUv7.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-D2YlIHZB.d.cts → sync-engine-V3_UutGv.d.cts} +2 -2
- package/{types-Cq1uHUKp.d.mts → types-D08UzDqe.d.cts} +69 -2
- package/{types-Cq1uHUKp.d.cts → types-D08UzDqe.d.mts} +69 -2
- package/{view-compiler-BzKk8nY3.mjs → view-compiler-C-6RydKK.mjs} +2 -2
- package/{view-compiler-BO4CKamn.d.cts → view-compiler-Cq8apvZ4.d.cts} +1 -1
- package/{view-compiler-iEwUOuba.d.mts → 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-1TN0zohk.d.cts +0 -45
- package/adapter-uxirB88i.d.mts +0 -45
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as _enum, c as literal, d as strictObject, f as string, i as projectionSchema, l as number, o as array, p as union, r as identityRefs, s as boolean, t as BASE_REF, u as record } from "./projection-
|
|
1
|
+
import { a as _enum, c as literal, d as strictObject, f as string, i as projectionSchema, l as number, o as array, p as union, r as identityRefs, s as boolean, t as BASE_REF, u as record } from "./projection-DvNewmI1.mjs";
|
|
2
2
|
//#region ../core/src/schema-meta.ts
|
|
3
3
|
/**
|
|
4
4
|
* Accessors over a discovered table's schema-v2 metadata.
|
|
@@ -399,6 +399,7 @@ const CANONICAL_FIELDS = {
|
|
|
399
399
|
contact: [
|
|
400
400
|
"name",
|
|
401
401
|
"email",
|
|
402
|
+
"phone",
|
|
402
403
|
"title",
|
|
403
404
|
"status"
|
|
404
405
|
],
|
|
@@ -406,7 +407,9 @@ const CANONICAL_FIELDS = {
|
|
|
406
407
|
"name",
|
|
407
408
|
"domain",
|
|
408
409
|
"industry",
|
|
409
|
-
"size"
|
|
410
|
+
"size",
|
|
411
|
+
"email",
|
|
412
|
+
"phone"
|
|
410
413
|
],
|
|
411
414
|
deal: [
|
|
412
415
|
"name",
|
|
@@ -504,8 +507,16 @@ const filterValueSchema = union([
|
|
|
504
507
|
boolean(),
|
|
505
508
|
filterOperatorsSchema
|
|
506
509
|
]);
|
|
510
|
+
/**
|
|
511
|
+
* A raw SQL predicate fragment. Kept as a *string* (not a query-builder callback)
|
|
512
|
+
* so the whole config stays JSON-serializable — it can be persisted into
|
|
513
|
+
* `crm_entity_mappings` and shipped to the cloud unchanged. Embedded-only in
|
|
514
|
+
* practice; not validated against the schema.
|
|
515
|
+
*/
|
|
516
|
+
const rawFilterSchema = strictObject({ $raw: string().min(1) });
|
|
517
|
+
const columnFilterSchema = record(string(), filterValueSchema);
|
|
507
518
|
/** `$raw` is a reserved key; a column literally named `$raw` is not addressable. */
|
|
508
|
-
const filterSchema = union([
|
|
519
|
+
const filterSchema = union([rawFilterSchema, columnFilterSchema]);
|
|
509
520
|
/**
|
|
510
521
|
* How the link between two entities is expressed in the host schema:
|
|
511
522
|
* - `fkOn: "company"` — FK lives on the company table (e.g. organizations.owner_id)
|
|
@@ -556,6 +567,20 @@ const entitySchema = strictObject({
|
|
|
556
567
|
/** Named relationships to other entities in this config. */
|
|
557
568
|
relationships: record(string(), relationshipSchema).optional(),
|
|
558
569
|
/**
|
|
570
|
+
* Treat rows from this entity as their company's point of contact.
|
|
571
|
+
*
|
|
572
|
+
* Opt-in, and only meaningful on a `contact` entity that resolves a company.
|
|
573
|
+
* Hosts whose schema knows who owns an account (an `owner` role on a
|
|
574
|
+
* membership table, say) can declare a narrow entity for those rows and have
|
|
575
|
+
* the CRM keep each company's point of contact current automatically.
|
|
576
|
+
*
|
|
577
|
+
* Sync only manages companies nobody has intervened on: the moment a person
|
|
578
|
+
* picks a point of contact in the CRM, that company is stamped and left
|
|
579
|
+
* alone. Without that the user's choice would be silently reverted on the
|
|
580
|
+
* next run — see `syncPrimaryContacts` and `host-owned-fields.ts`.
|
|
581
|
+
*/
|
|
582
|
+
isPrimaryContact: boolean().optional(),
|
|
583
|
+
/**
|
|
559
584
|
* For a "custom" entity, the crm_object_types row this materializes into.
|
|
560
585
|
* Server-generated, so pasting one into config couples the file to a
|
|
561
586
|
* specific workspace. Prefer declaring `objectType` and letting
|
package/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_entity_config = require("./entity-config-
|
|
3
|
+
const require_entity_config = require("./entity-config-BI4RYNKL.cjs");
|
|
4
4
|
require("./mapping-score-CaB3F4Uu.cjs");
|
|
5
5
|
const require_internal_entity_heuristics = require("./internal-entity-heuristics.cjs");
|
|
6
|
-
const require_sdk = require("./sdk-
|
|
6
|
+
const require_sdk = require("./sdk-BvGSxBQc.cjs");
|
|
7
7
|
let node_child_process = require("node:child_process");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
let node_module = require("node:module");
|
|
@@ -1188,8 +1188,10 @@ function siblingDbCandidates(schemaPath) {
|
|
|
1188
1188
|
return SIBLING_DB_NAMES.map((name) => (0, node_path.join)(dir, name));
|
|
1189
1189
|
}
|
|
1190
1190
|
function parentDbCandidates(schemaPath, cwd) {
|
|
1191
|
-
const
|
|
1192
|
-
const
|
|
1191
|
+
const dir = isDirectory(schemaPath) ? schemaPath : (0, node_path.dirname)(schemaPath);
|
|
1192
|
+
const parent = (0, node_path.dirname)(dir);
|
|
1193
|
+
const root = (0, node_path.resolve)(cwd);
|
|
1194
|
+
const relativeToRoot = (0, node_path.relative)(root, (0, node_path.resolve)(parent));
|
|
1193
1195
|
if (!(relativeToRoot === "" || !relativeToRoot.startsWith(".."))) return [];
|
|
1194
1196
|
return SIBLING_DB_NAMES.map((name) => (0, node_path.join)(parent, name));
|
|
1195
1197
|
}
|
|
@@ -1866,7 +1868,8 @@ function rankCandidates$1(tables, concept, contact = null) {
|
|
|
1866
1868
|
if (usable !== 0) return usable;
|
|
1867
1869
|
const aPromoted = promotedNames.has(a.t.tableName);
|
|
1868
1870
|
if (aPromoted !== promotedNames.has(b.t.tableName)) {
|
|
1869
|
-
|
|
1871
|
+
const loser = aPromoted ? b.t : a.t;
|
|
1872
|
+
if (require_internal_entity_heuristics.isFrameworkTable(loser.tableName)) return aPromoted ? -1 : 1;
|
|
1870
1873
|
}
|
|
1871
1874
|
const exact = Number(b.m.exact) - Number(a.m.exact);
|
|
1872
1875
|
if (exact !== 0) return exact;
|
|
@@ -4053,13 +4056,14 @@ function defaultReadFile(path) {
|
|
|
4053
4056
|
}
|
|
4054
4057
|
function resolveEnvPath(cwd) {
|
|
4055
4058
|
const framework = detectFramework(readDeps(cwd));
|
|
4059
|
+
const holdingKey = ENV_FILE_CANDIDATES.filter((name) => {
|
|
4060
|
+
const path = (0, node_path.join)(cwd, name);
|
|
4061
|
+
if (!(0, node_fs.existsSync)(path)) return false;
|
|
4062
|
+
const contents = (0, node_fs.readFileSync)(path, "utf8");
|
|
4063
|
+
return isKeySet(contents, "CLIVLY_SECRET_KEY") || isKeySet(contents, "CLIVLY_API_KEY");
|
|
4064
|
+
});
|
|
4056
4065
|
return (0, node_path.join)(cwd, resolveEnvFile({
|
|
4057
|
-
existing:
|
|
4058
|
-
const path = (0, node_path.join)(cwd, name);
|
|
4059
|
-
if (!(0, node_fs.existsSync)(path)) return false;
|
|
4060
|
-
const contents = (0, node_fs.readFileSync)(path, "utf8");
|
|
4061
|
-
return isKeySet(contents, "CLIVLY_SECRET_KEY") || isKeySet(contents, "CLIVLY_API_KEY");
|
|
4062
|
-
}),
|
|
4066
|
+
existing: holdingKey,
|
|
4063
4067
|
framework
|
|
4064
4068
|
}));
|
|
4065
4069
|
}
|
package/index.d.cts
CHANGED
|
@@ -59,21 +59,21 @@ interface ProbeHit {
|
|
|
59
59
|
}
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region src/index.d.ts
|
|
62
|
-
declare const KNOWN_COMMANDS: readonly ["init", "status", "push-schema", "add", "dev", "login", "help", "ping", "doctor", "connect"];
|
|
63
|
-
declare function nearestCommand(input: string): string | undefined;
|
|
64
|
-
interface AddDeps {
|
|
62
|
+
export declare const KNOWN_COMMANDS: readonly ["init", "status", "push-schema", "add", "dev", "login", "help", "ping", "doctor", "connect"];
|
|
63
|
+
export declare function nearestCommand(input: string): string | undefined;
|
|
64
|
+
export interface AddDeps {
|
|
65
65
|
fileExists: (path: string) => boolean;
|
|
66
66
|
out: (line: string) => void;
|
|
67
67
|
readDeps: (cwd: string) => Record<string, string>;
|
|
68
68
|
readFile: (path: string) => string | null;
|
|
69
69
|
writeFile: (path: string, contents: string) => void;
|
|
70
70
|
}
|
|
71
|
-
declare function runAdd(argv: string[], cwd: string, deps?: AddDeps): number;
|
|
71
|
+
export declare function runAdd(argv: string[], cwd: string, deps?: AddDeps): number;
|
|
72
72
|
interface InstallResult {
|
|
73
73
|
command: string;
|
|
74
74
|
ok: boolean;
|
|
75
75
|
}
|
|
76
|
-
interface RunInitOptions {
|
|
76
|
+
export interface RunInitOptions {
|
|
77
77
|
authImportFlag?: string;
|
|
78
78
|
companyTableFlag?: string;
|
|
79
79
|
contactTableFlag?: string;
|
|
@@ -115,9 +115,8 @@ interface RunInitOptions {
|
|
|
115
115
|
writeEnv?: (cwd: string, contents: string) => void;
|
|
116
116
|
yes?: boolean;
|
|
117
117
|
}
|
|
118
|
-
declare function credentialsMissing(envContents: string): boolean;
|
|
119
|
-
declare function runInit(options: RunInitOptions): Promise<number>;
|
|
120
|
-
declare function runInitFromArgv(argv: string[], cwd: string): Promise<number>;
|
|
121
|
-
declare function main(argv: string[]): Promise<number>;
|
|
122
|
-
//#endregion
|
|
123
|
-
export { AddDeps, KNOWN_COMMANDS, RunInitOptions, credentialsMissing, main, nearestCommand, runAdd, runInit, runInitFromArgv };
|
|
118
|
+
export declare function credentialsMissing(envContents: string): boolean;
|
|
119
|
+
export declare function runInit(options: RunInitOptions): Promise<number>;
|
|
120
|
+
export declare function runInitFromArgv(argv: string[], cwd: string): Promise<number>;
|
|
121
|
+
export declare function main(argv: string[]): Promise<number>;
|
|
122
|
+
//#endregion
|
package/index.d.mts
CHANGED
|
@@ -59,21 +59,21 @@ interface ProbeHit {
|
|
|
59
59
|
}
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region src/index.d.ts
|
|
62
|
-
declare const KNOWN_COMMANDS: readonly ["init", "status", "push-schema", "add", "dev", "login", "help", "ping", "doctor", "connect"];
|
|
63
|
-
declare function nearestCommand(input: string): string | undefined;
|
|
64
|
-
interface AddDeps {
|
|
62
|
+
export declare const KNOWN_COMMANDS: readonly ["init", "status", "push-schema", "add", "dev", "login", "help", "ping", "doctor", "connect"];
|
|
63
|
+
export declare function nearestCommand(input: string): string | undefined;
|
|
64
|
+
export interface AddDeps {
|
|
65
65
|
fileExists: (path: string) => boolean;
|
|
66
66
|
out: (line: string) => void;
|
|
67
67
|
readDeps: (cwd: string) => Record<string, string>;
|
|
68
68
|
readFile: (path: string) => string | null;
|
|
69
69
|
writeFile: (path: string, contents: string) => void;
|
|
70
70
|
}
|
|
71
|
-
declare function runAdd(argv: string[], cwd: string, deps?: AddDeps): number;
|
|
71
|
+
export declare function runAdd(argv: string[], cwd: string, deps?: AddDeps): number;
|
|
72
72
|
interface InstallResult {
|
|
73
73
|
command: string;
|
|
74
74
|
ok: boolean;
|
|
75
75
|
}
|
|
76
|
-
interface RunInitOptions {
|
|
76
|
+
export interface RunInitOptions {
|
|
77
77
|
authImportFlag?: string;
|
|
78
78
|
companyTableFlag?: string;
|
|
79
79
|
contactTableFlag?: string;
|
|
@@ -115,9 +115,8 @@ interface RunInitOptions {
|
|
|
115
115
|
writeEnv?: (cwd: string, contents: string) => void;
|
|
116
116
|
yes?: boolean;
|
|
117
117
|
}
|
|
118
|
-
declare function credentialsMissing(envContents: string): boolean;
|
|
119
|
-
declare function runInit(options: RunInitOptions): Promise<number>;
|
|
120
|
-
declare function runInitFromArgv(argv: string[], cwd: string): Promise<number>;
|
|
121
|
-
declare function main(argv: string[]): Promise<number>;
|
|
122
|
-
//#endregion
|
|
123
|
-
export { AddDeps, KNOWN_COMMANDS, RunInitOptions, credentialsMissing, main, nearestCommand, runAdd, runInit, runInitFromArgv };
|
|
118
|
+
export declare function credentialsMissing(envContents: string): boolean;
|
|
119
|
+
export declare function runInit(options: RunInitOptions): Promise<number>;
|
|
120
|
+
export declare function runInitFromArgv(argv: string[], cwd: string): Promise<number>;
|
|
121
|
+
export declare function main(argv: string[]): Promise<number>;
|
|
122
|
+
//#endregion
|
package/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as CANONICAL_FIELDS } from "./entity-config-
|
|
2
|
+
import { t as CANONICAL_FIELDS } from "./entity-config-Ccfb2IL9.mjs";
|
|
3
3
|
import "./mapping-score-C68uAqGB.mjs";
|
|
4
4
|
import { hasDefiningColumn, isFrameworkTable, matchesConcept, requiredFieldsFor, scoreFieldMap, scoreRelationships, suggestCursorField, toFieldMap } from "./internal-entity-heuristics.mjs";
|
|
5
|
-
import { s as isPlaceholderUrl, t as createClivlySDK } from "./sdk-
|
|
5
|
+
import { s as isPlaceholderUrl, t as createClivlySDK } from "./sdk-C-Pjxj2y.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { spawn } from "node:child_process";
|
|
8
8
|
import { accessSync, constants, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, statSync, watch, writeFileSync } from "node:fs";
|
|
@@ -1187,8 +1187,10 @@ function siblingDbCandidates(schemaPath) {
|
|
|
1187
1187
|
return SIBLING_DB_NAMES.map((name) => join(dir, name));
|
|
1188
1188
|
}
|
|
1189
1189
|
function parentDbCandidates(schemaPath, cwd) {
|
|
1190
|
-
const
|
|
1191
|
-
const
|
|
1190
|
+
const dir = isDirectory(schemaPath) ? schemaPath : dirname(schemaPath);
|
|
1191
|
+
const parent = dirname(dir);
|
|
1192
|
+
const root = resolve(cwd);
|
|
1193
|
+
const relativeToRoot = relative(root, resolve(parent));
|
|
1192
1194
|
if (!(relativeToRoot === "" || !relativeToRoot.startsWith(".."))) return [];
|
|
1193
1195
|
return SIBLING_DB_NAMES.map((name) => join(parent, name));
|
|
1194
1196
|
}
|
|
@@ -1865,7 +1867,8 @@ function rankCandidates$1(tables, concept, contact = null) {
|
|
|
1865
1867
|
if (usable !== 0) return usable;
|
|
1866
1868
|
const aPromoted = promotedNames.has(a.t.tableName);
|
|
1867
1869
|
if (aPromoted !== promotedNames.has(b.t.tableName)) {
|
|
1868
|
-
|
|
1870
|
+
const loser = aPromoted ? b.t : a.t;
|
|
1871
|
+
if (isFrameworkTable(loser.tableName)) return aPromoted ? -1 : 1;
|
|
1869
1872
|
}
|
|
1870
1873
|
const exact = Number(b.m.exact) - Number(a.m.exact);
|
|
1871
1874
|
if (exact !== 0) return exact;
|
|
@@ -4052,13 +4055,14 @@ function defaultReadFile(path) {
|
|
|
4052
4055
|
}
|
|
4053
4056
|
function resolveEnvPath(cwd) {
|
|
4054
4057
|
const framework = detectFramework(readDeps(cwd));
|
|
4058
|
+
const holdingKey = ENV_FILE_CANDIDATES.filter((name) => {
|
|
4059
|
+
const path = join(cwd, name);
|
|
4060
|
+
if (!existsSync(path)) return false;
|
|
4061
|
+
const contents = readFileSync(path, "utf8");
|
|
4062
|
+
return isKeySet(contents, "CLIVLY_SECRET_KEY") || isKeySet(contents, "CLIVLY_API_KEY");
|
|
4063
|
+
});
|
|
4055
4064
|
return join(cwd, resolveEnvFile({
|
|
4056
|
-
existing:
|
|
4057
|
-
const path = join(cwd, name);
|
|
4058
|
-
if (!existsSync(path)) return false;
|
|
4059
|
-
const contents = readFileSync(path, "utf8");
|
|
4060
|
-
return isKeySet(contents, "CLIVLY_SECRET_KEY") || isKeySet(contents, "CLIVLY_API_KEY");
|
|
4061
|
-
}),
|
|
4065
|
+
existing: holdingKey,
|
|
4062
4066
|
framework
|
|
4063
4067
|
}));
|
|
4064
4068
|
}
|
|
@@ -1,4 +1,71 @@
|
|
|
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-CKcj4-M_.mjs";
|
|
2
|
+
//#region ../core/src/host-owned-fields.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Which fields a CRM record lets a user edit.
|
|
5
|
+
*
|
|
6
|
+
* A record synced from the host app carries a `sourceRef`. Its identity fields
|
|
7
|
+
* are rewritten from the host view on every sync run, so an edit to one would
|
|
8
|
+
* be silently reverted minutes later — the user sees their change accepted,
|
|
9
|
+
* then gone, with nothing explaining why. That is worse than refusing it.
|
|
10
|
+
*
|
|
11
|
+
* So host-owned fields are rejected at the API, not merely disabled in the UI:
|
|
12
|
+
* the UI is not the security boundary, and the SDK and any future public API
|
|
13
|
+
* reach the same routers.
|
|
14
|
+
*
|
|
15
|
+
* Records created inside the CRM have no `sourceRef` and are fully editable —
|
|
16
|
+
* nothing else owns them.
|
|
17
|
+
*
|
|
18
|
+
* This is the cheap half of a capability matrix. It answers "may a user write
|
|
19
|
+
* this?" but not "may the sync engine write this?", which stays implicit
|
|
20
|
+
* because sync bypasses these routers entirely. An override model (the
|
|
21
|
+
* `stageOverrideAt` pattern on `crm_deals`) can replace this later without
|
|
22
|
+
* changing callers.
|
|
23
|
+
*/
|
|
24
|
+
/** Contact fields the host view owns when the row is synced. */
|
|
25
|
+
declare const HOST_OWNED_CONTACT_FIELDS: readonly ["email", "name"];
|
|
26
|
+
/**
|
|
27
|
+
* Company fields the host view owns when the row is synced.
|
|
28
|
+
*
|
|
29
|
+
* `email` and `phone` joined this list in the same change that made them
|
|
30
|
+
* mappable (migration 0048). They are not identity fields, but ownership here
|
|
31
|
+
* follows what sync rewrites, not what feels identity-like: both flow from the
|
|
32
|
+
* host view on every run, exactly as `email` does for contacts above. Widening
|
|
33
|
+
* `CANONICAL_FIELDS.company` without widening this list is the specific bug
|
|
34
|
+
* this module's doc comment calls worse than refusing the edit.
|
|
35
|
+
*
|
|
36
|
+
* `primaryContactId` is deliberately absent: it is a CRM-side judgement about
|
|
37
|
+
* who to talk to, never sourced from the host, so it stays editable on synced
|
|
38
|
+
* rows.
|
|
39
|
+
*/
|
|
40
|
+
declare const HOST_OWNED_COMPANY_FIELDS: readonly ["domain", "name", "email", "phone"];
|
|
41
|
+
type HostOwnedContactField = (typeof HOST_OWNED_CONTACT_FIELDS)[number];
|
|
42
|
+
type HostOwnedCompanyField = (typeof HOST_OWNED_COMPANY_FIELDS)[number];
|
|
43
|
+
/** The subset of a record this module needs to make its decision. */
|
|
44
|
+
interface SourcedRecord {
|
|
45
|
+
sourceRef?: string | null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* True when the record is owned by a host view rather than by the CRM.
|
|
49
|
+
*
|
|
50
|
+
* Deliberately keyed on `sourceRef` and not `entityRole`: `entityRole` is a
|
|
51
|
+
* mapping label that can be absent on a synced row, while `sourceRef` is the
|
|
52
|
+
* identity the sync engine reconciles against and is set for exactly the rows
|
|
53
|
+
* sync will rewrite.
|
|
54
|
+
*/
|
|
55
|
+
declare function isHostOwned(record: SourcedRecord): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Host-owned contact fields this patch would change, or `[]` when the patch is
|
|
58
|
+
* allowed. Callers turn a non-empty result into a 400 naming the fields.
|
|
59
|
+
*/
|
|
60
|
+
declare function rejectedContactFields(contact: SourcedRecord, patch: Readonly<Record<string, unknown>>): HostOwnedContactField[];
|
|
61
|
+
/** Host-owned company fields this patch would change, or `[]`. */
|
|
62
|
+
declare function rejectedCompanyFields(company: SourcedRecord, patch: Readonly<Record<string, unknown>>): HostOwnedCompanyField[];
|
|
63
|
+
/**
|
|
64
|
+
* The message shown when a write is refused. Names the fields and says where
|
|
65
|
+
* they come from, so the reason is actionable rather than a bare "forbidden".
|
|
66
|
+
*/
|
|
67
|
+
declare function hostOwnedFieldMessage(fields: readonly string[]): string;
|
|
68
|
+
//#endregion
|
|
2
69
|
//#region ../core/src/projection-cardinality.d.ts
|
|
3
70
|
declare function joinFansOut(join: ProjectionJoin, joinTable: DiscoveredSchemaTable): boolean;
|
|
4
71
|
/** Every join in the projection that can multiply rows. */
|
|
@@ -223,4 +290,4 @@ declare function matchesCondition(condition: Condition, fields: Record<string, s
|
|
|
223
290
|
*/
|
|
224
291
|
declare function evaluateStage(rules: EvaluableRule[], fields: Record<string, string | null>, mappedFields: Set<string>): string | null;
|
|
225
292
|
//#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 };
|
|
293
|
+
export { 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, 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,3 +1,81 @@
|
|
|
1
|
+
//#region ../core/src/host-owned-fields.ts
|
|
2
|
+
/**
|
|
3
|
+
* Which fields a CRM record lets a user edit.
|
|
4
|
+
*
|
|
5
|
+
* A record synced from the host app carries a `sourceRef`. Its identity fields
|
|
6
|
+
* are rewritten from the host view on every sync run, so an edit to one would
|
|
7
|
+
* be silently reverted minutes later — the user sees their change accepted,
|
|
8
|
+
* then gone, with nothing explaining why. That is worse than refusing it.
|
|
9
|
+
*
|
|
10
|
+
* So host-owned fields are rejected at the API, not merely disabled in the UI:
|
|
11
|
+
* the UI is not the security boundary, and the SDK and any future public API
|
|
12
|
+
* reach the same routers.
|
|
13
|
+
*
|
|
14
|
+
* Records created inside the CRM have no `sourceRef` and are fully editable —
|
|
15
|
+
* nothing else owns them.
|
|
16
|
+
*
|
|
17
|
+
* This is the cheap half of a capability matrix. It answers "may a user write
|
|
18
|
+
* this?" but not "may the sync engine write this?", which stays implicit
|
|
19
|
+
* because sync bypasses these routers entirely. An override model (the
|
|
20
|
+
* `stageOverrideAt` pattern on `crm_deals`) can replace this later without
|
|
21
|
+
* changing callers.
|
|
22
|
+
*/
|
|
23
|
+
/** Contact fields the host view owns when the row is synced. */
|
|
24
|
+
const HOST_OWNED_CONTACT_FIELDS = ["email", "name"];
|
|
25
|
+
/**
|
|
26
|
+
* Company fields the host view owns when the row is synced.
|
|
27
|
+
*
|
|
28
|
+
* `email` and `phone` joined this list in the same change that made them
|
|
29
|
+
* mappable (migration 0048). They are not identity fields, but ownership here
|
|
30
|
+
* follows what sync rewrites, not what feels identity-like: both flow from the
|
|
31
|
+
* host view on every run, exactly as `email` does for contacts above. Widening
|
|
32
|
+
* `CANONICAL_FIELDS.company` without widening this list is the specific bug
|
|
33
|
+
* this module's doc comment calls worse than refusing the edit.
|
|
34
|
+
*
|
|
35
|
+
* `primaryContactId` is deliberately absent: it is a CRM-side judgement about
|
|
36
|
+
* who to talk to, never sourced from the host, so it stays editable on synced
|
|
37
|
+
* rows.
|
|
38
|
+
*/
|
|
39
|
+
const HOST_OWNED_COMPANY_FIELDS = [
|
|
40
|
+
"domain",
|
|
41
|
+
"name",
|
|
42
|
+
"email",
|
|
43
|
+
"phone"
|
|
44
|
+
];
|
|
45
|
+
/**
|
|
46
|
+
* True when the record is owned by a host view rather than by the CRM.
|
|
47
|
+
*
|
|
48
|
+
* Deliberately keyed on `sourceRef` and not `entityRole`: `entityRole` is a
|
|
49
|
+
* mapping label that can be absent on a synced row, while `sourceRef` is the
|
|
50
|
+
* identity the sync engine reconciles against and is set for exactly the rows
|
|
51
|
+
* sync will rewrite.
|
|
52
|
+
*/
|
|
53
|
+
function isHostOwned(record) {
|
|
54
|
+
return Boolean(record.sourceRef);
|
|
55
|
+
}
|
|
56
|
+
function rejectedFields(record, patch, owned) {
|
|
57
|
+
if (!isHostOwned(record)) return [];
|
|
58
|
+
return owned.filter((field) => patch[field] !== void 0);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Host-owned contact fields this patch would change, or `[]` when the patch is
|
|
62
|
+
* allowed. Callers turn a non-empty result into a 400 naming the fields.
|
|
63
|
+
*/
|
|
64
|
+
function rejectedContactFields(contact, patch) {
|
|
65
|
+
return rejectedFields(contact, patch, HOST_OWNED_CONTACT_FIELDS);
|
|
66
|
+
}
|
|
67
|
+
/** Host-owned company fields this patch would change, or `[]`. */
|
|
68
|
+
function rejectedCompanyFields(company, patch) {
|
|
69
|
+
return rejectedFields(company, patch, HOST_OWNED_COMPANY_FIELDS);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The message shown when a write is refused. Names the fields and says where
|
|
73
|
+
* they come from, so the reason is actionable rather than a bare "forbidden".
|
|
74
|
+
*/
|
|
75
|
+
function hostOwnedFieldMessage(fields) {
|
|
76
|
+
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.`;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
1
79
|
//#region ../core/src/slug.ts
|
|
2
80
|
/**
|
|
3
81
|
* The one `slugify`.
|
|
@@ -147,12 +225,36 @@ Object.defineProperty(exports, "evaluateStage", {
|
|
|
147
225
|
return evaluateStage;
|
|
148
226
|
}
|
|
149
227
|
});
|
|
228
|
+
Object.defineProperty(exports, "hostOwnedFieldMessage", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function() {
|
|
231
|
+
return hostOwnedFieldMessage;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
Object.defineProperty(exports, "isHostOwned", {
|
|
235
|
+
enumerable: true,
|
|
236
|
+
get: function() {
|
|
237
|
+
return isHostOwned;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
150
240
|
Object.defineProperty(exports, "matchesCondition", {
|
|
151
241
|
enumerable: true,
|
|
152
242
|
get: function() {
|
|
153
243
|
return matchesCondition;
|
|
154
244
|
}
|
|
155
245
|
});
|
|
246
|
+
Object.defineProperty(exports, "rejectedCompanyFields", {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
get: function() {
|
|
249
|
+
return rejectedCompanyFields;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
Object.defineProperty(exports, "rejectedContactFields", {
|
|
253
|
+
enumerable: true,
|
|
254
|
+
get: function() {
|
|
255
|
+
return rejectedContactFields;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
156
258
|
Object.defineProperty(exports, "slugify", {
|
|
157
259
|
enumerable: true,
|
|
158
260
|
get: function() {
|
|
@@ -1,4 +1,71 @@
|
|
|
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/host-owned-fields.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Which fields a CRM record lets a user edit.
|
|
5
|
+
*
|
|
6
|
+
* A record synced from the host app carries a `sourceRef`. Its identity fields
|
|
7
|
+
* are rewritten from the host view on every sync run, so an edit to one would
|
|
8
|
+
* be silently reverted minutes later — the user sees their change accepted,
|
|
9
|
+
* then gone, with nothing explaining why. That is worse than refusing it.
|
|
10
|
+
*
|
|
11
|
+
* So host-owned fields are rejected at the API, not merely disabled in the UI:
|
|
12
|
+
* the UI is not the security boundary, and the SDK and any future public API
|
|
13
|
+
* reach the same routers.
|
|
14
|
+
*
|
|
15
|
+
* Records created inside the CRM have no `sourceRef` and are fully editable —
|
|
16
|
+
* nothing else owns them.
|
|
17
|
+
*
|
|
18
|
+
* This is the cheap half of a capability matrix. It answers "may a user write
|
|
19
|
+
* this?" but not "may the sync engine write this?", which stays implicit
|
|
20
|
+
* because sync bypasses these routers entirely. An override model (the
|
|
21
|
+
* `stageOverrideAt` pattern on `crm_deals`) can replace this later without
|
|
22
|
+
* changing callers.
|
|
23
|
+
*/
|
|
24
|
+
/** Contact fields the host view owns when the row is synced. */
|
|
25
|
+
declare const HOST_OWNED_CONTACT_FIELDS: readonly ["email", "name"];
|
|
26
|
+
/**
|
|
27
|
+
* Company fields the host view owns when the row is synced.
|
|
28
|
+
*
|
|
29
|
+
* `email` and `phone` joined this list in the same change that made them
|
|
30
|
+
* mappable (migration 0048). They are not identity fields, but ownership here
|
|
31
|
+
* follows what sync rewrites, not what feels identity-like: both flow from the
|
|
32
|
+
* host view on every run, exactly as `email` does for contacts above. Widening
|
|
33
|
+
* `CANONICAL_FIELDS.company` without widening this list is the specific bug
|
|
34
|
+
* this module's doc comment calls worse than refusing the edit.
|
|
35
|
+
*
|
|
36
|
+
* `primaryContactId` is deliberately absent: it is a CRM-side judgement about
|
|
37
|
+
* who to talk to, never sourced from the host, so it stays editable on synced
|
|
38
|
+
* rows.
|
|
39
|
+
*/
|
|
40
|
+
declare const HOST_OWNED_COMPANY_FIELDS: readonly ["domain", "name", "email", "phone"];
|
|
41
|
+
type HostOwnedContactField = (typeof HOST_OWNED_CONTACT_FIELDS)[number];
|
|
42
|
+
type HostOwnedCompanyField = (typeof HOST_OWNED_COMPANY_FIELDS)[number];
|
|
43
|
+
/** The subset of a record this module needs to make its decision. */
|
|
44
|
+
interface SourcedRecord {
|
|
45
|
+
sourceRef?: string | null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* True when the record is owned by a host view rather than by the CRM.
|
|
49
|
+
*
|
|
50
|
+
* Deliberately keyed on `sourceRef` and not `entityRole`: `entityRole` is a
|
|
51
|
+
* mapping label that can be absent on a synced row, while `sourceRef` is the
|
|
52
|
+
* identity the sync engine reconciles against and is set for exactly the rows
|
|
53
|
+
* sync will rewrite.
|
|
54
|
+
*/
|
|
55
|
+
declare function isHostOwned(record: SourcedRecord): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Host-owned contact fields this patch would change, or `[]` when the patch is
|
|
58
|
+
* allowed. Callers turn a non-empty result into a 400 naming the fields.
|
|
59
|
+
*/
|
|
60
|
+
declare function rejectedContactFields(contact: SourcedRecord, patch: Readonly<Record<string, unknown>>): HostOwnedContactField[];
|
|
61
|
+
/** Host-owned company fields this patch would change, or `[]`. */
|
|
62
|
+
declare function rejectedCompanyFields(company: SourcedRecord, patch: Readonly<Record<string, unknown>>): HostOwnedCompanyField[];
|
|
63
|
+
/**
|
|
64
|
+
* The message shown when a write is refused. Names the fields and says where
|
|
65
|
+
* they come from, so the reason is actionable rather than a bare "forbidden".
|
|
66
|
+
*/
|
|
67
|
+
declare function hostOwnedFieldMessage(fields: readonly string[]): string;
|
|
68
|
+
//#endregion
|
|
2
69
|
//#region ../core/src/projection-cardinality.d.ts
|
|
3
70
|
declare function joinFansOut(join: ProjectionJoin, joinTable: DiscoveredSchemaTable): boolean;
|
|
4
71
|
/** Every join in the projection that can multiply rows. */
|
|
@@ -223,4 +290,4 @@ declare function matchesCondition(condition: Condition, fields: Record<string, s
|
|
|
223
290
|
*/
|
|
224
291
|
declare function evaluateStage(rules: EvaluableRule[], fields: Record<string, string | null>, mappedFields: Set<string>): string | null;
|
|
225
292
|
//#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 };
|
|
293
|
+
export { 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, 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 };
|
package/internal-adapter.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CRMAdapter } from "./adapter-
|
|
1
|
+
import { t as CRMAdapter } from "./adapter-Bd5HjLYa.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-BWrOtOw5.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-C3BQpc-q.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-D54ajbl7.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-CiK37zJm.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-ehVWLSrN.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-BI4RYNKL.cjs");
|
|
3
3
|
exports.CANONICAL_FIELDS = require_entity_config.CANONICAL_FIELDS;
|
|
4
4
|
exports.CRM_CONCEPTS = require_entity_config.CRM_CONCEPTS;
|
|
5
5
|
exports.CUSTOM_CONCEPT = require_entity_config.CUSTOM_CONCEPT;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as relationshipsSchema, C as customObjectDeclarations, D as missingRequiredFields, E as filterSchema, M as validateEntitiesConfig, O as projectionFields, S as RelationshipsMap, T as entitiesConfigSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as requiredFieldsFor, k as relationshipSchema, l as ConfigValidationError, m as DiscoveredSchemaTable, n as CRM_CONCEPTS, o as ClivlyEntitiesConfigInput, p as DiscoveredColumnMeta, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS } from "./entity-config-
|
|
1
|
+
import { A as relationshipsSchema, C as customObjectDeclarations, D as missingRequiredFields, E as filterSchema, M as validateEntitiesConfig, O as projectionFields, S as RelationshipsMap, T as entitiesConfigSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as requiredFieldsFor, k as relationshipSchema, l as ConfigValidationError, m as DiscoveredSchemaTable, n as CRM_CONCEPTS, o as ClivlyEntitiesConfigInput, p as DiscoveredColumnMeta, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS } from "./entity-config-ApnT5j3X.cjs";
|
|
2
2
|
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntitiesConfigInput, ClivlyEntityConfig, ClivlyEntityConfigInput, ConfigValidationError, ConfigValidationResult, CrmConcept, CustomObjectDeclaration, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, REQUIRED_FIELDS, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, missingRequiredFields, projectionFields, relationshipSchema, relationshipsSchema, requiredFieldsFor, validateEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as relationshipsSchema, C as customObjectDeclarations, D as missingRequiredFields, E as filterSchema, M as validateEntitiesConfig, O as projectionFields, S as RelationshipsMap, T as entitiesConfigSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as requiredFieldsFor, k as relationshipSchema, l as ConfigValidationError, m as DiscoveredSchemaTable, n as CRM_CONCEPTS, o as ClivlyEntitiesConfigInput, p as DiscoveredColumnMeta, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS } from "./entity-config-
|
|
1
|
+
import { A as relationshipsSchema, C as customObjectDeclarations, D as missingRequiredFields, E as filterSchema, M as validateEntitiesConfig, O as projectionFields, S as RelationshipsMap, T as entitiesConfigSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, c as ClivlyEntityConfigInput, d as CrmConcept, f as CustomObjectDeclaration, g as FilterValue, h as FilterExpr, i as ClivlyConfigError, j as requiredFieldsFor, k as relationshipSchema, l as ConfigValidationError, m as DiscoveredSchemaTable, n as CRM_CONCEPTS, o as ClivlyEntitiesConfigInput, p as DiscoveredColumnMeta, r as CUSTOM_CONCEPT, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS } from "./entity-config-CKcj4-M_.mjs";
|
|
2
2
|
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, ClivlyEntitiesConfig, ClivlyEntitiesConfigInput, ClivlyEntityConfig, ClivlyEntityConfigInput, ConfigValidationError, ConfigValidationResult, CrmConcept, CustomObjectDeclaration, DiscoveredColumnMeta, DiscoveredSchemaTable, FilterExpr, FilterValue, MATERIALIZING_CONCEPTS, MaterializingConcept, REQUIRED_FIELDS, RelationshipSpec, RelationshipVia, RelationshipsMap, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, missingRequiredFields, projectionFields, relationshipSchema, relationshipsSchema, requiredFieldsFor, validateEntitiesConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MATERIALIZING_CONCEPTS, c as defineClivlyConfig, d as missingRequiredFields, f as projectionFields, g as validateEntitiesConfig, h as requiredFieldsFor, i as ClivlyConfigError, l as entitiesConfigSchema, m as relationshipsSchema, n as CRM_CONCEPTS, o as REQUIRED_FIELDS, p as relationshipSchema, r as CUSTOM_CONCEPT, s as customObjectDeclarations, t as CANONICAL_FIELDS, u as filterSchema } from "./entity-config-
|
|
1
|
+
import { a as MATERIALIZING_CONCEPTS, c as defineClivlyConfig, d as missingRequiredFields, f as projectionFields, g as validateEntitiesConfig, h as requiredFieldsFor, i as ClivlyConfigError, l as entitiesConfigSchema, m as relationshipsSchema, n as CRM_CONCEPTS, o as REQUIRED_FIELDS, p as relationshipSchema, r as CUSTOM_CONCEPT, s as customObjectDeclarations, t as CANONICAL_FIELDS, u as filterSchema } from "./entity-config-Ccfb2IL9.mjs";
|
|
2
2
|
export { CANONICAL_FIELDS, CRM_CONCEPTS, CUSTOM_CONCEPT, ClivlyConfigError, MATERIALIZING_CONCEPTS, REQUIRED_FIELDS, customObjectDeclarations, defineClivlyConfig, entitiesConfigSchema, filterSchema, missingRequiredFields, projectionFields, relationshipSchema, relationshipsSchema, requiredFieldsFor, validateEntitiesConfig };
|