clivly 0.9.3 → 0.9.4
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/core-entity-config.cjs +1 -1
- package/core-entity-config.mjs +1 -1
- package/core-mappings-config.cjs +1 -1
- package/core-mappings-config.mjs +1 -1
- package/core-sync-engine.cjs +1 -1
- package/core-sync-engine.mjs +1 -1
- package/core-view-compiler.cjs +1 -1
- package/core-view-compiler.mjs +1 -1
- package/core.cjs +11 -6
- package/core.d.cts +2 -2
- package/core.d.mts +2 -2
- package/core.mjs +8 -7
- package/drizzle.cjs +74 -9
- package/drizzle.d.cts +83 -7
- package/drizzle.d.mts +83 -7
- package/drizzle.mjs +74 -10
- package/{entity-config-DtBsl2MQ.cjs → entity-config-7sGCk_nw.cjs} +1 -1
- package/{entity-config-kUHri9yA.mjs → entity-config-B74SPOUZ.mjs} +1 -1
- package/index.cjs +60 -18
- package/index.mjs +60 -18
- package/{internal-Df-PtOH_.mjs → internal-CykXpEGk.mjs} +2 -2
- package/{internal-CwnEG6Wl.cjs → internal-DqduZU3l.cjs} +2 -2
- package/internal-entity-config.cjs +1 -1
- package/internal-entity-config.mjs +1 -1
- package/internal-entity-heuristics.cjs +1 -1
- package/internal-entity-heuristics.mjs +1 -1
- package/internal-mappings-config.cjs +1 -1
- package/internal-mappings-config.mjs +1 -1
- package/{internal-CDY8g9Ic.d.mts → internal-o2M7FGlR.d.mts} +29 -1
- package/internal-sync-engine.cjs +1 -1
- package/internal-sync-engine.mjs +1 -1
- package/internal-view-compiler.cjs +1 -1
- package/internal-view-compiler.mjs +1 -1
- package/{internal-Da_dlcQ_.d.cts → internal-wCXSELDN.d.cts} +29 -1
- package/internal.cjs +11 -6
- package/internal.d.cts +2 -2
- package/internal.d.mts +2 -2
- package/internal.mjs +8 -7
- package/{mappings-config-B0RqFLxu.cjs → mappings-config-CLyEg0sf.cjs} +1 -1
- package/{mappings-config-B1b1HVBg.mjs → mappings-config-DQS_s4dg.mjs} +1 -1
- package/{namespace-probe-EYyxWZnf.d.cts → namespace-probe-BoGI18dQ.d.cts} +8 -0
- package/{namespace-probe-BmdGnYMn.d.mts → namespace-probe-Cn7voAd0.d.mts} +8 -0
- package/package.json +1 -1
- package/{projection-D7xmQP4S.mjs → projection-CSGJbZlZ.mjs} +25 -4
- package/{projection-C5244vGa.cjs → projection-Dz6_i1-w.cjs} +25 -4
- package/projection-sql-BgnfiGqF.mjs +65 -0
- package/projection-sql-Cl1qIn8m.cjs +94 -0
- package/{sdk-COLUHhJq.cjs → sdk-CM1UO-I7.cjs} +58 -15
- package/{sdk-CZNXBsgA.mjs → sdk-DYBDR939.mjs} +53 -16
- package/sdk.cjs +3 -2
- package/sdk.d.cts +5 -2
- package/sdk.d.mts +5 -2
- package/sdk.mjs +3 -3
- package/{sync-engine-abE94g6X.cjs → sync-engine-C4A5jgA4.cjs} +1 -1
- package/{sync-engine-SuxSzbZ4.mjs → sync-engine-Dt5QQSKO.mjs} +1 -1
- package/{view-compiler-Blu4OXJ7.cjs → view-compiler-B5nDal14.cjs} +21 -74
- package/{view-compiler-CQx8TRrW.mjs → view-compiler-CSYwEWf5.mjs} +2 -55
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
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-7sGCk_nw.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-CM1UO-I7.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");
|
|
@@ -292,10 +292,37 @@ function addCommand(pm, packages) {
|
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
294
|
//#endregion
|
|
295
|
+
//#region src/tick-route.ts
|
|
296
|
+
/**
|
|
297
|
+
* The tick route's public URL path, and the template `clivly login` writes for
|
|
298
|
+
* it.
|
|
299
|
+
*
|
|
300
|
+
* Every framework the CLI scaffolds mounts the tick handler at the same URL —
|
|
301
|
+
* the *files* differ (`app/api/clivly/tick/route.ts`,
|
|
302
|
+
* `src/routes/api/clivly/tick.ts`, `app/routes/api.clivly.tick.ts`, …) but each
|
|
303
|
+
* one resolves to `/api/clivly/tick`. So this is a constant, not a per-framework
|
|
304
|
+
* lookup, and `clivly dev`, the generated config and the `.env` template can all
|
|
305
|
+
* read from one place instead of repeating the string and drifting.
|
|
306
|
+
*/
|
|
307
|
+
const CLIVLY_TICK_PATH = "/api/clivly/tick";
|
|
308
|
+
/**
|
|
309
|
+
* What `clivly login` writes into `.env` for `CLIVLY_SYNC_TRIGGER_URL`.
|
|
310
|
+
*
|
|
311
|
+
* A visible template beats an empty line: the developer sees the shape they
|
|
312
|
+
* eventually need — a public origin plus the tick path — instead of an unhelpful
|
|
313
|
+
* `CLIVLY_SYNC_TRIGGER_URL=` they have to go and look up.
|
|
314
|
+
*
|
|
315
|
+
* It is safe to ship a truthy non-address here only because the SDK refuses to
|
|
316
|
+
* treat a bracketed value as configured (`isPlaceholderUrl` in
|
|
317
|
+
* `@clivly/sdk/trigger-url`). Change the brackets here and that guard stops
|
|
318
|
+
* matching, so the two must stay in step.
|
|
319
|
+
*/
|
|
320
|
+
const TRIGGER_URL_PLACEHOLDER = `https://<yourDomain.com>${CLIVLY_TICK_PATH}`;
|
|
321
|
+
//#endregion
|
|
295
322
|
//#region src/dev-tunnel.ts
|
|
296
323
|
const CLOUDFLARE_QUICK_TUNNEL_REGEX = /https:\/\/[a-z0-9-]+\.trycloudflare\.com/;
|
|
297
324
|
const DEFAULT_PORT = "3000";
|
|
298
|
-
const DEFAULT_ROUTE_PATH =
|
|
325
|
+
const DEFAULT_ROUTE_PATH = CLIVLY_TICK_PATH;
|
|
299
326
|
function parseTunnelUrl(chunk) {
|
|
300
327
|
const match = chunk.match(CLOUDFLARE_QUICK_TUNNEL_REGEX);
|
|
301
328
|
return match ? match[0] : null;
|
|
@@ -1400,15 +1427,23 @@ async function confirmWorkspace(deps, credentials) {
|
|
|
1400
1427
|
return await deps.confirm("Write this workspace's credentials to .env? [y/N] ");
|
|
1401
1428
|
}
|
|
1402
1429
|
function credentialEntries(credentials) {
|
|
1403
|
-
return [
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1430
|
+
return [
|
|
1431
|
+
{
|
|
1432
|
+
key: SECRET_KEY_ENV,
|
|
1433
|
+
value: credentials.apiKey,
|
|
1434
|
+
comment: `Org secret key — ${CREDENTIALS_LOCATION}`
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
key: "CLIVLY_SYNC_TRIGGER_SECRET",
|
|
1438
|
+
value: credentials.triggerSecret,
|
|
1439
|
+
comment: `Signing secret — ${SYNC_SECRET_LOCATION}`
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
key: "CLIVLY_SYNC_TRIGGER_URL",
|
|
1443
|
+
value: TRIGGER_URL_PLACEHOLDER,
|
|
1444
|
+
comment: "Public URL of your tick route — replace <yourDomain.com> once deployed. Local dev: run `clivly dev` instead."
|
|
1445
|
+
}
|
|
1446
|
+
];
|
|
1412
1447
|
}
|
|
1413
1448
|
function writeCredentials(options, credentials) {
|
|
1414
1449
|
const { deps } = options;
|
|
@@ -1873,7 +1908,13 @@ export default createClivlySDK({
|
|
|
1873
1908
|
${sources.join(",\n")},
|
|
1874
1909
|
},
|
|
1875
1910
|
syncTrigger: {
|
|
1876
|
-
//
|
|
1911
|
+
// Where Clivly Cloud calls to start a sync — your mounted tick route.
|
|
1912
|
+
//
|
|
1913
|
+
// \`path\` lets the SDK build its own public URL from the hosting platform's
|
|
1914
|
+
// environment (VERCEL_URL, CF_PAGES_URL, RAILWAY_PUBLIC_DOMAIN,
|
|
1915
|
+
// RENDER_EXTERNAL_URL, FLY_APP_NAME), so on those platforms you never have
|
|
1916
|
+
// to set the URL by hand. \`url\` overrides that when you do.
|
|
1917
|
+
path: "${CLIVLY_TICK_PATH}",
|
|
1877
1918
|
url: process.env.CLIVLY_SYNC_TRIGGER_URL,
|
|
1878
1919
|
secret: process.env.CLIVLY_SYNC_TRIGGER_SECRET,
|
|
1879
1920
|
},
|
|
@@ -2986,14 +3027,15 @@ const triggerUrlStage = {
|
|
|
2986
3027
|
needs: [configStage.id],
|
|
2987
3028
|
run(ctx) {
|
|
2988
3029
|
const url = ctx.sdk?.syncTrigger?.url;
|
|
2989
|
-
if (url) return Promise.resolve({
|
|
3030
|
+
if (url && !require_sdk.isPlaceholderUrl(url)) return Promise.resolve({
|
|
2990
3031
|
state: "pass",
|
|
2991
3032
|
detail: url
|
|
2992
3033
|
});
|
|
3034
|
+
const isPlaceholder = url !== void 0;
|
|
2993
3035
|
return Promise.resolve({
|
|
2994
3036
|
state: "warn",
|
|
2995
|
-
detail: "Not set — remote sync cannot call back into this app.",
|
|
2996
|
-
hint: "
|
|
3037
|
+
detail: isPlaceholder ? `Still the placeholder (${url}) — remote sync cannot call back into this app.` : "Not set — remote sync cannot call back into this app.",
|
|
3038
|
+
hint: "Replace <yourDomain.com> with your deployed origin, or delete the line — on Vercel, Cloudflare Pages, Railway, Render and Fly the SDK derives the URL from the platform. For local development run `clivly dev`: it opens a tunnel and registers the URL for you, outranking whatever is in .env. Push-only setups can ignore this."
|
|
2997
3039
|
});
|
|
2998
3040
|
}
|
|
2999
3041
|
};
|
|
@@ -3547,8 +3589,8 @@ function previewMutations(deps, mutations, options) {
|
|
|
3547
3589
|
function printNextSteps(out, authComplete, loginRan, envFile) {
|
|
3548
3590
|
out("\nNext steps:\n");
|
|
3549
3591
|
out(loginRan ? " 1. Credentials written by `clivly login`\n" : ` 1. Add CLIVLY_SECRET_KEY to ${envFile} — create one at\n ${CREDENTIALS_LOCATION}\n (the legacy CLIVLY_API_KEY is still accepted)\n`);
|
|
3550
|
-
out(" 2.
|
|
3551
|
-
out("
|
|
3592
|
+
out(" 2. Local dev: run `clivly dev` for dashboard-triggered sync\n");
|
|
3593
|
+
out(" It tunnels your app and registers the URL for you — remote sync is\n deploy-only otherwise, so nothing is broken if you skip it. Once deployed\n to Vercel/Cloudflare/Railway/Render/Fly the URL is detected automatically;\n set CLIVLY_SYNC_TRIGGER_URL by hand only for a custom domain.\n");
|
|
3552
3594
|
const step = authComplete ? 3 : 4;
|
|
3553
3595
|
if (!authComplete) out(" 3. Finish resolveUser in the auth/verify route\n");
|
|
3554
3596
|
out(` ${step}. Run \`clivly status\` to see where you are\n`);
|
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-B74SPOUZ.mjs";
|
|
3
3
|
import "./mapping-score-C68uAqGB.mjs";
|
|
4
4
|
import { matchesConcept, requiredFieldsFor, scoreFieldMap, scoreRelationships, suggestCursorField, toFieldMap } from "./internal-entity-heuristics.mjs";
|
|
5
|
-
import { t as createClivlySDK } from "./sdk-
|
|
5
|
+
import { s as isPlaceholderUrl, t as createClivlySDK } from "./sdk-DYBDR939.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";
|
|
@@ -291,10 +291,37 @@ function addCommand(pm, packages) {
|
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
293
|
//#endregion
|
|
294
|
+
//#region src/tick-route.ts
|
|
295
|
+
/**
|
|
296
|
+
* The tick route's public URL path, and the template `clivly login` writes for
|
|
297
|
+
* it.
|
|
298
|
+
*
|
|
299
|
+
* Every framework the CLI scaffolds mounts the tick handler at the same URL —
|
|
300
|
+
* the *files* differ (`app/api/clivly/tick/route.ts`,
|
|
301
|
+
* `src/routes/api/clivly/tick.ts`, `app/routes/api.clivly.tick.ts`, …) but each
|
|
302
|
+
* one resolves to `/api/clivly/tick`. So this is a constant, not a per-framework
|
|
303
|
+
* lookup, and `clivly dev`, the generated config and the `.env` template can all
|
|
304
|
+
* read from one place instead of repeating the string and drifting.
|
|
305
|
+
*/
|
|
306
|
+
const CLIVLY_TICK_PATH = "/api/clivly/tick";
|
|
307
|
+
/**
|
|
308
|
+
* What `clivly login` writes into `.env` for `CLIVLY_SYNC_TRIGGER_URL`.
|
|
309
|
+
*
|
|
310
|
+
* A visible template beats an empty line: the developer sees the shape they
|
|
311
|
+
* eventually need — a public origin plus the tick path — instead of an unhelpful
|
|
312
|
+
* `CLIVLY_SYNC_TRIGGER_URL=` they have to go and look up.
|
|
313
|
+
*
|
|
314
|
+
* It is safe to ship a truthy non-address here only because the SDK refuses to
|
|
315
|
+
* treat a bracketed value as configured (`isPlaceholderUrl` in
|
|
316
|
+
* `@clivly/sdk/trigger-url`). Change the brackets here and that guard stops
|
|
317
|
+
* matching, so the two must stay in step.
|
|
318
|
+
*/
|
|
319
|
+
const TRIGGER_URL_PLACEHOLDER = `https://<yourDomain.com>${CLIVLY_TICK_PATH}`;
|
|
320
|
+
//#endregion
|
|
294
321
|
//#region src/dev-tunnel.ts
|
|
295
322
|
const CLOUDFLARE_QUICK_TUNNEL_REGEX = /https:\/\/[a-z0-9-]+\.trycloudflare\.com/;
|
|
296
323
|
const DEFAULT_PORT = "3000";
|
|
297
|
-
const DEFAULT_ROUTE_PATH =
|
|
324
|
+
const DEFAULT_ROUTE_PATH = CLIVLY_TICK_PATH;
|
|
298
325
|
function parseTunnelUrl(chunk) {
|
|
299
326
|
const match = chunk.match(CLOUDFLARE_QUICK_TUNNEL_REGEX);
|
|
300
327
|
return match ? match[0] : null;
|
|
@@ -1399,15 +1426,23 @@ async function confirmWorkspace(deps, credentials) {
|
|
|
1399
1426
|
return await deps.confirm("Write this workspace's credentials to .env? [y/N] ");
|
|
1400
1427
|
}
|
|
1401
1428
|
function credentialEntries(credentials) {
|
|
1402
|
-
return [
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1429
|
+
return [
|
|
1430
|
+
{
|
|
1431
|
+
key: SECRET_KEY_ENV,
|
|
1432
|
+
value: credentials.apiKey,
|
|
1433
|
+
comment: `Org secret key — ${CREDENTIALS_LOCATION}`
|
|
1434
|
+
},
|
|
1435
|
+
{
|
|
1436
|
+
key: "CLIVLY_SYNC_TRIGGER_SECRET",
|
|
1437
|
+
value: credentials.triggerSecret,
|
|
1438
|
+
comment: `Signing secret — ${SYNC_SECRET_LOCATION}`
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
key: "CLIVLY_SYNC_TRIGGER_URL",
|
|
1442
|
+
value: TRIGGER_URL_PLACEHOLDER,
|
|
1443
|
+
comment: "Public URL of your tick route — replace <yourDomain.com> once deployed. Local dev: run `clivly dev` instead."
|
|
1444
|
+
}
|
|
1445
|
+
];
|
|
1411
1446
|
}
|
|
1412
1447
|
function writeCredentials(options, credentials) {
|
|
1413
1448
|
const { deps } = options;
|
|
@@ -1872,7 +1907,13 @@ export default createClivlySDK({
|
|
|
1872
1907
|
${sources.join(",\n")},
|
|
1873
1908
|
},
|
|
1874
1909
|
syncTrigger: {
|
|
1875
|
-
//
|
|
1910
|
+
// Where Clivly Cloud calls to start a sync — your mounted tick route.
|
|
1911
|
+
//
|
|
1912
|
+
// \`path\` lets the SDK build its own public URL from the hosting platform's
|
|
1913
|
+
// environment (VERCEL_URL, CF_PAGES_URL, RAILWAY_PUBLIC_DOMAIN,
|
|
1914
|
+
// RENDER_EXTERNAL_URL, FLY_APP_NAME), so on those platforms you never have
|
|
1915
|
+
// to set the URL by hand. \`url\` overrides that when you do.
|
|
1916
|
+
path: "${CLIVLY_TICK_PATH}",
|
|
1876
1917
|
url: process.env.CLIVLY_SYNC_TRIGGER_URL,
|
|
1877
1918
|
secret: process.env.CLIVLY_SYNC_TRIGGER_SECRET,
|
|
1878
1919
|
},
|
|
@@ -2985,14 +3026,15 @@ const triggerUrlStage = {
|
|
|
2985
3026
|
needs: [configStage.id],
|
|
2986
3027
|
run(ctx) {
|
|
2987
3028
|
const url = ctx.sdk?.syncTrigger?.url;
|
|
2988
|
-
if (url) return Promise.resolve({
|
|
3029
|
+
if (url && !isPlaceholderUrl(url)) return Promise.resolve({
|
|
2989
3030
|
state: "pass",
|
|
2990
3031
|
detail: url
|
|
2991
3032
|
});
|
|
3033
|
+
const isPlaceholder = url !== void 0;
|
|
2992
3034
|
return Promise.resolve({
|
|
2993
3035
|
state: "warn",
|
|
2994
|
-
detail: "Not set — remote sync cannot call back into this app.",
|
|
2995
|
-
hint: "
|
|
3036
|
+
detail: isPlaceholder ? `Still the placeholder (${url}) — remote sync cannot call back into this app.` : "Not set — remote sync cannot call back into this app.",
|
|
3037
|
+
hint: "Replace <yourDomain.com> with your deployed origin, or delete the line — on Vercel, Cloudflare Pages, Railway, Render and Fly the SDK derives the URL from the platform. For local development run `clivly dev`: it opens a tunnel and registers the URL for you, outranking whatever is in .env. Push-only setups can ignore this."
|
|
2996
3038
|
});
|
|
2997
3039
|
}
|
|
2998
3040
|
};
|
|
@@ -3546,8 +3588,8 @@ function previewMutations(deps, mutations, options) {
|
|
|
3546
3588
|
function printNextSteps(out, authComplete, loginRan, envFile) {
|
|
3547
3589
|
out("\nNext steps:\n");
|
|
3548
3590
|
out(loginRan ? " 1. Credentials written by `clivly login`\n" : ` 1. Add CLIVLY_SECRET_KEY to ${envFile} — create one at\n ${CREDENTIALS_LOCATION}\n (the legacy CLIVLY_API_KEY is still accepted)\n`);
|
|
3549
|
-
out(" 2.
|
|
3550
|
-
out("
|
|
3591
|
+
out(" 2. Local dev: run `clivly dev` for dashboard-triggered sync\n");
|
|
3592
|
+
out(" It tunnels your app and registers the URL for you — remote sync is\n deploy-only otherwise, so nothing is broken if you skip it. Once deployed\n to Vercel/Cloudflare/Railway/Render/Fly the URL is detected automatically;\n set CLIVLY_SYNC_TRIGGER_URL by hand only for a custom domain.\n");
|
|
3551
3593
|
const step = authComplete ? 3 : 4;
|
|
3552
3594
|
if (!authComplete) out(" 3. Finish resolveUser in the auth/verify route\n");
|
|
3553
3595
|
out(` ${step}. Run \`clivly status\` to see where you are\n`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as PROJECTION_KEY_PATTERN, t as BASE_REF } from "./projection-
|
|
2
|
-
import { h as fanOutJoins, m as validateProjection } from "./entity-config-
|
|
1
|
+
import { n as PROJECTION_KEY_PATTERN, t as BASE_REF } from "./projection-CSGJbZlZ.mjs";
|
|
2
|
+
import { h as fanOutJoins, m as validateProjection } from "./entity-config-B74SPOUZ.mjs";
|
|
3
3
|
//#region ../core/src/projection-draft.ts
|
|
4
4
|
function emptyProjectionDraft(baseTable) {
|
|
5
5
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_projection = require("./projection-
|
|
2
|
-
const require_entity_config = require("./entity-config-
|
|
1
|
+
const require_projection = require("./projection-Dz6_i1-w.cjs");
|
|
2
|
+
const require_entity_config = require("./entity-config-7sGCk_nw.cjs");
|
|
3
3
|
//#region ../core/src/projection-draft.ts
|
|
4
4
|
function emptyProjectionDraft(baseTable) {
|
|
5
5
|
return {
|
|
@@ -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-7sGCk_nw.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 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-B74SPOUZ.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-7sGCk_nw.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 = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MATERIALIZING_CONCEPTS } from "./entity-config-
|
|
1
|
+
import { a as MATERIALIZING_CONCEPTS } from "./entity-config-B74SPOUZ.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 = [
|
|
@@ -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-CLyEg0sf.cjs");
|
|
3
3
|
exports.entitiesToMappings = require_mappings_config.entitiesToMappings;
|
|
4
4
|
exports.mappingsToEntitiesConfig = require_mappings_config.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-DQS_s4dg.mjs";
|
|
2
2
|
export { entitiesToMappings, mappingsToEntitiesConfig };
|
|
@@ -36,6 +36,34 @@ declare function describeCardinality(draft: ProjectionDraft, schema: DiscoveredS
|
|
|
36
36
|
joinKey: string;
|
|
37
37
|
}>;
|
|
38
38
|
//#endregion
|
|
39
|
+
//#region ../core/src/projection-sql.d.ts
|
|
40
|
+
/**
|
|
41
|
+
* SQL generation for projection-backed entities.
|
|
42
|
+
*
|
|
43
|
+
* Base and joins are aliased by their ref key (`base`, then each join's `key`),
|
|
44
|
+
* which is what allows the same table to be joined twice and keeps generated
|
|
45
|
+
* SQL independent of host table names.
|
|
46
|
+
*
|
|
47
|
+
* Pure string generation — no DB access. Identifiers are escaped so output is
|
|
48
|
+
* deterministic and injection-safe.
|
|
49
|
+
*/
|
|
50
|
+
/** Quote a single identifier part, escaping embedded double-quotes. */
|
|
51
|
+
declare function quoteIdent(name: string): string;
|
|
52
|
+
/**
|
|
53
|
+
* The identity expression. Composite identities concatenate their parts with
|
|
54
|
+
* `::`; validation guarantees every part is NOT NULL and non-text, which is
|
|
55
|
+
* what makes the concatenation collision-free.
|
|
56
|
+
*
|
|
57
|
+
* Exported unaliased because two paths need the same expression under different
|
|
58
|
+
* names: the view compiler aliases it `id`, and the SDK's projection push source
|
|
59
|
+
* also orders and keyset-paginates by it. Sharing one definition is what keeps
|
|
60
|
+
* a pushed row's `id` identical to the one the view would have produced.
|
|
61
|
+
*/
|
|
62
|
+
declare function compileProjectionIdentity(projection: ProjectionMapping, basePkColumn: string): string;
|
|
63
|
+
declare function compileProjectionJoins(projection: ProjectionMapping): string[];
|
|
64
|
+
/** `FROM <baseTable> AS "base"` — the alias every ref resolves against. */
|
|
65
|
+
declare function compileProjectionFrom(projection: ProjectionMapping): string;
|
|
66
|
+
//#endregion
|
|
39
67
|
//#region ../core/src/projection-validate.d.ts
|
|
40
68
|
/**
|
|
41
69
|
* Validate a projection against the discovered schema. Returns every error
|
|
@@ -69,4 +97,4 @@ declare function coversUniqueKey(table: DiscoveredSchemaTable, columns: string[]
|
|
|
69
97
|
/** Is this table's payload rich enough to validate a projection against? */
|
|
70
98
|
declare function hasRichMeta(table: DiscoveredSchemaTable): boolean;
|
|
71
99
|
//#endregion
|
|
72
|
-
export { validateProjection as a,
|
|
100
|
+
export { joinFansOut as _, validateProjection as a, compileProjectionJoins as c, describeCardinality as d, draftErrors as f, fanOutJoins as g, suggestJoinConditions as h, primaryKeyColumns as i, quoteIdent as l, emptyProjectionDraft as m, coversUniqueKey as n, compileProjectionFrom as o, draftToProjection as p, hasRichMeta as r, compileProjectionIdentity as s, columnMetaFor as t, ProjectionDraft as u };
|
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-C4A5jgA4.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;
|
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-Dt5QQSKO.mjs";
|
|
2
2
|
export { computeSampleWarnings, previewSync, reconcile, runSync };
|
|
@@ -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-B5nDal14.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 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-CSYwEWf5.mjs";
|
|
2
2
|
export { DEFAULT_VIEW_PREFIX, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
|
@@ -36,6 +36,34 @@ declare function describeCardinality(draft: ProjectionDraft, schema: DiscoveredS
|
|
|
36
36
|
joinKey: string;
|
|
37
37
|
}>;
|
|
38
38
|
//#endregion
|
|
39
|
+
//#region ../core/src/projection-sql.d.ts
|
|
40
|
+
/**
|
|
41
|
+
* SQL generation for projection-backed entities.
|
|
42
|
+
*
|
|
43
|
+
* Base and joins are aliased by their ref key (`base`, then each join's `key`),
|
|
44
|
+
* which is what allows the same table to be joined twice and keeps generated
|
|
45
|
+
* SQL independent of host table names.
|
|
46
|
+
*
|
|
47
|
+
* Pure string generation — no DB access. Identifiers are escaped so output is
|
|
48
|
+
* deterministic and injection-safe.
|
|
49
|
+
*/
|
|
50
|
+
/** Quote a single identifier part, escaping embedded double-quotes. */
|
|
51
|
+
declare function quoteIdent(name: string): string;
|
|
52
|
+
/**
|
|
53
|
+
* The identity expression. Composite identities concatenate their parts with
|
|
54
|
+
* `::`; validation guarantees every part is NOT NULL and non-text, which is
|
|
55
|
+
* what makes the concatenation collision-free.
|
|
56
|
+
*
|
|
57
|
+
* Exported unaliased because two paths need the same expression under different
|
|
58
|
+
* names: the view compiler aliases it `id`, and the SDK's projection push source
|
|
59
|
+
* also orders and keyset-paginates by it. Sharing one definition is what keeps
|
|
60
|
+
* a pushed row's `id` identical to the one the view would have produced.
|
|
61
|
+
*/
|
|
62
|
+
declare function compileProjectionIdentity(projection: ProjectionMapping, basePkColumn: string): string;
|
|
63
|
+
declare function compileProjectionJoins(projection: ProjectionMapping): string[];
|
|
64
|
+
/** `FROM <baseTable> AS "base"` — the alias every ref resolves against. */
|
|
65
|
+
declare function compileProjectionFrom(projection: ProjectionMapping): string;
|
|
66
|
+
//#endregion
|
|
39
67
|
//#region ../core/src/projection-validate.d.ts
|
|
40
68
|
/**
|
|
41
69
|
* Validate a projection against the discovered schema. Returns every error
|
|
@@ -69,4 +97,4 @@ declare function coversUniqueKey(table: DiscoveredSchemaTable, columns: string[]
|
|
|
69
97
|
/** Is this table's payload rich enough to validate a projection against? */
|
|
70
98
|
declare function hasRichMeta(table: DiscoveredSchemaTable): boolean;
|
|
71
99
|
//#endregion
|
|
72
|
-
export { validateProjection as a,
|
|
100
|
+
export { joinFansOut as _, validateProjection as a, compileProjectionJoins as c, describeCardinality as d, draftErrors as f, fanOutJoins as g, suggestJoinConditions as h, primaryKeyColumns as i, quoteIdent as l, emptyProjectionDraft as m, coversUniqueKey as n, compileProjectionFrom as o, draftToProjection as p, hasRichMeta as r, compileProjectionIdentity as s, columnMetaFor as t, ProjectionDraft as u };
|
package/internal.cjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_projection = require("./projection-
|
|
3
|
-
const require_entity_config = require("./entity-config-
|
|
4
|
-
const require_mappings_config = require("./mappings-config-
|
|
2
|
+
const require_projection = require("./projection-Dz6_i1-w.cjs");
|
|
3
|
+
const require_entity_config = require("./entity-config-7sGCk_nw.cjs");
|
|
4
|
+
const require_mappings_config = require("./mappings-config-CLyEg0sf.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 require_internal = require("./internal-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
7
|
+
const require_internal = require("./internal-DqduZU3l.cjs");
|
|
8
|
+
const require_projection_sql = require("./projection-sql-Cl1qIn8m.cjs");
|
|
9
|
+
const require_view_compiler = require("./view-compiler-B5nDal14.cjs");
|
|
10
|
+
const require_sync_engine = require("./sync-engine-C4A5jgA4.cjs");
|
|
10
11
|
exports.BASE_REF = require_projection.BASE_REF;
|
|
11
12
|
exports.CANONICAL_FIELDS = require_entity_config.CANONICAL_FIELDS;
|
|
12
13
|
exports.CRM_CONCEPTS = require_entity_config.CRM_CONCEPTS;
|
|
@@ -19,6 +20,9 @@ exports.buildRelationships = require_mapping_form.buildRelationships;
|
|
|
19
20
|
exports.columnMetaFor = require_entity_config.columnMetaFor;
|
|
20
21
|
exports.compileEntityView = require_view_compiler.compileEntityView;
|
|
21
22
|
exports.compileEntityViews = require_view_compiler.compileEntityViews;
|
|
23
|
+
exports.compileProjectionFrom = require_projection_sql.compileProjectionFrom;
|
|
24
|
+
exports.compileProjectionIdentity = require_projection_sql.compileProjectionIdentity;
|
|
25
|
+
exports.compileProjectionJoins = require_projection_sql.compileProjectionJoins;
|
|
22
26
|
exports.coversUniqueKey = require_entity_config.coversUniqueKey;
|
|
23
27
|
exports.defineClivlyConfig = require_entity_config.defineClivlyConfig;
|
|
24
28
|
exports.describeCardinality = require_internal.describeCardinality;
|
|
@@ -35,6 +39,7 @@ exports.joinFansOut = require_entity_config.joinFansOut;
|
|
|
35
39
|
exports.mappingsToEntitiesConfig = require_mappings_config.mappingsToEntitiesConfig;
|
|
36
40
|
exports.primaryKeyColumns = require_entity_config.primaryKeyColumns;
|
|
37
41
|
exports.projectionSchema = require_projection.projectionSchema;
|
|
42
|
+
exports.quoteIdent = require_projection_sql.quoteIdent;
|
|
38
43
|
exports.reconcile = require_sync_engine.reconcile;
|
|
39
44
|
exports.relationshipSchema = require_entity_config.relationshipSchema;
|
|
40
45
|
exports.relationshipViaSignature = require_mapping_form.relationshipViaSignature;
|
package/internal.d.cts
CHANGED
|
@@ -7,5 +7,5 @@ import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings
|
|
|
7
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-CmEdAMwj.cjs";
|
|
8
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-BG2O1an2.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 { a as validateProjection, c as
|
|
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 EntityMappingRow, type EntitySyncResult, 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, type PersistAction, type ProjectionDraft, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, 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, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, coversUniqueKey, defineClivlyConfig, describeCardinality, draftErrors, draftToProjection, emptyProjectionDraft, entitiesConfigSchema, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, joinFansOut, mappingsToEntitiesConfig, primaryKeyColumns, projectionSchema, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, suggestJoinConditions, validateEntitiesConfig, validateProjection };
|
|
10
|
+
import { _ as joinFansOut, a as validateProjection, c as compileProjectionJoins, d as describeCardinality, f as draftErrors, g as fanOutJoins, h as suggestJoinConditions, i as primaryKeyColumns, l as quoteIdent, m as emptyProjectionDraft, n as coversUniqueKey, o as compileProjectionFrom, p as draftToProjection, r as hasRichMeta, s as compileProjectionIdentity, t as columnMetaFor, u as ProjectionDraft } from "./internal-wCXSELDN.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 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 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, type PersistAction, type ProjectionDraft, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, 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, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, coversUniqueKey, defineClivlyConfig, describeCardinality, draftErrors, draftToProjection, emptyProjectionDraft, entitiesConfigSchema, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, joinFansOut, mappingsToEntitiesConfig, primaryKeyColumns, projectionSchema, quoteIdent, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, suggestJoinConditions, validateEntitiesConfig, validateProjection };
|
package/internal.d.mts
CHANGED
|
@@ -7,5 +7,5 @@ import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings
|
|
|
7
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-Bo7pqXW3.mjs";
|
|
8
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-DgQbrJON.mjs";
|
|
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.mjs";
|
|
10
|
-
import { a as validateProjection, c as
|
|
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 EntityMappingRow, type EntitySyncResult, 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, type PersistAction, type ProjectionDraft, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, 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, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, coversUniqueKey, defineClivlyConfig, describeCardinality, draftErrors, draftToProjection, emptyProjectionDraft, entitiesConfigSchema, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, joinFansOut, mappingsToEntitiesConfig, primaryKeyColumns, projectionSchema, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, suggestJoinConditions, validateEntitiesConfig, validateProjection };
|
|
10
|
+
import { _ as joinFansOut, a as validateProjection, c as compileProjectionJoins, d as describeCardinality, f as draftErrors, g as fanOutJoins, h as suggestJoinConditions, i as primaryKeyColumns, l as quoteIdent, m as emptyProjectionDraft, n as coversUniqueKey, o as compileProjectionFrom, p as draftToProjection, r as hasRichMeta, s as compileProjectionIdentity, t as columnMetaFor, u as ProjectionDraft } from "./internal-o2M7FGlR.mjs";
|
|
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 EntityMappingRow, type EntitySyncResult, 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, type PersistAction, type ProjectionDraft, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, 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, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, coversUniqueKey, defineClivlyConfig, describeCardinality, draftErrors, draftToProjection, emptyProjectionDraft, entitiesConfigSchema, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, joinFansOut, mappingsToEntitiesConfig, primaryKeyColumns, projectionSchema, quoteIdent, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, suggestJoinConditions, validateEntitiesConfig, validateProjection };
|
package/internal.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { i as projectionSchema, r as identityRefs, t as BASE_REF } from "./projection-
|
|
2
|
-
import { _ as columnMetaFor, a as MATERIALIZING_CONCEPTS, b as primaryKeyColumns, c as entitiesConfigSchema, d as relationshipSchema, f as relationshipsSchema, g as joinFansOut, h as fanOutJoins, i as ClivlyConfigError, l as filterSchema, m as validateProjection, n as CRM_CONCEPTS, p as validateEntitiesConfig, s as defineClivlyConfig, t as CANONICAL_FIELDS, v as coversUniqueKey, y as hasRichMeta } from "./entity-config-
|
|
3
|
-
import { n as mappingsToEntitiesConfig } from "./mappings-config-
|
|
1
|
+
import { i as projectionSchema, r as identityRefs, t as BASE_REF } from "./projection-CSGJbZlZ.mjs";
|
|
2
|
+
import { _ as columnMetaFor, a as MATERIALIZING_CONCEPTS, b as primaryKeyColumns, c as entitiesConfigSchema, d as relationshipSchema, f as relationshipsSchema, g as joinFansOut, h as fanOutJoins, i as ClivlyConfigError, l as filterSchema, m as validateProjection, n as CRM_CONCEPTS, p as validateEntitiesConfig, s as defineClivlyConfig, t as CANONICAL_FIELDS, v as coversUniqueKey, y as hasRichMeta } from "./entity-config-B74SPOUZ.mjs";
|
|
3
|
+
import { n as mappingsToEntitiesConfig } from "./mappings-config-DQS_s4dg.mjs";
|
|
4
4
|
import { t as authCustom } from "./auth-adapter-gfVDxf3d.mjs";
|
|
5
5
|
import { n as buildRelationships, r as relationshipViaSignature, t as buildFilterFromDiscriminator } from "./mapping-form-DigkuvFc.mjs";
|
|
6
|
-
import { a as suggestJoinConditions, i as emptyProjectionDraft, n as draftErrors, r as draftToProjection, t as describeCardinality } from "./internal-
|
|
7
|
-
import {
|
|
8
|
-
import { i as
|
|
9
|
-
|
|
6
|
+
import { a as suggestJoinConditions, i as emptyProjectionDraft, n as draftErrors, r as draftToProjection, t as describeCardinality } from "./internal-CykXpEGk.mjs";
|
|
7
|
+
import { a as quoteIdent, n as compileProjectionIdentity, r as compileProjectionJoins, t as compileProjectionFrom } from "./projection-sql-BgnfiGqF.mjs";
|
|
8
|
+
import { i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-CSYwEWf5.mjs";
|
|
9
|
+
import { i as runSync, r as reconcile } from "./sync-engine-Dt5QQSKO.mjs";
|
|
10
|
+
export { BASE_REF, CANONICAL_FIELDS, CRM_CONCEPTS, ClivlyConfigError, DEFAULT_VIEW_PREFIX, MATERIALIZING_CONCEPTS, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, coversUniqueKey, defineClivlyConfig, describeCardinality, draftErrors, draftToProjection, emptyProjectionDraft, entitiesConfigSchema, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, identityRefs, joinFansOut, mappingsToEntitiesConfig, primaryKeyColumns, projectionSchema, quoteIdent, reconcile, relationshipSchema, relationshipViaSignature, relationshipsSchema, runSync, suggestJoinConditions, validateEntitiesConfig, validateProjection };
|
|
@@ -324,6 +324,14 @@ interface SyncSource {
|
|
|
324
324
|
}): Promise<Record<string, unknown>[]>;
|
|
325
325
|
/** Stable, unique tie-breaker column for keyset paging. Defaults to "id". */
|
|
326
326
|
idField?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Custom-object slug this source mirrors into. Only meaningful for entries in
|
|
329
|
+
* `source.custom`, whose element type narrows it to required — declared here
|
|
330
|
+
* because the sync and readiness paths read `source.objectType` off a plain
|
|
331
|
+
* `SyncSource`, so leaving it off left the property required by one type,
|
|
332
|
+
* absent from another, and read by the runtime.
|
|
333
|
+
*/
|
|
334
|
+
objectType?: string;
|
|
327
335
|
/** Set by `fromDrizzle`; lets `doctor` introspect the backing table. */
|
|
328
336
|
[DRIZZLE_META]?: DrizzleSourceMeta;
|
|
329
337
|
}
|
|
@@ -324,6 +324,14 @@ interface SyncSource {
|
|
|
324
324
|
}): Promise<Record<string, unknown>[]>;
|
|
325
325
|
/** Stable, unique tie-breaker column for keyset paging. Defaults to "id". */
|
|
326
326
|
idField?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Custom-object slug this source mirrors into. Only meaningful for entries in
|
|
329
|
+
* `source.custom`, whose element type narrows it to required — declared here
|
|
330
|
+
* because the sync and readiness paths read `source.objectType` off a plain
|
|
331
|
+
* `SyncSource`, so leaving it off left the property required by one type,
|
|
332
|
+
* absent from another, and read by the runtime.
|
|
333
|
+
*/
|
|
334
|
+
objectType?: string;
|
|
327
335
|
/** Set by `fromDrizzle`; lets `doctor` introspect the backing table. */
|
|
328
336
|
[DRIZZLE_META]?: DrizzleSourceMeta;
|
|
329
337
|
}
|