clivly 0.13.0 → 0.15.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/README.md +13 -6
- package/{adapter-DTMeGGsl.d.cts → adapter-BMAUq4hf.d.mts} +28 -1
- package/{adapter-DhPBRNpi.d.mts → adapter-IH3r_I8v.d.cts} +28 -1
- package/{auth-adapter-C6rDx3XH.d.mts → auth-adapter-Bt1GZiag.d.cts} +1 -1
- package/{auth-adapter-Csk9KkvI.d.cts → auth-adapter-CHy273qb.d.mts} +1 -1
- package/auth-better-auth.d.cts +1 -1
- package/auth-better-auth.d.mts +1 -1
- package/auth-clerk.d.cts +1 -1
- package/auth-clerk.d.mts +1 -1
- package/auth-workos.d.cts +1 -1
- package/auth-workos.d.mts +1 -1
- package/core-adapter.d.cts +1 -1
- package/core-adapter.d.mts +1 -1
- package/core-auth-adapter.d.cts +1 -1
- package/core-auth-adapter.d.mts +1 -1
- package/core-sync-engine.cjs +3 -1
- package/core-sync-engine.d.cts +2 -2
- package/core-sync-engine.d.mts +2 -2
- package/core-sync-engine.mjs +2 -2
- package/core-types.d.cts +1 -1
- package/core-types.d.mts +1 -1
- package/core.cjs +4 -2
- package/core.d.cts +6 -6
- package/core.d.mts +6 -6
- package/core.mjs +3 -3
- package/index.cjs +102 -1
- package/index.mjs +102 -1
- package/{internal-Cmx7Zevf.d.mts → internal-C7NlPM3M.d.mts} +3 -1
- package/{internal-u0Bks5Gr.mjs → internal-CLvZdVj5.mjs} +12 -0
- package/{internal-vH5Rlg6Q.d.cts → internal-D2J4VQWT.d.cts} +3 -1
- package/{internal-BxtvxF7Z.cjs → internal-DsArcqkP.cjs} +12 -0
- package/internal-adapter.d.cts +1 -1
- package/internal-adapter.d.mts +1 -1
- package/internal-auth-adapter.d.cts +1 -1
- package/internal-auth-adapter.d.mts +1 -1
- package/internal-sync-engine.cjs +3 -1
- package/internal-sync-engine.d.cts +2 -2
- package/internal-sync-engine.d.mts +2 -2
- package/internal-sync-engine.mjs +2 -2
- package/internal-types.d.cts +1 -1
- package/internal-types.d.mts +1 -1
- package/internal.cjs +4 -2
- package/internal.d.cts +6 -6
- package/internal.d.mts +6 -6
- package/internal.mjs +3 -3
- package/package.json +1 -1
- package/{sdk-B-dp1tZN.mjs → sdk-DLoVPlGB.mjs} +139 -5
- package/{sdk-DKfKhJD_.cjs → sdk-ZMy4C4VK.cjs} +156 -4
- package/sdk.cjs +4 -1
- package/sdk.d.cts +32 -0
- package/sdk.d.mts +32 -0
- package/sdk.mjs +2 -2
- package/{sync-engine-Dwm_KDUS.cjs → sync-engine-BGVDsrOQ.cjs} +131 -71
- package/{sync-engine-V3_UutGv.d.cts → sync-engine-CYsWOujz.d.cts} +63 -22
- package/{sync-engine--M9EaONC.d.mts → sync-engine-C_5TpvfX.d.mts} +63 -22
- package/{sync-engine-Df2MCs_n.mjs → sync-engine-DH058G3w.mjs} +120 -72
- package/{types-B17TWEOL.d.cts → types-CpAtAtxd.d.cts} +35 -0
- package/{types-B17TWEOL.d.mts → types-CpAtAtxd.d.mts} +35 -0
package/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
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 {
|
|
5
|
+
import { n as createClivlySDK, u as isPlaceholderUrl } from "./sdk-DLoVPlGB.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";
|
|
@@ -3356,6 +3356,87 @@ function checkBootHook(readFile) {
|
|
|
3356
3356
|
};
|
|
3357
3357
|
}
|
|
3358
3358
|
//#endregion
|
|
3359
|
+
//#region src/cursor-store-check.ts
|
|
3360
|
+
/**
|
|
3361
|
+
* Whether a config that will run on a serverless runtime persists its sync
|
|
3362
|
+
* cursor.
|
|
3363
|
+
*
|
|
3364
|
+
* Without a persisted cursor, every `delta` sync starts from `null` and
|
|
3365
|
+
* re-reads the whole source table — because the SDK's default store lives in
|
|
3366
|
+
* memory, and a request-scoped runtime discards memory between invocations.
|
|
3367
|
+
* Nothing about this is visible from the outside: the run reports success, the
|
|
3368
|
+
* row counts look plausible, and the only symptom is the database bill. One
|
|
3369
|
+
* deployment on Workers burned a 5 GB monthly network allowance before launch
|
|
3370
|
+
* with two users, and `clivly status` was green the whole time.
|
|
3371
|
+
*
|
|
3372
|
+
* Read from source text rather than by loading the config: an edge config
|
|
3373
|
+
* frequently cannot be imported in Node at all, and that is exactly the case
|
|
3374
|
+
* that most needs an answer here.
|
|
3375
|
+
*/
|
|
3376
|
+
/** `cursorStore:` or `cursorStore,` as a real property, not in a comment. */
|
|
3377
|
+
const CURSOR_STORE_PROPERTY = /(^|[{,\s])cursorStore\s*[:,}]/;
|
|
3378
|
+
/** Marker files that pin a project to a specific serverless platform. */
|
|
3379
|
+
const PLATFORM_MARKERS = [
|
|
3380
|
+
{
|
|
3381
|
+
file: "wrangler.jsonc",
|
|
3382
|
+
label: "Cloudflare Workers"
|
|
3383
|
+
},
|
|
3384
|
+
{
|
|
3385
|
+
file: "wrangler.json",
|
|
3386
|
+
label: "Cloudflare Workers"
|
|
3387
|
+
},
|
|
3388
|
+
{
|
|
3389
|
+
file: "wrangler.toml",
|
|
3390
|
+
label: "Cloudflare Workers"
|
|
3391
|
+
},
|
|
3392
|
+
{
|
|
3393
|
+
file: "vercel.json",
|
|
3394
|
+
label: "Vercel"
|
|
3395
|
+
},
|
|
3396
|
+
{
|
|
3397
|
+
file: "netlify.toml",
|
|
3398
|
+
label: "Netlify"
|
|
3399
|
+
}
|
|
3400
|
+
];
|
|
3401
|
+
/** Next.js and friends: `export const runtime = "edge"`. */
|
|
3402
|
+
const INLINE_EDGE_RUNTIME = /export\s+const\s+runtime\s*=\s*["']edge["']/;
|
|
3403
|
+
/**
|
|
3404
|
+
* Strip comments and string literals before looking for the property.
|
|
3405
|
+
*
|
|
3406
|
+
* The scaffolded config ships `cursorStore` commented out as an example, and a
|
|
3407
|
+
* scan that counted that as configured would hand back a green rung for the
|
|
3408
|
+
* precise setup it exists to catch.
|
|
3409
|
+
*/
|
|
3410
|
+
function stripCommentsAndStrings(source) {
|
|
3411
|
+
return source.replace(/\/\*[\s\S]*?\*\//g, " ").replace(/(^|[^:])\/\/[^\n]*/g, "$1 ").replace(/"(?:[^"\\]|\\.)*"/g, "\"\"").replace(/'(?:[^'\\]|\\.)*'/g, "''").replace(/`(?:[^`\\]|\\.)*`/g, "``");
|
|
3412
|
+
}
|
|
3413
|
+
function detectEdgeRuntime(source, readFile) {
|
|
3414
|
+
for (const { file, label } of PLATFORM_MARKERS) if (readFile(file) !== null) return label;
|
|
3415
|
+
return INLINE_EDGE_RUNTIME.test(source) ? "edge runtime" : null;
|
|
3416
|
+
}
|
|
3417
|
+
/**
|
|
3418
|
+
* `readFile` resolves paths against the project root and is used only to spot
|
|
3419
|
+
* platform marker files. A project with none is treated as a long-lived host —
|
|
3420
|
+
* the safe default, since warning a Node host would be noise, and noise is
|
|
3421
|
+
* what teaches people to ignore warnings.
|
|
3422
|
+
*/
|
|
3423
|
+
function detectCursorStore(source, readFile = () => null) {
|
|
3424
|
+
const configured = CURSOR_STORE_PROPERTY.test(stripCommentsAndStrings(source));
|
|
3425
|
+
const edgeRuntime = detectEdgeRuntime(source, readFile);
|
|
3426
|
+
return {
|
|
3427
|
+
configured,
|
|
3428
|
+
edgeRuntime,
|
|
3429
|
+
shouldWarn: edgeRuntime !== null && !configured
|
|
3430
|
+
};
|
|
3431
|
+
}
|
|
3432
|
+
/** The remediation shown under the warning. */
|
|
3433
|
+
const CURSOR_STORE_HINT = "Pass `cursorStore: kvCursorStore(env.MY_KV)` (exported from `@clivly/sdk`) so delta syncs resume instead of re-reading every table. See https://clivly.com/docs/concepts/sync#cursor-stores";
|
|
3434
|
+
function cursorStoreDetail(verdict) {
|
|
3435
|
+
if (verdict.configured) return "delta syncs resume from a persisted cursor";
|
|
3436
|
+
if (verdict.edgeRuntime === null) return "in-memory (fine on a long-lived host)";
|
|
3437
|
+
return `No \`cursorStore\` on ${verdict.edgeRuntime} — memory does not survive between invocations, so every delta sync re-reads your entire source tables.`;
|
|
3438
|
+
}
|
|
3439
|
+
//#endregion
|
|
3359
3440
|
//#region src/edge-safety.ts
|
|
3360
3441
|
const NODE_BUILTINS = /* @__PURE__ */ new Set([
|
|
3361
3442
|
"assert",
|
|
@@ -3699,6 +3780,26 @@ const STATUS_STAGES = [
|
|
|
3699
3780
|
});
|
|
3700
3781
|
}
|
|
3701
3782
|
},
|
|
3783
|
+
{
|
|
3784
|
+
id: "cursor-store",
|
|
3785
|
+
label: "Sync cursor persists",
|
|
3786
|
+
needs: [configStage.id],
|
|
3787
|
+
run(ctx) {
|
|
3788
|
+
const read = ctx.readConfigSource ?? defaultReadConfigSource;
|
|
3789
|
+
const source = read(ctx.configPath);
|
|
3790
|
+
if (source === null) return Promise.resolve({
|
|
3791
|
+
state: "skip",
|
|
3792
|
+
detail: "config not readable"
|
|
3793
|
+
});
|
|
3794
|
+
const root = dirname(ctx.configPath);
|
|
3795
|
+
const verdict = detectCursorStore(source, (relative) => read(resolve(root, relative)));
|
|
3796
|
+
return Promise.resolve({
|
|
3797
|
+
state: verdict.shouldWarn ? "warn" : "pass",
|
|
3798
|
+
detail: cursorStoreDetail(verdict),
|
|
3799
|
+
...verdict.shouldWarn ? { hint: CURSOR_STORE_HINT } : {}
|
|
3800
|
+
});
|
|
3801
|
+
}
|
|
3802
|
+
},
|
|
3702
3803
|
{
|
|
3703
3804
|
id: "boot-hook",
|
|
3704
3805
|
label: "Boot hook wired",
|
|
@@ -9,7 +9,7 @@ import { L as ProjectionJoin, R as ProjectionMapping, h as FilterExpr, l as Conf
|
|
|
9
9
|
* D8 made for stage-rule conditions.
|
|
10
10
|
*/
|
|
11
11
|
interface PerSeatValueSource {
|
|
12
|
-
/** Flat
|
|
12
|
+
/** Flat fee in cents, using the same price basis as the plan prices. */
|
|
13
13
|
baseFeeCents?: number;
|
|
14
14
|
/** Mapped column holding "month" or "year". Absent means always monthly. */
|
|
15
15
|
intervalField?: string;
|
|
@@ -18,6 +18,8 @@ interface PerSeatValueSource {
|
|
|
18
18
|
planField: string;
|
|
19
19
|
/** Unit price in cents, keyed by the value found in `planField`. */
|
|
20
20
|
plans: Record<string, number>;
|
|
21
|
+
/** Monthly rates or amounts charged each billing period. Omitted preserves legacy behaviour. */
|
|
22
|
+
priceBasis?: "monthly" | "billing_interval";
|
|
21
23
|
/** Mapped column holding the seat count. */
|
|
22
24
|
seatField: string;
|
|
23
25
|
/** Stage types whose deals are worth nothing (usually `["lost"]`). */
|
|
@@ -23,6 +23,18 @@ function computeDealValue(source, fields, mappedFields, stageType) {
|
|
|
23
23
|
const seats = Number(rawSeats);
|
|
24
24
|
if (!Number.isSafeInteger(seats)) return null;
|
|
25
25
|
const monthly = (source.baseFeeCents ?? 0) + seats * unitPriceCents;
|
|
26
|
+
if (!Number.isSafeInteger(monthly) || monthly < 0) return null;
|
|
27
|
+
return normalizePrice(monthly, source, fields, mappedFields);
|
|
28
|
+
}
|
|
29
|
+
/** Preserve old configurations while making new price bases explicit. */
|
|
30
|
+
function normalizePrice(monthly, source, fields, mappedFields) {
|
|
31
|
+
if (source.priceBasis === "monthly") return monthly;
|
|
32
|
+
if (source.priceBasis === "billing_interval") {
|
|
33
|
+
const interval = source.intervalField && mappedFields.has(source.intervalField) ? fields[source.intervalField]?.trim().toLowerCase() : null;
|
|
34
|
+
if (interval === "month" || interval === "monthly") return monthly;
|
|
35
|
+
if (interval === "year" || interval === "annual" || interval === "annually" || interval === "yearly") return Math.round(monthly / MONTHS_PER_YEAR);
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
26
38
|
return source.intervalField !== void 0 && mappedFields.has(source.intervalField) && fields[source.intervalField] === "year" ? Math.round(monthly / MONTHS_PER_YEAR) : monthly;
|
|
27
39
|
}
|
|
28
40
|
//#endregion
|
|
@@ -9,7 +9,7 @@ import { L as ProjectionJoin, R as ProjectionMapping, h as FilterExpr, l as Conf
|
|
|
9
9
|
* D8 made for stage-rule conditions.
|
|
10
10
|
*/
|
|
11
11
|
interface PerSeatValueSource {
|
|
12
|
-
/** Flat
|
|
12
|
+
/** Flat fee in cents, using the same price basis as the plan prices. */
|
|
13
13
|
baseFeeCents?: number;
|
|
14
14
|
/** Mapped column holding "month" or "year". Absent means always monthly. */
|
|
15
15
|
intervalField?: string;
|
|
@@ -18,6 +18,8 @@ interface PerSeatValueSource {
|
|
|
18
18
|
planField: string;
|
|
19
19
|
/** Unit price in cents, keyed by the value found in `planField`. */
|
|
20
20
|
plans: Record<string, number>;
|
|
21
|
+
/** Monthly rates or amounts charged each billing period. Omitted preserves legacy behaviour. */
|
|
22
|
+
priceBasis?: "monthly" | "billing_interval";
|
|
21
23
|
/** Mapped column holding the seat count. */
|
|
22
24
|
seatField: string;
|
|
23
25
|
/** Stage types whose deals are worth nothing (usually `["lost"]`). */
|
|
@@ -23,6 +23,18 @@ function computeDealValue(source, fields, mappedFields, stageType) {
|
|
|
23
23
|
const seats = Number(rawSeats);
|
|
24
24
|
if (!Number.isSafeInteger(seats)) return null;
|
|
25
25
|
const monthly = (source.baseFeeCents ?? 0) + seats * unitPriceCents;
|
|
26
|
+
if (!Number.isSafeInteger(monthly) || monthly < 0) return null;
|
|
27
|
+
return normalizePrice(monthly, source, fields, mappedFields);
|
|
28
|
+
}
|
|
29
|
+
/** Preserve old configurations while making new price bases explicit. */
|
|
30
|
+
function normalizePrice(monthly, source, fields, mappedFields) {
|
|
31
|
+
if (source.priceBasis === "monthly") return monthly;
|
|
32
|
+
if (source.priceBasis === "billing_interval") {
|
|
33
|
+
const interval = source.intervalField && mappedFields.has(source.intervalField) ? fields[source.intervalField]?.trim().toLowerCase() : null;
|
|
34
|
+
if (interval === "month" || interval === "monthly") return monthly;
|
|
35
|
+
if (interval === "year" || interval === "annual" || interval === "annually" || interval === "yearly") return Math.round(monthly / MONTHS_PER_YEAR);
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
26
38
|
return source.intervalField !== void 0 && mappedFields.has(source.intervalField) && fields[source.intervalField] === "year" ? Math.round(monthly / MONTHS_PER_YEAR) : monthly;
|
|
27
39
|
}
|
|
28
40
|
//#endregion
|
package/internal-adapter.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CRMAdapter } from "./adapter-
|
|
1
|
+
import { t as CRMAdapter } from "./adapter-IH3r_I8v.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-BMAUq4hf.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-Bt1GZiag.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-CHy273qb.mjs";
|
|
2
2
|
export { ClivlyAuthAdapter, ClivlyUser, CrmMembership, MembershipResolver, authCustom };
|
package/internal-sync-engine.cjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
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-BGVDsrOQ.cjs");
|
|
3
3
|
exports.computeSampleWarnings = require_sync_engine.computeSampleWarnings;
|
|
4
|
+
exports.isRemovalAction = require_sync_engine.isRemovalAction;
|
|
4
5
|
exports.previewSync = require_sync_engine.previewSync;
|
|
5
6
|
exports.reconcile = require_sync_engine.reconcile;
|
|
7
|
+
exports.resolveActions = require_sync_engine.resolveActions;
|
|
6
8
|
exports.runSync = require_sync_engine.runSync;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PreviewWarning, c as
|
|
2
|
-
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, previewSync, reconcile, runSync };
|
|
1
|
+
import { a as PreviewWarning, c as SyncAction, d as computeSampleWarnings, f as isRemovalAction, g as runSync, h as resolveActions, i as PreviewResult, l as SyncResult, m as reconcile, n as MirrorRecord, o as ResolvedMembership, p as previewSync, r as PersistAction, s as SourceRow, t as EntitySyncResult, u as SyncStore } from "./sync-engine-CYsWOujz.cjs";
|
|
2
|
+
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, ResolvedMembership, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, isRemovalAction, previewSync, reconcile, resolveActions, runSync };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PreviewWarning, c as
|
|
2
|
-
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, previewSync, reconcile, runSync };
|
|
1
|
+
import { a as PreviewWarning, c as SyncAction, d as computeSampleWarnings, f as isRemovalAction, g as runSync, h as resolveActions, i as PreviewResult, l as SyncResult, m as reconcile, n as MirrorRecord, o as ResolvedMembership, p as previewSync, r as PersistAction, s as SourceRow, t as EntitySyncResult, u as SyncStore } from "./sync-engine-C_5TpvfX.mjs";
|
|
2
|
+
export { EntitySyncResult, MirrorRecord, PersistAction, PreviewResult, PreviewWarning, ResolvedMembership, SourceRow, SyncAction, SyncResult, SyncStore, computeSampleWarnings, isRemovalAction, previewSync, reconcile, resolveActions, runSync };
|
package/internal-sync-engine.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
export { computeSampleWarnings, previewSync, reconcile, runSync };
|
|
1
|
+
import { a as resolveActions, i as reconcile, n as isRemovalAction, o as runSync, r as previewSync, t as computeSampleWarnings } from "./sync-engine-DH058G3w.mjs";
|
|
2
|
+
export { computeSampleWarnings, isRemovalAction, previewSync, reconcile, resolveActions, runSync };
|
package/internal-types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as UpdateCompanyInput, C as RecordSource, D as TaskFilters, E as TaskEntityType, F as isClosedStageType, M as UpdateDealInput, N as UpdateTaskInput, O as TaskPriority, P as ValueInterval, S as PipelineStageConfig, T as Task, _ as OPEN_STAGE_TYPE, a as Contact, b as PipelineConfig, c as CreateActivityInput, d as CreateDealInput, f as CreateTaskInput, g as Note, h as DealStage, i as CompanyFilters, j as UpdateContactInput, k as TaskStatus, l as CreateCompanyInput, m as Deal, n as ActivityType, o as ContactFilters, p as CrmRole, r as Company, s as ContactStatus, t as Activity, u as CreateContactInput, v as Page, w as StageType, x as PipelineKind, y as PageRequest } from "./types-
|
|
1
|
+
import { A as UpdateCompanyInput, C as RecordSource, D as TaskFilters, E as TaskEntityType, F as isClosedStageType, M as UpdateDealInput, N as UpdateTaskInput, O as TaskPriority, P as ValueInterval, S as PipelineStageConfig, T as Task, _ as OPEN_STAGE_TYPE, a as Contact, b as PipelineConfig, c as CreateActivityInput, d as CreateDealInput, f as CreateTaskInput, g as Note, h as DealStage, i as CompanyFilters, j as UpdateContactInput, k as TaskStatus, l as CreateCompanyInput, m as Deal, n as ActivityType, o as ContactFilters, p as CrmRole, r as Company, s as ContactStatus, t as Activity, u as CreateContactInput, v as Page, w as StageType, x as PipelineKind, y as PageRequest } from "./types-CpAtAtxd.cjs";
|
|
2
2
|
export { Activity, ActivityType, Company, CompanyFilters, Contact, ContactFilters, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmRole, Deal, DealStage, Note, OPEN_STAGE_TYPE, Page, PageRequest, PipelineConfig, PipelineKind, PipelineStageConfig, RecordSource, StageType, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateCompanyInput, UpdateContactInput, UpdateDealInput, UpdateTaskInput, ValueInterval, isClosedStageType };
|
package/internal-types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as UpdateCompanyInput, C as RecordSource, D as TaskFilters, E as TaskEntityType, F as isClosedStageType, M as UpdateDealInput, N as UpdateTaskInput, O as TaskPriority, P as ValueInterval, S as PipelineStageConfig, T as Task, _ as OPEN_STAGE_TYPE, a as Contact, b as PipelineConfig, c as CreateActivityInput, d as CreateDealInput, f as CreateTaskInput, g as Note, h as DealStage, i as CompanyFilters, j as UpdateContactInput, k as TaskStatus, l as CreateCompanyInput, m as Deal, n as ActivityType, o as ContactFilters, p as CrmRole, r as Company, s as ContactStatus, t as Activity, u as CreateContactInput, v as Page, w as StageType, x as PipelineKind, y as PageRequest } from "./types-
|
|
1
|
+
import { A as UpdateCompanyInput, C as RecordSource, D as TaskFilters, E as TaskEntityType, F as isClosedStageType, M as UpdateDealInput, N as UpdateTaskInput, O as TaskPriority, P as ValueInterval, S as PipelineStageConfig, T as Task, _ as OPEN_STAGE_TYPE, a as Contact, b as PipelineConfig, c as CreateActivityInput, d as CreateDealInput, f as CreateTaskInput, g as Note, h as DealStage, i as CompanyFilters, j as UpdateContactInput, k as TaskStatus, l as CreateCompanyInput, m as Deal, n as ActivityType, o as ContactFilters, p as CrmRole, r as Company, s as ContactStatus, t as Activity, u as CreateContactInput, v as Page, w as StageType, x as PipelineKind, y as PageRequest } from "./types-CpAtAtxd.mjs";
|
|
2
2
|
export { Activity, ActivityType, Company, CompanyFilters, Contact, ContactFilters, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmRole, Deal, DealStage, Note, OPEN_STAGE_TYPE, Page, PageRequest, PipelineConfig, PipelineKind, PipelineStageConfig, RecordSource, StageType, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateCompanyInput, UpdateContactInput, UpdateDealInput, UpdateTaskInput, ValueInterval, isClosedStageType };
|
package/internal.cjs
CHANGED
|
@@ -3,11 +3,11 @@ const require_projection = require("./projection-BELgANG2.cjs");
|
|
|
3
3
|
const require_entity_config = require("./entity-config-BI4RYNKL.cjs");
|
|
4
4
|
const require_mappings_config = require("./mappings-config-BCsRLohT.cjs");
|
|
5
5
|
const require_auth_adapter = require("./auth-adapter-CiEXcweZ.cjs");
|
|
6
|
-
const require_internal = require("./internal-
|
|
6
|
+
const require_internal = require("./internal-DsArcqkP.cjs");
|
|
7
7
|
const require_mapping_form = require("./mapping-form-BpfON_ME.cjs");
|
|
8
8
|
const require_projection_sql = require("./projection-sql-DuCtFE9t.cjs");
|
|
9
9
|
const require_view_compiler = require("./view-compiler-xiwm5iar.cjs");
|
|
10
|
-
const require_sync_engine = require("./sync-engine-
|
|
10
|
+
const require_sync_engine = require("./sync-engine-BGVDsrOQ.cjs");
|
|
11
11
|
const require_types = require("./types-Cq5gHCTq.cjs");
|
|
12
12
|
exports.BASE_REF = require_projection.BASE_REF;
|
|
13
13
|
exports.CANONICAL_FIELDS = require_entity_config.CANONICAL_FIELDS;
|
|
@@ -43,6 +43,7 @@ exports.hostOwnedFieldMessage = require_internal.hostOwnedFieldMessage;
|
|
|
43
43
|
exports.identityRefs = require_projection.identityRefs;
|
|
44
44
|
exports.isClosedStageType = require_types.isClosedStageType;
|
|
45
45
|
exports.isHostOwned = require_internal.isHostOwned;
|
|
46
|
+
exports.isRemovalAction = require_sync_engine.isRemovalAction;
|
|
46
47
|
exports.joinFansOut = require_entity_config.joinFansOut;
|
|
47
48
|
exports.mappingsToEntitiesConfig = require_mappings_config.mappingsToEntitiesConfig;
|
|
48
49
|
exports.matchesCondition = require_internal.matchesCondition;
|
|
@@ -58,6 +59,7 @@ exports.relationshipSchema = require_entity_config.relationshipSchema;
|
|
|
58
59
|
exports.relationshipViaSignature = require_mapping_form.relationshipViaSignature;
|
|
59
60
|
exports.relationshipsSchema = require_entity_config.relationshipsSchema;
|
|
60
61
|
exports.requiredFieldsFor = require_entity_config.requiredFieldsFor;
|
|
62
|
+
exports.resolveActions = require_sync_engine.resolveActions;
|
|
61
63
|
exports.runSync = require_sync_engine.runSync;
|
|
62
64
|
exports.slugify = require_internal.slugify;
|
|
63
65
|
exports.toObjectTypeSlug = require_internal.toObjectTypeSlug;
|
package/internal.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { A as relationshipsSchema, B as identityRefs, D as missingRequiredFields, E as filterSchema, F as ProjectionFieldBinding, I as ProjectionIdentity, L as ProjectionJoin, M as validateEntitiesConfig, N as BASE_REF, O as projectionFields, P as PROJECTION_KEY_PATTERN, R as ProjectionMapping, S as RelationshipsMap, T as entitiesConfigSchema, V as projectionSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, d as CrmConcept, 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, p as DiscoveredColumnMeta, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS, z as ProjectionRef } from "./entity-config-ApnT5j3X.cjs";
|
|
2
|
-
import { A as UpdateCompanyInput, C as RecordSource, D as TaskFilters, E as TaskEntityType, F as isClosedStageType, M as UpdateDealInput, N as UpdateTaskInput, O as TaskPriority, P as ValueInterval, S as PipelineStageConfig, T as Task, _ as OPEN_STAGE_TYPE, a as Contact, b as PipelineConfig, c as CreateActivityInput, d as CreateDealInput, f as CreateTaskInput, g as Note, h as DealStage, i as CompanyFilters, j as UpdateContactInput, k as TaskStatus, l as CreateCompanyInput, m as Deal, n as ActivityType, o as ContactFilters, p as CrmRole, r as Company, s as ContactStatus, t as Activity, u as CreateContactInput, v as Page, w as StageType, x as PipelineKind, y as PageRequest } from "./types-
|
|
3
|
-
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-
|
|
4
|
-
import { t as CRMAdapter } from "./adapter-
|
|
2
|
+
import { A as UpdateCompanyInput, C as RecordSource, D as TaskFilters, E as TaskEntityType, F as isClosedStageType, M as UpdateDealInput, N as UpdateTaskInput, O as TaskPriority, P as ValueInterval, S as PipelineStageConfig, T as Task, _ as OPEN_STAGE_TYPE, a as Contact, b as PipelineConfig, c as CreateActivityInput, d as CreateDealInput, f as CreateTaskInput, g as Note, h as DealStage, i as CompanyFilters, j as UpdateContactInput, k as TaskStatus, l as CreateCompanyInput, m as Deal, n as ActivityType, o as ContactFilters, p as CrmRole, r as Company, s as ContactStatus, t as Activity, u as CreateContactInput, v as Page, w as StageType, x as PipelineKind, y as PageRequest } from "./types-CpAtAtxd.cjs";
|
|
3
|
+
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-Bt1GZiag.cjs";
|
|
4
|
+
import { t as CRMAdapter } from "./adapter-IH3r_I8v.cjs";
|
|
5
5
|
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-XsLLCqW_.cjs";
|
|
6
6
|
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-iJzbcUMp.cjs";
|
|
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-Cq8apvZ4.cjs";
|
|
8
|
-
import { c as
|
|
9
|
-
import { A as PerSeatValueSource, C as HostOwnedCompanyField, D as isHostOwned, E as hostOwnedFieldMessage, O as rejectedCompanyFields, S as joinFansOut, T as SourcedRecord, _ as compileProjectionJoins, a as matchesCondition, b as quoteIdent, c as columnMetaFor, d as primaryKeyColumns, f as validateProjection, g as compileProjectionIdentity, h as compileProjectionFrom, i as evaluateStage, j as computeDealValue, k as rejectedContactFields, l as coversUniqueKey, m as PREVIEW_MAX_ROWS, n as ConditionOp, o as slugify, p as validateProjectionFilter, r as EvaluableRule, s as toObjectTypeSlug, t as Condition, u as hasRichMeta, v as compileProjectionPreview, w as HostOwnedContactField, x as fanOutJoins, y as compileProjectionSelect } from "./internal-
|
|
8
|
+
import { c as SyncAction, f as isRemovalAction, g as runSync, h as resolveActions, l as SyncResult, m as reconcile, n as MirrorRecord, o as ResolvedMembership, r as PersistAction, s as SourceRow, t as EntitySyncResult, u as SyncStore } from "./sync-engine-CYsWOujz.cjs";
|
|
9
|
+
import { A as PerSeatValueSource, C as HostOwnedCompanyField, D as isHostOwned, E as hostOwnedFieldMessage, O as rejectedCompanyFields, S as joinFansOut, T as SourcedRecord, _ as compileProjectionJoins, a as matchesCondition, b as quoteIdent, c as columnMetaFor, d as primaryKeyColumns, f as validateProjection, g as compileProjectionIdentity, h as compileProjectionFrom, i as evaluateStage, j as computeDealValue, k as rejectedContactFields, l as coversUniqueKey, m as PREVIEW_MAX_ROWS, n as ConditionOp, o as slugify, p as validateProjectionFilter, r as EvaluableRule, s as toObjectTypeSlug, t as Condition, u as hasRichMeta, v as compileProjectionPreview, w as HostOwnedContactField, x as fanOutJoins, y as compileProjectionSelect } from "./internal-D2J4VQWT.cjs";
|
|
10
10
|
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-BA4c0RbD.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 CompanyFilters, type CompileOptions, type CompiledView, type Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, type Contact, type ContactFilters, type ContactStatus, type CreateActivityInput, type CreateCompanyInput, type CreateContactInput, type CreateDealInput, type CreateTaskInput, type CrmConcept, type CrmMembership, type CrmRole, DEFAULT_VIEW_PREFIX, type Deal, type DealStage, type DiscoveredColumnMeta, type DiscoveredSchemaTable, type EntityMappingRow, type EntitySyncResult, type EvaluableRule, type ExplainResult, type FilterExpr, type FilterValue, type HostOwnedCompanyField, type HostOwnedContactField, type IntegrationFacts, type IntegrationState, type IntegrationStatus, type IntegrationStep, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type NextAction, type Note, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, type Page, type PageRequest, type PerSeatValueSource, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, REQUIRED_FIELDS, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, type SourcedRecord, type StageType, type StepId, type StepProblem, type StepState, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateCompanyInput, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, computeDealValue, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, hostOwnedFieldMessage, identityRefs, isClosedStageType, isHostOwned, joinFansOut, mappingsToEntitiesConfig, matchesCondition, missingRequiredFields, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, rejectedCompanyFields, rejectedContactFields, relationshipSchema, relationshipViaSignature, relationshipsSchema, requiredFieldsFor, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
|
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 CompanyFilters, type CompileOptions, type CompiledView, type Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, type Contact, type ContactFilters, type ContactStatus, type CreateActivityInput, type CreateCompanyInput, type CreateContactInput, type CreateDealInput, type CreateTaskInput, type CrmConcept, type CrmMembership, type CrmRole, DEFAULT_VIEW_PREFIX, type Deal, type DealStage, type DiscoveredColumnMeta, type DiscoveredSchemaTable, type EntityMappingRow, type EntitySyncResult, type EvaluableRule, type ExplainResult, type FilterExpr, type FilterValue, type HostOwnedCompanyField, type HostOwnedContactField, type IntegrationFacts, type IntegrationState, type IntegrationStatus, type IntegrationStep, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type NextAction, type Note, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, type Page, type PageRequest, type PerSeatValueSource, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, REQUIRED_FIELDS, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type ResolvedMembership, type SourceRow, type SourcedRecord, type StageType, type StepId, type StepProblem, type StepState, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateCompanyInput, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, computeDealValue, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, hostOwnedFieldMessage, identityRefs, isClosedStageType, isHostOwned, isRemovalAction, joinFansOut, mappingsToEntitiesConfig, matchesCondition, missingRequiredFields, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, rejectedCompanyFields, rejectedContactFields, relationshipSchema, relationshipViaSignature, relationshipsSchema, requiredFieldsFor, resolveActions, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
package/internal.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { A as relationshipsSchema, B as identityRefs, D as missingRequiredFields, E as filterSchema, F as ProjectionFieldBinding, I as ProjectionIdentity, L as ProjectionJoin, M as validateEntitiesConfig, N as BASE_REF, O as projectionFields, P as PROJECTION_KEY_PATTERN, R as ProjectionMapping, S as RelationshipsMap, T as entitiesConfigSchema, V as projectionSchema, _ as MATERIALIZING_CONCEPTS, a as ClivlyEntitiesConfig, b as RelationshipSpec, d as CrmConcept, 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, p as DiscoveredColumnMeta, s as ClivlyEntityConfig, t as CANONICAL_FIELDS, u as ConfigValidationResult, v as MaterializingConcept, w as defineClivlyConfig, x as RelationshipVia, y as REQUIRED_FIELDS, z as ProjectionRef } from "./entity-config-CKcj4-M_.mjs";
|
|
2
|
-
import { A as UpdateCompanyInput, C as RecordSource, D as TaskFilters, E as TaskEntityType, F as isClosedStageType, M as UpdateDealInput, N as UpdateTaskInput, O as TaskPriority, P as ValueInterval, S as PipelineStageConfig, T as Task, _ as OPEN_STAGE_TYPE, a as Contact, b as PipelineConfig, c as CreateActivityInput, d as CreateDealInput, f as CreateTaskInput, g as Note, h as DealStage, i as CompanyFilters, j as UpdateContactInput, k as TaskStatus, l as CreateCompanyInput, m as Deal, n as ActivityType, o as ContactFilters, p as CrmRole, r as Company, s as ContactStatus, t as Activity, u as CreateContactInput, v as Page, w as StageType, x as PipelineKind, y as PageRequest } from "./types-
|
|
3
|
-
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-
|
|
4
|
-
import { t as CRMAdapter } from "./adapter-
|
|
2
|
+
import { A as UpdateCompanyInput, C as RecordSource, D as TaskFilters, E as TaskEntityType, F as isClosedStageType, M as UpdateDealInput, N as UpdateTaskInput, O as TaskPriority, P as ValueInterval, S as PipelineStageConfig, T as Task, _ as OPEN_STAGE_TYPE, a as Contact, b as PipelineConfig, c as CreateActivityInput, d as CreateDealInput, f as CreateTaskInput, g as Note, h as DealStage, i as CompanyFilters, j as UpdateContactInput, k as TaskStatus, l as CreateCompanyInput, m as Deal, n as ActivityType, o as ContactFilters, p as CrmRole, r as Company, s as ContactStatus, t as Activity, u as CreateContactInput, v as Page, w as StageType, x as PipelineKind, y as PageRequest } from "./types-CpAtAtxd.mjs";
|
|
3
|
+
import { a as authCustom, i as MembershipResolver, n as ClivlyUser, r as CrmMembership, t as ClivlyAuthAdapter } from "./auth-adapter-CHy273qb.mjs";
|
|
4
|
+
import { t as CRMAdapter } from "./adapter-BMAUq4hf.mjs";
|
|
5
5
|
import { i as relationshipViaSignature, n as buildFilterFromDiscriminator, r as buildRelationships, t as RelationshipCandidate } from "./mapping-form-Btn-7gzv.mjs";
|
|
6
6
|
import { i as mappingsToEntitiesConfig, t as EntityMappingRow } from "./mappings-config-D6_oCi2Q.mjs";
|
|
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-CwKVoK1w.mjs";
|
|
8
|
-
import { c as
|
|
9
|
-
import { A as PerSeatValueSource, C as HostOwnedCompanyField, D as isHostOwned, E as hostOwnedFieldMessage, O as rejectedCompanyFields, S as joinFansOut, T as SourcedRecord, _ as compileProjectionJoins, a as matchesCondition, b as quoteIdent, c as columnMetaFor, d as primaryKeyColumns, f as validateProjection, g as compileProjectionIdentity, h as compileProjectionFrom, i as evaluateStage, j as computeDealValue, k as rejectedContactFields, l as coversUniqueKey, m as PREVIEW_MAX_ROWS, n as ConditionOp, o as slugify, p as validateProjectionFilter, r as EvaluableRule, s as toObjectTypeSlug, t as Condition, u as hasRichMeta, v as compileProjectionPreview, w as HostOwnedContactField, x as fanOutJoins, y as compileProjectionSelect } from "./internal-
|
|
8
|
+
import { c as SyncAction, f as isRemovalAction, g as runSync, h as resolveActions, l as SyncResult, m as reconcile, n as MirrorRecord, o as ResolvedMembership, r as PersistAction, s as SourceRow, t as EntitySyncResult, u as SyncStore } from "./sync-engine-C_5TpvfX.mjs";
|
|
9
|
+
import { A as PerSeatValueSource, C as HostOwnedCompanyField, D as isHostOwned, E as hostOwnedFieldMessage, O as rejectedCompanyFields, S as joinFansOut, T as SourcedRecord, _ as compileProjectionJoins, a as matchesCondition, b as quoteIdent, c as columnMetaFor, d as primaryKeyColumns, f as validateProjection, g as compileProjectionIdentity, h as compileProjectionFrom, i as evaluateStage, j as computeDealValue, k as rejectedContactFields, l as coversUniqueKey, m as PREVIEW_MAX_ROWS, n as ConditionOp, o as slugify, p as validateProjectionFilter, r as EvaluableRule, s as toObjectTypeSlug, t as Condition, u as hasRichMeta, v as compileProjectionPreview, w as HostOwnedContactField, x as fanOutJoins, y as compileProjectionSelect } from "./internal-C7NlPM3M.mjs";
|
|
10
10
|
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-BA4c0RbD.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 CompanyFilters, type CompileOptions, type CompiledView, type Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, type Contact, type ContactFilters, type ContactStatus, type CreateActivityInput, type CreateCompanyInput, type CreateContactInput, type CreateDealInput, type CreateTaskInput, type CrmConcept, type CrmMembership, type CrmRole, DEFAULT_VIEW_PREFIX, type Deal, type DealStage, type DiscoveredColumnMeta, type DiscoveredSchemaTable, type EntityMappingRow, type EntitySyncResult, type EvaluableRule, type ExplainResult, type FilterExpr, type FilterValue, type HostOwnedCompanyField, type HostOwnedContactField, type IntegrationFacts, type IntegrationState, type IntegrationStatus, type IntegrationStep, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type NextAction, type Note, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, type Page, type PageRequest, type PerSeatValueSource, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, REQUIRED_FIELDS, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type SourceRow, type SourcedRecord, type StageType, type StepId, type StepProblem, type StepState, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateCompanyInput, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, computeDealValue, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, hostOwnedFieldMessage, identityRefs, isClosedStageType, isHostOwned, joinFansOut, mappingsToEntitiesConfig, matchesCondition, missingRequiredFields, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, rejectedCompanyFields, rejectedContactFields, relationshipSchema, relationshipViaSignature, relationshipsSchema, requiredFieldsFor, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
|
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 CompanyFilters, type CompileOptions, type CompiledView, type Condition, type ConditionOp, type ConfigValidationError, type ConfigValidationResult, type ConnectionLiveness, type Contact, type ContactFilters, type ContactStatus, type CreateActivityInput, type CreateCompanyInput, type CreateContactInput, type CreateDealInput, type CreateTaskInput, type CrmConcept, type CrmMembership, type CrmRole, DEFAULT_VIEW_PREFIX, type Deal, type DealStage, type DiscoveredColumnMeta, type DiscoveredSchemaTable, type EntityMappingRow, type EntitySyncResult, type EvaluableRule, type ExplainResult, type FilterExpr, type FilterValue, type HostOwnedCompanyField, type HostOwnedContactField, type IntegrationFacts, type IntegrationState, type IntegrationStatus, type IntegrationStep, MATERIALIZING_CONCEPTS, type MaterializingConcept, type MembershipResolver, type MirrorRecord, type NextAction, type Note, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, type Page, type PageRequest, type PerSeatValueSource, type PersistAction, type PipelineConfig, type PipelineKind, type PipelineStageConfig, type ProjectionFieldBinding, type ProjectionIdentity, type ProjectionJoin, type ProjectionMapping, type ProjectionRef, REQUIRED_FIELDS, type RecordSource, type RelationshipCandidate, type RelationshipSpec, type RelationshipVia, type RelationshipsMap, type ResolvedMembership, type SourceRow, type SourcedRecord, type StageType, type StepId, type StepProblem, type StepState, type SyncAction, type SyncResult, type SyncStore, type Task, type TaskEntityType, type TaskFilters, type TaskPriority, type TaskStatus, type UpdateCompanyInput, type UpdateContactInput, type UpdateDealInput, type UpdateTaskInput, type ValueInterval, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, computeDealValue, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, hostOwnedFieldMessage, identityRefs, isClosedStageType, isHostOwned, isRemovalAction, joinFansOut, mappingsToEntitiesConfig, matchesCondition, missingRequiredFields, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, rejectedCompanyFields, rejectedContactFields, relationshipSchema, relationshipViaSignature, relationshipsSchema, requiredFieldsFor, resolveActions, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
package/internal.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import { i as projectionSchema, n as PROJECTION_KEY_PATTERN, r as identityRefs,
|
|
|
2
2
|
import { C as hasRichMeta, S as coversUniqueKey, _ as validateProjection, a as MATERIALIZING_CONCEPTS, b as joinFansOut, 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, t as CANONICAL_FIELDS, u as filterSchema, v as validateProjectionFilter, w as primaryKeyColumns, x as columnMetaFor, y as fanOutJoins } from "./entity-config-Ccfb2IL9.mjs";
|
|
3
3
|
import { n as mappingsToEntitiesConfig } from "./mappings-config-CwQNQ6bA.mjs";
|
|
4
4
|
import { t as authCustom } from "./auth-adapter-gfVDxf3d.mjs";
|
|
5
|
-
import { a as hostOwnedFieldMessage, c as rejectedContactFields, i as toObjectTypeSlug, l as computeDealValue, n as matchesCondition, o as isHostOwned, r as slugify, s as rejectedCompanyFields, t as evaluateStage } from "./internal-
|
|
5
|
+
import { a as hostOwnedFieldMessage, c as rejectedContactFields, i as toObjectTypeSlug, l as computeDealValue, n as matchesCondition, o as isHostOwned, r as slugify, s as rejectedCompanyFields, t as evaluateStage } from "./internal-CLvZdVj5.mjs";
|
|
6
6
|
import { n as buildRelationships, r as relationshipViaSignature, t as buildFilterFromDiscriminator } from "./mapping-form-DigkuvFc.mjs";
|
|
7
7
|
import { a as compileProjectionPreview, i as compileProjectionJoins, n as compileProjectionFrom, o as compileProjectionSelect, r as compileProjectionIdentity, s as quoteIdent, t as PREVIEW_MAX_ROWS } from "./projection-sql-DweUaWRc.mjs";
|
|
8
8
|
import { i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-C-6RydKK.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { a as resolveActions, i as reconcile, n as isRemovalAction, o as runSync } from "./sync-engine-DH058G3w.mjs";
|
|
10
10
|
import { n as isClosedStageType, t as OPEN_STAGE_TYPE } from "./types-YJTkXKzU.mjs";
|
|
11
|
-
export { BASE_REF, CANONICAL_FIELDS, CRM_CONCEPTS, ClivlyConfigError, DEFAULT_VIEW_PREFIX, MATERIALIZING_CONCEPTS, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, REQUIRED_FIELDS, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, computeDealValue, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, hostOwnedFieldMessage, identityRefs, isClosedStageType, isHostOwned, joinFansOut, mappingsToEntitiesConfig, matchesCondition, missingRequiredFields, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, rejectedCompanyFields, rejectedContactFields, relationshipSchema, relationshipViaSignature, relationshipsSchema, requiredFieldsFor, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
|
11
|
+
export { BASE_REF, CANONICAL_FIELDS, CRM_CONCEPTS, ClivlyConfigError, DEFAULT_VIEW_PREFIX, MATERIALIZING_CONCEPTS, OPEN_STAGE_TYPE, PREVIEW_MAX_ROWS, PROJECTION_KEY_PATTERN, REQUIRED_FIELDS, authCustom, buildFilterFromDiscriminator, buildRelationships, columnMetaFor, compileEntityView, compileEntityViews, compileProjectionFrom, compileProjectionIdentity, compileProjectionJoins, compileProjectionPreview, compileProjectionSelect, computeDealValue, coversUniqueKey, defineClivlyConfig, entitiesConfigSchema, evaluateStage, explainEntitiesConfig, fanOutJoins, filterSchema, hasRichMeta, hostOwnedFieldMessage, identityRefs, isClosedStageType, isHostOwned, isRemovalAction, joinFansOut, mappingsToEntitiesConfig, matchesCondition, missingRequiredFields, primaryKeyColumns, projectionFields, projectionSchema, quoteIdent, reconcile, rejectedCompanyFields, rejectedContactFields, relationshipSchema, relationshipViaSignature, relationshipsSchema, requiredFieldsFor, resolveActions, runSync, slugify, toObjectTypeSlug, validateEntitiesConfig, validateProjection, validateProjectionFilter };
|
package/package.json
CHANGED
|
@@ -1391,6 +1391,51 @@ async function fullSyncSource(args) {
|
|
|
1391
1391
|
};
|
|
1392
1392
|
}
|
|
1393
1393
|
//#endregion
|
|
1394
|
+
//#region ../sdk/src/trigger-method.ts
|
|
1395
|
+
/** Host-side override, mirroring `CLIVLY_INSTANT_PUSH_DISABLED`. */
|
|
1396
|
+
const REQUIRE_POST_ENV_VAR = "CLIVLY_TRIGGER_REQUIRE_POST";
|
|
1397
|
+
const NON_POST_DEPRECATION_WARNING = `Clivly: this sync trigger was called with GET. It still ran the sync, but a future release will refuse any method except POST with a 405. Change the caller — your cron job or uptime check — to POST. To adopt the new behaviour now, set ${REQUIRE_POST_ENV_VAR}=true.`;
|
|
1398
|
+
const METHOD_NOT_ALLOWED = 405;
|
|
1399
|
+
const NO_CONTENT = 204;
|
|
1400
|
+
const OK = 200;
|
|
1401
|
+
/**
|
|
1402
|
+
* Resolve the phase. Only the exact strings `"true"` and `"false"` count —
|
|
1403
|
+
* anything else (unset, empty, `"1"`, `"TRUE"`) falls through to the default
|
|
1404
|
+
* rather than guessing, so a typo can never silently disable a guard.
|
|
1405
|
+
*/
|
|
1406
|
+
function enforcementEnabled(input) {
|
|
1407
|
+
const override = input.env[REQUIRE_POST_ENV_VAR];
|
|
1408
|
+
if (override === "true") return true;
|
|
1409
|
+
if (override === "false") return false;
|
|
1410
|
+
return input.enforceDefault;
|
|
1411
|
+
}
|
|
1412
|
+
function resolveTriggerMethod(input) {
|
|
1413
|
+
const method = input.method.toUpperCase();
|
|
1414
|
+
if (method === "POST") return {
|
|
1415
|
+
runSync: true,
|
|
1416
|
+
status: OK
|
|
1417
|
+
};
|
|
1418
|
+
if (method === "HEAD") return {
|
|
1419
|
+
runSync: false,
|
|
1420
|
+
status: NO_CONTENT
|
|
1421
|
+
};
|
|
1422
|
+
const refuse = {
|
|
1423
|
+
body: {
|
|
1424
|
+
error: `Method ${method} is not allowed on the Clivly sync trigger. Use POST.`,
|
|
1425
|
+
ok: false
|
|
1426
|
+
},
|
|
1427
|
+
runSync: false,
|
|
1428
|
+
status: METHOD_NOT_ALLOWED
|
|
1429
|
+
};
|
|
1430
|
+
if (method !== "GET") return refuse;
|
|
1431
|
+
if (enforcementEnabled(input)) return refuse;
|
|
1432
|
+
return {
|
|
1433
|
+
runSync: true,
|
|
1434
|
+
status: OK,
|
|
1435
|
+
warn: NON_POST_DEPRECATION_WARNING
|
|
1436
|
+
};
|
|
1437
|
+
}
|
|
1438
|
+
//#endregion
|
|
1394
1439
|
//#region ../sdk/src/trigger-url.ts
|
|
1395
1440
|
const SCHEME_REGEX = /^https?:\/\//;
|
|
1396
1441
|
const INVALID_HOST_CHARS_REGEX = /[/\\@?#\s]/;
|
|
@@ -1702,7 +1747,7 @@ function buildSchema(config) {
|
|
|
1702
1747
|
});
|
|
1703
1748
|
}
|
|
1704
1749
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
1705
|
-
function
|
|
1750
|
+
function memoryCursorStore() {
|
|
1706
1751
|
const cursors = /* @__PURE__ */ new Map();
|
|
1707
1752
|
return {
|
|
1708
1753
|
get: (entity) => cursors.get(entity) ?? null,
|
|
@@ -1711,6 +1756,56 @@ function createMemoryCursorStore() {
|
|
|
1711
1756
|
}
|
|
1712
1757
|
};
|
|
1713
1758
|
}
|
|
1759
|
+
/** Default key prefix for {@link kvCursorStore}. */
|
|
1760
|
+
const CURSOR_KEY_PREFIX = "clivly:cursor:";
|
|
1761
|
+
/**
|
|
1762
|
+
* A persistent `CursorStore` backed by any key-value store.
|
|
1763
|
+
*
|
|
1764
|
+
* Serverless runtimes discard memory between invocations, so without a
|
|
1765
|
+
* persisted cursor every `delta` sync starts from `null` and re-reads the
|
|
1766
|
+
* whole source table. That is invisible — the run succeeds — and bills like a
|
|
1767
|
+
* full sync forever.
|
|
1768
|
+
*
|
|
1769
|
+
* This exists because the hand-written version has a trap in it:
|
|
1770
|
+
* `SyncCursor.time` is a `Date`, which a JSON round-trip turns into a string,
|
|
1771
|
+
* and `fromDrizzle` then calls `since.time.toISOString()` on it. The cursor is
|
|
1772
|
+
* stored as an ISO string and parsed back to a `Date` here so no caller has to
|
|
1773
|
+
* remember that.
|
|
1774
|
+
*
|
|
1775
|
+
* ```ts
|
|
1776
|
+
* cursorStore: kvCursorStore(env.CLIVLY_CURSORS) // Workers KV binding
|
|
1777
|
+
* ```
|
|
1778
|
+
*
|
|
1779
|
+
* A malformed or partial stored value resolves to `null` rather than throwing:
|
|
1780
|
+
* the worst case is one full re-read, where throwing would wedge sync entirely.
|
|
1781
|
+
*/
|
|
1782
|
+
function kvCursorStore(kv, options) {
|
|
1783
|
+
const prefix = options?.prefix ?? "clivly:cursor:";
|
|
1784
|
+
const keyFor = (entity) => `${prefix}${entity}`;
|
|
1785
|
+
return {
|
|
1786
|
+
get: async (entity) => {
|
|
1787
|
+
const raw = await kv.get(keyFor(entity));
|
|
1788
|
+
if (!raw) return null;
|
|
1789
|
+
try {
|
|
1790
|
+
const parsed = JSON.parse(raw);
|
|
1791
|
+
if (typeof parsed.id !== "string" || typeof parsed.time !== "string") return null;
|
|
1792
|
+
const time = new Date(parsed.time);
|
|
1793
|
+
return Number.isNaN(time.getTime()) ? null : {
|
|
1794
|
+
id: parsed.id,
|
|
1795
|
+
time
|
|
1796
|
+
};
|
|
1797
|
+
} catch {
|
|
1798
|
+
return null;
|
|
1799
|
+
}
|
|
1800
|
+
},
|
|
1801
|
+
set: async (entity, cursor) => {
|
|
1802
|
+
await kv.put(keyFor(entity), cursor === null ? "" : JSON.stringify({
|
|
1803
|
+
id: cursor.id,
|
|
1804
|
+
time: cursor.time.toISOString()
|
|
1805
|
+
}));
|
|
1806
|
+
}
|
|
1807
|
+
};
|
|
1808
|
+
}
|
|
1714
1809
|
function isLikelyServerless() {
|
|
1715
1810
|
const runtime = globalThis;
|
|
1716
1811
|
if (runtime.navigator?.userAgent === "Cloudflare-Workers") return true;
|
|
@@ -1940,9 +2035,11 @@ function createClivlySDK(config) {
|
|
|
1940
2035
|
let presenceClient = null;
|
|
1941
2036
|
let httpHeartbeatActive = true;
|
|
1942
2037
|
const batchSize = config.sync?.batchSize ?? DEFAULT_BATCH_SIZE;
|
|
1943
|
-
|
|
2038
|
+
if (serverless && !config.cursorStore) console.warn("Clivly: no `cursorStore` is configured and this looks like a serverless/edge runtime, where memory does not survive between invocations. Every `delta` sync will start from scratch and re-read your entire source tables — a full sync, on every run, billed as such. Pass a persistent store: `cursorStore: kvCursorStore(env.MY_KV)` (exported from `@clivly/sdk`). See https://clivly.com/docs/concepts/sync#cursor-stores");
|
|
2039
|
+
const cursorStore = config.cursorStore ?? memoryCursorStore();
|
|
1944
2040
|
const fetcher = createFetcher(config.retry);
|
|
1945
2041
|
let warnedUnsignedTrigger = false;
|
|
2042
|
+
let warnedNonPostTrigger = false;
|
|
1946
2043
|
const remoteProjections = createRemoteProjectionFetcher({
|
|
1947
2044
|
apiKey: config.apiKey,
|
|
1948
2045
|
apiUrl,
|
|
@@ -2368,8 +2465,45 @@ function createClivlySDK(config) {
|
|
|
2368
2465
|
return {};
|
|
2369
2466
|
}
|
|
2370
2467
|
};
|
|
2468
|
+
/**
|
|
2469
|
+
* The response to send instead of running a sync, or null to proceed.
|
|
2470
|
+
*
|
|
2471
|
+
* Split out of the handler so the method decision reads as one thing rather
|
|
2472
|
+
* than three branches ahead of the request plumbing — the same shape as
|
|
2473
|
+
* `triggerRequestAllowed` below.
|
|
2474
|
+
*/
|
|
2475
|
+
const refuseDisallowedMethod = (req) => {
|
|
2476
|
+
const decision = resolveTriggerMethod({
|
|
2477
|
+
enforceDefault: false,
|
|
2478
|
+
env: config.env ?? process.env,
|
|
2479
|
+
method: req.method
|
|
2480
|
+
});
|
|
2481
|
+
if (decision.warn && !warnedNonPostTrigger) {
|
|
2482
|
+
warnedNonPostTrigger = true;
|
|
2483
|
+
console.warn(decision.warn);
|
|
2484
|
+
}
|
|
2485
|
+
if (decision.runSync) return null;
|
|
2486
|
+
return decision.body ? jsonResponse(decision.body, decision.status) : new Response(null, { status: decision.status });
|
|
2487
|
+
};
|
|
2488
|
+
/**
|
|
2489
|
+
* Serve a preview request, or null when this payload is a real sync.
|
|
2490
|
+
*
|
|
2491
|
+
* Preview (T10) is a signed, ZERO-WRITE dry run: it returns ≤5 RAW source
|
|
2492
|
+
* rows, slimmed to only the columns the draft maps or filters on and coerced
|
|
2493
|
+
* to JSON scalars, which the cloud then projects through the same path as a
|
|
2494
|
+
* real sync. It never syncs, never pushes, never writes a cursor and never
|
|
2495
|
+
* ingests. Callers keep it inside their `try` so a malformed body or a
|
|
2496
|
+
* throwing `fetchPage` degrades to the same graceful 500 as the sync paths.
|
|
2497
|
+
*/
|
|
2498
|
+
const handleIfPreview = async (payload) => {
|
|
2499
|
+
if (payload.preview) return await handlePreviewRequest(config, payload.preview);
|
|
2500
|
+
if (payload.previewProjection) return await handleProjectionPreviewRequest(config, payload.previewProjection);
|
|
2501
|
+
return null;
|
|
2502
|
+
};
|
|
2371
2503
|
const createClivlyHandler = () => async (req) => {
|
|
2372
2504
|
observedUrl = observedTriggerUrl(req) ?? observedUrl;
|
|
2505
|
+
const refusal = refuseDisallowedMethod(req);
|
|
2506
|
+
if (refusal) return refusal;
|
|
2373
2507
|
const rawBody = await req.text().catch(() => "");
|
|
2374
2508
|
if (!await triggerRequestAllowed(req, rawBody)) return jsonResponse({
|
|
2375
2509
|
ok: false,
|
|
@@ -2379,8 +2513,8 @@ function createClivlySDK(config) {
|
|
|
2379
2513
|
const runId = payload.runId ?? null;
|
|
2380
2514
|
const startedAt = Date.now();
|
|
2381
2515
|
try {
|
|
2382
|
-
|
|
2383
|
-
if (
|
|
2516
|
+
const previewResponse = await handleIfPreview(payload);
|
|
2517
|
+
if (previewResponse) return previewResponse;
|
|
2384
2518
|
if (payload.sample) await runSampleSync(payload.sample.entityKey, payload.runId);
|
|
2385
2519
|
else await runScheduled({
|
|
2386
2520
|
mode: payload.mode,
|
|
@@ -2486,4 +2620,4 @@ function createClivlySDK(config) {
|
|
|
2486
2620
|
};
|
|
2487
2621
|
}
|
|
2488
2622
|
//#endregion
|
|
2489
|
-
export {
|
|
2623
|
+
export { ClivlyAuthError as a, ClivlyRateLimitError as c, memoryCursorStore as i, createChatSessionHandler as l, createClivlySDK as n, ClivlyError as o, kvCursorStore as r, ClivlyNetworkError as s, CURSOR_KEY_PREFIX as t, isPlaceholderUrl as u };
|