Object Reference
In this section, you will find a reference of common objects used within the Webfuse API.
SessionInfo
Section titled “SessionInfo”Information related to the current Session.
interface SessionInfo { sessionId: string; opentokSessionId: string; space: Space; metadata: Record<string, any>;}Properties
Section titled “Properties”sessionId
- Unique identifier for the session.
opentokSessionId
- The OpenTok session ID used for real-time media.
space
- A Space object containing configuration and details about the Space this session belongs to.
metadata
- Custom metadata associated with the session.
Example
Section titled “Example”{ "sessionId": "<session_id>", "opentokSessionId": "<opentok_session_id>", "space": { "access_control": "public", "company_id": 1, "domain": "<space_domain>", "host_rights": "everyone", "id": 1, "identification": "anonymous", "is_paused": false, "link": "<space_url>", "name": "test", "slug": "test", "type": "meeting", "visibility": "members-only", "adminIds": [9, 1], "memberIds": [] }, "metadata": { "foo": "bar" }}Represents a Webfuse Space configuration.
interface Space { access_control: string; company_id: number; domain: string; host_rights: string; id: number; identification: string; is_paused: boolean; link: string; name: string; slug: string; type: string; visibility: string; adminIds: number[]; memberIds: number[];}Properties
Section titled “Properties”id
- The unique identifier for the Space.
name
- The name of the Space.
slug
- The URL-friendly identifier for the Space.
link
- The full URL to the Space.
company_id
- The ID of the company that owns the Space.
type
- The type of Space (
'meeting','assisted','solo').
domain
- The domain associated with the Space.
access_control
- The access control setting for the Space (
'members-only','company','public').
host_rights
- Who has host rights in the Space (
'everyone','members-only','admins-only').
identification
- The identification requirement for the Space (
'anonymous','name_only','verified').
is_paused
trueif the Space is currently paused.
visibility
- The visibility setting for the Space (
'members-only','company').
adminIds
- An array of user IDs who are admins of the Space.
memberIds
- An array of user IDs who are members of the Space.
Represents an opened tab in the Session.
interface Tab { active: boolean; control_index: number; isMediaSharing: boolean; leader_index: number; mediaSharingType: 'screen' | 'video' | null; newTab: boolean; paused: boolean; sessionId: string; ssid: number; title: string; url: string;}Properties
Section titled “Properties”ssid
- Unique identifier for the tab (Session Stream ID).
url
- The current URL loaded in the tab.
title
- The title of the page loaded in the tab.
active
trueif this is the currently active (visible) tab.
paused
trueif the streaming of this tab is currently paused.
leader_index
- The
client_indexof the participant who owns/created this tab.
control_index
- The
client_indexof the participant who currently has control of this tab.
isMediaSharing
trueif this tab is being used for screen or video sharing.
mediaSharingType
- The type of media being shared (
'screen','video', ornull).
newTab
trueif this is a “New Tab” page.
sessionId
- The ID of the session this tab belongs to.
Example
Section titled “Example”{ "active": true, "control_index": 0, "isMediaSharing": false, "leader_index": 0, "mediaSharingType": null, "newTab": false, "paused": false, "sessionId": "sess_12345", "ssid": 1, "title": "Example Domain", "url": "https://example.com"}Participant
Section titled “Participant”Represents a participant in the Session.
interface Participant { name: string; email: string; online: boolean; client_index: number; self: boolean;}Properties
Section titled “Properties”name
- The display name of the participant.
email
- The email address of the participant (if available).
client_index
- A unique numeric index assigned to the participant in the session.
online
trueif the participant is currently connected.
self
trueif this object represents the current user.
Example
Section titled “Example”{ "name": "John Doe", "email": "john@example.com", "online": true, "client_index": 0, "self": true}IntegrationSettings
Section titled “IntegrationSettings”Settings used when initializing a Space via the Widget API.
interface IntegrationSettings { session_start_confirmation?: boolean; support_button_position?: string; hidden_support_button?: boolean; block_until_agent_joins?: boolean; hide_until_agent_joins?: boolean; key_combo_to_start?: boolean; shake_to_start?: boolean; session_autorestore_enabled?: boolean; metadata?: Record<string, string | number | boolean>;}Properties
Section titled “Properties”session_start_confirmation
- Ask users for their consent before starting a Session using JS API.
support_button_position
- Position of the support button on the page.
hidden_support_button
- Do not show the default support button. This option is used in combination with
shake_to_startorkey_combo_to_start.
block_until_agent_joins
- When a Session is started using JS API, show the Session URL and PIN until another participant joins. (Note: this option does not affect permanent Spaces.)
hide_until_agent_joins
- When a Session is started using JS API, hide the Session interface until another participant joins. (Note: this option does not affect permanent Spaces.)
key_combo_to_start
- Allow users to start a Session on pages with the support button by pressing Ctrl+Enter.
shake_to_start
- Allow users to start a Session on pages with the support button, by shaking their mobile device.
session_autorestore_enabled
- Automatically try to restore sessions started with JS API when the page is reloaded.
metadata
- Object with key-value pairs that will be saved and then available in the Session information.
Information about a frame within a tab.
interface Frame { frameId: number; parentFrameId: number; url: string;}Properties
Section titled “Properties”frameId
- The unique identifier for the frame.
0represents the main frame.
parentFrameId
- The identifier of the parent frame.
-1if the frame has no parent.
url
- The URL currently loaded in the frame.
Example
Section titled “Example”[ { frameId: 123, parentFrameId: 0, url: "https://example.com/iframe.html" }]