-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathClientNotifications.ts
39 lines (35 loc) · 1.08 KB
/
ClientNotifications.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { BrowserContext } from "./shared";
export interface ClientNotifications {
/**
* Displays a Steam notification.
* @param notification Notification type.
* @param options Stringified object of {@link SteamNotificationOptions}.
* @param callback
*/
DisplayClientNotification(
notification: EClientUINotificationType,
options: string,
callback: (context: BrowserContext) => void,
): void;
/**
* @param notificationId The ID of the notification to handle.
* @param handleAction `true` to execute the callback function associated with the notification, `false` otherwise.
*/
OnRespondToClientNotification(notificationId: number, handleAction: boolean): void;
}
export interface SteamNotificationOptions {
body: string;
chatroomgroupid?: number;
chatroomid?: number;
icon?: string;
state: string;
/** A Steam64 ID. */
steamid: string;
tag?: string;
title?: string;
}
export enum EClientUINotificationType {
GroupChatMessage = 1,
FriendChatMessage,
FriendPersonaState,
}