Type Definitions
ClientAuth
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
orgEphemeralToken |
string |
<optional> |
Org ephemeral user token created at https://app.forsta.io/authtokens. |
jwt |
string |
<optional> |
An existing JSON Web Token for a Forsta user account. Note that
the JWT may be updated during use. Subscribe to the |
Auth is a single value union. Only ONE property should be set.
Type:
- Object
ClientOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
onInit |
function |
<optional> |
Callback to run when client is first initialized. |
|
onLoaded |
function |
<optional> |
Callback to run when client is fully loaded and ready to use. |
|
url |
string |
<optional> |
https://app.forsta.io/@
|
Override the default site url. |
showNav |
bool | Unhide the navigation panel used for thread selection. |
||
showHeader |
bool | Unhide the header panel. |
||
showThreadAside |
bool | Unhide the optional right aside panel containing thread info. |
||
showThreadHeader |
bool | Unhide the thread header panel. |
||
ephemeralUserInfo |
EphemeralUserInfo | Details about the ephemeral user to be created or used. Only relevant when orgEphemeralToken auth is used. |
||
openThreadId |
null | string | Force the messenger to open a specific thread on
startup. If the value is |
Type:
- Object
EphemeralUserInfo
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
firstName |
string |
<optional> |
First name of the user. |
lastName |
string |
<optional> |
Last name of the user. |
email |
string |
<optional> |
Email of the user. |
phone |
string |
<optional> |
Phone of the user. NOTE: Should be SMS capable. |
salt |
string |
<optional> |
Random value used to distinguish user accounts in advanced use-cases. |
Information about the ephemeral user that will be created or reused for this session.
Type:
- Object
Events
init
The client application has been initialized. This is emitted shortly after successfully
starting up, but before the messenger is fully loaded. Use the loaded
event to wait
for the client application to be completely available.
Type:
- object
loaded
The client application is fully loaded and ready to be controlled.
Type:
- object
provisioningdone
When provisioning has finished successfully this event is emitted.
Type:
- object
provisioningerror
Properties:
Name | Type | Description |
---|---|---|
error |
Error | The error object. |
If an error occurs during provisioning it will be emitted using this event.
Type:
- object
provisioningrequired
This event is emitted if the application requires the user to perform provisioning of their Identity Key.
Type:
- object
thread-message
Properties:
Name | Type | Description |
---|---|---|
id |
string | The message id. |
threadId |
string | The id of the thread this message belongs to. |
Thread message event. Emitted when a new message is added, either by sending or receiving.
Type:
- object