obi-sdk 0.1.10 → 0.2.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 +46 -29
- package/dist/modular/chunks/{session-c3b70ffb.js → index-2d0b05af.js} +5409 -818
- package/dist/modular/chunks/index-2d0b05af.js.map +1 -0
- package/dist/modular/chunks/obi-widget-0970cbbe.js +2221 -0
- package/dist/modular/chunks/obi-widget-0970cbbe.js.map +1 -0
- package/dist/modular/core.js +3 -8
- package/dist/modular/core.js.map +1 -1
- package/dist/modular/index.js +20 -228
- package/dist/modular/index.js.map +1 -1
- package/dist/modular/ui.js +17 -16
- package/dist/modular/ui.js.map +1 -1
- package/dist/obi-sdk.es.js +21068 -7
- package/dist/obi-sdk.standalone.iife.js +60 -33
- package/dist/obi-sdk.standalone.iife.js.map +1 -1
- package/dist/obi-sdk.umd.js +103 -76
- package/index.d.ts +10 -61
- package/package.json +4 -4
- package/dist/index-719ec57d.js +0 -5168
- package/dist/modular/chunks/mitt-3c1f932d.js +0 -20
- package/dist/modular/chunks/mitt-3c1f932d.js.map +0 -1
- package/dist/modular/chunks/obi-widget-ff350828.js +0 -6369
- package/dist/modular/chunks/obi-widget-ff350828.js.map +0 -1
- package/dist/modular/chunks/session-c3b70ffb.js.map +0 -1
- package/dist/session-730ff76c.js +0 -15762
package/index.d.ts
CHANGED
|
@@ -1,61 +1,10 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare class ObiAssistant {
|
|
12
|
-
static init(config: ObiAssistantConfig): HTMLElement
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export declare class ObiSDK {
|
|
16
|
-
// Core SDK methods
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export declare class ObiWidget extends HTMLElement {
|
|
20
|
-
apiKey: string
|
|
21
|
-
position?: string
|
|
22
|
-
user?: {
|
|
23
|
-
id: string
|
|
24
|
-
email?: string
|
|
25
|
-
metadata?: Record<string, any>
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export declare enum EventType {
|
|
30
|
-
CONNECTING = "connecting",
|
|
31
|
-
CONNECTED = "connected",
|
|
32
|
-
DISCONNECTED = "disconnected",
|
|
33
|
-
ERROR = "error",
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export declare enum SDKState {
|
|
37
|
-
IDLE = "idle",
|
|
38
|
-
LOADING = "loading",
|
|
39
|
-
READY = "ready",
|
|
40
|
-
ERROR = "error",
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Initialize the Obi Assistant widget with the latest SDK version from CDN
|
|
45
|
-
* This ensures users always get the latest features and bug fixes
|
|
46
|
-
*
|
|
47
|
-
* @param config The configuration for initializing the Obi widget
|
|
48
|
-
*/
|
|
49
|
-
export declare function initObi(config: ObiAssistantConfig): Promise<HTMLElement>
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Get the latest SDK instance (not implemented in this version)
|
|
53
|
-
* @throws Error always throws error in this version
|
|
54
|
-
*/
|
|
55
|
-
export declare function getLatestSDK(): Promise<never>
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Create a session (not implemented in this version)
|
|
59
|
-
* @throws Error always throws error in this version
|
|
60
|
-
*/
|
|
61
|
-
export declare function createLatestSession(options?: any): Promise<never>
|
|
1
|
+
export {
|
|
2
|
+
ObiAssistantConfig,
|
|
3
|
+
ObiSDK,
|
|
4
|
+
ObiWidget,
|
|
5
|
+
EventType,
|
|
6
|
+
SDKState,
|
|
7
|
+
initObi,
|
|
8
|
+
getLatestSDK,
|
|
9
|
+
createLatestSession,
|
|
10
|
+
} from "./src/types/sdk"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "obi-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "JavaScript SDK for Obi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/obi-sdk.umd.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"index.d.ts"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
|
-
"dev": "vite",
|
|
14
|
+
"dev": "DEV_MODE=true vite",
|
|
15
15
|
"build": "tsc && vite build",
|
|
16
16
|
"build:loader": "vite build --config vite.loader.config.js",
|
|
17
17
|
"build:standalone": "vite build --config vite.standalone.config.js",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
38
38
|
"homepage": "https://www.iamobi.ai",
|
|
39
39
|
"dependencies": {
|
|
40
|
+
"eventemitter3": "^4.0.7",
|
|
40
41
|
"lit": "^3.0.0",
|
|
41
42
|
"livekit-client": "^2.11.4",
|
|
42
|
-
"mitt": "^3.0.1",
|
|
43
43
|
"ts-pattern": "^5.0.6",
|
|
44
44
|
"zod": "^3.22.0"
|
|
45
45
|
},
|
|
@@ -64,4 +64,4 @@
|
|
|
64
64
|
"typescript": "^5.0.2",
|
|
65
65
|
"vite": "^4.5.0"
|
|
66
66
|
}
|
|
67
|
-
}
|
|
67
|
+
}
|