Skip to main content

types/context

Interfaces

SCAlertMessagesContextType

Interface SCAlertMessagesContextType

Properties

PropertyTypeDescription
optionsRecord<string, any>Options
setOptions(options) => voidSet options

SCBlockedUsersManagerType

Properties

PropertyTypeDescription
block?(user) => Promise<any>Handle user block/unblock
blockednumber[]List of all blocked users
isBlocked?(user) => booleanHandle check if a user is blocked
isLoading() => booleanList of current user in loading state
loadingbooleanLoading state
refresh?() => Promise<any>Refresh blocked user list

SCConnectionsManagerType

Properties

PropertyTypeDescription
acceptConnection?(user) => Promise<any>Handle accept connection
cancelRequestConnection?(user) => Promise<any>Handle cancel request connection
connectionsnumber[]List of all users in relations(social graph) with authenticated user
emptyCache?() => voidEmpty cache to revalidate all categories
isLoading(user) => booleanList of current users in loading state
loadingnumber[]List of all users in loading state
refresh?() => voidRefresh connections status
removeConnection?(user) => Promise<any>Handle remove connection
requestConnection?(user) => Promise<any>Handle request connection
status?(user) => stringCheck user status

SCContextProviderType

Interface SCContextProviderType

Properties

PropertyTypeDescription
childrenReactNodeNested children
confSCSettingsTypeSettings
contextProviders?(children) => Element[]Providers

SCContextType

Interface SCContextType

Properties

PropertyTypeDescription
settingsSCSettingsTypeSettings

SCFollowedCategoriesManagerType

Properties

PropertyTypeDescription
categoriesnumber[]List of all categories ids followed by the authenticated user
emptyCache?() => voidEmpty cache to revalidate all categories
follow?(category) => Promise<any>Handle user follow/unfollow category
isFollowed?(category) => booleanHandle check if a user follow a category, caching data
isLoading(category) => booleanList of current categories in loading state
loadingnumber[]List of all categories in loading state
refresh?() => voidRefresh categories

SCFollowedManagerType

Properties

PropertyTypeDescription
emptyCache?() => voidEmpty cache to revalidate all followed
follow?(user) => Promise<any>Handle user follow/unfollow user
followednumber[]List of all user ids followed by the authenticated user
isFollowed?(user) => booleanHandle check if a user follow a user, caching data
isLoading(user) => booleanList of current users in loading state
loadingnumber[]List of all users in loading state
refresh?() => voidRefresh followed

SCFollowersManagerType

Properties

PropertyTypeDescription
emptyCache?() => voidEmpty cache to revalidate all followers
followersnumber[]List of all user ids that follow the authenticated user
isFollower?(user) => booleanHandle check if a user is a followers, caching data
isLoading(user) => booleanList of current users in loading state
loadingnumber[]List of all users in loading state

SCGeocodingType

Interface SCGeocodingType

Properties

PropertyTypeDescription
apiKeystringSet secretKey geocoding service Default: null

SCIntegrationsOpenAIType

Interface SCIntegrationsOpenAIType

Properties

PropertyTypeDescription
secretKeystringSet secretKey OpenAI Default: null

SCIntegrationsType

Interface SCIntegrationsType

Properties

PropertyTypeDescription
geocoding?SCGeocodingTypeGeocoding
openai?SCIntegrationsOpenAITypeOpenAI

SCJoinedCoursesManagerType

Properties

PropertyTypeDescription
coursesnumber[]List of all courses ids followed by the authenticated user
emptyCache?() => voidEmpty cache to revalidate all courses
isLoading(course) => booleanList of current courses in loading state
join?(course, userId?) => Promise<any>Handle user joining a course
joinStatus?(course) => stringHandles a user join status to a course, caching data
leave?(course) => Promise<any>Handle user leaving a course
loadingnumber[]List of all courses in loading state
refresh?() => voidRefresh courses

SCLocaleContextType

