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/index.d.ts CHANGED
@@ -1,61 +1,10 @@
1
- export interface ObiAssistantConfig {
2
- apiKey: string
3
- position?: "bottom-right" | "bottom-left" | "top-right" | "top-left"
4
- user?: {
5
- id: string
6
- email?: string
7
- metadata?: Record<string, any>
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.1.10",
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
+ }