@soyio/soyio-widget 1.0.3 → 1.0.5
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 +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,6 +30,8 @@ Integrate the widget into your frontend framework using the script below. Ensure
|
|
|
30
30
|
|
|
31
31
|
```html
|
|
32
32
|
<script>
|
|
33
|
+
import Widget from '@soyio/soyio-widget';
|
|
34
|
+
|
|
33
35
|
// Widget configuration
|
|
34
36
|
const widgetConfig = {
|
|
35
37
|
flow: "<flow>",
|
|
@@ -59,7 +61,7 @@ Integrate the widget into your frontend framework using the script below. Ensure
|
|
|
59
61
|
- **`companyId`**: The unique identifier for the company, must start with `'com_'`.
|
|
60
62
|
- **`userReference`**: (Optional) A reference identifier provided by the company for the user engaging with the widget. This identifier is used in events (`onEvent` and `webhooks`) to inform the company which user the events are associated with.
|
|
61
63
|
- **`userEmail`**: The user's email address. This field is optional when the flow is `'register'`, where if not provided, Soyio will prompt the user to enter their email. However, for the `'authenticate'` flow, this field should not be provided.
|
|
62
|
-
- **`flowTemplateId`**: Required only in the `'register'` flow, this identifier specifies the order and quantity of documents requested from the user. It must start with `'
|
|
64
|
+
- **`flowTemplateId`**: Required only in the `'register'` flow, this identifier specifies the order and quantity of documents requested from the user. It must start with `'vt_'`.
|
|
63
65
|
- **`identityId`**: Necessary only in the `'authenticate'` flow, this identifier must start with `'id_'` and signifies the user's identity.
|
|
64
66
|
- **`forceError`**: (Optional) Triggers specific errors for testing or debugging. Used to simulate failure scenarios.
|
|
65
67
|
- **`onEvent`**: A callback function triggered upon event occurrences, used for capturing and logging event-related data.
|
|
@@ -78,7 +80,7 @@ The `onEvent` callback is designed to handle various events that occur during wi
|
|
|
78
80
|
|
|
79
81
|
- **`IDENTITY_AUTHENTICATED`**: This event occurs when a user successfully completes the authentication flow. The event object includes:
|
|
80
82
|
|
|
81
|
-
- `eventName`: The name of the event,
|
|
83
|
+
- `eventName`: The name of the event, in this case, `'IDENTITY_AUTHENTICATED'`.
|
|
82
84
|
- `identityId`: The unique identifier for the authenticated identity.
|
|
83
85
|
- `userReference`: The reference identifier for the user, facilitating the association of the event with the user within the company's context.
|
|
84
86
|
|