@decky/ui 4.15.0 → 4.16.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.
Files changed (173) hide show
  1. package/dist/components/Dialog.js +1 -1
  2. package/dist/components/Dropdown.d.ts +2 -2
  3. package/dist/components/FooterLegend.d.ts +8 -2
  4. package/dist/components/FooterLegend.js +7 -0
  5. package/dist/components/Menu.d.ts +5 -9
  6. package/dist/components/Modal.d.ts +3 -2
  7. package/dist/globals/index.d.ts +25 -2
  8. package/dist/globals/index.js +1 -2
  9. package/dist/globals/shared/cm.d.ts +112 -0
  10. package/dist/globals/shared/enums.d.ts +80 -0
  11. package/dist/globals/shared/enums.js +85 -0
  12. package/dist/globals/shared/history.d.ts +12 -0
  13. package/dist/globals/shared/history.js +1 -0
  14. package/dist/globals/shared/index.d.ts +5 -0
  15. package/dist/globals/shared/index.js +5 -0
  16. package/dist/globals/shared/interfaces.d.ts +54 -0
  17. package/dist/globals/shared/interfaces.js +1 -0
  18. package/dist/globals/shared/navigation.d.ts +14 -0
  19. package/dist/globals/shared/navigation.js +10 -0
  20. package/dist/globals/shared/steamid.d.ts +36 -0
  21. package/dist/globals/shared/steamid.js +15 -0
  22. package/dist/globals/shared/storage.d.ts +27 -0
  23. package/dist/globals/shared/storage.js +11 -0
  24. package/dist/globals/steam-client/App.d.ts +1 -1
  25. package/dist/globals/steam-client/Auth.d.ts +1 -1
  26. package/dist/globals/steam-client/ClientNotifications.d.ts +1 -1
  27. package/dist/globals/steam-client/Overlay.d.ts +2 -1
  28. package/dist/globals/steam-client/Screenshots.d.ts +1 -1
  29. package/dist/globals/steam-client/Settings.d.ts +1 -1
  30. package/dist/globals/steam-client/SharedConnection.d.ts +2 -1
  31. package/dist/globals/steam-client/UI.d.ts +14 -3
  32. package/dist/globals/steam-client/UI.js +11 -0
  33. package/dist/globals/steam-client/User.d.ts +13 -0
  34. package/dist/globals/steam-client/User.js +7 -0
  35. package/dist/globals/steam-client/WebChat.d.ts +3 -2
  36. package/dist/globals/steam-client/shared.d.ts +0 -29
  37. package/dist/globals/steam-client/shared.js +0 -24
  38. package/dist/globals/stores/app.d.ts +35 -0
  39. package/dist/globals/stores/app.js +1 -0
  40. package/dist/globals/stores/appdetailsstore.d.ts +86 -0
  41. package/dist/globals/stores/appdetailsstore.js +1 -0
  42. package/dist/globals/stores/appinfostore.d.ts +56 -0
  43. package/dist/globals/stores/appinfostore.js +1 -0
  44. package/dist/globals/stores/appstore.d.ts +77 -0
  45. package/dist/globals/stores/appstore.js +1 -0
  46. package/dist/globals/stores/badgestore.d.ts +52 -0
  47. package/dist/globals/stores/badgestore.js +1 -0
  48. package/dist/globals/stores/collectionstore.d.ts +313 -0
  49. package/dist/globals/stores/collectionstore.js +143 -0
  50. package/dist/globals/stores/consolestore.d.ts +20 -0
  51. package/dist/globals/stores/consolestore.js +1 -0
  52. package/dist/globals/stores/focusnavcontroller.d.ts +383 -0
  53. package/dist/globals/stores/focusnavcontroller.js +29 -0
  54. package/dist/globals/stores/friendstore/clanstore.d.ts +75 -0
  55. package/dist/globals/stores/friendstore/clanstore.js +19 -0
  56. package/dist/globals/stores/friendstore/friendchat.d.ts +374 -0
  57. package/dist/globals/stores/friendstore/friendchat.js +56 -0
  58. package/dist/globals/stores/friendstore/friendgroupstore.d.ts +98 -0
  59. package/dist/globals/stores/friendstore/friendgroupstore.js +8 -0
  60. package/dist/globals/stores/friendstore/friendingamenotificationstore.d.ts +2 -0
  61. package/dist/globals/stores/friendstore/friendingamenotificationstore.js +1 -0
  62. package/dist/globals/stores/friendstore/friendslistfavoritesstore.d.ts +22 -0
  63. package/dist/globals/stores/friendstore/friendslistfavoritesstore.js +1 -0
  64. package/dist/globals/stores/friendstore/friendsuifriendstore.d.ts +125 -0
  65. package/dist/globals/stores/friendstore/friendsuifriendstore.js +1 -0
  66. package/dist/globals/stores/friendstore/index.d.ts +25 -0
  67. package/dist/globals/stores/friendstore/index.js +1 -0
  68. package/dist/globals/stores/friendstore/shared.d.ts +207 -0
  69. package/dist/globals/stores/friendstore/shared.js +41 -0
  70. package/dist/globals/stores/gamerecordingstore.d.ts +263 -0
  71. package/dist/globals/stores/gamerecordingstore.js +1 -0
  72. package/dist/globals/stores/index.d.ts +18 -0
  73. package/dist/globals/stores/index.js +18 -0
  74. package/dist/globals/stores/libraryuistore.d.ts +179 -0
  75. package/dist/globals/stores/libraryuistore.js +56 -0
  76. package/dist/globals/stores/localizationmanager.d.ts +18 -0
  77. package/dist/globals/stores/localizationmanager.js +1 -0
  78. package/dist/globals/stores/mainwindowbrowsermanager.d.ts +62 -0
  79. package/dist/globals/stores/mainwindowbrowsermanager.js +1 -0
  80. package/dist/globals/stores/notificationstore.d.ts +242 -0
  81. package/dist/globals/stores/notificationstore.js +20 -0
  82. package/dist/globals/stores/popupmanager.d.ts +128 -0
  83. package/dist/globals/stores/popupmanager.js +1 -0
  84. package/dist/globals/stores/securitystore.d.ts +35 -0
  85. package/dist/globals/stores/securitystore.js +1 -0
  86. package/dist/globals/stores/settingsstore.d.ts +86 -0
  87. package/dist/globals/stores/settingsstore.js +19 -0
  88. package/dist/globals/stores/steamuistore/gamepadbrowserview.d.ts +143 -0
  89. package/dist/globals/stores/steamuistore/gamepadbrowserview.js +9 -0
  90. package/dist/globals/stores/steamuistore/gamepaduiaudio.d.ts +36 -0
  91. package/dist/globals/stores/steamuistore/gamepaduiaudio.js +1 -0
  92. package/dist/globals/stores/steamuistore/index.d.ts +129 -0
  93. package/dist/globals/stores/steamuistore/index.js +11 -0
  94. package/dist/globals/stores/steamuistore/menu.d.ts +39 -0
  95. package/dist/globals/stores/steamuistore/menu.js +19 -0
  96. package/dist/globals/stores/steamuistore/window.d.ts +206 -0
  97. package/dist/globals/stores/steamuistore/window.js +6 -0
  98. package/dist/globals/stores/storeitemcache.d.ts +319 -0
  99. package/dist/globals/stores/storeitemcache.js +17 -0
  100. package/dist/globals/stores/urlstore.d.ts +57 -0
  101. package/dist/globals/stores/urlstore.js +1 -0
  102. package/dist/modules/Router.d.ts +5 -58
  103. package/dist/modules/Router.js +2 -20
  104. package/dist/tsconfig.tsbuildinfo +1 -1
  105. package/dist/utils/index.d.ts +0 -1
  106. package/dist/utils/react/treepatcher.js +7 -7
  107. package/package.json +1 -1
  108. package/src/components/Dialog.ts +1 -1
  109. package/src/components/Dropdown.tsx +2 -2
  110. package/src/components/FooterLegend.ts +10 -2
  111. package/src/components/Menu.ts +11 -21
  112. package/src/components/Modal.ts +40 -8
  113. package/src/globals/index.ts +45 -2
  114. package/src/globals/shared/cm.ts +158 -0
  115. package/src/globals/shared/enums.ts +97 -0
  116. package/src/globals/shared/history.ts +15 -0
  117. package/src/globals/shared/index.ts +5 -0
  118. package/src/globals/shared/interfaces.ts +147 -0
  119. package/src/globals/shared/navigation.ts +15 -0
  120. package/src/globals/shared/steamid.ts +49 -0
  121. package/src/globals/shared/storage.ts +62 -0
  122. package/src/globals/steam-client/App.ts +2 -2
  123. package/src/globals/steam-client/Auth.ts +2 -2
  124. package/src/globals/steam-client/ClientNotifications.ts +1 -1
  125. package/src/globals/steam-client/Overlay.ts +2 -1
  126. package/src/globals/steam-client/Screenshots.ts +1 -1
  127. package/src/globals/steam-client/Settings.ts +1 -1
  128. package/src/globals/steam-client/SharedConnection.ts +2 -1
  129. package/src/globals/steam-client/UI.ts +15 -6
  130. package/src/globals/steam-client/User.ts +20 -0
  131. package/src/globals/steam-client/WebChat.ts +3 -2
  132. package/src/globals/steam-client/shared.ts +0 -69
  133. package/src/globals/stores/app.ts +102 -0
  134. package/src/globals/stores/appdetailsstore.ts +235 -0
  135. package/src/globals/stores/appinfostore.ts +65 -0
  136. package/src/globals/stores/appstore.ts +166 -0
  137. package/src/globals/stores/badgestore.ts +87 -0
  138. package/src/globals/stores/collectionstore.ts +544 -0
  139. package/src/globals/stores/consolestore.ts +54 -0
  140. package/src/globals/stores/focusnavcontroller.ts +522 -0
  141. package/src/globals/stores/friendstore/clanstore.ts +89 -0
  142. package/src/globals/stores/friendstore/friendchat.ts +646 -0
  143. package/src/globals/stores/friendstore/friendgroupstore.ts +187 -0
  144. package/src/globals/stores/friendstore/friendingamenotificationstore.ts +1 -0
  145. package/src/globals/stores/friendstore/friendslistfavoritesstore.ts +37 -0
  146. package/src/globals/stores/friendstore/friendsuifriendstore.ts +274 -0
  147. package/src/globals/stores/friendstore/index.ts +58 -0
  148. package/src/globals/stores/friendstore/shared.ts +318 -0
  149. package/src/globals/stores/gamerecordingstore.ts +367 -0
  150. package/src/globals/stores/index.ts +18 -0
  151. package/src/globals/stores/libraryuistore.ts +395 -0
  152. package/src/globals/stores/localizationmanager.ts +56 -0
  153. package/src/globals/stores/mainwindowbrowsermanager.ts +135 -0
  154. package/src/globals/stores/notificationstore.ts +298 -0
  155. package/src/globals/stores/popupmanager.ts +352 -0
  156. package/src/globals/stores/securitystore.ts +36 -0
  157. package/src/globals/stores/settingsstore.ts +134 -0
  158. package/src/globals/stores/steamuistore/gamepadbrowserview.ts +172 -0
  159. package/src/globals/stores/steamuistore/gamepaduiaudio.ts +117 -0
  160. package/src/globals/stores/steamuistore/index.ts +212 -0
  161. package/src/globals/stores/steamuistore/menu.ts +89 -0
  162. package/src/globals/stores/steamuistore/window.ts +466 -0
  163. package/src/globals/stores/storeitemcache.ts +347 -0
  164. package/src/globals/stores/urlstore.ts +150 -0
  165. package/src/modules/Router.ts +11 -77
  166. package/src/utils/index.ts +0 -1
  167. package/src/utils/react/treepatcher.ts +9 -9
  168. package/dist/globals/SteamClient.d.ts +0 -5
  169. package/dist/globals/SteamClient.js +0 -1
  170. package/dist/globals/stores.d.ts +0 -70
  171. package/src/globals/SteamClient.ts +0 -6
  172. package/src/globals/stores.ts +0 -74
  173. /package/dist/globals/{stores.js → shared/cm.js} +0 -0
