@skippr/live-agent-sdk 0.14.0 → 0.16.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 +17 -0
- package/dist/esm/lib-exports.js +632 -180
- package/dist/skippr-sdk.css +1 -1
- package/dist/skippr-sdk.js +128 -128
- package/dist/types/components/LiveAgent.d.ts +2 -1
- package/dist/types/components/LoginFlow.d.ts +8 -0
- package/dist/types/context/LiveAgentContext.d.ts +7 -0
- package/dist/types/hooks/useAuth.d.ts +14 -0
- package/dist/types/hooks/useSession.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,6 +62,7 @@ Self-contained widget component. Renders a floating button that opens a sidebar
|
|
|
62
62
|
| `agentId` | `string` | *required* | Agent ID provided by Skippr |
|
|
63
63
|
| `appKey` | `string` | — | Publishable App Key from the admin dashboard |
|
|
64
64
|
| `authToken` | `string` | — | Bearer token for authenticated users |
|
|
65
|
+
| `userToken` | `string` | — | Signed JWT for secret mode identity verification |
|
|
65
66
|
| `defaultOpen` | `boolean` | `false` | Whether the panel starts open |
|
|
66
67
|
|
|
67
68
|
---
|
|
@@ -89,6 +90,22 @@ Hook for accessing session state and panel controls. Must be called within `<Liv
|
|
|
89
90
|
| `closePanel` | `() => void` | Close the panel |
|
|
90
91
|
| `togglePanel` | `() => void` | Toggle the panel open/closed |
|
|
91
92
|
|
|
93
|
+
### Global API
|
|
94
|
+
|
|
95
|
+
| Method | Description |
|
|
96
|
+
|--------|-------------|
|
|
97
|
+
| `Skippr.initialize(config)` | Mount the widget |
|
|
98
|
+
| `Skippr.logout()` | Clear auth token, show login form (direct auth mode) |
|
|
99
|
+
| `Skippr.destroy()` | Remove widget and clear auth tokens |
|
|
100
|
+
|
|
101
|
+
## Authentication Modes
|
|
102
|
+
|
|
103
|
+
The SDK supports two identity modes configured per App Key:
|
|
104
|
+
|
|
105
|
+
**Direct Auth** (default) — Users log in via email OTP inside the widget. No backend integration needed.
|
|
106
|
+
|
|
107
|
+
**Secret** — Your backend signs a JWT with the App Key's identity secret and passes it as `userToken`. The SDK skips the login form and verifies the user server-side.
|
|
108
|
+
|
|
92
109
|
## Support
|
|
93
110
|
|
|
94
111
|
For questions, technical support, or feedback:
|