@decky/ui 4.9.2 → 4.10.1

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.
Files changed (184) hide show
  1. package/dist/components/Menu.js +5 -3
  2. package/dist/globals/SteamClient.d.ts +1 -304
  3. package/dist/globals/steam-client/App.d.ts +880 -0
  4. package/dist/globals/steam-client/App.js +320 -0
  5. package/dist/globals/steam-client/Auth.d.ts +57 -0
  6. package/dist/globals/steam-client/Auth.js +19 -0
  7. package/dist/globals/steam-client/Broadcast.d.ts +22 -0
  8. package/dist/globals/steam-client/Broadcast.js +1 -0
  9. package/dist/globals/steam-client/Browser.d.ts +45 -0
  10. package/dist/globals/steam-client/Browser.js +17 -0
  11. package/dist/globals/steam-client/ClientNotifications.d.ts +20 -0
  12. package/dist/globals/steam-client/ClientNotifications.js +6 -0
  13. package/dist/globals/steam-client/Cloud.d.ts +4 -0
  14. package/dist/globals/steam-client/Cloud.js +1 -0
  15. package/dist/globals/steam-client/CommunityItems.d.ts +5 -0
  16. package/dist/globals/steam-client/CommunityItems.js +1 -0
  17. package/dist/globals/steam-client/Console.d.ts +11 -0
  18. package/dist/globals/steam-client/Console.js +1 -0
  19. package/dist/globals/steam-client/Customization.d.ts +8 -0
  20. package/dist/globals/steam-client/Customization.js +1 -0
  21. package/dist/globals/steam-client/Downloads.d.ts +63 -0
  22. package/dist/globals/steam-client/Downloads.js +1 -0
  23. package/dist/globals/steam-client/FamilySharing.d.ts +20 -0
  24. package/dist/globals/steam-client/FamilySharing.js +1 -0
  25. package/dist/globals/steam-client/FriendSettings.d.ts +49 -0
  26. package/dist/globals/steam-client/FriendSettings.js +6 -0
  27. package/dist/globals/steam-client/Friends.d.ts +27 -0
  28. package/dist/globals/steam-client/Friends.js +1 -0
  29. package/dist/globals/steam-client/GameNotes.d.ts +41 -0
  30. package/dist/globals/steam-client/GameNotes.js +1 -0
  31. package/dist/globals/steam-client/GameRecording.d.ts +20 -0
  32. package/dist/globals/steam-client/GameRecording.js +1 -0
  33. package/dist/globals/steam-client/GameSessions.d.ts +26 -0
  34. package/dist/globals/steam-client/GameSessions.js +1 -0
  35. package/dist/globals/steam-client/Input.d.ts +421 -0
  36. package/dist/globals/steam-client/Input.js +170 -0
  37. package/dist/globals/steam-client/InstallFolder.d.ts +57 -0
  38. package/dist/globals/steam-client/InstallFolder.js +1 -0
  39. package/dist/globals/steam-client/Installs.d.ts +60 -0
  40. package/dist/globals/steam-client/Installs.js +20 -0
  41. package/dist/globals/steam-client/Messaging.d.ts +5 -0
  42. package/dist/globals/steam-client/Messaging.js +1 -0
  43. package/dist/globals/steam-client/Music.d.ts +36 -0
  44. package/dist/globals/steam-client/Music.js +14 -0
  45. package/dist/globals/steam-client/Notifications.d.ts +260 -0
  46. package/dist/globals/steam-client/Notifications.js +73 -0
  47. package/dist/globals/steam-client/OpenVR.d.ts +85 -0
  48. package/dist/globals/steam-client/OpenVR.js +16 -0
  49. package/dist/globals/steam-client/Overlay.d.ts +58 -0
  50. package/dist/globals/steam-client/Overlay.js +18 -0
  51. package/dist/globals/steam-client/Parental.d.ts +69 -0
  52. package/dist/globals/steam-client/Parental.js +19 -0
  53. package/dist/globals/steam-client/RemotePlay.d.ts +225 -0
  54. package/dist/globals/steam-client/RemotePlay.js +71 -0
  55. package/dist/globals/steam-client/Screenshots.d.ts +47 -0
  56. package/dist/globals/steam-client/Screenshots.js +8 -0
  57. package/dist/globals/steam-client/ServerBrowser.d.ts +117 -0
  58. package/dist/globals/steam-client/ServerBrowser.js +26 -0
  59. package/dist/globals/steam-client/Settings.d.ts +398 -0
  60. package/dist/globals/steam-client/Settings.js +96 -0
  61. package/dist/globals/steam-client/SharedConnection.d.ts +22 -0
  62. package/dist/globals/steam-client/SharedConnection.js +1 -0
  63. package/dist/globals/steam-client/Stats.d.ts +4 -0
  64. package/dist/globals/steam-client/Stats.js +1 -0
  65. package/dist/globals/steam-client/SteamChina.d.ts +3 -0
  66. package/dist/globals/steam-client/SteamChina.js +1 -0
  67. package/dist/globals/steam-client/Storage.d.ts +8 -0
  68. package/dist/globals/steam-client/Storage.js +1 -0
  69. package/dist/globals/steam-client/Streaming.d.ts +15 -0
  70. package/dist/globals/steam-client/Streaming.js +1 -0
  71. package/dist/globals/steam-client/UI.d.ts +44 -0
  72. package/dist/globals/steam-client/UI.js +12 -0
  73. package/dist/globals/steam-client/URL.d.ts +16 -0
  74. package/dist/globals/steam-client/URL.js +1 -0
  75. package/dist/globals/steam-client/Updates.d.ts +68 -0
  76. package/dist/globals/steam-client/Updates.js +34 -0
  77. package/dist/globals/steam-client/User.d.ts +130 -0
  78. package/dist/globals/steam-client/User.js +33 -0
  79. package/dist/globals/steam-client/WebChat.d.ts +60 -0
  80. package/dist/globals/steam-client/WebChat.js +6 -0
  81. package/dist/globals/steam-client/WebUITransport.d.ts +11 -0
  82. package/dist/globals/steam-client/WebUITransport.js +1 -0
  83. package/dist/globals/steam-client/Window.d.ts +66 -0
  84. package/dist/globals/steam-client/Window.js +6 -0
  85. package/dist/globals/steam-client/browser-view/BrowserViewPopup.d.ts +124 -0
  86. package/dist/globals/steam-client/browser-view/BrowserViewPopup.js +35 -0
  87. package/dist/globals/steam-client/browser-view/index.d.ts +20 -0
  88. package/dist/globals/steam-client/browser-view/index.js +1 -0
  89. package/dist/globals/steam-client/index.d.ts +89 -0
  90. package/dist/globals/steam-client/index.js +1 -0
  91. package/dist/globals/steam-client/shared.d.ts +166 -0
  92. package/dist/globals/steam-client/shared.js +146 -0
  93. package/dist/globals/steam-client/system/Audio.d.ts +42 -0
  94. package/dist/globals/steam-client/system/Audio.js +1 -0
  95. package/dist/globals/steam-client/system/AudioDevice.d.ts +92 -0
  96. package/dist/globals/steam-client/system/AudioDevice.js +33 -0
  97. package/dist/globals/steam-client/system/Bluetooth.d.ts +47 -0
  98. package/dist/globals/steam-client/system/Bluetooth.js +15 -0
  99. package/dist/globals/steam-client/system/Devkit.d.ts +7 -0
  100. package/dist/globals/steam-client/system/Devkit.js +1 -0
  101. package/dist/globals/steam-client/system/Display.d.ts +10 -0
  102. package/dist/globals/steam-client/system/Display.js +1 -0
  103. package/dist/globals/steam-client/system/DisplayManager.d.ts +9 -0
  104. package/dist/globals/steam-client/system/DisplayManager.js +1 -0
  105. package/dist/globals/steam-client/system/Dock.d.ts +19 -0
  106. package/dist/globals/steam-client/system/Dock.js +1 -0
  107. package/dist/globals/steam-client/system/Perf.d.ts +159 -0
  108. package/dist/globals/steam-client/system/Perf.js +53 -0
  109. package/dist/globals/steam-client/system/Report.d.ts +13 -0
  110. package/dist/globals/steam-client/system/Report.js +1 -0
  111. package/dist/globals/steam-client/system/UI.d.ts +28 -0
  112. package/dist/globals/steam-client/system/UI.js +1 -0
  113. package/dist/globals/steam-client/system/index.d.ts +243 -0
  114. package/dist/globals/steam-client/system/index.js +111 -0
  115. package/dist/globals/steam-client/system/network/Device.d.ts +10 -0
  116. package/dist/globals/steam-client/system/network/Device.js +1 -0
  117. package/dist/globals/steam-client/system/network/index.d.ts +312 -0
  118. package/dist/globals/steam-client/system/network/index.js +55 -0
  119. package/dist/globals/stores.d.ts +26 -13
  120. package/dist/modules/Router.d.ts +2 -39
  121. package/dist/modules/Router.js +0 -39
  122. package/package.json +1 -1
  123. package/src/components/Menu.ts +7 -8
  124. package/src/globals/SteamClient.ts +4 -320
  125. package/src/globals/steam-client/App.ts +1749 -0
  126. package/src/globals/steam-client/Auth.ts +105 -0
  127. package/src/globals/steam-client/Broadcast.ts +56 -0
  128. package/src/globals/steam-client/Browser.ts +91 -0
  129. package/src/globals/steam-client/ClientNotifications.ts +39 -0
  130. package/src/globals/steam-client/Cloud.ts +14 -0
  131. package/src/globals/steam-client/CommunityItems.ts +24 -0
  132. package/src/globals/steam-client/Console.ts +43 -0
  133. package/src/globals/steam-client/Customization.ts +12 -0
  134. package/src/globals/steam-client/Downloads.ts +175 -0
  135. package/src/globals/steam-client/FamilySharing.ts +30 -0
  136. package/src/globals/steam-client/FriendSettings.ts +80 -0
  137. package/src/globals/steam-client/Friends.ts +70 -0
  138. package/src/globals/steam-client/GameNotes.ts +73 -0
  139. package/src/globals/steam-client/GameRecording.ts +29 -0
  140. package/src/globals/steam-client/GameSessions.ts +59 -0
  141. package/src/globals/steam-client/Input.ts +762 -0
  142. package/src/globals/steam-client/InstallFolder.ts +167 -0
  143. package/src/globals/steam-client/Installs.ts +131 -0
  144. package/src/globals/steam-client/Messaging.ts +20 -0
  145. package/src/globals/steam-client/Music.ts +99 -0
  146. package/src/globals/steam-client/Notifications.ts +333 -0
  147. package/src/globals/steam-client/OpenVR.ts +122 -0
  148. package/src/globals/steam-client/Overlay.ts +172 -0
  149. package/src/globals/steam-client/Parental.ts +129 -0
  150. package/src/globals/steam-client/RemotePlay.ts +342 -0
  151. package/src/globals/steam-client/Screenshots.ts +149 -0
  152. package/src/globals/steam-client/ServerBrowser.ts +372 -0
  153. package/src/globals/steam-client/Settings.ts +663 -0
  154. package/src/globals/steam-client/SharedConnection.ts +43 -0
  155. package/src/globals/steam-client/Stats.ts +10 -0
  156. package/src/globals/steam-client/SteamChina.ts +3 -0
  157. package/src/globals/steam-client/Storage.ts +24 -0
  158. package/src/globals/steam-client/Streaming.ts +59 -0
  159. package/src/globals/steam-client/UI.ts +90 -0
  160. package/src/globals/steam-client/URL.ts +174 -0
  161. package/src/globals/steam-client/Updates.ts +101 -0
  162. package/src/globals/steam-client/User.ts +266 -0
  163. package/src/globals/steam-client/WebChat.ts +164 -0
  164. package/src/globals/steam-client/WebUITransport.ts +21 -0
  165. package/src/globals/steam-client/Window.ts +235 -0
  166. package/src/globals/steam-client/browser-view/BrowserViewPopup.ts +393 -0
  167. package/src/globals/steam-client/browser-view/index.ts +54 -0
  168. package/src/globals/steam-client/index.ts +90 -0
  169. package/src/globals/steam-client/shared.ts +262 -0
  170. package/src/globals/steam-client/system/Audio.ts +202 -0
  171. package/src/globals/steam-client/system/AudioDevice.ts +116 -0
  172. package/src/globals/steam-client/system/Bluetooth.ts +171 -0
  173. package/src/globals/steam-client/system/Devkit.ts +11 -0
  174. package/src/globals/steam-client/system/Display.ts +15 -0
  175. package/src/globals/steam-client/system/DisplayManager.ts +16 -0
  176. package/src/globals/steam-client/system/Dock.ts +34 -0
  177. package/src/globals/steam-client/system/Perf.ts +194 -0
  178. package/src/globals/steam-client/system/Report.ts +39 -0
  179. package/src/globals/steam-client/system/UI.ts +38 -0
  180. package/src/globals/steam-client/system/index.ts +390 -0
  181. package/src/globals/steam-client/system/network/Device.ts +17 -0
  182. package/src/globals/steam-client/system/network/index.ts +403 -0
  183. package/src/globals/stores.ts +30 -13
  184. package/src/modules/Router.ts +2 -40