@@ -0,0 +1,235 @@
1
+ import type {
2
+ AppAchievements,
3
+ AppAssociations,
4
+ AppDescription,
5
+ AppDetails,
6
+ LogoPosition,
7
+ SteamAppOverview,
8
+ } from '../steam-client/App';
9
+ import type { EResult } from '../steam-client/shared';
10
+
11
+ type AjaxLibraryDetails_t = AppDescription &
12
+ Omit<AppAssociations, 'rgFranchises'> & {
13
+ appid: string;
14
+ name: string;
15
+ // TODO: GetLinks() somewhere maybe idek
16
+ rgSocialMedia: any[];
17
+ status: EResult;
18
+ };
19
+
20
+ type AssetsWith2x_t<T extends string[]> = [
21
+ /**
22
+ * Relative to `https://steamloopback.host`.
23
+ */
24
+ cached2xAsset: string,
25
+ ...T,
26
+ ];
27
+
28
+ /**
29
+ * Hero, header image, etc.
30
+ */
31
+ type AppAssets_t = [
32
+ /**
33
+ * Relative to `https://steamloopback.host`.
34
+ */
35
+ cachedAsset: string,
36
+
37
+ /**
38
+ * Relative to `https://steamloopback.host`.
39
+ */
40
+ legacyCachedAsset: string,
41
+
42
+ /**
43
+ * Relative to {@link CURLStore.GetStoreAppImageURL}.
44
+ */
45
+ storeAsset: string,
46
+ ];
47
+
48
+ /**
49
+ * Like {@link AppAssets_t}, but including custom assets.
50
+ */
51
+ type AppAssetsWithCustomImage_t = [
52
+ /**
53
+ * Custom asset with the `.jpg` extension.
54
+ *
55
+ * Note that you will have to check if it exists, depending on what file type
56
+ * the user has uploaded.
57
+ * Relative to `https://steamloopback.host`. Empty if not set.
58
+ */
59
+ customJpgAsset: string,
60
+
61
+ /**
62
+ * Custom asset with the `.png` extension.
63
+ *
64
+ * Note that you will have to check if it exists, depending on what file type
65
+ * the user has uploaded.
66
+ * Relative to `https://steamloopback.host`. Empty if not set.
67
+ */
68
+ customPngAsset: string,
69
+
70
+ /**
71
+ * Relative to `https://steamloopback.host`.
72
+ */
73
+ cachedAsset: string,
74
+
75
+ /**
76
+ * Relative to `https://steamloopback.host`.
77
+ */
78
+ cachedLegacyAsset: string,
79
+
80
+ /**
81
+ * Relative to {@link CURLStore.GetStoreAppImageURL}.
82
+ */
83
+ storeAsset: string,
84
+ ];
85
+
86
+ interface AppDetailsSpotlight {
87
+ data: {
88
+ events: any[];
89
+ };
90
+ dtLoaded: Date;
91
+ }
92
+
93
+ type LogoPositionInStorage = LogoPosition & {
94
+ nVersion: number;
95
+ };
96
+
97
+ interface AppData_t {
98
+ appDetailsSpotlight: AppDetailsSpotlight | null;
99
+ associationData: AppAssociations | null;
100
+ bLoadingAchievments: boolean;
101
+ cRegistered: number;
102
+ customImageInfo: LogoPositionInStorage | null;
103
+ /** UNIX timestamp. */
104
+ customImageInfoRtime: number;
105
+ descriptionsData: AppDescription | null;
106
+ details: AppDetails;
107
+ }
108
+
109
+ interface GetLogoImagesResult<T> {
110
+ logoPosition: LogoPosition;
111
+ rgLogoImages: T;
112
+ }
113
+
114
+ interface GetHeroImagesResult<T> {
115
+ appid: number;
116
+ bHasHeroImage: boolean;
117
+ rgHeroImages: T;
118
+ }
119
+
120
+ export declare class CAppDetailsStore {
121
+ m_mapAppData: Map<number, AppData_t>;
122
+
123
+ /**
124
+ * @param name Localized achievement name.
125
+ * @returns `true` if the app's provided achievement is hidden and achieved.
126
+ */
127
+ BAchievementIsHiddenAndAchieved(appid: number, name: string): boolean;
128
+
129
+ /**
130
+ * @returns `true` if the provided app has community market support.
131
+ */
132
+ BHasMarketPresence(details: AppDetails): boolean;
133
+
134
+ /**
135
+ * @returns `true` if the provided app was recently () launched.
136
+ * @todo broken ? doesn't work lol
137
+ */
138
+ BHasRecentlyLaunched(details: AppDetails): boolean;
139
+
140
+ /**
141
+ * @returns `true` if the provided app has workshop support.
142
+ */
143
+ BIsWorkshopVisible(details: AppDetails): boolean;
144
+
145
+ /**
146
+ * Resets the provided app's custom logo position to default.
147
+ */
148
+ ClearCustomLogoPosition(overview: SteamAppOverview): Promise<void>;
149
+
150
+ /**
151
+ * @returns the provided app's achievements.
152
+ * @throws if data hasn't been loaded yet. Call {@link RequestAchievements}
153
+ * before calling this in order to avoid it! (Most likely a bug in
154
+ * {@link RequestAchievements}, since GetAchievement *does* call it if data
155
+ * hasn't been loaded yet.)
156
+ */
157
+ GetAchievements(appid: number): AppAchievements;
158
+
159
+ GetAjaxLibraryAppDetails(appid: number): Promise<AjaxLibraryDetails_t | null>;
160
+
161
+ GetAppData(appid: number): AppData_t;
162
+
163
+ GetAppDetails(appid: number): AppDetails | null;
164
+
165
+ GetAppDetailsSpotlight(appid: number): AppDetailsSpotlight;
166
+
167
+ /**
168
+ * @returns the provided app's associations (developers, publishers, franchises, etc.).
169
+ */
170
+ GetAssociations(appid: number): AppAssociations;
171
+
172
+ /**
173
+ * @returns the provided app's custom logo position or `null` if not loaded
174
+ * yet or `undefined` if not set.
175
+ */
176
+ GetCustomLogoPosition(appid: number): LogoPosition | null | undefined;
177
+
178
+ GetDescriptions(appid: number): AppDescription;
179
+
180
+ GetHeaderImages<T extends boolean>(
181
+ overview: SteamAppOverview,
182
+ prefer2x?: T,
183
+ ): T extends true ? AssetsWith2x_t<AppAssetsWithCustomImage_t> : AppAssetsWithCustomImage_t;
184
+
185
+ GetHeaderImagesForAppId<T extends boolean>(
186
+ appid: number,
187
+ localCacheVersion?: number,
188
+ storeAssetMtime?: number,
189
+ prefer2x?: T,
190
+ ): T extends true ? AssetsWith2x_t<AppAssets_t> : AppAssets_t;
191
+
192
+ GetHeroBlurImages(overview: SteamAppOverview): AppAssetsWithCustomImage_t;
193
+
194
+ GetHeroBlurImagesForAppId(appid: number, localCacheVersion?: number, storeAssetMtime?: number): AppAssets_t;
195
+
196
+ GetHeroImages(overview: SteamAppOverview): GetHeroImagesResult<AppAssetsWithCustomImage_t>;
197
+
198
+ GetHeroImagesForAppId(
199
+ appid: number,
200
+ localCacheVersion?: number,
201
+ storeAssetMtime?: number,
202
+ ): GetHeroImagesResult<AppAssets_t>;
203
+
204
+ GetLogoImages(overview: SteamAppOverview): GetLogoImagesResult<AppAssetsWithCustomImage_t>;
205
+
206
+ GetLogoImagesForAppId(
207
+ appid: number,
208
+ localCacheVersion?: number,
209
+ storeAssetMtime?: number,
210
+ ): GetLogoImagesResult<AppAssets_t>;
211
+
212
+ RequestAppDetails(appid: number): Promise<AppDetails | undefined>;
213
+
214
+ RequestAchievements(appid: number): Promise<void>;
215
+
216
+ RequestAppDetailsSpotlight(appid: number): Promise<void>;
217
+
218
+ RequestAssociationData(appid: number): Promise<void>;
219
+
220
+ RequestCustomImageInfo(overview: SteamAppOverview): Promise<void>;
221
+
222
+ RequestDescriptionsData(appid: number): Promise<void>;
223
+
224
+ /**
225
+ * Sets a provided logo position for a specified app.
226
+ */
227
+ SaveCustomLogoPosition(overview: SteamAppOverview, position: LogoPosition): Promise<void>;
228
+
229
+ SetAjaxLibraryAppDetails(appid: number, data: AppData_t, details: AjaxLibraryDetails_t): void;
230
+
231
+ /**
232
+ * @returns `true` if the provided custom logo position is valid.
233
+ */
234
+ ValidateCustomImageInfo(info: LogoPositionInStorage): boolean;
235
+ }
@@ -0,0 +1,65 @@
1
+ import type { CCallbackList } from '../shared';
2
+ import type { EAppType } from '../steam-client/App';
3
+
4
+ interface AppInfoCacheObject_t {
5
+ eAppType: EAppType;
6
+ strIconURL: string;
7
+ strName: string;
8
+ strUpdatedFromServer: string;
9
+ }
10
+
11
+ declare class CAppInfo {
12
+ m_unAppID: number;
13
+ m_bInitialized: boolean;
14
+ m_strName: string;
15
+ m_strIconURL: string;
16
+ m_dtUpdatedFromServer: Date;
17
+ m_eAppType: EAppType;
18
+
19
+ get appid(): number;
20
+ get is_initialized(): boolean;
21
+ get is_valid(): boolean;
22
+ get name(): string;
23
+ get icon_url_no_default(): string;
24
+ get time_updated_from_server(): Date;
25
+ get apptype(): EAppType;
26
+
27
+ /**
28
+ * @returns `true` if this app is an application or tool.
29
+ */
30
+ BIsApplicationOrTool(): boolean;
31
+
32
+ BuildAppURL(imageName: string): string;
33
+ DeserializeFromMessage(e: any): void;
34
+ DeserializeFromAppOverview(e: any): void;
35
+ DeserializeFromCacheObject(e: any): void;
36
+ SerializeToCacheObject(): AppInfoCacheObject_t | null;
37
+ }
38
+
39
+ export declare class CAppInfoStore {
40
+ m_mapAppInfo: Map<number, CAppInfo>;
41
+ m_mapRichPresenceLoc: any;
42
+ m_cAppInfoRequestsInFlight: number;
43
+ m_setPendingAppInfo: Set<unknown>;
44
+ m_PendingAppInfoPromise: any;
45
+ m_PendingAppInfoResolve: any;
46
+ m_CacheStorage: any | null;
47
+ m_fnCallbackOnAppInfoLoaded: CCallbackList;
48
+
49
+ BHavePendingAppInfoRequests(): boolean;
50
+ EnsureAppInfoForAppIDs(rgAppIDs: number[]): Promise<any>;
51
+ FlushPendingAppInfo(): Promise<void>;
52
+ GetAppInfo(appid: number): CAppInfo;
53
+ GetCacheKeyForAppID(appid: number): string;
54
+ GetRichPresenceLocAsync(e: any): any;
55
+ GetRichPresenceLoc(e: any): any;
56
+ IsLoadingAppID(appid: number): boolean;
57
+ LoadAppInfoBatchFromLocalCache(rgAppInfoBatch: any[]): Promise<any[]>;
58
+ LoadAppInfoBatch(rgAppInfoBatch: any[]): Promise<void>;
59
+ Localize(appid: number, strToken: string, r: any): any;
60
+ QueueAppInfoRequest(e: any): any;
61
+ QueueRichPresenceLocRequest(e: any): any;
62
+ RegisterCallbackOnLoad(callback: () => void): void;
63
+ SaveAppInfoBatchToLocalCache(rgAppInfoBatch: any[]): Promise<void>;
64
+ SetCacheStorage(storage: any): void;
65
+ }
@@ -0,0 +1,166 @@
1
+ import type { SteamAppOverview, SteamAppOverviewRemoteClientData } from '../steam-client/App';
2
+ import type { EGenre, EStoreCategory } from './collectionstore';
3
+
4
+ // protoMsg here is CAppOverview or something
5
+ export interface IAppOverview extends SteamAppOverview {
6
+ m_setStoreCategories: Set<EStoreCategory>;
7
+ m_setStoreTags: Set<EGenre>;
8
+
9
+ BAreCategoriesEqual(protoMsg: any): boolean;
10
+ BAreSetsEqual(lhs: Set<any>, rhs: Set<any>): boolean;
11
+ BAreStoreTagsEqual(): boolean;
12
+ BHasCustomImages(): boolean;
13
+ BHasStoreCategory(category: EStoreCategory): boolean;
14
+ BHasStoreTag(tag: EGenre): boolean;
15
+ BIsAppBlocked(): boolean;
16
+ BIsAppInBlockList(): boolean;
17
+ BIsApplicationOrTool(): boolean;
18
+ BIsBorrowed(): boolean;
19
+ BIsDemo(): boolean;
20
+ BIsGameIDEqual(protoMsg: any): boolean;
21
+ BIsHardware(): boolean;
22
+ BIsLastTimePlayedEqual(protoMsg: any): boolean;
23
+ BIsModOrShortcut(): boolean;
24
+ BIsMusicAlbum(): boolean;
25
+ BIsNewToLibrary(): boolean;
26
+ BIsOwned(): boolean;
27
+ BIsOwnedByAnotherUser(): boolean;
28
+ BIsPerClientDataEqual(protoMsg: any): boolean;
29
+ BIsPerClientDataLocal(protoMsg: any): boolean;
30
+ BIsSelectedClientLocal(): boolean;
31
+ BIsShortcut(): boolean;
32
+ BIsSortAsEqual(protoMsg: any): boolean;
33
+ BIsSteamDeckVerified(): boolean;
34
+ BIsSteamOSCompatible(): boolean;
35
+ BIsSteamVR(): boolean;
36
+ BIsUnreleased(): boolean;
37
+ BIsVisibleInMRUList(): boolean;
38
+ BSupportsVR(): boolean;
39
+ GetCanonicalReleaseDate(): number;
40
+ GetCanonicalReleaseYear(): string;
41
+ GetGameID(): string;
42
+ GetLastPlayedSectionName(): string;
43
+ GetLastTimePlayed(): number;
44
+ GetPerClientData(which: 'local' | 'mostavailable' | 'selected'): SteamAppOverviewRemoteClientData;
45
+ GetPrimaryAppID(): number;
46
+ GetStoreTags(): Set<EGenre>;
47
+ }
48
+
49
+ interface StoreTag {
50
+ nTagId: EGenre;
51
+ nCount: number;
52
+ }
53
+
54
+ export declare class CAppStore {
55
+ m_bIsInitialized: boolean;
56
+ m_mapApps: Map<IAppOverview, string>;
57
+ m_mapStoreTagLocalization: Map<EGenre, string>;
58
+ m_msTagMapLoaded: number;
59
+
60
+ /**
61
+ * @returns the soundtrack's album cover URL or `null` if not a soundtrack.
62
+ */
63
+ GetAlbumCoverURLForApp(app: SteamAppOverview): string | null;
64
+
65
+ /**
66
+ * @returns the overview for a provided app ID.
67
+ */
68
+ GetAppOverviewByAppID(appid: number): SteamAppOverview | null;
69
+
70
+ /**
71
+ * @returns the overview for a provided app ID.
72
+ */
73
+ GetAppOverviewByGameID(gameid: string): SteamAppOverview | null;
74
+
75
+ /**
76
+ * Like {@link GetAlbumCoverURLForApp}, but the URL is relative to
77
+ * `https://steamloopback.host`.
78
+ */
79
+ GetCachedAlbumCoverURL(app: SteamAppOverview): string | null;
80
+
81
+ /**
82
+ * Like {@link GetVerticalCapsuleURLForApp}, but the URL is relative to
83
+ * `https://steamloopback.host`.
84
+ */
85
+ GetCachedVerticalCapsuleURL(app: SteamAppOverview): string[];
86
+
87
+ /**
88
+ * @returns the app's custom hero image URLs.
89
+ * @see {@link GetCustomImageURLs}
90
+ */
91
+ GetCustomHeroImageURLs(app: SteamAppOverview): string[];
92
+
93
+ /**
94
+ * You most likely want to use {@link GetCustomHeroImageURLs},
95
+ * {@link GetCustomLandcapeImageURLs}, {@link GetCustomLogoImageURLs} or
96
+ * {@link GetCustomVerticalCapsuleURLs} instead!
97
+ *
98
+ * Gets the URLs for the provided asset.
99
+ *
100
+ * Note that only one of them will be available, depending on which extension
101
+ * ("jpg" or "png") was uploaded.
102
+ *
103
+ * @param assetName For example "", "_hero", "_logo", etc.
104
+ * @returns the URLs relative to `https://steamloopback.host` for the provided
105
+ * asset name.
106
+ */
107
+ GetCustomImageURLs(app: SteamAppOverview, assetName: string): string[];
108
+
109
+ /**
110
+ * @returns the custom hero image URLs.
111
+ * @see {@link GetCustomImageURLs}
112
+ */
113
+ GetCustomLandcapeImageURLs(app: SteamAppOverview): string[];
114
+
115
+ /**
116
+ * @returns the app's custom logo image URLs.
117
+ * @see {@link GetCustomImageURLs}
118
+ */
119
+ GetCustomLogoImageURLs(app: SteamAppOverview): string[];
120
+
121
+ /**
122
+ * @returns the app's custom vertical capsule image URLs.
123
+ * @see {@link GetCustomImageURLs}
124
+ */
125
+ GetCustomVerticalCapsuleURLs(app: SteamAppOverview): string[];
126
+
127
+ /**
128
+ * @returns the app's 32x32 icon URL.
129
+ */
130
+ GetIconURLForApp(app: SteamAppOverview): string;
131
+
132
+ /**
133
+ * @returns the localized string for a provided store category.
134
+ */
135
+ GetLocalizationForStoreTag(category: EGenre): string;
136
+
137
+ /**
138
+ * Like {@link GetVerticalCapsuleURLForApp}, but "pregenerated" here means
139
+ * that if the app doesn't have a vertical capsule (usually older apps), then
140
+ * it will return its hero instead with blur on the side to match the size.
141
+ *
142
+ * @returns the app's vertical capsule URL.
143
+ */
144
+ GetPregeneratedVerticalCapsuleForApp(app: SteamAppOverview): string;
145
+
146
+ /**
147
+ * @returns the app's store page URL.
148
+ */
149
+ GetStorePageURLForApp(app: SteamAppOverview): string;
150
+
151
+ /**
152
+ * Gets the similiar store tags from a provided localized string.
153
+ *
154
+ * @param s The string to match.
155
+ */
156
+ GetTopStoreTags(s: string): StoreTag[];
157
+
158
+ /**
159
+ * @returns the app's vertical capsule URL.
160
+ */
161
+ GetVerticalCapsuleURLForApp(app: SteamAppOverview): string;
162
+
163
+ get allApps(): IAppOverview[];
164
+ get sharedLibraryAccountIds(): number[];
165
+ get siteLicenseApps(): { strSiteName: string; rgApps: IAppOverview[] } | null;
166
+ }
@@ -0,0 +1,87 @@
1
+ import type { VDFBoolean_t } from '../steam-client/shared';
2
+
3
+ interface BadgeCard_t {
4
+ strName: string;
5
+ strTitle: string;
6
+ strImgURL: string;
7
+ strArtworkURL: string;
8
+ strMarketHash: string;
9
+ nOwned: 0;
10
+ }
11
+
12
+ interface BadgeInfo_t {
13
+ bMaxed: VDFBoolean_t;
14
+ dtNextRetry: number;
15
+ strIconURL: string;
16
+ strName: string;
17
+ strNextLevelName: string;
18
+ nLevel: number;
19
+ nMaxLevel: number;
20
+ nXP: number;
21
+ nNextLevelXP: number;
22
+ rgCards: BadgeCard_t[];
23
+ }
24
+
25
+ // Seems like there are protobufs for this named
26
+ // "CQuest_GetCommunityItemDefinitions_Response_ItemDefinition"
27
+ // & "CommunityItemDefinition" but they are not in SteamDatabase/SteamTracking
28
+ // but present in some js files... don't wanna do shit with it right now
29
+ interface CommunityItemDefinition {
30
+ active: boolean;
31
+ appid: number;
32
+ item_class: number;
33
+ item_description: string;
34
+ item_image_composed: string;
35
+ item_image_composed_foil: string;
36
+ item_image_large: string;
37
+ item_image_small: string;
38
+ item_internal_name: string;
39
+ item_last_changed: number;
40
+ item_movie_mp4: string;
41
+ item_movie_mp4_small: string;
42
+ item_movie_webm: string;
43
+ item_movie_webm_small: string;
44
+ item_name: string;
45
+ item_series: number;
46
+ item_title: string;
47
+ item_type: number;
48
+ }
49
+
50
+ export declare class CBadgeStore {
51
+ m_mapBadgeData: Map<number, BadgeInfo_t>;
52
+ m_mapCommunityItemDefs: Map<number, CommunityItemDefinition[]>;
53
+
54
+ /**
55
+ * Fetches badge data for a provided app from the internet.
56
+ *
57
+ * @note It seems like there is a bug that won't let you run this if provided
58
+ * app's badge info has not been loaded yet, so you have to run the following
59
+ * before calling this:
60
+ * ```js
61
+ * badgeStore.m_mapBadgeData.set(appid, { dtNextRetry: 0 });
62
+ * ```
63
+ */
64
+ FetchBadgeData(appid: number): Promise<void>;
65
+
66
+ FetchCommunityItemDefinitions(appid: number): Promise<void>;
67
+
68
+ /**
69
+ * Gets badge info for a provided app. Call {@link FetchBadgeData} before
70
+ * calling this.
71
+ */
72
+ GetBadgeData(appid: number): BadgeInfo_t;
73
+
74
+ GetCommunityItemDefinition(
75
+ defs: CommunityItemDefinition[],
76
+ itemClass: number,
77
+ itemType: number,
78
+ ): CommunityItemDefinition | null;
79
+
80
+ GetCommunityItemDefinitions(appid: number): CommunityItemDefinition[];
81
+
82
+ /**
83
+ * Lets the provided app's badge data be fetched again, since it won't let you
84
+ * fetch it after it's been loaded already.
85
+ */
86
+ InvalidateBadgeData(appid: number): void;
87
+ }