@clivly/sdk 0.11.0-next.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,4 @@
1
1
  import { c as CreateChatSessionHandlerOptions } from "./types-CvhxV-IX.cjs";
2
2
  //#region src/chat-session.d.ts
3
- declare function createChatSessionHandler({ allowedOrigins, apiKey, apiUrl, fetchImpl, resolveUser }: CreateChatSessionHandlerOptions): (request: Request) => Promise<Response>;
4
- //#endregion
5
- export { createChatSessionHandler };
3
+ export declare function createChatSessionHandler({ allowedOrigins, apiKey, apiUrl, fetchImpl, resolveUser }: CreateChatSessionHandlerOptions): (request: Request) => Promise<Response>;
4
+ //#endregion
@@ -1,5 +1,4 @@
1
1
  import { c as CreateChatSessionHandlerOptions } from "./types-CvhxV-IX.mjs";
2
2
  //#region src/chat-session.d.ts
3
- declare function createChatSessionHandler({ allowedOrigins, apiKey, apiUrl, fetchImpl, resolveUser }: CreateChatSessionHandlerOptions): (request: Request) => Promise<Response>;
4
- //#endregion
5
- export { createChatSessionHandler };
3
+ export declare function createChatSessionHandler({ allowedOrigins, apiKey, apiUrl, fetchImpl, resolveUser }: CreateChatSessionHandlerOptions): (request: Request) => Promise<Response>;
4
+ //#endregion
@@ -54,12 +54,12 @@ interface FromDrizzleProjectionOptions {
54
54
  */
55
55
  objectType?: string;
56
56
  }
