Files
decky-frontend-lib/src/globals/steam-client/Notifications.ts
Yao Chung Hu 131ab4cc11 feat(globals): Steam client reference (#92)
* change: Add SteamClient types

Steam Version:  1690583737
Steam Client Build Date:  Sat, Jul 29 02:44 UTC -08:00

* new: Document some SteamClient interfaces

Using the SDH discord server, GitHub and some personal findings, I tried to document as much SteamClient functions as I can.

* new: Document some SteamClient interfaces - part 2

* new: Document some SteamClient interfaces - part 3

* new: Document some SteamClient interfaces - part 4

* new: Document some SteamClient interfaces - part 5

* new: Document some SteamClient interfaces - part 6

* new: Document some SteamClient interfaces - part 7

* change: Update interfaces to Steam Version 1691097434

Steam Version:  1691097434
Steam Client Build Date:  Fri, Aug 4 04:54 UTC -08:00

* new: Document some SteamClient interfaces - part 8

* new: Document some SteamClient interfaces - part 9

* change: Update interfaces to Steam Version 1694466342

Steam Version:  1694466342
Steam Client Build Date:  Tue, Sep 12 04:59 UTC +08:00

* new: Document some SteamClient interfaces - part 10

* new: Document some SteamClient interfaces - part 11

* new: Document some SteamClient interfaces - part 12

* new: Document some SteamClient interfaces - part 13

* new: Document some SteamClient interfaces - part 14

* change: Update interfaces to Steam Version 1698260427

Steam Version:  1698260427
Steam Client Build Date:  Thu, Oct 26 2:40 AM UTC -08:00

* new: Document some SteamClient interfaces - part 10

* change: Update interfaces to Steam Version 1700160213

Steam Version:  1700160213
Steam Client Build Date:  Fri, Nov 17 2:23 AM UTC +08:00

* docs(SteamClient): document some interfaces

* change: Fix formatting style

* docs(SteamClient): document protobufs & System.Report

* docs(SteamClient): document CMsgMonitorInfo

* docs(SteamClient): document remaining messages

* docs(SteamClient): update interfaces to Steam Version 1702515219
Steam Version:  1702515219
Steam Client Build Date:  Thu, Dec 14 00:36 UTC -08:00

* docs(SteamClient): update interfaces to Steam Version 1704329464
Steam Version:  1704329464
Steam Client Build Date:  Thu, Jan 4 12:23 AM UTC -08:00

* docs(SteamClient): update interfaces to Steam Version 1705630720
Steam Version:  1705630720
Steam Client Build Date:  Fri, Jan 19 1:58 AM UTC -08:00

* docs(SteamClient): update interfaces to Steam Version 1706914901
Steam Version:  1706914901
Steam Client Build Date:  Fri, Feb 2 8:46 PM UTC -08:00

* docs(SteamClient): update interfaces to Steam Version 1709920887
Steam Version:  1709920887
Steam Client Build Date:  Thu, Mar 7 5:29 PM UTC -08:00

* docs(SteamClient): update interfaces to Steam Version 1710786209
Steam Version:  1710786209
Steam Client Build Date:  Mon, Mar 18 7:07 PM UTC -08:00

* docs(SteamClient): document even more interfaces

* new: Document some SteamClient interfaces - part 15

* Fix QAM button bit number

* new: Document some SteamClient interfaces - part 16

* change: Update interfaces to Steam Version 1714854927

Steam Version: 1714854927
Steam Client Build Date:  Sat, May 4 7:11 AM UTC -08:00

* change: Refactor and reorganize SteamClient

* docs(SteamClient): document more notification interfaces

* docs(SteamClient): document more interfaces

* docs(SteamClient): add some descriptions

* docs(SteamClient): remove duplicate types

* change: Fix rebase errors

* Updated ControllerStateChange

* Fix typo

* docs(SteamClient): update interfaces to Steam Version 1723601482

Steam Version:  1723601482
Steam Client Build Date:  Wed, Aug 14 01:51 UTC -08:00

* docs(SteamClient): update interfaces to 1725654351

* docs(SteamClient): update interfaces to 1730416762

* docs(SteamClient): forgot some stuff

* docs(SteamClient): add missed interfaces

* docs(SteamClient): update enums

* docs(SteamClient): add some things and move stuff around

* docs(SteamClient): move shared enums/interfaces to a separate file

* docs(SteamClient): add more stuff

* docs(SteamClient): reword some things

* docs(SteamClient): new BrowserView things

* docs(SteamClient): review fixes

* move to src/globals

---------

Co-authored-by: ricewind012 <58827198+ricewind012@users.noreply.github.com>
Co-authored-by: Party Wumpus <48649272+PartyWumpus@users.noreply.github.com>
Co-authored-by: Xander <xander@isxander.dev>
2025-04-23 11:20:48 -04:00

334 lines
7.8 KiB
TypeScript

import { JsPbMessage, Unregisterable } from "./shared";
/**
* Everything is taken from here:
* https://github.com/SteamDatabase/SteamTracking/blob/master/Protobufs/steammessages_clientnotificationtypes.proto
*/
export interface Notifications {
/**
* If `data` is deserialized, returns one of the following here: {@link Notifications}
* @returns an object that can be used to unregister the callback.
*/
RegisterForNotifications(
callback: (notificationIndex: number, type: EClientNotificationType, data: ArrayBuffer) => void,
): Unregisterable;
}
export enum EClientNotificationType {
Invalid,
DownloadComplete,
FriendInvite,
FriendInGame,
FriendOnline,
Achievement,
LowBattery,
SystemUpdate,
FriendMessage,
GroupChatMessage,
FriendInviteRollup,
FamilySharingDeviceAuthorizationChanged,
FamilySharingStopPlaying,
FamilySharingLibraryAvailable,
Screenshot,
CloudSyncFailure,
CloudSyncConflict,
IncomingVoiceChat,
ClaimSteamDeckRewards,
GiftReceived,
ItemAnnouncement,
HardwareSurvey,
LowDiskSpace,
BatteryTemperature,
DockUnsupportedFirmware,
PeerContentUpload,
CannotReadControllerGuideButton,
Comment,
Wishlist,
TradeOffer,
AsyncGame,
General,
HelpRequest,
OverlaySplashScreen,
BroadcastAvailableToWatch,
TimedTrialRemaining,
LoginRefresh,
MajorSale,
TimerExpired,
ModeratorMsg,
SteamInputActionSetChanged,
RemoteClientConnection,
RemoteClientStartStream,
StreamingClientConnection,
FamilyInvite,
PlaytimeWarning,
FamilyPurchaseRequest,
FamilyPurchaseRequestResponse,
ParentalFeatureRequest,
ParentalPlaytimeRequest,
GameRecordingError,
ParentalFeatureResponse,
ParentalPlaytimeResponse,
RequestedGameAdded,
ClipDownloaded,
GameRecordingStart,
GameRecordingStop,
GameRecordingUserMarkerAdded,
GameRecordingInstantClip,
}
export enum ESystemUpdateNotificationType {
Invalid,
Available,
NeedsRestart,
}
export enum EGameRecordingErrorType {
General = 1,
LowDiskSpace,
}
export interface ClientNotificationGroupChatMessage extends JsPbMessage {
tag(): string;
/** A Steam64 ID. */
steamid_sender(): string;
chat_group_id(): string;
chat_id(): string;
title(): string;
body(): string;
rawbody(): string;
icon(): string;
notificationid(): number;
}
export interface ClientNotificationFriendMessage extends JsPbMessage {
body(): string;
icon(): string;
notificationid(): number;
response_steamurl(): string;
/** A Steam64 ID. */
steamid(): string;
tag(): string;
title(): string;
}
export interface ClientNotificationCloudSyncFailure extends JsPbMessage {
appid(): number;
}
export interface ClientNotificationCloudSyncConflict extends JsPbMessage {
appid(): number;
}
export interface ClientNotificationScreenshot extends JsPbMessage {
screenshot_handle(): string;
description(): string;
local_url(): string;
}
export interface ClientNotificationDownloadCompleted extends JsPbMessage {
appid(): number;
dlc_appid(): number;
}
export interface ClientNotificationFriendInvite extends JsPbMessage {
steamid(): number;
}
export interface ClientNotificationFriendInviteRollup extends JsPbMessage {
new_invite_count(): number;
}
export interface ClientNotificationFriendInGame extends JsPbMessage {
steamid(): number;
game_name(): string;
}
export interface ClientNotificationFriendOnline extends JsPbMessage {
steamid(): number;
}
export interface ClientNotificationAchievement extends JsPbMessage {
achievement_id(): string;
appid(): number;
name(): string;
description(): string;
image_url(): string;
achieved(): boolean;
rtime_unlocked(): number;
min_progress(): number;
current_progress(): number;
max_progress(): number;
global_achieved_pct(): number;
}
export interface ClientNotificationLowBattery extends JsPbMessage {
pct_remaining(): number;
}
export interface ClientNotificationSystemUpdate extends JsPbMessage {
type(): ESystemUpdateNotificationType;
}
export interface ClientNotificationFriendMessage extends JsPbMessage {
tag(): string;
steamid(): string;
title(): string;
body(): string;
icon(): string;
notificationid(): number;
response_steamurl(): string;
}
export interface ClientNotificationGroupChatMessage extends JsPbMessage {
tag(): string;
steamid_sender(): string;
chat_group_id(): string;
chat_id(): string;
title(): string;
body(): string;
rawbody(): string;
icon(): string;
notificationid(): number;
}
export interface ClientNotificationFamilySharingDeviceAuthorizationChanged extends JsPbMessage {
accountid_owner(): number;
authorized(): boolean;
}
export interface ClientNotificationFamilySharingStopPlaying extends JsPbMessage {
accountid_owner(): number;
seconds_remaining(): number;
appid(): number;
}
export interface ClientNotificationFamilySharingLibraryAvailable extends JsPbMessage {
accountid_owner(): number;
}
export interface ClientNotificationIncomingVoiceChat extends JsPbMessage {
steamid(): number;
}
export interface ClientNotificationClaimSteamDeckRewards extends JsPbMessage {
}
export interface ClientNotificationGiftReceived extends JsPbMessage {
sender_name(): string;
}
export interface ClientNotificationItemAnnouncement extends JsPbMessage {
new_item_count(): number;
new_backpack_items(): boolean;
}
export interface ClientNotificationHardwareSurveyPending extends JsPbMessage {
}
export interface ClientNotificationLowDiskSpace extends JsPbMessage {
folder_index(): number;
}
export interface ClientNotificationBatteryTemperature extends JsPbMessage {
temperature(): number;
notification_type(): string;
}
export interface ClientNotificationDockUnsupportedFirmware extends JsPbMessage {
}
export interface ClientNotificationPeerContentUpload extends JsPbMessage {
appid(): number;
peer_name(): string;
}
export interface ClientNotificationCannotReadControllerGuideButton extends JsPbMessage {
controller_index(): number;
}
export interface ClientNotificationOverlaySplashScreen extends JsPbMessage {
}
export interface ClientNotificationBroadcastAvailableToWatch extends JsPbMessage {
broadcast_permission(): number;
}
export interface ClientNotificationTimedTrialRemaining extends JsPbMessage {
appid(): number;
icon(): string;
offline(): boolean;
allowed_seconds(): number;
played_seconds(): number;
}
export interface ClientNotificationLoginRefresh extends JsPbMessage {
}
export interface ClientNotificationTimerExpired extends JsPbMessage {
}
export interface ClientNotificationSteamInputActionSetChanged extends JsPbMessage {
controller_index(): number;
action_set_name(): string;
}
export interface ClientNotificationRemoteClientConnection extends JsPbMessage {
machine(): string;
connected(): boolean;
}
export interface ClientNotificationRemoteClientStartStream extends JsPbMessage {
machine(): string;
game_name(): string;
}
export interface ClientNotificationStreamingClientConnection extends JsPbMessage {
hostname(): string;
machine(): string;
connected(): boolean;
}
export interface ClientNotificationPlaytimeWarning extends JsPbMessage {
type(): string;
playtime_remaining(): number;
}
export interface ClientNotificationGameRecordingError extends JsPbMessage {
game_id(): number;
error_type(): EGameRecordingErrorType;
}
export interface ClientNotificationGameRecordingStart extends JsPbMessage {
game_id(): number;
}
export interface ClientNotificationGameRecordingStop extends JsPbMessage {
game_id(): number;
clip_id(): string;
duration_secs(): number;
}
export interface ClientNotificationGameRecordingUserMarkerAdded extends JsPbMessage {
game_id(): number;
}
export interface CClientNotificationGameRecordingInstantClip extends JsPbMessage {
game_id(): number;
clip_id(): string;
duration_secs(): number;
}