@eloquentai/chat-sdk 0.24.1-dev → 0.25.1-dev
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/dist/contexts/constants.d.ts +1 -0
- package/dist/contexts/error-handling.utils.d.ts +2 -0
- package/dist/{index-BUaoeTBT.js → index-CzCHVWuL.js} +2 -2
- package/dist/{index-BUaoeTBT.js.map → index-CzCHVWuL.js.map} +1 -1
- package/dist/{index-LT_qtZ6J.js → index-Dwk9Cj04.js} +3122 -3038
- package/dist/index-Dwk9Cj04.js.map +1 -0
- package/dist/index.mjs +1 -1
- package/dist/lib/config.d.ts +5 -0
- package/dist/lib/cookies.d.ts +21 -0
- package/dist/lib/eloquent-ai-api-client.d.ts +7 -0
- package/dist/lib/http.d.ts +8 -0
- package/package.json +1 -1
- package/dist/index-LT_qtZ6J.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as n, a as t, r } from "./index-
|
|
1
|
+
import { C as n, a as t, r } from "./index-Dwk9Cj04.js";
|
|
2
2
|
try {
|
|
3
3
|
let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, a = new e.Error().stack;
|
|
4
4
|
a && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[a] = "2f86aa74-a654-4fad-86f8-adba1f3666a9", e._sentryDebugIdIdentifier = "sentry-dbid-2f86aa74-a654-4fad-86f8-adba1f3666a9");
|
package/dist/lib/config.d.ts
CHANGED
|
@@ -4,6 +4,11 @@ export declare const LOGO_ANIMATED_URL: string;
|
|
|
4
4
|
* @returns The API URL.
|
|
5
5
|
*/
|
|
6
6
|
export declare function getApiUrl(): string;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the Region API URL based on the environment.
|
|
9
|
+
* @returns The Region API URL.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getRegionApiUrl(): string;
|
|
7
12
|
/**
|
|
8
13
|
* Returns the Amplify configuration for the API.
|
|
9
14
|
* @returns The Amplify configuration.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cookie utility functions for managing browser cookies
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Set a cookie with the given name, value, and options
|
|
6
|
+
*/
|
|
7
|
+
export declare function setCookie(name: string, value: string, options?: {
|
|
8
|
+
maxAge?: number;
|
|
9
|
+
path?: string;
|
|
10
|
+
domain?: string;
|
|
11
|
+
secure?: boolean;
|
|
12
|
+
sameSite?: "Strict" | "Lax" | "None";
|
|
13
|
+
}): void;
|
|
14
|
+
/**
|
|
15
|
+
* Get a cookie value by name
|
|
16
|
+
*/
|
|
17
|
+
export declare function getCookie(name: string): string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Delete a cookie by name
|
|
20
|
+
*/
|
|
21
|
+
export declare function deleteCookie(name: string, path?: string): void;
|
|
@@ -26,6 +26,9 @@ export interface MessageResponse {
|
|
|
26
26
|
previousMessage?: MessageResponse;
|
|
27
27
|
role: "user" | "assistant";
|
|
28
28
|
}
|
|
29
|
+
export interface OrganizationResponse {
|
|
30
|
+
region: string;
|
|
31
|
+
}
|
|
29
32
|
export interface BootResponse {
|
|
30
33
|
chat_settings: {
|
|
31
34
|
agent_name: string;
|
|
@@ -57,6 +60,10 @@ export declare class EloquentAiApiClient {
|
|
|
57
60
|
* Reset API client by clearing all stored state
|
|
58
61
|
*/
|
|
59
62
|
reset(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Get organization data by app ID
|
|
65
|
+
*/
|
|
66
|
+
getOrganizationByAppId(appId: string): Promise<OrganizationResponse>;
|
|
60
67
|
boot(): Promise<BootResponse>;
|
|
61
68
|
createConversation(options: {
|
|
62
69
|
userId: string;
|
package/dist/lib/http.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export declare class NetworkError extends Error {
|
|
2
|
+
constructor(message: string);
|
|
3
|
+
}
|
|
1
4
|
export declare class ServerError extends Error {
|
|
2
5
|
status: number;
|
|
3
6
|
response: Record<string, Record<string, string | number>[]>;
|
|
@@ -15,4 +18,9 @@ export declare class HttpClient {
|
|
|
15
18
|
private request;
|
|
16
19
|
get<T>(url: string): Promise<T>;
|
|
17
20
|
post<T, D>(url: string, data: D): Promise<T>;
|
|
21
|
+
/**
|
|
22
|
+
* External GET request without default headers or credentials
|
|
23
|
+
* Used for cross-origin requests that don't need authentication
|
|
24
|
+
*/
|
|
25
|
+
getExternal<T>(url: string): Promise<T>;
|
|
18
26
|
}
|