@plucky-ai/chat-sdk 0.3.0 → 0.3.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @plucky-ai/chat-sdk
2
2
 
3
- A lightweight SDK for integrating Plucky Chat functionality into your applications.
3
+ A lightweight SDK for integrating Plucky into your applications. Access the full docs [here](https://docs.plucky.ai).
4
4
 
5
5
  ## Installation
6
6
 
@@ -14,36 +14,25 @@ pnpm add @plucky-ai/chat-sdk
14
14
 
15
15
  ## Usage
16
16
 
17
- ```typescript
18
- import { init, getAPI } from '@plucky-ai/chat-sdk'
19
-
20
- // Initialize the SDK
21
- const api = init({
22
- // your configuration options
17
+ ```javascript
18
+ import { Plucky, sendMessage } from '@plucky-ai/chat-sdk'
19
+
20
+ const APP_ID = 'Your app id'
21
+ const BASE_URL = 'https://widget.plucky.ai'
22
+
23
+ Plucky({
24
+ appId: APP_ID,
25
+ baseUrl: BASE_URL,
26
+ user: {
27
+ id: 'user-123',
28
+ name: 'John Doe',
29
+ email: 'john@example.com',
30
+ createdAt: '2024-01-15T00:00:00.000Z',
31
+ },
23
32
  })
24
33
 
25
- // Or get the existing API instance
26
- const api = getAPI()
27
- ```
28
-
29
- ## API Reference
30
-
31
- ### `init(options: InitOptions)`
32
-
33
- Initializes the Plucky Chat SDK with the provided options.
34
-
35
- ### `getAPI()`
36
-
37
- Returns the current API instance, creating one if it doesn't exist.
38
-
39
- ## Types
40
-
41
- ```typescript
42
- interface InitOptions {
43
- // Configuration options for the SDK
44
- }
45
-
46
- interface PluckyAPI {
47
- // API methods and properties
48
- }
34
+ sendMessage({
35
+ content: 'Hello world!',
36
+ createChat: true,
37
+ })
49
38
  ```
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plucky-ai/chat-sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plucky-ai/chat-sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",