@arkadiuminc/sdk 2.39.0 → 2.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -44,7 +44,7 @@ export declare class AnalyticsApi implements AnalyticsApiContract {
|
|
|
44
44
|
configureProvider(config: IAnalyticConfig): Promise<void>;
|
|
45
45
|
sendEvent(eventCategory: string, eventAction: string, dimensions: DimensionsObject): Promise<void>;
|
|
46
46
|
sendPageView(pageName: string, dimensions: DimensionsObject): Promise<void>;
|
|
47
|
-
trackException(
|
|
47
|
+
trackException(error: Error): Promise<void>;
|
|
48
48
|
setFingerprintData(fingerprintData: FingerprintData): Promise<any>;
|
|
49
49
|
enableProvider(providerType: AnalyticsProviderType): void;
|
|
50
50
|
disableProvider(providerType: AnalyticsProviderType): void;
|
|
@@ -14,6 +14,26 @@ export declare enum FriendshipState {
|
|
|
14
14
|
RequestReceived = "request_received",
|
|
15
15
|
Blocked = "blocked"
|
|
16
16
|
}
|
|
17
|
+
export declare enum UserStatusType {
|
|
18
|
+
Online = "online",
|
|
19
|
+
Offline = "offline",
|
|
20
|
+
InGame = "in_game",
|
|
21
|
+
Custom = "custom"
|
|
22
|
+
}
|
|
23
|
+
export interface GameStatus {
|
|
24
|
+
type: UserStatusType.InGame;
|
|
25
|
+
gameId: string;
|
|
26
|
+
gameName: string;
|
|
27
|
+
customMessage?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface CustomStatus {
|
|
30
|
+
type: UserStatusType.Custom;
|
|
31
|
+
message: string;
|
|
32
|
+
}
|
|
33
|
+
export interface BasicStatus {
|
|
34
|
+
type: UserStatusType.Online | UserStatusType.Offline;
|
|
35
|
+
}
|
|
36
|
+
export declare type UserStatus = GameStatus | CustomStatus | BasicStatus;
|
|
17
37
|
declare type Friend = {
|
|
18
38
|
avatarUrl?: string;
|
|
19
39
|
displayName?: string;
|
|
@@ -21,7 +41,7 @@ declare type Friend = {
|
|
|
21
41
|
online?: boolean;
|
|
22
42
|
username?: string;
|
|
23
43
|
friendshipState?: FriendshipState;
|
|
24
|
-
status?:
|
|
44
|
+
status?: UserStatus;
|
|
25
45
|
};
|
|
26
46
|
export declare class FriendsArena extends NakamaService {
|
|
27
47
|
private _auth;
|
|
@@ -30,6 +50,7 @@ export declare class FriendsArena extends NakamaService {
|
|
|
30
50
|
private _friendsJoinedListener?;
|
|
31
51
|
private _friendsLeftListener?;
|
|
32
52
|
private _friendStatus;
|
|
53
|
+
private _userStatus?;
|
|
33
54
|
private _notificationListenerRemovers;
|
|
34
55
|
constructor(nakamaProvider: NakamaProvider, _auth: Auth, _notificationsService: NotificationsArena);
|
|
35
56
|
private compressUUID;
|
|
@@ -56,5 +77,14 @@ export declare class FriendsArena extends NakamaService {
|
|
|
56
77
|
subscribeFriendsJoinedListener(listener: (joinedFriends: Array<Friend>) => void): void;
|
|
57
78
|
subscribeFriendsLeftListener(listener: (leftFriends: Array<Friend>) => void): void;
|
|
58
79
|
blockFriend(friendId: string): Promise<boolean>;
|
|
80
|
+
private updateFriendStatus;
|
|
81
|
+
updateStatus(status?: UserStatus): Promise<void>;
|
|
82
|
+
setOnlineStatus(): Promise<void>;
|
|
83
|
+
setOfflineStatus(): Promise<void>;
|
|
84
|
+
setGameStatus(gameId: string, gameName: string, customMessage?: string): Promise<void>;
|
|
85
|
+
setCustomStatus(message: string): Promise<void>;
|
|
86
|
+
getStatus(): UserStatus | undefined;
|
|
87
|
+
getFormattedStatus(status?: UserStatus): string;
|
|
88
|
+
getGameIdFromStatus(status?: UserStatus): string | undefined;
|
|
59
89
|
}
|
|
60
90
|
export {};
|