@@ -0,0 +1,129 @@
1
+ import { EResult, Unregisterable } from "./shared";
2
+
3
+ /**
4
+ * Interface for managing parental control settings.
5
+ */
6
+ export interface Parental {
7
+ /**
8
+ * Locks the parental control settings.
9
+ */
10
+ LockParentalLock(): void;
11
+
12
+ RegisterForParentalPlaytimeWarnings(callback: (time: number) => void): Unregisterable;
13
+
14
+ /**
15
+ * Registers a callback function to be invoked when parental settings change.
16
+ * @param callback The callback function to be invoked when parental settings change.
17
+ * @returns an object that can be used to unregister the callback.
18
+ */
19
+ RegisterForParentalSettingsChanges(callback: (settings: ParentalSettings) => void): Unregisterable;
20
+
21
+ /**
22
+ * Unlocks the parental lock with the provided PIN.
23
+ * @param pin The 4-digit PIN to unlock the parental lock.
24
+ * @returns a number representing the result of the unlock operation.
25
+ */
26
+ UnlockParentalLock(pin: string, param1: boolean): Promise<EResult>;
27
+ }
28
+
29
+ export interface ParentalSettings {
30
+ ever_enabled: boolean;
31
+ locked: boolean;
32
+ /**
33
+ * If deserialized, returns {@link ParentalSettingsProtoMsg}.
34
+ */
35
+ settings: ArrayBuffer;
36
+ strPlaintextPassword: string;
37
+ }
38
+
39
+ /**
40
+ * Represents the parental settings and restrictions.
41
+ * @todo This whole thing is unconfirmed as I do not have access to parental
42
+ * stuff and things
43
+ */
44
+ export interface ParentalSettingsProtoMsg {
45
+ steamid?: number;
46
+ applist_base_id?: number;
47
+ applist_base_description?: string;
48
+ /**
49
+ * Base list.
50
+ */
51
+ applist_base: ParentalApp[];
52
+ /**
53
+ * Custom list of allowed applications.
54
+ */
55
+ applist_custom: ParentalApp[];
56
+ /**
57
+ * @todo enum ?
58
+ */
59
+ passwordhashtype?: number;
60
+ salt?: number;
61
+ passwordhash?: number;
62
+ /**
63
+ * Indicates whether parental settings are enabled.
64
+ */
65
+ is_enabled?: boolean;
66
+ /**
67
+ * Bitmask representing enabled features.
68
+ * - Bit 0: Unknown (@todo Please provide more details if known)
69
+ * - Bit 1: Online content & features - Steam Store
70
+ * - Bit 2: Online content & features - Community-generated content
71
+ * - Bit 3: Online content & features - My online profile, screenshots, and achievements
72
+ * - Bit 4: Online content & features - Friends, chat, and groups
73
+ * - Bit 5-11: Unknown (@todo Please provide more details if known)
74
+ * - Bit 12: Library content - 0: Only games I choose, 1: All games
75
+ * @todo {@link EParentalFeature} ?
76
+ */
77
+ enabled_features?: number;
78
+ /**
79
+ * Email for recovery (if applicable).
80
+ */
81
+ recovery_email?: string;
82
+ is_site_license_lock?: boolean;
83
+ temporary_enabled_features?: number;
84
+ rtime_temporary_feature_expiration?: number;
85
+ playtime_restrictions?: ParentalPlaytimeRestrictions;
86
+ temporary_playtime_restrictions?: ParentalTemporaryPlaytimeRestrictions;
87
+ excluded_store_content_descriptors: number[];
88
+ excluded_community_content_descriptors: number[];
89
+ utility_appids: number[];
90
+ }
91
+
92
+ interface ParentalApp {
93
+ appid: number;
94
+ is_allowed: boolean;
95
+ }
96
+
97
+ interface ParentalPlaytimeDay {
98
+ allowed_time_windows?: number;
99
+ allowed_daily_minutes?: number;
100
+ }
101
+
102
+ interface ParentalPlaytimeRestrictions {
103
+ apply_playtime_restrictions?: boolean;
104
+ playtime_days: ParentalPlaytimeDay[];
105
+ }
106
+
107
+ interface ParentalTemporaryPlaytimeRestrictions {
108
+ restrictions?: ParentalPlaytimeDay;
109
+ rtime_expires?: number;
110
+ }
111
+
112
+ export enum EParentalFeature {
113
+ Invalid,
114
+ Store,
115
+ Community,
116
+ Profile,
117
+ Friends,
118
+ News,
119
+ Trading,
120
+ Settings,
121
+ Console,
122
+ Browser,
123
+ ParentalSetup,
124
+ Library,
125
+ Test,
126
+ SiteLicense,
127
+ KioskMode,
128
+ Max,
129
+ }
@@ -0,0 +1,342 @@
1
+ import {EControllerType} from "./Input";
2
+ import { EParentalFeature } from "./Parental";
3
+ import { EResult, Unregisterable } from "./shared";
4
+
5
+ export interface RemotePlay {
6
+ /**
7
+ * @param param1 TODO: Something about restrictions countries ? maybe it's games
8
+ */
9
+ BCanAcceptInviteForGame(gameId: string, param1: string): Promise<boolean>;
10
+ BCanCreateInviteForGame(gameId: string, param1: boolean): Promise<boolean>;
11
+
12
+ BRemotePlayTogetherGuestOnPhoneOrTablet(steam64Id: string, guestId: number): Promise<boolean>;
13
+
14
+ BRemotePlayTogetherGuestSupported(): Promise<boolean>;
15
+
16
+ // TODO: both calls have 1 arg, but it requires 2
17
+ CancelInviteAndSession(steam64Id: string, param1: number): Promise<EResult>;
18
+
19
+ CancelInviteAndSessionWithGuestID(steam64Id: string, guestId: number): Promise<EResult>;
20
+
21
+ CancelRemoteClientPairing(): void;
22
+
23
+ CloseGroup(): Promise<number>;
24
+
25
+ CreateGroup(param0: string): Promise<EResult>;
26
+
27
+ CreateInviteAndSession(steam64Id: string, param1: string): Promise<EResult>;
28
+
29
+ CreateInviteAndSessionWithGuestID(steam64Id: string, guestId: number, param2: string): Promise<EResult>;
30
+
31
+ GetClientID(): Promise<string>;
32
+
33
+ // TODO: -1 no preference? no idea where the settings are anyway lol
34
+ GetClientStreamingBitrate(): Promise<number>;
35
+ GetClientStreamingQuality(): Promise<number>;
36
+ GetControllerType(controllerIndex: number): Promise<EControllerType>;
37
+
38
+ /**
39
+ * @returns an integer from 0 to 100.
40
+ */
41
+ GetGameSystemVolume(): Promise<number>;
42
+
43
+ GetPerUserInputSettings(steam64Id: string): Promise<RemotePlayInputSettings>;
44
+
45
+ GetPerUserInputSettingsWithGuestID(steam64Id: string, guestId: number): Promise<RemotePlayInputSettings>;
46
+
47
+ IdentifyController(nControllerIndex: number): void;
48
+
49
+ InstallAudioDriver(): void;
50
+ InstallInputDriver(): void;
51
+ MoveControllerToSlot(controllerIndex: number, slot: number): void;
52
+ RegisterForAdditionalParentalBlocks(callback: (blocks: EParentalFeature[]) => void): Unregisterable;
53
+ RegisterForAudioDriverPrompt(callback: () => void): Unregisterable;
54
+
55
+ /**
56
+ * @todo no mentions of it in Steam code
57
+ */
58
+ RegisterForBitrateOverride: Unregisterable;
59
+ RegisterForClearControllers(callback: () => void): Unregisterable;
60
+ RegisterForControllerIndexSet(
61
+ callback: (steamid: string, slot: number, guestid: number) => void
62
+ ): Unregisterable;
63
+
64
+ RegisterForDevicesChanges(callback: (devices: RemotePlayDevice[]) => void): Unregisterable;
65
+
66
+ RegisterForGroupCreated(callback: (steamId: string, appId: string) => void): Unregisterable;
67
+ RegisterForGroupDisbanded(callback: () => void): Unregisterable;
68
+ RegisterForInputDriverPrompt(callback: () => void): Unregisterable;
69
+ RegisterForInputDriverRestartNotice(callback: () => void): Unregisterable;
70
+
71
+ RegisterForInputUsed(
72
+ callback: (steam64Id: string, type: EClientUsedInputType, guestId: number) => void,
73
+ ): Unregisterable; // only fires on host
74
+
75
+ RegisterForInviteResult(
76
+ callback: (
77
+ steamId: string,
78
+ param1: any,
79
+ result: ERemoteClientLaunch,
80
+ ) => void
81
+ ): Unregisterable;
82
+
83
+ RegisterForNetworkUtilizationUpdate(
84
+ callback: (steam64Id: string, guestId: number, networkUtilization: number, networkDuration: number) => void,
85
+ ): Unregisterable; // only fires on host
86
+
87
+ RegisterForPlaceholderStateChanged(callback: (isShowingPlaceholder: boolean) => void): Unregisterable;
88
+
89
+ RegisterForPlayerInputSettingsChanged(
90
+ callback: (steamId: string, settings: RemotePlayInputSettings, guestId: number) => void
91
+ ): Unregisterable;
92
+
93
+ RegisterForQualityOverride(callback: (hostStreamingQualityOverride: number) => void): Unregisterable;
94
+
95
+ RegisterForRemoteClientLaunchFailed(callback: (state: ERemoteClientLaunch) => void): Unregisterable;
96
+
97
+ RegisterForRemoteClientStarted(callback: (steam64Id: string, appId: string) => void): Unregisterable; // only fires on client
98
+
99
+ RegisterForRemoteClientStopped(callback: (steam64Id: string, appId: string) => void): Unregisterable; // only fires on client
100
+
101
+ RegisterForRemoteDeviceAuthorizationCancelled(callback: () => void): Unregisterable;
102
+
103
+ RegisterForRemoteDeviceAuthorizationRequested(callback: (device: string) => void): Unregisterable;
104
+
105
+ RegisterForRemoteDevicePairingPINChanged(callback: (device: string, pin: string) => void): Unregisterable;
106
+
107
+ RegisterForRestrictedSessionChanges(callback: (restrictedSession: boolean) => void): Unregisterable;
108
+
109
+ RegisterForSessionStopped(callback: (steam64Id: string, guestId: number, avatarHash: string) => void): Unregisterable;
110
+
111
+ RegisterForSessionStarted(callback: (steam64Id: string, gameId: string, guestId: number) => void): Unregisterable;
112
+
113
+ RegisterForSessionStopped(callback: (steam64Id: string, guestId: number) => void): Unregisterable;
114
+
115
+ RegisterForSettingsChanges(callback: (remotePlaySettings: RemotePlaySettings) => void): Unregisterable;
116
+
117
+ SetClientStreamingBitrate(bitrate: number): void;
118
+
119
+ SetClientStreamingQuality(quality: number): void;
120
+
121
+ SetGameSystemVolume(volume: number): void;
122
+
123
+ SetPerUserControllerInputEnabled(steam64Id: string, enabled: boolean): void;
124
+
125
+ SetPerUserControllerInputEnabledWithGuestID(steam64Id: string, guestId: number, enabled: boolean): void;
126
+
127
+ SetPerUserKeyboardInputEnabled(steam64Id: string, enabled: boolean): void;
128
+
129
+ SetPerUserKeyboardInputEnabledWithGuestID(steam64Id: string, guestId: number, enabled: boolean): void;
130
+
131
+ SetPerUserMouseInputEnabled(steam64Id: string, enabled: boolean): void;
132
+
133
+ SetPerUserMouseInputEnabledWithGuestID(steam64Id: string, guestId: number, enabled: boolean): void;
134
+
135
+ SetRemoteDeviceAuthorized(param0: boolean, param1: string): void;
136
+
137
+ SetRemoteDevicePIN(pin: string): void;
138
+
139
+ SetRemotePlayEnabled(enabled: boolean): void;
140
+
141
+ /**
142
+ * @param base64 Serialized base64 message from {@link StreamingClientConfig}.
143
+ */
144
+ SetStreamingClientConfig(base64: string, sessionId: number): void;
145
+
146
+ /**
147
+ * Enables advanced client options.
148
+ */
149
+ SetStreamingClientConfigEnabled(value: boolean): void;
150
+
151
+ SetStreamingDesktopToRemotePlayTogetherEnabled(enabled: boolean): void;
152
+
153
+ SetStreamingP2PScope(scope: EStreamP2PScope): void;
154
+
155
+ /**
156
+ * @param base64 Serialized base64 message from {@link StreamingServerConfig}.
157
+ */
158
+ SetStreamingServerConfig(base64: string, sessionId: number): void;
159
+
160
+ /**
161
+ * Enables advanced host options.
162
+ */
163
+ SetStreamingServerConfigEnabled(value: boolean): void;
164
+
165
+ StopStreamingClient(): void;
166
+
167
+ StopStreamingSession(id: number): void;
168
+ StopStreamingSessionAndSuspendDevice(id: number): void;
169
+
170
+ UnlockH264(): void;
171
+
172
+ /**
173
+ * Unpairs all devices.
174
+ */
175
+ UnpairRemoteDevices(): void;
176
+ }
177
+
178
+ export enum EClientUsedInputType {
179
+ Keyboard,
180
+ Mouse,
181
+ Controller,
182
+ Max,
183
+ }
184
+
185
+ export interface RemotePlayDevice {
186
+ clientId: string;
187
+ clientName: string;
188
+ status: string; // "Connected", "Paired",
189
+ formFactor: number;
190
+ unStreamingSessionID: number;
191
+ bCanSteamVR: boolean;
192
+ bCanSuspend: boolean;
193
+ }
194
+
195
+ interface RemotePlayInputSettings {
196
+ bKeyboardEnabled: true;
197
+ bMouseEnabled: true;
198
+ bControllerEnabled: true;
199
+ }
200
+
201
+ export interface RemotePlaySettings {
202
+ bAV1DecodeAvailable: boolean;
203
+ bHEVCDecodeAvailable: boolean;
204
+ bRemotePlayDisabledBySystemPolicy: boolean;
205
+ bRemotePlaySupported: boolean;
206
+ bRemotePlayEnabled: boolean;
207
+ eRemotePlayP2PScope: EStreamP2PScope;
208
+ bRemotePlayServerConfigAvailable: boolean;
209
+ bRemotePlayServerConfigEnabled: boolean;
210
+ bRemotePlayClientConfigEnabled: boolean;
211
+ unStreamingSessionID: number;
212
+ strStreamingClientName: string;
213
+ /**
214
+ * If deserialized, returns {@link StreamingClientConfig}.
215
+ */
216
+ RemotePlayClientConfig: StreamingClientConfig;
217
+ /**
218
+ * If deserialized, returns {@link StreamingServerConfig}.
219
+ */
220
+ RemotePlayServerConfig: ArrayBuffer;
221
+ nDefaultAudioChannels: number;
222
+ nAutomaticResolutionX: number;
223
+ nAutomaticResolutionY: number;
224
+ }
225
+
226
+ export interface StreamingClientConfig {
227
+ quality?: EStreamQualityPreference;
228
+ desired_resolution_x?: number;
229
+ desired_resolution_y?: number;
230
+ desired_framerate_numerator?: number;
231
+ desired_framerate_denominator?: number;
232
+ desired_bitrate_kbps?: number;
233
+ enable_hardware_decoding?: boolean;
234
+ enable_performance_overlay?: boolean;
235
+ enable_video_streaming?: boolean;
236
+ enable_audio_streaming?: boolean;
237
+ enable_input_streaming?: boolean;
238
+ audio_channels?: number;
239
+ enable_video_hevc?: boolean;
240
+ enable_performance_icons?: boolean;
241
+ enable_microphone_streaming?: boolean;
242
+ controller_overlay_hotkey?: string;
243
+ enable_touch_controller_OBSOLETE?: boolean;
244
+ p2p_scope?: EStreamP2PScope;
245
+ enable_audio_uncompressed?: boolean;
246
+ display_limit?: StreamVideoLimit;
247
+ quality_limit?: StreamVideoLimit;
248
+ runtime_limit?: StreamVideoLimit;
249
+ decoder_limit: StreamVideoLimit[];
250
+ }
251
+
252
+ export interface StreamingServerConfig {
253
+ change_desktop_resolution?: boolean;
254
+ dynamically_adjust_resolution_OBSOLETE?: boolean;
255
+ enable_capture_nvfbc?: boolean;
256
+ enable_hardware_encoding_nvidia_OBSOLETE?: boolean;
257
+ enable_hardware_encoding_amd_OBSOLETE?: boolean;
258
+ enable_hardware_encoding_intel_OBSOLETE?: boolean;
259
+ software_encoding_threads?: number;
260
+ enable_traffic_priority?: boolean;
261
+ host_play_audio?: EStreamHostPlayAudioPreference;
262
+ enable_hardware_encoding?: boolean;
263
+ }
264
+
265
+ export interface StreamVideoLimit {
266
+ codec?: EStreamVideoCodec;
267
+ mode?: StreamVideoMode;
268
+ bitrate_kbps?: number;
269
+ burst_bitrate_kbps?: number;
270
+ }
271
+
272
+ export interface StreamVideoMode {
273
+ width?: number;
274
+ height?: number;
275
+ refresh_rate?: number;
276
+ refresh_rate_numerator?: number;
277
+ refresh_rate_denominator?: number;
278
+ }
279
+
280
+ export enum ERemoteClientLaunch {
281
+ OK = 1,
282
+ Fail,
283
+ RequiresUI,
284
+ RequiresLaunchOption,
285
+ RequiresEULA,
286
+ Timeout,
287
+ StreamTimeout,
288
+ StreamClientFail,
289
+ OtherGameRunning,
290
+ DownloadStarted,
291
+ DownloadNoSpace,
292
+ DownloadFiltered,
293
+ DownloadRequiresUI,
294
+ AccessDenied,
295
+ NetworkError,
296
+ Progress,
297
+ ParentalUnlockFailed,
298
+ ScreenLocked,
299
+ Unsupported,
300
+ DisabledLocal,
301
+ DisabledRemote,
302
+ Broadcasting,
303
+ Busy,
304
+ DriversNotInstalled,
305
+ TransportUnavailable,
306
+ Canceled,
307
+ Invisible,
308
+ RestrictedCountry,
309
+ Unauthorized,
310
+ }
311
+
312
+ export enum EStreamVideoCodec {
313
+ None,
314
+ Raw,
315
+ VP8,
316
+ VP9,
317
+ H264,
318
+ HEVC,
319
+ ORBX1,
320
+ ORBX2,
321
+ AV1,
322
+ }
323
+
324
+ export enum EStreamHostPlayAudioPreference {
325
+ Default,
326
+ Always,
327
+ }
328
+
329
+ export enum EStreamQualityPreference {
330
+ Automatic = -1,
331
+ Fast = 1,
332
+ Balanced,
333
+ Beautiful,
334
+ }
335
+
336
+ export enum EStreamP2PScope {
337
+ Automatic,
338
+ Disabled,
339
+ OnlyMe,
340
+ Friends,
341
+ Everyone,
342
+ }
@@ -0,0 +1,149 @@
1
+ /**
2
+ * Interface for managing screenshots.
3
+ */
4
+ export interface Screenshots {
5
+ /**
6
+ * Deletes a local screenshot.
7
+ * @param appId The ID of the application.
8
+ * @param screenshotIndex The index of the local screenshot.
9
+ * @returns a boolean value indicating whether the deletion was successful.
10
+ */
11
+ DeleteLocalScreenshot(appId: string, screenshotIndex: number): Promise<boolean>;
12
+
13
+ DeleteLocalScreenshots(screenshots: ScreenshotToDelete[]): Promise<ScreenshotDeletionResponse>;
14
+
15
+ /**
16
+ * Retrieves all local screenshots for all applications.
17
+ * @returns an array of Screenshot objects.
18
+ */
19
+ GetAllAppsLocalScreenshots(): Promise<Screenshot[]>;
20
+
21
+ /**
22
+ * Retrieves the count of all local screenshots for all applications.
23
+ * @returns the count of local screenshots.
24
+ */
25
+ GetAllAppsLocalScreenshotsCount(): Promise<number>;
26
+
27
+ /**
28
+ * Retrieves a range of local screenshots for all applications.
29
+ * @param start The starting index of the screenshot range.
30
+ * @param end The ending index of the screenshot range.
31
+ * @returns an array of Screenshot objects within the specified range.
32
+ */
33
+ GetAllAppsLocalScreenshotsRange(start: number, end: number): Promise<Screenshot[]>;
34
+
35
+ /**
36
+ * Retrieves all local screenshots.
37
+ * @returns an array of Screenshot objects.
38
+ */
39
+ GetAllLocalScreenshots(): Promise<Screenshot[]>;
40
+
41
+ /**
42
+ * Retrieves the game associated with a specific local screenshot index.
43
+ * @param screenshotIndex The index of the local screenshot.
44
+ * @returns the ID of the game associated with the screenshot.
45
+ */
46
+ GetGameWithLocalScreenshots(screenshotIndex: number): Promise<number>;
47
+
48
+ /**
49
+ * Retrieves the last taken local screenshot.
50
+ * @returns the last taken local screenshot.
51
+ */
52
+ GetLastScreenshotTaken(): Promise<Screenshot>;
53
+
54
+ /**
55
+ * Retrieves a specific local screenshot for an application.
56
+ * @param appId The ID of the application.
57
+ * @param screenshotIndex The index of the local screenshot.
58
+ * @returns the requested local screenshot.
59
+ */
60
+ GetLocalScreenshotByHandle(appId: string, screenshotIndex: number): Promise<Screenshot>;
61
+
62
+ /**
63
+ * Retrieves the count of local screenshots for a specific application.
64
+ * @param appId The ID of the application.
65
+ * @returns the count of local screenshots for the application.
66
+ */
67
+ GetLocalScreenshotCount(appId: number): Promise<number>;
68
+
69
+ /**
70
+ * Retrieves the path of a screenshot.
71
+ * @param appId The ID of the application.
72
+ * @param hHandle The handle of the screenshot.
73
+ * @returns the screenshot path or the screenshot directory if no such handle.
74
+ */
75
+ GetLocalScreenshotPath(appId: number, hHandle: number): Promise<string>;
76
+
77
+ /**
78
+ * Retrieves the number of games with local screenshots.
79
+ * @returns the number of games with local screenshots.
80
+ */
81
+ GetNumGamesWithLocalScreenshots(): Promise<number>;
82
+
83
+ /**
84
+ * Gets total screenshot usage in the specified library folder.
85
+ * @param path Library folder path.
86
+ * @returns the number of taken space in bytes.
87
+ */
88
+ GetTotalDiskSpaceUsage(path: string): Promise<number>;
89
+
90
+ /**
91
+ * Opens a local screenshot in the system image viewer.
92
+ * If the screenshot index is invalid, this function opens the screenshots directory for the specified application ID.
93
+ * @param appId The ID of the application.
94
+ * @param screenshotIndex The index of the local screenshot.
95
+ */
96
+ ShowScreenshotInSystemViewer(appId: string, screenshotIndex: number): void;
97
+
98
+ /**
99
+ * Opens the folder containing local screenshots for a specific application.
100
+ * @param appId The ID of the application.
101
+ */
102
+ ShowScreenshotsOnDisk(appId: string): void;
103
+
104
+ /**
105
+ * Uploads a local screenshot.
106
+ * @param appId The ID of the application.
107
+ * @param localScreenshot_hHandle The handle of the local screenshot.
108
+ * @param filePrivacyState The privacy state of the screenshot file.
109
+ * @returns a boolean value indicating whether the upload was successful.
110
+ */
111
+ UploadLocalScreenshot(
112
+ appId: string,
113
+ localScreenshot_hHandle: number,
114
+ filePrivacyState: EUCMFilePrivacyState,
115
+ ): Promise<boolean>;
116
+ }
117
+
118
+ export interface Screenshot {
119
+ nAppID: number;
120
+ strGameID: string;
121
+ hHandle: number;
122
+ nWidth: number;
123
+ nHeight: number;
124
+ nCreated: number; // timestamp
125
+ ePrivacy: EUCMFilePrivacyState;
126
+ strCaption: string;
127
+ bSpoilers: boolean;
128
+ strUrl: string;
129
+ bUploaded: boolean;
130
+ ugcHandle: string;
131
+ }
132
+
133
+ export interface ScreenshotToDelete {
134
+ gameID: string;
135
+ rgHandles: number[];
136
+ }
137
+
138
+ export interface ScreenshotDeletionResponse {
139
+ bSuccess: boolean;
140
+ rgFailedRequestIndices: number[];
141
+ }
142
+
143
+ export enum EUCMFilePrivacyState {
144
+ Invalid = -1,
145
+ Private = 1 << 1,
146
+ FriendsOnly = 1 << 2,
147
+ Public = 1 << 3,
148
+ Unlisted = 1 << 4,
149
+ }