Circuit Module
Summary
Circuit SDK module.
Main class is Client which exposes the messaging and real-time APIs for a particular user.
Here is an example that creates a client instance, performs a login, registers for an itemAdd event and sends a new text message.
// Create Circuit client instance
const client = new Circuit.Client({
client_id: '<your client_id>',
domain: '<circuit system, defaults to circuitsandbox.net>'
});
// Authenticate with OAuth2. User will see the Circuit OAuth2 popup.
const user = await client.logon();
// Listen for itemAdded event
client.addEventListener('itemAdded', evt => console.log('Item received:', evt.item));
// Send text item on a specific conversation
const item = await client.addTextItem('3154f545-1a6a-493a-8448-3c5cfa5a6b11', 'Hello World');
View the examples on circuit.github.io.
This module provides the following classes:
- AccountStatus
- AtcRegistrationState
- Attachment
- BridgeNumber
- Call
- CallParticipant
- CallStateName
- Client
- ClientInfo
- ConnectionState
- Conversation
- ConversationAvatar
- ConversationDetails
- ConversationFlaggedItemData
- ConversationFlaggedItems
- ConversationItemType
- ConversationParticipant
- ConversationParticipantResult
- ConversationSearchResult
- ConversationTopic
- ConversationTopicResult
- ConversationType
- ConversationUserData
- Credentials
- Device
- DeviceType
- Element
- ElementId
- EmailAddress
- Error
- FilterCondition
- FilterConnector
- FormControl
- FormControlType
- FormData
- FormMetadata
- FormOption
- GetAccountsFilterCriteria
- GetAccountsSorting
- GetIncomingWebhooksResult
- GuestClient
- GuestJoinError
- IncomingWebhook
- Injectors
- Item
- JournalFilter
- Label
- LayoutMapping
- Locale
- logger
- LogLevel
- MediaType
- MonitorSessionError
- NodeSDK
- ParticipantCriteria
- ParticipantSearchCriteria
- PhoneNumber
- Presence
- PresenceState
- Preview
- Recording
- RecordingInfoReason
- RecordingInfoState
- RecordingStarter
- RecordingVideoLayoutName
- RetrieveAction
- RtcItem
- RTCItemType
- RtcParticipant
- RTCParticipantType
- RtcSessionController
- RtpStats
- RtpStatsConfig
- RtpStatsMedia
- SearchContext
- SearchDirection
- SearchItemContext
- SearchScope
- SearchStatusCode
- SearchThreadContext
- SessionClosedReason
- SortOrder
- SystemItem
- SystemItemType
- SystemPermission
- TextItem
- TextItemContentType
- Thread
- Token
- User
- UserRole
- UserSettings
- UserState
- Utils
- VideoLayout
- VideoResolution
- VideoResolutionLevel
- Viewbox
- WebRTCAdapter
- Whiteboard
This module is a rollup of the following modules:
-
Circuit.Enums
Enum definitions.