Interface SCLocaleContextType

Properties

PropertyTypeDescription
localestringLocale: en, it, etc.
messagesRecord<any, any>Locale messages
selectLocale(l) => voidChange locale

SCLocaleType

Interface SCLocaleType

Properties

PropertyTypeDescription
default?stringDefault locale.
messages?Record<string, any>Overrides default messages.

SCNotificationContextType

Interface SCNotificationContextType

Properties

PropertyTypeDescription
mnpmInstance?anymobile native push instance
wpSubscriptionanywp subscription
wsInstanceanyws instance

SCNotificationsMobileNativePushMessagingType

Interface SCNotificationsMobileNativePushMessagingType

Properties

PropertyTypeDescription
disable?booleanDisable

SCNotificationsType

Interface SCNotificationsType

Properties

PropertyTypeDescription
mobileNativePushMessaging?SCNotificationsMobileNativePushMessagingTypeMobile native push messaging
webPushMessaging?SCNotificationsWebPushMessagingTypeWeb push messaging notification
webSocket?SCNotificationsWebSocketTypeWeb socket notification

SCNotificationsWebPushMessagingType

Interface SCNotificationsWebPushMessagingType

Properties

PropertyTypeDescription
applicationServerKey?booleanapplicationServerKey - Public key
disableToastMessage?booleanDisable toast message

SCNotificationsWebSocketType

Interface SCNotificationsWebSocketType

Properties

PropertyTypeDescription
disableToastMessage?booleanDisable toast message
prefixPath?stringSet websocket prefix path Default: ws
secure?booleanSet websocket protocol: wss or ws. Default: wss

SCPreferencesContextType

Interface SCPreferencesContextType

Properties

PropertyTypeDescription
featuresstring[]List of all community enabled features
preferencesRecord<string, any>List of all community preferences
refresh() => voidForce refresh
setFeatures(features) => voidSet features
setPreferences(preferences) => voidSet prefrerences

SCPreferencesType

Interface SCPreferencesType

Properties

PropertyTypeDescription
featuresstring[]List of all community enabled features
preferencesRecord<string, any>List of all community preferences

SCRoutingContextType

Interface SCRoutingContextType

Properties

PropertyTypeDescription
routerLink?ComponentClass<any>Component
routes?Record<string, string>Routes
url?(string, object) => stringGenerate default path

SCRoutingType

Interface SCRoutingType

Properties

PropertyTypeDescription
handleRoute?(name, defaultUrl, data, templateUrl) => stringHandle override routes path
routerLink?ComponentClass<any>Component
routes?Record<string, string>Routes

SCSessionType

Interface SCSessionType

Properties

PropertyTypeDescription
authToken?SCAuthTokenTypeAccess Token.
clientId?stringClientID: only for OAuth.
handleLogout?() => voidCallback on logout.
handleRefreshToken?(currentSession) => Promise<SCAuthTokenType>Callback to refresh the token.
typestringSession types: OAuth, JWT, Cookies.

SCSettingsManagerType

Properties

PropertyTypeDescription
all?() => SCUserSettingsTypeGet all settings
get?(p) => anyGet a settings
isLoading() => booleanCheck if component is loading
refresh?() => voidRefresh settings
update?(p, v) => anyUpdate a settings

SCSettingsType

Interface SCSettingsType

Properties

PropertyTypeDescription
contextProviders?(children) => Element[]List of SC context providers to override the default value Default context providers: SCPreferencesProvider, SCRoutingProvider, SCUserProvider, SCNotificationProvider, SCThemeProvider, SCLocaleProvider, SCPreferencesProvider,
handleAnonymousAction?() => voidCallback to handle anonymous action Ex. an anonymous user attempt to post a comment
integrations?SCIntegrationsTypeIntegrations conf
locale?SCLocaleTypei18n. Locale: it, en, etc...
notifications?SCNotificationsTypeObject conf of notification.
portalstringPortal.
preferences?SCPreferencesTypeObject conf of preferences.
router?SCRoutingTypeObject conf of router.
sessionSCSessionTypeObject conf of session.
theme?SCThemeTypeObject conf of session.
vote?SCVoteTypeVote conf