57
- declare function fromDrizzleProjection(db: unknown, projection: ProjectionMapping, opts: FromDrizzleProjectionOptions & {
57
+ export declare function fromDrizzleProjection(db: unknown, projection: ProjectionMapping, opts: FromDrizzleProjectionOptions & {
58
58
  objectType: string;
59
59
  }): SyncSource & {
60
60
  objectType: string;
61
61
  };
62
- declare function fromDrizzleProjection(db: unknown, projection: ProjectionMapping, opts: FromDrizzleProjectionOptions): SyncSource;
62
+ export declare function fromDrizzleProjection(db: unknown, projection: ProjectionMapping, opts: FromDrizzleProjectionOptions): SyncSource;
63
63
  //#endregion
64
64
  //#region src/drizzle.d.ts
65
65
  interface DrizzleDb {
@@ -94,17 +94,17 @@ interface FromDrizzleOptions {
94
94
  * `drizzle-orm` is an optional peer dependency — installed only when you import
95
95
  * `@clivly/sdk/drizzle`.
96
96
  */
97
- declare function fromDrizzle(db: DrizzleDb, table: Table, opts: FromDrizzleOptions & {
97
+ export declare function fromDrizzle(db: DrizzleDb, table: Table, opts: FromDrizzleOptions & {
98
98
  objectType: string;
99
99
  }): SyncSource & {
100
100
  objectType: string;
101
101
  };
102
- declare function fromDrizzle(db: DrizzleDb, table: Table, opts: FromDrizzleOptions): SyncSource;
102
+ export declare function fromDrizzle(db: DrizzleDb, table: Table, opts: FromDrizzleOptions): SyncSource;
103
103
  /**
104
104
  * Build a `NamespaceIntrospector` from any Drizzle client that exposes
105
105
  * `.execute()`. Reads `information_schema` in the connection's default schema
106
106
  * (`current_schema()`), so it reports exactly the tables the app can reach.
107
107
  */
108
- declare function drizzleIntrospector(db: unknown): NamespaceIntrospector;
108
+ export declare function drizzleIntrospector(db: unknown): NamespaceIntrospector;
109
109
  //#endregion
110
- export { type FromDrizzleProjectionOptions, buildUniqueConstraints, discoverFromDrizzle, drizzleIntrospector, fromDrizzle, fromDrizzleProjection };
110
+ export { type FromDrizzleProjectionOptions, buildUniqueConstraints, discoverFromDrizzle };
@@ -54,12 +54,12 @@ interface FromDrizzleProjectionOptions {
54
54
  */
55
55
  objectType?: string;
56
56
  }
57
- declare function fromDrizzleProjection(db: unknown, projection: ProjectionMapping, opts: FromDrizzleProjectionOptions & {
57
+ export declare function fromDrizzleProjection(db: unknown, projection: ProjectionMapping, opts: FromDrizzleProjectionOptions & {
58
58
  objectType: string;
59
59
  }): SyncSource & {
60
60
  objectType: string;
61
61
  };
62
- declare function fromDrizzleProjection(db: unknown, projection: ProjectionMapping, opts: FromDrizzleProjectionOptions): SyncSource;
62
+ export declare function fromDrizzleProjection(db: unknown, projection: ProjectionMapping, opts: FromDrizzleProjectionOptions): SyncSource;
63
63
  //#endregion
64
64
  //#region src/drizzle.d.ts
65
65
  interface DrizzleDb {
@@ -94,17 +94,17 @@ interface FromDrizzleOptions {
94
94
  * `drizzle-orm` is an optional peer dependency — installed only when you import
95
95
  * `@clivly/sdk/drizzle`.
96
96
  */
97
- declare function fromDrizzle(db: DrizzleDb, table: Table, opts: FromDrizzleOptions & {
97
+ export declare function fromDrizzle(db: DrizzleDb, table: Table, opts: FromDrizzleOptions & {
98
98
  objectType: string;
99
99
  }): SyncSource & {
100
100
  objectType: string;
101
101
  };
102
- declare function fromDrizzle(db: DrizzleDb, table: Table, opts: FromDrizzleOptions): SyncSource;
102
+ export declare function fromDrizzle(db: DrizzleDb, table: Table, opts: FromDrizzleOptions): SyncSource;
103
103
  /**
104
104
  * Build a `NamespaceIntrospector` from any Drizzle client that exposes
105
105
  * `.execute()`. Reads `information_schema` in the connection's default schema
106
106
  * (`current_schema()`), so it reports exactly the tables the app can reach.
107
107
  */
108
- declare function drizzleIntrospector(db: unknown): NamespaceIntrospector;
108
+ export declare function drizzleIntrospector(db: unknown): NamespaceIntrospector;
109
109
  //#endregion
110
- export { type FromDrizzleProjectionOptions, buildUniqueConstraints, discoverFromDrizzle, drizzleIntrospector, fromDrizzle, fromDrizzleProjection };
110
+ export { type FromDrizzleProjectionOptions, buildUniqueConstraints, discoverFromDrizzle };
package/dist/index.d.cts CHANGED
@@ -2,10 +2,10 @@ import { a as ClivlySDK, c as CreateChatSessionHandlerOptions, d as DoctorCheck,
2
2
  import { createChatSessionHandler } from "./chat-session.cjs";
3
3
  import { ClivlyEntitiesConfig, ConfigValidationError, ConfigValidationResult, CustomObjectDeclaration, DiscoveredSchemaTable, customObjectDeclarations, defineClivlyConfig, validateEntitiesConfig } from "@clivly/core/entity-config";
4
4
  //#region src/trigger-url.d.ts
5
- declare function isPlaceholderUrl(value: string): boolean;
5
+ export declare function isPlaceholderUrl(value: string): boolean;
6
6
  //#endregion
7
7
  //#region src/errors.d.ts
8
- declare class ClivlyError extends Error {
8
+ export declare class ClivlyError extends Error {
9
9
  /** HTTP status, or null when the request never completed (network error). */
10
10
  readonly status: number | null;
11
11
  readonly reason: ClivlyConnectResult["reason"];
@@ -19,11 +19,11 @@ declare class ClivlyError extends Error {
19
19
  static from(result: ClivlyConnectResult): ClivlyError | null;
20
20
  }
21
21
  /** The API key was rejected (401) or lacks access (403). Not retryable. */
22
- declare class ClivlyAuthError extends ClivlyError {}
22
+ export declare class ClivlyAuthError extends ClivlyError {}
23
23
  /** Rate limited (429). Retryable after backoff / `Retry-After`. */
24
- declare class ClivlyRateLimitError extends ClivlyError {}
24
+ export declare class ClivlyRateLimitError extends ClivlyError {}
25
25
  /** The request never reached the server (network/DNS/TLS). Retryable. */
26
- declare class ClivlyNetworkError extends ClivlyError {}
26
+ export declare class ClivlyNetworkError extends ClivlyError {}
27
27
  //#endregion
28
28
  //#region src/index.d.ts
29
29
  /**
@@ -32,6 +32,6 @@ declare class ClivlyNetworkError extends ClivlyError {}
32
32
  * backend today. Tunnel management and CRM write-back are scaffolded (see the
33
33
  * clearly-marked TODOs) and land with the Cloudflare infrastructure.
34
34
  */
35
- declare function createClivlySDK(config: ClivlySDKConfig): ClivlySDK;
35
+ export declare function createClivlySDK(config: ClivlySDKConfig): ClivlySDK;
36
36
  //#endregion
37
- export { type ChatSessionRequestBody, type ChatWidgetVisitor, ClivlyAuthError, type ClivlyConnectReason, type ClivlyConnectResult, type ClivlyEntitiesConfig, ClivlyError, ClivlyNetworkError, ClivlyRateLimitError, type ClivlySDK, type ClivlySDKConfig, type ClivlyUser, type ConfigValidationError, type ConfigValidationResult, type CreateChatSessionHandlerOptions, type CursorStore, type CustomObjectDeclaration, type DiscoveredSchemaTable, type DiscoveredTable, type DoctorCheck, type DoctorReport, type EnsureSchemaResult, type EnsuredMappingResult, type EnsuredObjectTypeResult, type RemoteProjectionsDescription, type SyncTriggerDescription, createChatSessionHandler, createClivlySDK, customObjectDeclarations, defineClivlyConfig, isPlaceholderUrl, validateEntitiesConfig };
37
+ export { type ChatSessionRequestBody, type ChatWidgetVisitor, type ClivlyConnectReason, type ClivlyConnectResult, type ClivlyEntitiesConfig, type ClivlySDK, type ClivlySDKConfig, type ClivlyUser, type ConfigValidationError, type ConfigValidationResult, type CreateChatSessionHandlerOptions, type CursorStore, type CustomObjectDeclaration, type DiscoveredSchemaTable, type DiscoveredTable, type DoctorCheck, type DoctorReport, type EnsureSchemaResult, type EnsuredMappingResult, type EnsuredObjectTypeResult, type RemoteProjectionsDescription, type SyncTriggerDescription, createChatSessionHandler, customObjectDeclarations, defineClivlyConfig, validateEntitiesConfig };
package/dist/index.d.mts CHANGED
@@ -2,10 +2,10 @@ import { a as ClivlySDK, c as CreateChatSessionHandlerOptions, d as DoctorCheck,
2
2
  import { createChatSessionHandler } from "./chat-session.mjs";
3
3
  import { ClivlyEntitiesConfig, ConfigValidationError, ConfigValidationResult, CustomObjectDeclaration, DiscoveredSchemaTable, customObjectDeclarations, defineClivlyConfig, validateEntitiesConfig } from "@clivly/core/entity-config";
4
4
  //#region src/trigger-url.d.ts
5
- declare function isPlaceholderUrl(value: string): boolean;
5
+ export declare function isPlaceholderUrl(value: string): boolean;
6
6
  //#endregion
7
7
  //#region src/errors.d.ts
8
- declare class ClivlyError extends Error {
8
+ export declare class ClivlyError extends Error {
9
9
  /** HTTP status, or null when the request never completed (network error). */
10
10
  readonly status: number | null;
11
11
  readonly reason: ClivlyConnectResult["reason"];
@@ -19,11 +19,11 @@ declare class ClivlyError extends Error {
19
19
  static from(result: ClivlyConnectResult): ClivlyError | null;
20
20
  }
21
21
  /** The API key was rejected (401) or lacks access (403). Not retryable. */
22
- declare class ClivlyAuthError extends ClivlyError {}
22
+ export declare class ClivlyAuthError extends ClivlyError {}
23
23
  /** Rate limited (429). Retryable after backoff / `Retry-After`. */
24
- declare class ClivlyRateLimitError extends ClivlyError {}
24
+ export declare class ClivlyRateLimitError extends ClivlyError {}
25
25
  /** The request never reached the server (network/DNS/TLS). Retryable. */
26
- declare class ClivlyNetworkError extends ClivlyError {}
26
+ export declare class ClivlyNetworkError extends ClivlyError {}
27
27
  //#endregion
28
28
  //#region src/index.d.ts
29
29
  /**
@@ -32,6 +32,6 @@ declare class ClivlyNetworkError extends ClivlyError {}
32
32
  * backend today. Tunnel management and CRM write-back are scaffolded (see the
33
33
  * clearly-marked TODOs) and land with the Cloudflare infrastructure.
34
34
  */
35
- declare function createClivlySDK(config: ClivlySDKConfig): ClivlySDK;
35
+ export declare function createClivlySDK(config: ClivlySDKConfig): ClivlySDK;
36
36
  //#endregion
37
- export { type ChatSessionRequestBody, type ChatWidgetVisitor, ClivlyAuthError, type ClivlyConnectReason, type ClivlyConnectResult, type ClivlyEntitiesConfig, ClivlyError, ClivlyNetworkError, ClivlyRateLimitError, type ClivlySDK, type ClivlySDKConfig, type ClivlyUser, type ConfigValidationError, type ConfigValidationResult, type CreateChatSessionHandlerOptions, type CursorStore, type CustomObjectDeclaration, type DiscoveredSchemaTable, type DiscoveredTable, type DoctorCheck, type DoctorReport, type EnsureSchemaResult, type EnsuredMappingResult, type EnsuredObjectTypeResult, type RemoteProjectionsDescription, type SyncTriggerDescription, createChatSessionHandler, createClivlySDK, customObjectDeclarations, defineClivlyConfig, isPlaceholderUrl, validateEntitiesConfig };
37
+ export { type ChatSessionRequestBody, type ChatWidgetVisitor, type ClivlyConnectReason, type ClivlyConnectResult, type ClivlyEntitiesConfig, type ClivlySDK, type ClivlySDKConfig, type ClivlyUser, type ConfigValidationError, type ConfigValidationResult, type CreateChatSessionHandlerOptions, type CursorStore, type CustomObjectDeclaration, type DiscoveredSchemaTable, type DiscoveredTable, type DoctorCheck, type DoctorReport, type EnsureSchemaResult, type EnsuredMappingResult, type EnsuredObjectTypeResult, type RemoteProjectionsDescription, type SyncTriggerDescription, createChatSessionHandler, customObjectDeclarations, defineClivlyConfig, validateEntitiesConfig };
package/dist/vite.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as ClivlySDK } from "./types-CvhxV-IX.cjs";
2
2
  import { Plugin } from "vite";
3
3
  //#region src/vite.d.ts
4
- interface ClivlyViteOptions {
4
+ export interface ClivlyViteOptions {
5
5
  /** Log prefix for Clivly's boot lines. Defaults to "clivly". */
6
6
  name?: string;
7
7
  }
@@ -17,6 +17,5 @@ interface ClivlyViteOptions {
17
17
  * Vite is an optional peer dependency imported type-only (`import type`), so
18
18
  * the built bundle carries no runtime dependency on Vite.
19
19
  */
20
- declare function clivlyVite(sdk: ClivlySDK, options?: ClivlyViteOptions): Plugin;
21
- //#endregion
22
- export { ClivlyViteOptions, clivlyVite };
20
+ export declare function clivlyVite(sdk: ClivlySDK, options?: ClivlyViteOptions): Plugin;
21
+ //#endregion
package/dist/vite.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as ClivlySDK } from "./types-CvhxV-IX.mjs";
2
2
  import { Plugin } from "vite";
3
3
  //#region src/vite.d.ts
4
- interface ClivlyViteOptions {
4
+ export interface ClivlyViteOptions {
5
5
  /** Log prefix for Clivly's boot lines. Defaults to "clivly". */
6
6
  name?: string;
7
7
  }
@@ -17,6 +17,5 @@ interface ClivlyViteOptions {
17
17
  * Vite is an optional peer dependency imported type-only (`import type`), so
18
18
  * the built bundle carries no runtime dependency on Vite.
19
19
  */
20
- declare function clivlyVite(sdk: ClivlySDK, options?: ClivlyViteOptions): Plugin;
21
- //#endregion
22
- export { ClivlyViteOptions, clivlyVite };
20
+ export declare function clivlyVite(sdk: ClivlySDK, options?: ClivlyViteOptions): Plugin;
21
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clivly/sdk",
3
- "version": "0.11.0-next.0",
3
+ "version": "0.11.0",
4
4
  "private": false,
5
5
  "description": "Clivly SDK — connect your app to Clivly Cloud (heartbeat, discovery, auth bridge).",
6
6
  "license": "MIT",
@@ -53,14 +53,14 @@
53
53
  "README.md"
54
54
  ],
55
55
  "dependencies": {
56
- "@clivly/core": "0.11.0-next.0"
56
+ "@clivly/core": "0.11.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@electric-sql/pglite": "^0.5.4",
60
60
  "drizzle-orm": "^0.45.2",
61
61
  "tsdown": "^0.23.0",
62
62
  "typescript": "^6",
63
- "vite": "^8.0.8",
63
+ "vite": "^8.3.0",
64
64
  "vitest": "^3.2.0"
65
65
  },
66
66
  "peerDependencies": {