@cyphlens/2fa-sse-sdk 1.0.7 → 1.0.8

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.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -41,12 +41,12 @@ Include the SDK directly in your HTML:
41
41
 
42
42
  #### 1. ES Modules (ESM) - Modern JavaScript
43
43
  ```javascript
44
- import Cyphlens from "@cyphlens/2fa-sse-sdk";
44
+ import { Cyphlens, EventType } from "@cyphlens/2fa-sse-sdk";
45
45
  ```
46
46
 
47
47
  #### 2. CommonJS (CJS) - Node.js
48
48
  ```javascript
49
- const Cyphlens = require("@cyphlens/2fa-sse-sdk");
49
+ const { Cyphlens, EventType } = require("@cyphlens/2fa-sse-sdk");
50
50
  ```
51
51
 
52
52
  #### 3. Browser (IIFE)
@@ -71,7 +71,7 @@ const cyphlensClient = new Cyphlens("https://your-api-base-url/b2b/v1");
71
71
  ```javascript
72
72
  // Define the callback for handling events
73
73
  const onData = (eventType, data) => {
74
- if (eventType === Cyphlens.EventType.MFASwipe) {
74
+ if (eventType === EventType.MFASwipe) {
75
75
  const twoFactorEvent = data;
76
76
  console.log("2FA Status:", twoFactorEvent.status);
77
77
  // Handle status change (e.g., update UI or trigger logic)
@@ -111,7 +111,7 @@ Stops the event listener and closes the connection.
111
111
  ---
112
112
 
113
113
  ## Event Types
114
- - **`Cyphlens.EventType.MFASwipe`**: Triggered when a 2FA swipe event occurs.
114
+ - **`EventType.MFASwipe`**: Triggered when a 2FA swipe event occurs.
115
115
  - **data**: `{ status: string, ... }` - Contains the event details, including the 2FA status.
116
116
 
117
117
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyphlens/2fa-sse-sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "private": false,
5
5
  "description": "Cyphlens SDK for 2FA SSE",
6
6
  "main": "dist/index.js",