SCSubscribedEventsManagerType

Properties

PropertyTypeDescription
emptyCache?() => voidEmpty cache to revalidate all groups
eventsnumber[]List of all events ids followed by the authenticated user
isLoading(event) => booleanList of current events in loading state
loadingnumber[]List of all events in loading state
refresh?() => voidRefresh groups
subscribe?(event, userId?) => Promise<any>Handle user subscription to an event
subscriptionStatus?(event) => stringHandles a user subscription status to an event, caching data
toggleEventAttendance?(event, userId?) => Promise<any>Handle user going to an event
toggleEventNonattendance?(event, userId?) => Promise<any>Handle user not going to an event

SCSubscribedGroupsManagerType

Properties

PropertyTypeDescription
emptyCache?() => voidEmpty cache to revalidate all groups
groupsnumber[]List of all groups ids followed by the authenticated user
isLoading(group) => booleanList of current groups in loading state
loadingnumber[]List of all groups in loading state
refresh?() => voidRefresh groups
subscribe?(group, userId?) => Promise<any>Handle user subscription to a group
subscriptionStatus?(group) => stringHandles a user subscription status to a group, caching data
unsubscribe?(group) => Promise<any>Handle user unsubscription from a group

SCSubscribedIncubatorsManagerType

Properties

PropertyTypeDescription
emptyCache?() => voidEmpty cache to revalidate all subscribed
incubatorsnumber[]List of all incubators ids subscribed by the authenticated user
isLoading(incubator) => booleanList of current incubators in loading state
isSubscribed?(incubator) => booleanHandle check if a user has subscribed to an incubator, caching data
loadingnumber[]List of all incubators in loading state
refresh?() => voidRefresh subscribed
subscribe?(incubator) => Promise<any>Handle incubator subscribe/unsubscribe

SCThemeContextType

Interface SCThemeContextType

Properties

PropertyTypeDescription
setTheme(theme) => voidChange theme
themeSCThemeTypeTheme

SCUserContextType

Interface SCUserContextType

Properties

PropertyTypeDescription
error?anyError that occurred during authentication.
loadingbooleanAuthentication is loading.
logout() => voidTriggered when logout is performed.
managersobjectManagers: followed, connections, categories, incubators, groups, etc...
managers.blockedUsers?SCBlockedUsersManagerType-
managers.categoriesSCFollowedCategoriesManagerType-
managers.connections?SCConnectionsManagerType-
managers.courses?SCJoinedCoursesManagerType-
managers.events?SCSubscribedEventsManagerType-
managers.followed?SCFollowedManagerType-
managers.followers?SCFollowersManagerType-
managers.groups?SCSubscribedGroupsManagerType-
managers.incubators?SCSubscribedIncubatorsManagerType-
managers.settings?SCSettingsManagerType-
refreshCounters() => Promise<any>Handle refresh user notification counters Interactions, BroadcastMessages, Followers, Followings, Categories, etc.
refreshSession() => Promise<any>Triggered when call a refresh session.
session?SCSessionTypeCurrent Session.
setUnseenInteractionsCounter(counter) => voidHandle change unseen interactions counter
setUnseenNotificationBannersCounter(counter) => voidHandle change unseen notification banner counter
updateUser(info) => voidHandle change user info
user?SCUserTypeAuthenticated User.

SCVoteContextType

Interface SCVoteContextType

Properties

PropertyTypeDescription
isLoadingbooleanIs loading the list of reactions?
reactionsSCReactionType[]List of all reactions
refreshReactions() => Promise<SCReactionType[]>Refresh reactions

SCVoteType

Interface SCVoteType

Properties

PropertyTypeDescription
reactionsSCReactionType[]List of all reactions