types/context
Interfaces
SCAlertMessagesContextType
Interface SCAlertMessagesContextType
Properties
Property | Type | Description |
---|---|---|
options | Record <string , any > | Options |
setOptions | (options : any ) => void | Set options |
SCBlockedUsersManagerType
Properties
Property | Type | Description |
---|---|---|
block? | (user : SCUserType ) => Promise <any > | Handle user block/unblock |
blocked | number [] | List of all blocked users |
isBlocked? | (user : SCUserType ) => boolean | Handle check if a user is blocked |
isLoading | () => boolean | List of current user in loading state |
loading | boolean | Loading state |
refresh? | () => Promise <any > | Refresh blocked user list |
SCConnectionsManagerType
Properties
Property | Type | Description |
---|---|---|
acceptConnection? | (user : SCUserType ) => Promise <any > | Handle accept connection |
cancelRequestConnection? | (user : SCUserType ) => Promise <any > | Handle cancel request connection |
connections | number [] | List of all users in relations(social graph) with authenticated user |
emptyCache? | () => void | Empty cache to revalidate all categories |
isLoading | (user : SCUserType ) => boolean | List of current users in loading state |
loading | number [] | List of all users in loading state |
refresh? | () => void | Refresh connections status |
removeConnection? | (user : SCUserType ) => Promise <any > | Handle remove connection |
requestConnection? | (user : SCUserType ) => Promise <any > | Handle request connection |
status? | (user : SCUserType ) => string | Check user status |
SCContextProviderType
Interface SCContextProviderType
Properties
Property | Type | Description |
---|---|---|
children | ReactNode | Nested children |
conf | SCSettingsType | Settings |
contextProviders? | (children ) => Element [] | Providers |
SCContextType
Interface SCContextType
Properties
Property | Type | Description |
---|---|---|
settings | SCSettingsType | Settings |
SCFollowedCategoriesManagerType
Properties
Property | Type | Description |
---|---|---|
categories | number [] | List of all categories ids followed by the authenticated user |
emptyCache? | () => void | Empty cache to revalidate all categories |
follow? | (category : SCCategoryType ) => Promise <any > | Handle user follow/unfollow category |
isFollowed? | (category : SCCategoryType ) => boolean | Handle check if a user follow a category, caching data |
isLoading | (category : SCCategoryType ) => boolean | List of current categories in loading state |
loading | number [] | List of all categories in loading state |
refresh? | () => void | Refresh categories |
SCFollowedManagerType
Properties
Property | Type | Description |
---|---|---|
emptyCache? | () => void | Empty cache to revalidate all followed |
follow? | (user : SCUserType ) => Promise <any > | Handle user follow/unfollow user |
followed | number [] | List of all user ids followed by the authenticated user |
isFollowed? | (user : SCUserType ) => boolean | Handle check if a user follow a user, caching data |
isLoading | (user : SCUserType ) => boolean | List of current users in loading state |
loading | number [] | List of all users in loading state |
refresh? | () => void | Refresh followed |
SCFollowersManagerType
Properties
Property | Type | Description |
---|---|---|
emptyCache? | () => void | Empty cache to revalidate all followers |
followers | number [] | List of all user ids that follow the authenticated user |
isFollower? | (user : SCUserType ) => boolean | Handle check if a user is a followers, caching data |
isLoading | (user : SCUserType ) => boolean | List of current users in loading state |
loading | number [] | List of all users in loading state |
SCIntegrationsOpenAIType
Interface SCNotificationsWebSocketType
Properties
Property | Type | Description |
---|---|---|
secretKey | string | Set secretKey OpenAI Default: null |
SCIntegrationsType
Interface SCIntegrationsType
Properties
Property | Type | Description |
---|---|---|
openai? | SCIntegrationsOpenAIType | OpenAI |
SCLocaleContextType
Interface SCLocaleContextType
Properties
Property | Type | Description |
---|---|---|
locale | string | Locale: en, it, etc. |
messages | Record <any , any > | Locale messages |
selectLocale | (l : string ) => void | Change locale |
SCLocaleType
Interface SCLocaleType
Properties
Property | Type | Description |
---|---|---|
default? | string | Default locale. |
messages? | Record <string , any > | Overrides default messages. |
SCNotificationContextType
Interface SCNotificationContextType
Properties
Property | Type | Description |
---|---|---|
mnpmInstance? | any | mobile native push instance |
wpSubscription | any | wp subscription |
wsInstance | any | ws instance |
SCNotificationsMobileNativePushMessagingType
Interface SCNotificationsMobileNativePushMessagingType
Properties
Property | Type | Description |
---|---|---|
disable? | boolean | Disable |
SCNotificationsType
Interface SCNotificationsType
Properties
Property | Type | Description |
---|---|---|
mobileNativePushMessaging? | SCNotificationsMobileNativePushMessagingType | Mobile native push messaging |
webPushMessaging? | SCNotificationsWebPushMessagingType | Web push messaging notification |
webSocket? | SCNotificationsWebSocketType | Web socket notification |
SCNotificationsWebPushMessagingType
Interface SCNotificationsWebPushMessagingType
Properties
Property | Type | Description |
---|---|---|
applicationServerKey? | boolean | applicationServerKey - Public key |
disableToastMessage? | boolean | Disable toast message |
SCNotificationsWebSocketType
Interface SCNotificationsWebSocketType
Properties
Property | Type | Description |
---|---|---|
disableToastMessage? | boolean | Disable toast message |
prefixPath? | string | Set websocket prefix path Default: ws |
secure? | boolean | Set websocket protocol: wss or ws. Default: wss |
SCPreferencesContextType
Interface SCPreferencesContextType
Properties
Property | Type | Description |
---|---|---|
features | string [] | List of all community enabled features |
preferences | Record <string , any > | List of all community preferences |
SCPreferencesType
Interface SCPreferencesType
Properties
Property | Type | Description |
---|---|---|
features | string [] | List of all community enabled features |
preferences | Record <string , any > | List of all community preferences |
SCRoutingContextType
Interface SCRoutingContextType
Properties
Property | Type | Description |
---|---|---|
routerLink? | ComponentClass <any , any > | Component |
routes? | Record <string , string > | Routes |
url? | (string : any , object : any ) => string | Generate default path |
SCRoutingType
Interface SCRoutingType
Properties
Property | Type | Description |
---|---|---|
handleRoute? | (name : any , defaultUrl : any , data : any , templateUrl : any ) => string | Handle override routes path |
routerLink? | ComponentClass <any , any > | Component |
routes? | Record <string , string > | Routes |
SCSessionType
Interface SCSessionType
Properties
Property | Type | Description |
---|---|---|
authToken? | SCAuthTokenType | Access Token. |
clientId? | string | ClientID: only for OAuth. |
handleLogout? | () => void | Callback on logout. |
handleRefreshToken? | (currentSession : any ) => Promise <SCAuthTokenType > | Callback to refresh the token. |
type | string | Session types: OAuth, JWT, Cookies. |
SCSettingsManagerType
Properties
Property | Type | Description |
---|---|---|
all? | () => SCUserSettingsType | Get all settings |
get? | (p : any ) => any | Get a settings |
isLoading | () => boolean | Check if component is loading |
refresh? | () => void | Refresh settings |
update? | (p : any , v : any ) => any | Update a settings |
SCSettingsType
Interface SCSettingsType
Properties
Property | Type | Description |
---|---|---|
contextProviders? | (children ) => Element [] | List of SC context providers to override the default value Default context providers: SCPreferencesProvider, SCRoutingProvider, SCUserProvider, SCNotificationProvider, SCThemeProvider, SCLocaleProvider, SCPreferencesProvider, |
handleAnonymousAction? | () => void | Callback to handle anonymous action Ex. an anonymous user attempt to post a comment |
locale? | SCLocaleType | i18n. Locale: it, en, etc... |
notifications? | SCNotificationsType | Object conf of notification. |
portal | string | Portal. |
preferences? | SCPreferencesType | Object conf of preferences. |
router? | SCRoutingType | Object conf of router. |
session | SCSessionType | Object conf of session. |
theme? | SCThemeType | Object conf of session. |
vote? | SCVoteType | Vote conf |
SCSubscribedGroupsManagerType
Properties
Property | Type | Description |
---|---|---|
emptyCache? | () => void | Empty cache to revalidate all groups |
groups | number [] | List of all groups ids followed by the authenticated user |
isLoading | (group : SCGroupType ) => boolean | List of current groups in loading state |
loading | number [] | List of all groups in loading state |
refresh? | () => void | Refresh groups |
subscribe? | (group : SCGroupType , userId ?: number ) => Promise <any > | Handle user subscription to a group |
subscriptionStatus? | (group : SCGroupType ) => string | Handles a user subscription status to a group, caching data |
unsubscribe? | (group : SCGroupType ) => Promise <any > | Handle user unsubscription from a group |
SCSubscribedIncubatorsManagerType
Properties
Property | Type | Description |
---|---|---|
emptyCache? | () => void | Empty cache to revalidate all subscribed |
incubators | number [] | List of all incubators ids subscribed by the authenticated user |
isLoading | (incubator : SCIncubatorType ) => boolean | List of current incubators in loading state |
isSubscribed? | (incubator : SCIncubatorType ) => boolean | Handle check if a user has subscribed to an incubator, caching data |
loading | number [] | List of all incubators in loading state |
refresh? | () => void | Refresh subscribed |
subscribe? | (incubator : SCIncubatorType ) => Promise <any > | Handle incubator subscribe/unsubscribe |
SCThemeContextType
Interface SCThemeContextType
Properties
Property | Type | Description |
---|---|---|
setTheme | (theme : any ) => void | Change theme |
theme | SCThemeType | Theme |
SCUserContextType
Interface SCUserContextType
Properties
Property | Type | Description |
---|---|---|
error? | any | Error that occurred during authentication. |
loading | boolean | Authentication is loading. |
logout | () => void | Triggered when logout is performed. |
managers | object | Managers: followed, connections, categories, incubators, groups, etc... |
managers.blockedUsers? | SCBlockedUsersManagerType | - |
managers.categories | SCFollowedCategoriesManagerType | - |
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? | SCSessionType | Current Session. |
setUnseenInteractionsCounter | (counter : number ) => void | Handle change unseen interactions counter |
setUnseenNotificationBannersCounter | (counter : number ) => void | Handle change unseen notification banner counter |
updateUser | (info : Record <string , any >) => void | Handle change user info |
user? | SCUserType | Authenticated User. |
SCVoteContextType
Interface SCVoteContextType
Properties
Property | Type | Description |
---|---|---|
isLoading | boolean | Is loading the list of reactions? |
reactions | SCReactionType [] | List of all reactions |
refreshReactions | () => Promise <SCReactionType []> | Refresh reactions |
SCVoteType
Interface SCVoteType
Properties
Property | Type | Description |
---|---|---|
reactions | SCReactionType [] | List of all reactions |