Skip to main content

types/context

Interfaces

SCAlertMessagesContextType

Interface SCAlertMessagesContextType

Properties

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

SCBlockedUsersManagerType

Properties

PropertyTypeDescription
block?(user: SCUserType) => Promise<any>Handle user block/unblock
blockednumber[]List of all blocked users
isBlocked?(user: SCUserType) => 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: SCUserType) => Promise<any>Handle accept connection
cancelRequestConnection?(user: SCUserType) => 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: SCUserType) => booleanList of current users in loading state
loadingnumber[]List of all users in loading state
refresh?() => voidRefresh connections status
removeConnection?(user: SCUserType) => Promise<any>Handle remove connection
requestConnection?(user: SCUserType) => Promise<any>Handle request connection
status?(user: SCUserType) => 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: SCCategoryType) => Promise<any>Handle user follow/unfollow category
isFollowed?(category: SCCategoryType) => booleanHandle check if a user follow a category, caching data
isLoading(category: SCCategoryType) => 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: SCUserType) => Promise<any>Handle user follow/unfollow user
followednumber[]List of all user ids followed by the authenticated user
isFollowed?(user: SCUserType) => booleanHandle check if a user follow a user, caching data
isLoading(user: SCUserType) => 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: SCUserType) => booleanHandle check if a user is a followers, caching data
isLoading(user: SCUserType) => booleanList of current users in loading state
loadingnumber[]List of all users in loading state

SCIntegrationsOpenAIType

Interface SCNotificationsWebSocketType

Properties

PropertyTypeDescription
secretKeystringSet secretKey OpenAI
Default: null

SCIntegrationsType

Interface SCIntegrationsType

Properties

PropertyTypeDescription
openai?SCIntegrationsOpenAITypeOpenAI

SCLocaleContextType

Interface SCLocaleContextType

Properties

PropertyTypeDescription
localestringLocale: en, it, etc.
messagesRecord<any, any>Locale messages
selectLocale(l: string) => 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

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, any>Component
routes?Record<string, string>Routes
url?(string: any, object: any) => stringGenerate default path

SCRoutingType

Interface SCRoutingType

Properties

PropertyTypeDescription
handleRoute?(name: any, defaultUrl: any, data: any, templateUrl: any) => stringHandle override routes path
routerLink?ComponentClass<any, 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: any) => Promise<SCAuthTokenType>Callback to refresh the token.
typestringSession types: OAuth, JWT, Cookies.

SCSettingsManagerType

Properties

PropertyTypeDescription
all?() => SCUserSettingsTypeGet all settings
get?(p: any) => anyGet a settings
isLoading() => booleanCheck if component is loading
refresh?() => voidRefresh settings
update?(p: any, v: any) => 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
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

SCSubscribedGroupsManagerType

Properties

PropertyTypeDescription
emptyCache?() => voidEmpty cache to revalidate all groups
groupsnumber[]List of all groups ids followed by the authenticated user
isLoading(group: SCGroupType) => booleanList of current groups in loading state
loadingnumber[]List of all groups in loading state
refresh?() => voidRefresh groups
subscribe?(group: SCGroupType, userId?: number) => Promise<any>Handle user subscription to a group
subscriptionStatus?(group: SCGroupType) => stringHandles a user subscription status to a group, caching data
unsubscribe?(group: SCGroupType) => 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: SCIncubatorType) => booleanList of current incubators in loading state
isSubscribed?(incubator: SCIncubatorType) => 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: SCIncubatorType) => Promise<any>Handle incubator subscribe/unsubscribe

SCThemeContextType

Interface SCThemeContextType

Properties

PropertyTypeDescription
setTheme(theme: any) => 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.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: number) => voidHandle change unseen interactions counter
setUnseenNotificationBannersCounter(counter: number) => voidHandle change unseen notification banner counter
updateUser(info: Record<string, any>) => 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