@arkadiuminc/sdk
Advanced tools
Comparing version
@@ -17,2 +17,22 @@ import { NakamaProvider } from '../nakama/nakama-provider'; | ||
} | ||
export declare enum UserStatusType { | ||
Online = "online", | ||
Offline = "offline", | ||
InGame = "in_game", | ||
Custom = "custom" | ||
} | ||
export interface GameStatus { | ||
type: UserStatusType.InGame; | ||
gameId: string; | ||
gameName: string; | ||
customMessage?: string; | ||
} | ||
export interface CustomStatus { | ||
type: UserStatusType.Custom; | ||
message: string; | ||
} | ||
export interface BasicStatus { | ||
type: UserStatusType.Online | UserStatusType.Offline; | ||
} | ||
export declare type UserStatus = GameStatus | CustomStatus | BasicStatus; | ||
declare type Friend = { | ||
@@ -25,3 +45,3 @@ avatarUrl?: string; | ||
friendshipState?: FriendshipState; | ||
status?: any; | ||
status?: UserStatus; | ||
}; | ||
@@ -35,2 +55,3 @@ export declare class FriendsArena extends NakamaService { | ||
private _friendStatus; | ||
private _userStatus?; | ||
private _notificationListenerRemovers; | ||
@@ -62,3 +83,12 @@ constructor(nakamaProvider: NakamaProvider, _auth: Auth, _notificationsService: NotificationsArena); | ||
blockFriend(friendId: string): Promise<boolean>; | ||
private updateFriendStatus; | ||
updateStatus(status?: UserStatus): Promise<void>; | ||
setOnlineStatus(): Promise<void>; | ||
setOfflineStatus(): Promise<void>; | ||
setGameStatus(gameId: string, gameName: string, customMessage?: string): Promise<void>; | ||
setCustomStatus(message: string): Promise<void>; | ||
getStatus(): UserStatus | undefined; | ||
getFormattedStatus(status?: UserStatus): string; | ||
getGameIdFromStatus(status?: UserStatus): string | undefined; | ||
} | ||
export {}; |
{ | ||
"name": "@arkadiuminc/sdk", | ||
"version": "2.39.1", | ||
"version": "2.40.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
70849
1.46%1763
1.73%