clivly 0.9.0 → 0.9.2
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 +19 -7
- package/core-drizzle.d.cts +1 -1
- package/core-drizzle.d.mts +1 -1
- package/core-entity-config.cjs +3 -1
- package/core-entity-config.d.cts +2 -2
- package/core-entity-config.d.mts +2 -2
- package/core-entity-config.mjs +2 -2
- package/core-entity-heuristics.d.cts +1 -1
- package/core-entity-heuristics.d.mts +1 -1
- package/core-mapping-form.d.cts +1 -1
- package/core-mapping-form.d.mts +1 -1
- package/core-mappings-config.cjs +2 -1
- package/core-mappings-config.d.cts +2 -2
- package/core-mappings-config.d.mts +2 -2
- package/core-mappings-config.mjs +2 -2
- package/core-sync-engine.cjs +1 -1
- package/core-sync-engine.d.cts +1 -1
- package/core-sync-engine.d.mts +1 -1
- package/core-sync-engine.mjs +1 -1
- package/core-view-compiler.cjs +2 -1
- package/core-view-compiler.d.cts +2 -2
- package/core-view-compiler.d.mts +2 -2
- package/core-view-compiler.mjs +2 -2
- package/core.cjs +5 -5
- package/core.d.cts +6 -6
- package/core.d.mts +6 -6
- package/core.mjs +5 -5
- package/{drizzle-BhN5M9zt.d.cts → drizzle-CiK8MMEZ.d.mts} +1 -1
- package/{drizzle-kBULBAOa.d.mts → drizzle-DEtRrqtc.d.cts} +1 -1
- package/drizzle.d.cts +2 -2
- package/drizzle.d.mts +2 -2
- package/{entity-config-C4Yf_fPj.d.cts → entity-config-B2RA53nw.d.cts} +168 -2
- package/{entity-config-C4Yf_fPj.d.mts → entity-config-B2RA53nw.d.mts} +168 -2
- package/{entity-config-CsLl-ftC.cjs → entity-config-DtBsl2MQ.cjs} +88 -13
- package/{entity-config-D3LmzgLb.mjs → entity-config-kUHri9yA.mjs} +77 -14
- package/index.cjs +375 -29
- package/index.d.cts +1 -0
- package/index.d.mts +1 -0
- package/index.mjs +375 -29
- package/{internal-MBkNo3bw.d.mts → internal-CDY8g9Ic.d.mts} +1 -2
- package/{internal-BARjyN4n.cjs → internal-CwnEG6Wl.cjs} +1 -1
- package/{internal-B8ydhsKd.d.cts → internal-Da_dlcQ_.d.cts} +1 -2
- package/{internal-DMySVbM0.mjs → internal-Df-PtOH_.mjs} +1 -1
- package/internal-drizzle.d.cts +1 -1
- package/internal-drizzle.d.mts +1 -1
- package/internal-entity-config.cjs +3 -1
- package/internal-entity-config.d.cts +2 -2
- package/internal-entity-config.d.mts +2 -2
- package/internal-entity-config.mjs +2 -2
- package/internal-entity-heuristics.cjs +1 -1
- package/internal-entity-heuristics.d.cts +1 -1
- package/internal-entity-heuristics.d.mts +1 -1
- package/internal-entity-heuristics.mjs +1 -1
- package/internal-mapping-form.d.cts +1 -1
- package/internal-mapping-form.d.mts +1 -1
- package/internal-mappings-config.cjs +2 -1
- package/internal-mappings-config.d.cts +2 -2
- package/internal-mappings-config.d.mts +2 -2
- package/internal-mappings-config.mjs +2 -2
- package/internal-sync-engine.cjs +1 -1
- package/internal-sync-engine.d.cts +1 -1
- package/internal-sync-engine.d.mts +1 -1
- package/internal-sync-engine.mjs +1 -1
- package/internal-view-compiler.cjs +2 -1
- package/internal-view-compiler.d.cts +2 -2
- package/internal-view-compiler.d.mts +2 -2
- package/internal-view-compiler.mjs +2 -2
- package/internal.cjs +5 -5
- package/internal.d.cts +6 -6
- package/internal.d.mts +6 -6
- package/internal.mjs +5 -5
- package/{mapping-form-43bwOTat.d.cts → mapping-form-DH77BXLv.d.mts} +1 -1
- package/{mapping-form-DUvWUYCo.d.mts → mapping-form-J0aU6O7l.d.cts} +1 -1
- package/{mappings-config-BSSwdHiq.cjs → mappings-config-B0RqFLxu.cjs} +30 -1
- package/{mappings-config-bJQT_gSa.mjs → mappings-config-B1b1HVBg.mjs} +25 -2
- package/mappings-config-D9dsonoi.d.mts +85 -0
- package/mappings-config-RQLGx8ub.d.cts +85 -0
- package/{namespace-probe-BSH_p9TK.d.cts → namespace-probe-C6aHjedO.d.cts} +65 -3
- package/{namespace-probe-Dsp5uNkS.d.mts → namespace-probe-Dj-0Q3Hb.d.mts} +65 -3
- package/package.json +1 -1
- package/{sdk-Bj-ZDf4u.cjs → sdk-D4Wp_uxb.cjs} +754 -44
- package/{sdk-BvRD2jAp.mjs → sdk-DXV8M_Io.mjs} +754 -44
- package/sdk.cjs +4 -2
- package/sdk.d.cts +3 -3
- package/sdk.d.mts +3 -3
- package/sdk.mjs +3 -3
- package/{sync-engine-GNqRB8eS.d.cts → sync-engine-BG2O1an2.d.cts} +2 -2
- package/{sync-engine-ZsusW-q_.d.mts → sync-engine-DgQbrJON.d.mts} +2 -2
- package/{sync-engine-Bg6-SznL.mjs → sync-engine-SuxSzbZ4.mjs} +1 -1
- package/{sync-engine-DEJvKw6E.cjs → sync-engine-abE94g6X.cjs} +1 -1
- package/{view-compiler-DplczSjF.cjs → view-compiler-Blu4OXJ7.cjs} +22 -0
- package/{view-compiler-Cin0neDO.d.mts → view-compiler-Bo7pqXW3.d.mts} +12 -2
- package/{view-compiler-DlTpOfZi.mjs → view-compiler-CQx8TRrW.mjs} +17 -1
- package/{view-compiler-Ll9cbIJz.d.cts → view-compiler-CmEdAMwj.d.cts} +12 -2
- package/vite.d.cts +1 -1
- package/vite.d.mts +1 -1
- package/mappings-config-BpcR8bBo.d.mts +0 -167
- package/mappings-config-xsLMn3I-.d.cts +0 -167
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ClivlyEntitiesConfig } from "./entity-config-
|
|
1
|
+
import { a as ClivlyEntitiesConfig } from "./entity-config-B2RA53nw.mjs";
|
|
2
2
|
//#region ../sdk/src/drizzle-meta.d.ts
|
|
3
3
|
declare const DRIZZLE_META: "__clivly_drizzle_source_meta__";
|
|
4
4
|
interface DrizzleSourceMeta {
|
|
@@ -78,6 +78,12 @@ interface ClivlySDKConfig {
|
|
|
78
78
|
* runtimes can supply their own.
|
|
79
79
|
*/
|
|
80
80
|
env?: Record<string, string | undefined>;
|
|
81
|
+
/**
|
|
82
|
+
* Where this app is running: `local_dev`, `preview` or `production`. Reported
|
|
83
|
+
* on each heartbeat so the dashboard can name the environment it is watching.
|
|
84
|
+
* Inferred from platform variables and `NODE_ENV` when omitted.
|
|
85
|
+
*/
|
|
86
|
+
environment?: "local_dev" | "preview" | "production";
|
|
81
87
|
/**
|
|
82
88
|
* 🚧 Not implemented in 0.1.x. Reserved options for tunnel mode and CRM
|
|
83
89
|
* write-back — they have NO effect yet and land with the Cloudflare
|
|
@@ -112,6 +118,17 @@ interface ClivlySDKConfig {
|
|
|
112
118
|
*/
|
|
113
119
|
namespaceReady?: boolean;
|
|
114
120
|
orm?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Presence transport override. HTTP remains the default until the recorded
|
|
123
|
+
* production rollout gate permits a WebSocket default; set `http` explicitly
|
|
124
|
+
* to keep the legacy transport after that rollout. Operators may also set
|
|
125
|
+
* `CLIVLY_PRESENCE_TRANSPORT` without changing application code.
|
|
126
|
+
*/
|
|
127
|
+
presence?: {
|
|
128
|
+
/** Explicit release identity; platform deployment ids and commit SHAs follow. */
|
|
129
|
+
deploymentId?: string;
|
|
130
|
+
transport?: "http" | "websocket";
|
|
131
|
+
};
|
|
115
132
|
/**
|
|
116
133
|
* Network retry policy for outbound calls (heartbeat + sync push). Transient
|
|
117
134
|
* failures (network errors, HTTP 429, HTTP 5xx) are retried with exponential
|
|
@@ -217,6 +234,26 @@ interface CreateChatSessionHandlerOptions {
|
|
|
217
234
|
*/
|
|
218
235
|
resolveUser?: (req: Request) => Promise<ClivlyUser | null> | ClivlyUser | null;
|
|
219
236
|
}
|
|
237
|
+
/** One object type ensured by `ensureSchema`. */
|
|
238
|
+
interface EnsuredObjectTypeResult {
|
|
239
|
+
/** True when this call created it, false when it already existed. */
|
|
240
|
+
created: boolean;
|
|
241
|
+
id: string;
|
|
242
|
+
slug: string;
|
|
243
|
+
}
|
|
244
|
+
/** One mapping ensured by `ensureSchema`. */
|
|
245
|
+
interface EnsuredMappingResult {
|
|
246
|
+
created: boolean;
|
|
247
|
+
/** The config entity key this mapping came from. */
|
|
248
|
+
entityKey: string;
|
|
249
|
+
id: string;
|
|
250
|
+
/** True when an existing config-owned mapping's definition changed. */
|
|
251
|
+
updated: boolean;
|
|
252
|
+
}
|
|
253
|
+
interface EnsureSchemaResult {
|
|
254
|
+
mappings: EnsuredMappingResult[];
|
|
255
|
+
objectTypes: EnsuredObjectTypeResult[];
|
|
256
|
+
}
|
|
220
257
|
interface DoctorCheck {
|
|
221
258
|
/** Human-readable outcome — what passed, or why it failed. */
|
|
222
259
|
detail: string;
|
|
@@ -325,6 +362,31 @@ interface ClivlySDK {
|
|
|
325
362
|
createClivlyHandler(): (req: Request) => Promise<Response>;
|
|
326
363
|
/** Validate this setup end-to-end (read-only) before the first sync. */
|
|
327
364
|
doctor(): Promise<DoctorReport>;
|
|
365
|
+
/**
|
|
366
|
+
* Create any custom object types the config declares that this workspace does
|
|
367
|
+
* not have yet, keyed by entity slug — so `clivly.config.ts` needs no
|
|
368
|
+
* dashboard-generated id. Create-only and idempotent.
|
|
369
|
+
*
|
|
370
|
+
* Resolves to the ensured objects (empty when the config declares none), or
|
|
371
|
+
* `null` when the request could not be delivered.
|
|
372
|
+
*/
|
|
373
|
+
ensureCustomObjects(): Promise<{
|
|
374
|
+
slug: string;
|
|
375
|
+
id: string;
|
|
376
|
+
created: boolean;
|
|
377
|
+
}[] | null>;
|
|
378
|
+
/**
|
|
379
|
+
* Declare the whole schema this config describes — custom object types AND
|
|
380
|
+
* the mappings that make them receive rows. The superset of
|
|
381
|
+
* `ensureCustomObjects`, which creates the object container and nothing else.
|
|
382
|
+
*
|
|
383
|
+
* Resolves to `null` when the request could not be delivered (including
|
|
384
|
+
* against a server too old to have the route), and REJECTS when Clivly
|
|
385
|
+
* refuses the config — e.g. an entity that would overwrite a mapping managed
|
|
386
|
+
* in the dashboard. That distinction matters: unreachable is worth a retry,
|
|
387
|
+
* refused is worth reading.
|
|
388
|
+
*/
|
|
389
|
+
ensureSchema(): Promise<EnsureSchemaResult | null>;
|
|
328
390
|
/**
|
|
329
391
|
* Send a single heartbeat now. Returns true on success. Kept for the keep-alive
|
|
330
392
|
* loop and back-compat; use `connect()` when you need the failure reason.
|
|
@@ -357,7 +419,7 @@ interface ClivlySDK {
|
|
|
357
419
|
*/
|
|
358
420
|
start(): Promise<void>;
|
|
359
421
|
/** Stop the keep-alive loop. */
|
|
360
|
-
stop(): void
|
|
422
|
+
stop(): Promise<void>;
|
|
361
423
|
/**
|
|
362
424
|
* Sync all configured sources now. `delta` (default) pages changed rows since
|
|
363
425
|
* the last cursor; `full` pushes each complete entity so the server can
|
|
@@ -378,4 +440,4 @@ interface NamespaceIntrospector {
|
|
|
378
440
|
sampleSelect(table: string): Promise<void>;
|
|
379
441
|
}
|
|
380
442
|
//#endregion
|
|
381
|
-
export { ClivlyConnectResult as a, ClivlyUser as c, DiscoveredTable as d, DoctorCheck as f, ClivlyConnectReason as i, CreateChatSessionHandlerOptions as l,
|
|
443
|
+
export { SyncSource as _, ClivlyConnectResult as a, ClivlyUser as c, DiscoveredTable as d, DoctorCheck as f, EnsuredObjectTypeResult as g, EnsuredMappingResult as h, ClivlyConnectReason as i, CreateChatSessionHandlerOptions as l, EnsureSchemaResult as m, ChatSessionRequestBody as n, ClivlySDK as o, DoctorReport as p, ChatWidgetVisitor as r, ClivlySDKConfig as s, NamespaceIntrospector as t, CursorStore as u };
|