discord-api-ts 0.0.1-security → 4.6.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of discord-api-ts might be problematic. Click here for more details.

Files changed (259) hide show
  1. package/.eslintrc.js +21 -0
  2. package/.github/FUNDING.yml +3 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
  5. package/.github/workflows/doc-publish.yml +33 -0
  6. package/.github/workflows/npmpublish.yml +70 -0
  7. package/.travis.yml +13 -0
  8. package/CODE_OF_CONDUCT.md +76 -0
  9. package/LICENSE +21 -0
  10. package/README.md +166 -3
  11. package/examples/cleanPlayers.js +130 -0
  12. package/examples/cleanWall.js +110 -0
  13. package/examples/revertRanks.js +100 -0
  14. package/examples/savePlayers.js +119 -0
  15. package/examples/saveWall.js +96 -0
  16. package/img/moderatedThumbnails/moderatedThumbnail_100x100.png +0 -0
  17. package/img/moderatedThumbnails/moderatedThumbnail_110x110.png +0 -0
  18. package/img/moderatedThumbnails/moderatedThumbnail_140x140.png +0 -0
  19. package/img/moderatedThumbnails/moderatedThumbnail_150x150.png +0 -0
  20. package/img/moderatedThumbnails/moderatedThumbnail_150x200.png +0 -0
  21. package/img/moderatedThumbnails/moderatedThumbnail_180x180.png +0 -0
  22. package/img/moderatedThumbnails/moderatedThumbnail_250x250.png +0 -0
  23. package/img/moderatedThumbnails/moderatedThumbnail_30x30.png +0 -0
  24. package/img/moderatedThumbnails/moderatedThumbnail_352x352.png +0 -0
  25. package/img/moderatedThumbnails/moderatedThumbnail_420x420.png +0 -0
  26. package/img/moderatedThumbnails/moderatedThumbnail_48x48.png +0 -0
  27. package/img/moderatedThumbnails/moderatedThumbnail_50x50.png +0 -0
  28. package/img/moderatedThumbnails/moderatedThumbnail_60x60.png +0 -0
  29. package/img/moderatedThumbnails/moderatedThumbnail_720x720.png +0 -0
  30. package/img/moderatedThumbnails/moderatedThumbnail_75x75.png +0 -0
  31. package/img/noblox-js-small.png +0 -0
  32. package/img/noblox-js.png +0 -0
  33. package/img/thumbnailSizes.png +0 -0
  34. package/jsDocsConfig.json +55 -0
  35. package/lib/accountinformation/getUserSocialLinks.js +42 -0
  36. package/lib/accountsettings/block.js +58 -0
  37. package/lib/accountsettings/unblock.js +58 -0
  38. package/lib/asset/deleteFromInventory.js +69 -0
  39. package/lib/asset/getGamePassProductInfo.js +51 -0
  40. package/lib/asset/getProductInfo.js +56 -0
  41. package/lib/asset/uploadAnimation.js +103 -0
  42. package/lib/asset/uploadItem.js +83 -0
  43. package/lib/asset/uploadModel.js +90 -0
  44. package/lib/avatar/avatarRules.js +38 -0
  45. package/lib/avatar/currentlyWearing.js +32 -0
  46. package/lib/avatar/getAvatar.js +35 -0
  47. package/lib/avatar/getCurrentAvatar.js +37 -0
  48. package/lib/avatar/getRecentItems.js +37 -0
  49. package/lib/avatar/outfitDetails.js +32 -0
  50. package/lib/avatar/outfits.js +37 -0
  51. package/lib/avatar/redrawAvatar.js +48 -0
  52. package/lib/avatar/removeAssetId.js +55 -0
  53. package/lib/avatar/setAvatarBodyColors.js +60 -0
  54. package/lib/avatar/setAvatarScales.js +60 -0
  55. package/lib/avatar/setPlayerAvatarType.js +50 -0
  56. package/lib/avatar/setWearingAssets.js +50 -0
  57. package/lib/avatar/wearAssetId.js +55 -0
  58. package/lib/badges/getAwardedTimestamps.js +52 -0
  59. package/lib/badges/getBadgeInfo.js +43 -0
  60. package/lib/badges/getGameBadges.js +62 -0
  61. package/lib/badges/getPlayerBadges.js +28 -0
  62. package/lib/badges/updateBadgeInfo.js +80 -0
  63. package/lib/cache/add.js +14 -0
  64. package/lib/cache/addIf.js +26 -0
  65. package/lib/cache/clear.js +8 -0
  66. package/lib/cache/get.js +28 -0
  67. package/lib/cache/index.js +17 -0
  68. package/lib/cache/new.js +12 -0
  69. package/lib/cache/wrap.js +25 -0
  70. package/lib/chat/addUsersToConversation.js +61 -0
  71. package/lib/chat/chatSettings.js +33 -0
  72. package/lib/chat/getChatMessages.js +40 -0
  73. package/lib/chat/getConversations.js +43 -0
  74. package/lib/chat/getRolloutSettings.js +35 -0
  75. package/lib/chat/getUnreadConversationCount.js +33 -0
  76. package/lib/chat/getUnreadMessages.js +38 -0
  77. package/lib/chat/getUserConversations.js +37 -0
  78. package/lib/chat/markChatAsRead.js +52 -0
  79. package/lib/chat/markChatAsSeen.js +50 -0
  80. package/lib/chat/multiGetLatestMessages.js +37 -0
  81. package/lib/chat/onNewConversation.js +50 -0
  82. package/lib/chat/onNewMessage.js +53 -0
  83. package/lib/chat/onNewMessageBySelf.js +50 -0
  84. package/lib/chat/onUserOnline.js +50 -0
  85. package/lib/chat/onUserTyping.js +54 -0
  86. package/lib/chat/removeFromGroupConversation.js +62 -0
  87. package/lib/chat/renameGroupConversation.js +57 -0
  88. package/lib/chat/sendChatMessage.js +57 -0
  89. package/lib/chat/setChatUserTyping.js +61 -0
  90. package/lib/chat/start121Conversation.js +50 -0
  91. package/lib/chat/startCloudEditConversation.js +50 -0
  92. package/lib/chat/startGroupConversation.js +62 -0
  93. package/lib/client/onNotification.js +70 -0
  94. package/lib/client/setAPIKey.js +18 -0
  95. package/lib/client/setCookie.js +38 -0
  96. package/lib/datastores/deleteDatastoreEntry.js +66 -0
  97. package/lib/datastores/getDatastoreEntry.js +98 -0
  98. package/lib/datastores/getDatastoreEntryVersions.js +83 -0
  99. package/lib/datastores/getDatastoreKeys.js +73 -0
  100. package/lib/datastores/getDatastores.js +72 -0
  101. package/lib/datastores/incrementDatastoreEntry.js +93 -0
  102. package/lib/datastores/setDatastoreEntry.js +90 -0
  103. package/lib/develop/canManage.js +44 -0
  104. package/lib/develop/configureItem.js +142 -0
  105. package/lib/develop/updateUniverse.js +53 -0
  106. package/lib/develop/updateUniverseAccess.js +55 -0
  107. package/lib/economy/buy.js +99 -0
  108. package/lib/economy/getGroupFunds.js +43 -0
  109. package/lib/economy/getGroupRevenueSummary.js +48 -0
  110. package/lib/economy/getGroupTransactions.js +32 -0
  111. package/lib/economy/getResaleData.js +54 -0
  112. package/lib/economy/getResellers.js +35 -0
  113. package/lib/economy/getUserTransactions.js +34 -0
  114. package/lib/economy/onGroupTransaction.js +74 -0
  115. package/lib/friends/acceptFriendRequest.js +59 -0
  116. package/lib/friends/declineAllFriendRequests.js +57 -0
  117. package/lib/friends/declineFriendRequest.js +59 -0
  118. package/lib/friends/getFollowers.js +61 -0
  119. package/lib/friends/getFollowings.js +61 -0
  120. package/lib/friends/getFriendRequests.js +56 -0
  121. package/lib/friends/getFriends.js +53 -0
  122. package/lib/friends/onFriendRequest.js +58 -0
  123. package/lib/friends/removeFriend.js +58 -0
  124. package/lib/friends/sendFriendRequest.js +59 -0
  125. package/lib/friends/unfollow.js +58 -0
  126. package/lib/games/addDeveloperProduct.js +65 -0
  127. package/lib/games/checkDeveloperProductName.js +39 -0
  128. package/lib/games/configureGamePass.js +146 -0
  129. package/lib/games/getDeveloperProducts.js +51 -0
  130. package/lib/games/getGameInstances.js +31 -0
  131. package/lib/games/getGamePasses.js +39 -0
  132. package/lib/games/getGameRevenue.js +49 -0
  133. package/lib/games/getGameSocialLinks.js +45 -0
  134. package/lib/games/getGroupGames.js +30 -0
  135. package/lib/games/getPlaceInfo.js +48 -0
  136. package/lib/games/getUniverseInfo.js +51 -0
  137. package/lib/games/updateDeveloperProduct.js +69 -0
  138. package/lib/groups/changeRank.js +59 -0
  139. package/lib/groups/deleteWallPost.js +64 -0
  140. package/lib/groups/deleteWallPostsByUser.js +59 -0
  141. package/lib/groups/demote.js +25 -0
  142. package/lib/groups/exile.js +59 -0
  143. package/lib/groups/getAuditLog.js +67 -0
  144. package/lib/groups/getGroup.js +57 -0
  145. package/lib/groups/getGroupSocialLinks.js +44 -0
  146. package/lib/groups/getGroups.js +88 -0
  147. package/lib/groups/getJoinRequest.js +52 -0
  148. package/lib/groups/getJoinRequests.js +58 -0
  149. package/lib/groups/getPlayers.js +108 -0
  150. package/lib/groups/getRankInGroup.js +52 -0
  151. package/lib/groups/getRankNameInGroup.js +52 -0
  152. package/lib/groups/getRole.js +64 -0
  153. package/lib/groups/getRolePermissions.js +51 -0
  154. package/lib/groups/getRoles.js +56 -0
  155. package/lib/groups/getShout.js +49 -0
  156. package/lib/groups/getWall.js +59 -0
  157. package/lib/groups/groupPayout.js +103 -0
  158. package/lib/groups/handleJoinRequest.js +60 -0
  159. package/lib/groups/leaveGroup.js +60 -0
  160. package/lib/groups/onAuditLog.js +62 -0
  161. package/lib/groups/onJoinRequest.js +63 -0
  162. package/lib/groups/onJoinRequestHandle.js +105 -0
  163. package/lib/groups/onShout.js +57 -0
  164. package/lib/groups/onWallPost.js +58 -0
  165. package/lib/groups/promote.js +25 -0
  166. package/lib/groups/searchGroups.js +32 -0
  167. package/lib/groups/setGroupDescription.js +65 -0
  168. package/lib/groups/setGroupName.js +66 -0
  169. package/lib/groups/setRank.js +79 -0
  170. package/lib/groups/shout.js +65 -0
  171. package/lib/index.js +30 -0
  172. package/lib/internal/levelOneCopy.js +16 -0
  173. package/lib/internal/queue.js +61 -0
  174. package/lib/internal/timeout.js +30 -0
  175. package/lib/internal/wrap.js +78 -0
  176. package/lib/inventory/getCollectibles.js +31 -0
  177. package/lib/inventory/getInventory.js +32 -0
  178. package/lib/inventory/getInventoryById.js +31 -0
  179. package/lib/inventory/getOwnership.js +54 -0
  180. package/lib/inventory/getUAIDs.js +47 -0
  181. package/lib/itemconfiguration/getGroupAssets.js +32 -0
  182. package/lib/options.js +26 -0
  183. package/lib/party/onPartyDeleted.js +53 -0
  184. package/lib/party/onPartyInvite.js +53 -0
  185. package/lib/party/onPartyJoinedGame.js +53 -0
  186. package/lib/party/onPartyLeftGame.js +53 -0
  187. package/lib/party/onPartySelfJoined.js +53 -0
  188. package/lib/party/onPartySelfLeft.js +53 -0
  189. package/lib/party/onPartyUserJoined.js +53 -0
  190. package/lib/party/onPartyUserLeft.js +53 -0
  191. package/lib/premiumfeatures/getPremium.js +51 -0
  192. package/lib/presence/getPresences.js +63 -0
  193. package/lib/privatemessages/getMessages.js +60 -0
  194. package/lib/privatemessages/message.js +80 -0
  195. package/lib/privatemessages/onMessage.js +88 -0
  196. package/lib/thumbnails/getLogo.js +60 -0
  197. package/lib/thumbnails/getPlayerThumbnail.js +121 -0
  198. package/lib/thumbnails/getThumbnails.js +93 -0
  199. package/lib/trades/acceptTrade.js +58 -0
  200. package/lib/trades/canTradeWith.js +48 -0
  201. package/lib/trades/counterTrade.js +84 -0
  202. package/lib/trades/declineTrade.js +58 -0
  203. package/lib/trades/getTradeInfo.js +52 -0
  204. package/lib/trades/getTrades.js +37 -0
  205. package/lib/trades/sendTrade.js +82 -0
  206. package/lib/users/getBlurb.js +36 -0
  207. package/lib/users/getIdFromUsername.js +53 -0
  208. package/lib/users/getPlayerInfo.js +100 -0
  209. package/lib/users/getUsernameFromId.js +44 -0
  210. package/lib/users/onBlurbChange.js +46 -0
  211. package/lib/util/clearSession.js +32 -0
  212. package/lib/util/generalRequest.js +61 -0
  213. package/lib/util/getAction.js +45 -0
  214. package/lib/util/getCurrentUser.js +44 -0
  215. package/lib/util/getGeneralToken.js +52 -0
  216. package/lib/util/getHash.js +29 -0
  217. package/lib/util/getInputs.js +37 -0
  218. package/lib/util/getPageResults.js +89 -0
  219. package/lib/util/getSenderUserId.js +30 -0
  220. package/lib/util/getSession.js +38 -0
  221. package/lib/util/getVerification.js +60 -0
  222. package/lib/util/getVerificationInputs.js +31 -0
  223. package/lib/util/http.js +110 -0
  224. package/lib/util/jar.js +24 -0
  225. package/lib/util/refreshCookie.js +52 -0
  226. package/lib/util/relog.js +81 -0
  227. package/lib/util/setOptions.js +54 -0
  228. package/lib/util/shortPoll.js +102 -0
  229. package/lib/util/threaded.js +80 -0
  230. package/package.json +91 -3
  231. package/postinstall.js +1 -0
  232. package/settings.json +107 -0
  233. package/test/accountinformation.test.js +27 -0
  234. package/test/accountsettings.test.js +27 -0
  235. package/test/asset.test.js +81 -0
  236. package/test/assets/Great-White-Shark-Fin.rbxm +0 -0
  237. package/test/assets/KeyframeSequence.rbxm +0 -0
  238. package/test/avatar.test.js +164 -0
  239. package/test/badges.test.js +96 -0
  240. package/test/chat.test.js +104 -0
  241. package/test/datastore.test.js +105 -0
  242. package/test/develop.test.js +53 -0
  243. package/test/economy.test.js +137 -0
  244. package/test/friends.test.js +128 -0
  245. package/test/games.test.js +212 -0
  246. package/test/groups.test.js +311 -0
  247. package/test/inventory.test.js +98 -0
  248. package/test/itemconfiguration.test.js +24 -0
  249. package/test/premiumfeatures.test.js +17 -0
  250. package/test/presence.test.js +25 -0
  251. package/test/privatemessages.test.js +33 -0
  252. package/test/thumbnails.test.js +53 -0
  253. package/test/users.test.js +68 -0
  254. package/tutorials/Authentication.md +75 -0
  255. package/tutorials/Event Emitters.md +26 -0
  256. package/tutorials/Promises.md +86 -0
  257. package/tutorials/VPS Authentication.md +72 -0
  258. package/typings/index.d.ts +2525 -0
  259. package/typings/jsDocs.ts +1927 -0
@@ -0,0 +1,2525 @@
1
+ // Type definitions for noblox.js@4.8.0-0
2
+ // Authored by Gamenew09 w/ changes by suufi
3
+
4
+ declare module "noblox.js" {
5
+ // Interfaces/Types
6
+ import * as events from "events";
7
+ import * as stream from "stream";
8
+
9
+ /**
10
+ * request
11
+ */
12
+ interface CookieJar {
13
+ session?: string;
14
+ }
15
+
16
+ /**
17
+ * NobloxOptions for setOptions, based from settings.json
18
+ */
19
+ interface NobloxOptions {
20
+ /** Minimizes data usage and speed up requests by only saving session cookies, disable if you need other cookies to be saved as well. (Default: true) */
21
+ session_only: boolean;
22
+
23
+ /** This is usually used for functions that have to receive a lot of pages at once. Only this amount will be queued up as to preserve memory, make this as high as possible for fastest responses (although it will be somewhat limited by maxSockets). (Default: 50) */
24
+ max_threads: number;
25
+
26
+ /** Timeout for http requests. This is necessary for functions that make a very large number of requests, where it is possible some simply won't connect. (Default: 10000) */
27
+ timeout: number;
28
+
29
+ event: {
30
+ /** Maximum number of consecutive retries after an event times out or fails in some other way. (Default: 5) */
31
+ maxRetries: number;
32
+ /** Maximum time (in milliseconds) a request can take. If your server has extremely high latency you may have to raise this. (Default: 10000) */
33
+ timeout: number;
34
+ /** The poll time in milliseconds by default. A lower number will detect changes much quicker but will stress the network, a higher one does the opposite. (Default: 10000) */
35
+ defaultDelay: number;
36
+ /** The poll time in milliseconds to check for new audit log entries. A lower number will detect changes much quicker but will stress the network, a higher one does the opposite. (Default: 10000) */
37
+ onAuditLog: number;
38
+ /** The poll time in milliseconds to check for new wall posts. A lower number will detect changes much quicker but will stress the network, a higher one does the opposite. (Default: 10000) */
39
+ onWallPost: number;
40
+ /** The poll time in milliseconds to check for new join requests. A lower number will detect changes much quicker but will stress the network, a higher one does the opposite. (Default: 10000) */
41
+ onJoinRequestHandle: number;
42
+ /** The poll time in milliseconds to check for new join requests. A lower number will detect changes much quicker but will stress the network, a higher one does the opposite. (Default: 10000) */
43
+ onJoinRequest: number;
44
+ /** The poll time in milliseconds to check for a new shout message. A lower number will detect changes much quicker but will stress the network, a higher one does the opposite. (Default: 10000) */
45
+ onShout: number;
46
+ /** The poll time in milliseconds to check for a new blurb message. A lower number will detect changes much quicker but will stress the network, a higher one does the opposite. (Default: 10000) */
47
+ onBlurbChange: number;
48
+ /** The poll time in milliseconds to check for new transaction log entries. A lower number will detect changes much quicker but will stress the network, a higher one does the opposite. This endpoint has a low rate limit. (Default: 30000) */
49
+ onGroupTransaction: number;
50
+ }
51
+
52
+ thumbnail: {
53
+ /** Maximum number of retries to retrieve a pending thumbnail, rare, but occurs with uncached users (Roblox's cache) (Default: 2) */
54
+ maxRetries: number;
55
+ /** The time to wait between consecutive retries of retrieving pending thumbnails. (Default: 500) */
56
+ retryDelay: number;
57
+
58
+ failedUrl: {
59
+ /** The image URL to provide when an asset thumbnail is still pending; defaults to Roblox moderation icon via noblox.js's GitHub repo at https://noblox.js.org/moderatedThumbnails/moderatedThumbnail_{size}.png */
60
+ pending: string;
61
+ /** The image URL to provide when an asset thumbnail has been moderated by Roblox; defaults to Roblox moderation icon via noblox.js's GitHub repo at https://noblox.js.org/moderatedThumbnails/moderatedThumbnail_{size}.png */
62
+ blocked: string;
63
+ }
64
+ }
65
+
66
+ queue: {
67
+ Message: {
68
+ /** Although messages do have a floodcheck, it is not instituted immediately so this is disabled by default. If you are sending a lot of messages set a delay around 10-15 seconds (10000-15000). (Default: 0) */
69
+ delay: number
70
+ }
71
+ }
72
+
73
+ cache: {
74
+ /** XCSRF tokens expire 30 minutes after being created. Until they expire, however, no new tokens can be made. Sometimes an XCSRF token has already been created for the user so the server doesn't know when to collect a new one. During transitions some requests may use invalid tokens. For now, new XCSRF tokens are automatically retrieved when cached ones get rejected. */
75
+ XCSRF: {
76
+ /** Default: 1800 */
77
+ expire: number | boolean;
78
+ /** Default: false */
79
+ refresh: number | boolean;
80
+ },
81
+
82
+ /** Verification tokens seem to last extremely long times. */
83
+ Verify: {
84
+ /** Default: 7200 */
85
+ expire: number | boolean;
86
+ /** Default: 3600 */
87
+ refresh: number | boolean;
88
+ },
89
+
90
+ /** This should be fine unless your group changes its ranks often. */
91
+ Roles: {
92
+ /** Default: 600 */
93
+ expire: number | boolean;
94
+ /** Default: true */
95
+ refresh: number | boolean;
96
+ },
97
+
98
+ /** Disable this completely if you don't plan on ever changing your exile bot's rank. */
99
+ RolesetId: {
100
+ /** Default: 86400 */
101
+ expire: number | boolean;
102
+ /** Default: false */
103
+ refresh: number | boolean;
104
+ },
105
+
106
+ /** Disabled by default for security (price checks). If you are only working with ROBLOX assets, however, you can set this to something high (since ROBLOX product info rarely changes). */
107
+ Product: {
108
+ /** Default: false */
109
+ expire: number | boolean;
110
+ /** Default: false */
111
+ refresh: number | boolean;
112
+ },
113
+
114
+ /** Caches a user's username based on their ID. It is not on by default because it is an uncontrollable change but the option is there to cache it if you would like. */
115
+ NameFromID: {
116
+ /** Default: false */
117
+ expire: number | boolean;
118
+ /** Default: false */
119
+ refresh: number | boolean;
120
+ },
121
+
122
+ /** Permanent cache for a user's ID based on their name. There is no reason this would ever change (changing names would re-match it and old names cannot be reused by other accounts). Only disable if you want this to match current names only. */
123
+ IDFromName: {
124
+ /** Default: true */
125
+ expire: number | boolean;
126
+ /** Default: false */
127
+ refresh: number | boolean;
128
+ },
129
+
130
+ /** Permanent cache for the sender's user ID. This should literally never change. */
131
+ SenderId: {
132
+ /** Default: true */
133
+ expire: number | boolean;
134
+ /** Default: false */
135
+ refresh: number | boolean;
136
+ },
137
+
138
+ /** Caches rank by user ID. Changes cannot be anticipated so this is not enabled by default. */
139
+ Rank: {
140
+ /** Default: false */
141
+ expire: number | boolean;
142
+ /** Default: false */
143
+ refresh: number | boolean;
144
+ }
145
+ }
146
+ }
147
+
148
+ /// Asset
149
+
150
+ /**
151
+ * shirts = 11
152
+ * pants = 12
153
+ * decals = 13
154
+ */
155
+ type UploadItemAssetType = 11 | 12 | 13;
156
+
157
+ interface ProductInfoCreator {
158
+ Id: number;
159
+ Name: string;
160
+ HasVerifiedBadge: boolean;
161
+ }
162
+
163
+ interface IGroupPartial {
164
+ Name: string,
165
+ Id: number,
166
+ EmblemUrl: string,
167
+ MemberCount: number,
168
+ Rank: number,
169
+ Role: string,
170
+ RoleId: number,
171
+ IsPrimary: boolean,
172
+ }
173
+
174
+ interface GroupGameInfo {
175
+ id: number;
176
+ name: string;
177
+ description?: string;
178
+ creator: { id: number; type: string; };
179
+ rootPlace: { id: number; type: string; };
180
+ created: Date;
181
+ updated: Date;
182
+ placeVisits: number;
183
+ }
184
+
185
+ interface GroupAssetInfo {
186
+ assetId: number;
187
+ name: string;
188
+ }
189
+
190
+ interface ProductInfo {
191
+ TargetId: number;
192
+ ProductType?: string;
193
+ AssetId: number;
194
+ ProductId: number;
195
+ Name: string
196
+ Description: string;
197
+ AssetTypeId: number;
198
+ Creator: ProductInfoCreator;
199
+ IconImageAssetId: number;
200
+ Created: Date;
201
+ Updated: Date;
202
+ PriceInRobux?: number;
203
+ PriceInTickets?: number;
204
+ Sales: number;
205
+ IsNew: boolean;
206
+ IsForSale: boolean;
207
+ IsPublicDomain: boolean;
208
+ IsLimited: boolean;
209
+ IsLimitedUnique: boolean;
210
+ Remaining?: number;
211
+ MinimumMembershipLevel: number;
212
+ ContentRatingTypeId: number;
213
+ SaleAvailabilityLocations?: string[];
214
+ SaleLocation?: string;
215
+ CollectibleItemId?: number;
216
+ }
217
+
218
+ type GamePassProductInfo = Omit<ProductInfo, "ContentRatingTypeId" | "SaleAvailabilityLocations" | "SaleLocation" | "CollectibleItemId">;
219
+
220
+ interface BuyProductInfo {
221
+ ProductId: number;
222
+ Creator: { Id: number };
223
+ PriceInRobux: number;
224
+ UserAssetId: number;
225
+ }
226
+
227
+ interface PriceRange {
228
+ high: number;
229
+ low: number;
230
+ }
231
+
232
+ interface BuyAssetResponse {
233
+ productId: number;
234
+ price: number;
235
+ }
236
+
237
+ interface ChartDataPointResponse {
238
+ value?: number;
239
+ date?: Date;
240
+ }
241
+
242
+ interface ResaleDataResponse {
243
+ assetStock?: number;
244
+ sales?: number;
245
+ numberRemaining?: number;
246
+ recentAveragePrice?: number;
247
+ originalPrice?: number;
248
+ priceDataPoints?: ChartDataPointResponse[];
249
+ volumeDataPoints?: ChartDataPointResponse[];
250
+ }
251
+
252
+ interface ResellerAgent {
253
+ id: number;
254
+ type: "User" | "Group";
255
+ name: string;
256
+ }
257
+
258
+ interface ResellerData {
259
+ userAssetId: number;
260
+ seller: ResellerAgent;
261
+ price: number;
262
+ serialNumber?: number;
263
+ }
264
+
265
+ interface ThumbnailRequest {
266
+ requestId?: string;
267
+ targetId?: number;
268
+ token?: string;
269
+ alias?: string;
270
+ type: 'Avatar' | 'AvatarHeadShot' | 'GameIcon' | 'BadgeIcon' | 'GameThumbnail' | 'GamePass' | 'Asset' | 'BundleThumbnail' | 'Outfit' | 'GroupIcon' | 'DeveloperProduct' | 'AutoGeneratedAsset' | 'AvatarBust' | 'PlaceIcon' | 'AutoGeneratedGameIcon' | 'ForceAutoGeneratedGameIcon';
271
+ size: string;
272
+ format?: 'png' | 'jpeg';
273
+ isCircular?: boolean;
274
+ }
275
+
276
+ interface ThumbnailData {
277
+ requestId?: string;
278
+ errorCode: number;
279
+ errorMessage: string;
280
+ targetId: number;
281
+ state: "Completed" | "Pending" | "Blocked";
282
+ imageUrl?: string;
283
+ }
284
+
285
+ interface UploadItemResponse {
286
+ id: number;
287
+ }
288
+
289
+ interface UploadModelResponse {
290
+ AssetId: number;
291
+ AssetVersionId: number;
292
+ }
293
+
294
+ interface UploadModelItemOptions {
295
+ name: string;
296
+ description?: string;
297
+ copyLocked?: boolean;
298
+ allowComments?: boolean;
299
+ groupId?: number;
300
+ }
301
+
302
+ interface ConfigureItemResponse {
303
+ name: string;
304
+ assetId: number;
305
+ description?: string;
306
+ price?: number;
307
+ isCopyingAllowed?: boolean;
308
+ }
309
+
310
+ /// Avatar
311
+
312
+ interface AssetTypeRulesModel {
313
+ min: number;
314
+ max: number;
315
+ increment: number;
316
+ }
317
+
318
+ interface AvatarRulesScales {
319
+ [scalename: string]: AssetTypeRulesModel;
320
+ }
321
+
322
+ interface WearableAssetType {
323
+ maxNumber: number;
324
+ id: number;
325
+ name: string;
326
+ }
327
+
328
+ interface BodyColorModel {
329
+ brickColorId: number;
330
+ hexColor: string;
331
+ name: string;
332
+ }
333
+
334
+ interface DefaultClothingAssetLists {
335
+ defaultShirtAssetIds: number[];
336
+ defaultPantAssetIds: number[];
337
+ }
338
+
339
+ interface AvatarRules {
340
+ playerAvatarTypes: string[];
341
+ scales: AvatarRulesScales;
342
+ wearableAssetTypes: WearableAssetType[];
343
+ bodyColorsPalette: BodyColorModel[];
344
+ basicBodyColorsPalette: BodyColorModel[];
345
+ minimumDeltaEBodyColorDifference: number;
346
+ proportionsAndBodyTypeEnabledForUser: boolean;
347
+ defaultClothingAssetLists: DefaultClothingAssetLists;
348
+ bundlesEnabledForUser: boolean;
349
+ emotesEnabledForUser: boolean;
350
+ }
351
+
352
+ interface AssetIdList {
353
+ assetIds: number[];
354
+ }
355
+
356
+ interface AvatarScale {
357
+ height: number;
358
+ width: number;
359
+ head: number;
360
+ depth: number;
361
+ proportion: number;
362
+ bodyType: number;
363
+ }
364
+
365
+ interface AvatarBodyColors {
366
+ headColorId: number;
367
+ torsoColorId: number;
368
+ rightArmColorId: number;
369
+ leftArmColorId: number;
370
+ rightLegColorId: number;
371
+ leftLegColorId: number;
372
+ }
373
+
374
+ interface AvatarAssetType {
375
+ id: number;
376
+ name: string;
377
+ }
378
+
379
+ interface AvatarAsset {
380
+ id: number;
381
+ name: string;
382
+ assetType: AvatarAssetType;
383
+ }
384
+
385
+ type PlayerAvatarType = "R6" | "R15";
386
+
387
+ interface AvatarInfo {
388
+ scales: AvatarScale;
389
+ playerAvatarType: PlayerAvatarType;
390
+ bodyColors: AvatarBodyColors;
391
+ assets: AvatarAsset[];
392
+ defaultShirtApplied: boolean;
393
+ defaultPantsApplied: boolean;
394
+ }
395
+
396
+ type RecentItemListType = "All" | "Clothing" | "BodyParts" | "AvatarAnimations" | "Accessories" | "Outfits" | "Gear";
397
+ type RecentItemType = "Asset" | "Outfit";
398
+
399
+ interface AssetRecentItem {
400
+ id: number;
401
+ name: string;
402
+ type: RecentItemType;
403
+ assetType: AvatarAssetType;
404
+ isEditable?: boolean;
405
+ }
406
+
407
+ interface AssetRecentItemsResult {
408
+ data: AssetRecentItem[];
409
+ total: number;
410
+ }
411
+
412
+ interface AvatarOutfitDetails {
413
+ id: number;
414
+ name: string;
415
+ assets: AvatarAsset[];
416
+ bodyColors: AvatarBodyColors[];
417
+ scale: AvatarScale;
418
+ playerAvatarType: PlayerAvatarType;
419
+ isEditable: boolean;
420
+ }
421
+
422
+ interface AvatarOutfit {
423
+ id: number;
424
+ name: string;
425
+ isEditable: boolean;
426
+ }
427
+
428
+ interface GetOutfitsResult {
429
+ data: AvatarOutfit[];
430
+ total: number;
431
+ }
432
+
433
+ /// Chat
434
+
435
+ interface RejectedParticipant {
436
+ rejectedReason: string;
437
+ type: string;
438
+ targetId: number;
439
+ name: string;
440
+ displayName: string;
441
+ }
442
+
443
+ interface ConversationAddResponse {
444
+ conversationId: number;
445
+ rejectedParticipants: RejectedParticipant[];
446
+ resultType: string;
447
+ statusMessage: string;
448
+ }
449
+
450
+ interface ConversationRemoveResponse {
451
+ conversationId: number;
452
+ resultType: string;
453
+ statusMessage: string;
454
+ }
455
+
456
+ interface ConversationRenameResponse {
457
+ conversationTitle: string;
458
+ resultType: string;
459
+ title: ChatConversationTitle;
460
+ statusMessage: string;
461
+ }
462
+
463
+ interface SendChatResponse {
464
+ content: string;
465
+ filteredForRecievers: boolean;
466
+ messageId: string;
467
+ sent: string;
468
+ messageType: string;
469
+ resultType: string;
470
+ statusMessage: string;
471
+ }
472
+
473
+ interface UpdateTypingResponse {
474
+ statusMessage: string;
475
+ }
476
+
477
+ interface StartGroupConversationResponse {
478
+ conversation: ChatConversation;
479
+ rejectedParticipants: RejectedParticipant[];
480
+ resultType: string;
481
+ statusMessage: string;
482
+ }
483
+
484
+ interface ChatSettings {
485
+ /**
486
+ * Is chat enabled for the user.
487
+ */
488
+ chatEnabled: boolean;
489
+ /**
490
+ * Was the Last ChatMessage Sent within the last x days or the account was created in the last x days? Note: user is active by default unless he does not chat for more than x days after account creation
491
+ */
492
+ isActiveChatUser: boolean;
493
+ }
494
+
495
+ interface ChatMessage {
496
+ id: string;
497
+ senderType: "User" | "System";
498
+ sent: string;
499
+ read: boolean;
500
+ messageType: "PlainText" | "Link" | "EventBased";
501
+ decorators: string[];
502
+ senderTargetId: number;
503
+ content: string;
504
+ link: ChatMessageLink;
505
+ eventBased: ChatMessageEventBased;
506
+ }
507
+
508
+ interface ChatMessageLink {
509
+ type: "Game";
510
+ game: ChatMessageGameLink;
511
+ }
512
+
513
+ interface ChatMessageGameLink {
514
+ universeId: number;
515
+ }
516
+
517
+ interface ChatMessageEventBased {
518
+ type: "SetConversationUniverse";
519
+ setConversationUniverse: ChatMessageSetConversationUniverseEventBased;
520
+ }
521
+
522
+ interface ChatMessageSetConversationUniverseEventBased {
523
+ actorUserId: number;
524
+ universeId: number;
525
+ }
526
+
527
+ interface ChatConversation {
528
+ id: number;
529
+ title: string;
530
+ initiator: ChatParticipant;
531
+ hasUnreadMessages: boolean;
532
+ participants: ChatParticipant[];
533
+ conversationType: "OneToOneConversation" | "MultiUserConversation" | "CloudEditConversation";
534
+ conversationTitle: ChatConversationTitle;
535
+ lastUpdated: Date;
536
+ conversationUniverse: ChatConversationUniverse;
537
+ }
538
+
539
+ interface ChatParticipant {
540
+ type: "User" | "System";
541
+ targetId: number;
542
+ name: string;
543
+ displayName: string;
544
+ }
545
+
546
+ interface ChatConversationTitle {
547
+ titleForViewer: string;
548
+ isDefaultTitle: boolean;
549
+ }
550
+
551
+ interface ChatConversationUniverse {
552
+ universeId: number;
553
+ rootPlaceId: number;
554
+ }
555
+
556
+ type ChatFeatureNames = "LuaChat" | "ConversationUniverse" | "PlayTogether" | "Party" | "GameLink" | "OldPlayTogether";
557
+
558
+ interface GetRolloutSettingsResult {
559
+ rolloutFeatures: ChatRolloutFeature[];
560
+ }
561
+
562
+ interface ChatRolloutFeature {
563
+ featureName: ChatFeatureNames;
564
+ isRolloutEnabled: boolean;
565
+ }
566
+
567
+ interface GetUnreadConversationCountResult {
568
+ count: number;
569
+ }
570
+
571
+ interface ChatConversationWithMessages {
572
+ conversationId: number;
573
+ chatMessages: ChatMessage[];
574
+ }
575
+
576
+ interface OnUserTypingChatEvent {
577
+ UserId: number;
578
+ ConversationId: number;
579
+ IsTyping: boolean;
580
+ }
581
+
582
+ /// Game
583
+ interface GameInstance {
584
+ id: string;
585
+ maxPlayers: number;
586
+ playing: number;
587
+ playerTokens: string[];
588
+ fps: number;
589
+ ping: number;
590
+ }
591
+
592
+ interface GamePassResponse {
593
+ gamePassId: number,
594
+ name?: string,
595
+ description?: string,
596
+ price?: number,
597
+ isForSale?: boolean,
598
+ iconChanged?: boolean
599
+ }
600
+
601
+ type SocialLinkResponse = {
602
+ id: number;
603
+ type: 'Facebook' | 'Twitter' | 'YouTube' | 'Twitch' | 'GooglePlus' | 'Discord' | 'RobloxGroup' | 'Amazon';
604
+ url: string;
605
+ title: string;
606
+ }
607
+
608
+ interface DeveloperProduct {
609
+ ProductId: number,
610
+ DeveloperProductId: number,
611
+ Name: string,
612
+ Description: string,
613
+ IconImageAssetId: number,
614
+ displayName: string,
615
+ displayDescription: string,
616
+ displayIcon: number,
617
+ PriceInRobux: number
618
+ }
619
+
620
+ interface DeveloperProductsResult {
621
+ DeveloperProducts: DeveloperProduct[],
622
+ FinalPage: boolean,
623
+ PageSize: number
624
+ }
625
+
626
+ interface DeveloperProductAddResult {
627
+ universeId: number,
628
+ name: string,
629
+ priceInRobux: number,
630
+ description?: string,
631
+ productId: string
632
+ }
633
+
634
+ interface CheckDeveloperProductNameResult {
635
+ Success: boolean;
636
+ /**
637
+ * When success is true: "Name available"
638
+ * When success is false, you can get: "Product name already exists"
639
+ */
640
+ Message: string;
641
+ }
642
+
643
+ interface GamePassData {
644
+ id: number;
645
+ name: string;
646
+ displayName: string;
647
+ productId?: number;
648
+ price?: number;
649
+ }
650
+
651
+ type AvatarType = "MorphToR6" | "MorphToR15" | "PlayerChoice"
652
+ type AnimationType = "Standard" | "PlayerChoice"
653
+ type CollisionType = "InnerBox" | "OuterBox"
654
+ type JointType = "Standard" | "ArtistIntent"
655
+
656
+ type Genre = "All" | "Tutorial" | "Scary" | "TownAndCity" | "War" | "Funny" | "Fantasy" | "Adventure" | "SciFi" | "Pirate" | "FPS" | "RPG" | "Sports" | "Ninja" | "WildWest"
657
+ type PlayableDevices = "Computer" | "Phone" | "Tablet" | "Console"
658
+ type Regions = "Unknown" | "China"
659
+
660
+ interface UniverseAsset {
661
+ assetID: number,
662
+ assetTypeID: number,
663
+ isPlayerChoice: boolean
664
+ }
665
+
666
+ interface UniversePermissions {
667
+ IsThirdPartyTeleportAllowed?: boolean;
668
+ IsThirdPartyAssetAllowed?: boolean;
669
+ IsThirdPartyPurchaseAllowed?: boolean;
670
+ }
671
+
672
+ interface UniverseSettings {
673
+ allowPrivateServers?: boolean;
674
+ privateServerPrice?: number;
675
+
676
+ name?: string;
677
+ description?: string;
678
+
679
+ universeAvatarType?: AvatarType;
680
+ universeAnimationType?: AnimationType;
681
+ universeCollisionType?: CollisionType;
682
+ universeJointPositioningType?: JointType;
683
+
684
+ isArchived?: boolean;
685
+ isFriendsOnly?: boolean;
686
+
687
+ genre?: Genre;
688
+
689
+ playableDevices?: Array<PlayableDevices>;
690
+ universeAvatarAssetOverrides?: Array<UniverseAsset>;
691
+
692
+ isForSale?: boolean;
693
+ price?: number;
694
+
695
+ universeAvatarMinScales?: AvatarScale
696
+ universeAvatarMaxScales?: AvatarScale
697
+
698
+ studioAccessToApisAllowed?: boolean;
699
+ permissions?: UniversePermissions;
700
+
701
+ optInRegions?: Array<Regions>;
702
+ }
703
+
704
+ interface UpdateUniverseResponse extends UniverseSettings {
705
+ id: number;
706
+ }
707
+
708
+ interface UniverseCreator {
709
+ id: number;
710
+ name: string;
711
+ type: string;
712
+ isRNVAccount: boolean;
713
+ }
714
+
715
+ interface UniverseInformation {
716
+ id: number;
717
+ rootPlaceId: number;
718
+ name: string;
719
+ description: string;
720
+ creator: UniverseCreator;
721
+ price: number;
722
+ allowedGearGenres: string[];
723
+ allowedGearCategories: string[];
724
+ isGenreEnforced: boolean;
725
+ copyingAllowed: boolean;
726
+ playing: number;
727
+ visits: number;
728
+ maxPlayers: number;
729
+ created: Date;
730
+ updated: Date;
731
+ studioAccessToApisAllowed: boolean;
732
+ createVipServersAllowed: boolean;
733
+ universeAvatarType: AvatarType;
734
+ genre: Genre;
735
+ isAllGenre: boolean;
736
+ isFavoritedByUser: boolean;
737
+ favoritedCount: number;
738
+ }
739
+
740
+ interface PlaceInformation {
741
+ placeId: number;
742
+ name: string;
743
+ sourceName: string;
744
+ sourceDescription: string;
745
+ url: string;
746
+ builder: string;
747
+ builderId: number;
748
+ hasVerifiedBadge: boolean;
749
+ isPlayable: boolean;
750
+ reasonProhibited: string;
751
+ universeId: number;
752
+ universeRootPlaceId: number;
753
+ price: number;
754
+ imageToken: string;
755
+ }
756
+
757
+ /// Group
758
+
759
+ type GroupIconSize = "150x150" | "420x420"
760
+ type GroupIconFormat = "Png"
761
+
762
+ interface Role {
763
+ name: string;
764
+ memberCount?: number;
765
+ rank: number;
766
+ id: number;
767
+ }
768
+
769
+ interface RoleWithDescription {
770
+ name: string;
771
+ memberCount?: number;
772
+ rank: number;
773
+ id: number;
774
+ description: string;
775
+ }
776
+
777
+ interface GroupPostsPermissions {
778
+ viewWall: boolean;
779
+ postToWall: boolean;
780
+ deleteFromWall: boolean;
781
+ viewStatus: boolean;
782
+ postToStatus: boolean;
783
+ }
784
+
785
+ interface GroupMembershipPermissions {
786
+ changeRank: boolean;
787
+ inviteMembers: boolean;
788
+ removeMembers: boolean;
789
+ }
790
+
791
+ interface GroupManagementPermissions {
792
+ manageRelationships: boolean;
793
+ manageClan: boolean;
794
+ viewAuditLogs: boolean;
795
+ }
796
+
797
+ interface GroupEconomyPermissions {
798
+ spendGroupFunds: boolean;
799
+ advertiseGroup: boolean;
800
+ createItems: boolean;
801
+ manageItems: boolean;
802
+ addGroupPlaces: boolean;
803
+ manageGroupGames: boolean;
804
+ viewGroupPayouts: boolean;
805
+ }
806
+
807
+ interface RolePermissionsBody {
808
+ groupPostsPermissions: GroupPostsPermissions;
809
+ groupMembershipPermissions: GroupMembershipPermissions;
810
+ groupManagementPermissions: GroupManagementPermissions;
811
+ groupEconomyPermissions: GroupEconomyPermissions;
812
+ }
813
+
814
+ interface RolePermissions {
815
+ groupId: number;
816
+ role: RoleWithDescription;
817
+ permissions: RolePermissionsBody
818
+ }
819
+
820
+ interface ChangeRankResult {
821
+ newRole: Role;
822
+ oldRole: Role;
823
+ }
824
+
825
+ interface Group {
826
+ id: number;
827
+ name: string;
828
+ description: string;
829
+ owner: GroupUser;
830
+ shout?: GroupShout;
831
+ memberCount: number;
832
+ isBuildersClubOnly: boolean;
833
+ publicEntryAllowed: boolean;
834
+ isLocked: boolean;
835
+ }
836
+
837
+ interface GroupSearchItem {
838
+ id: number;
839
+ name: string;
840
+ description: string;
841
+ memberCount: number;
842
+ publicEntryAllowed: boolean;
843
+ created: Date;
844
+ updated: Date;
845
+ }
846
+
847
+ interface GroupView {
848
+ __VIEWSTATE: string;
849
+ __VIEWSTATEGENERATOR: string;
850
+ __EVENTVALIDATION: string;
851
+ __RequestVerificationToken: string;
852
+ }
853
+
854
+ interface GroupUser {
855
+ userId: number;
856
+ username: string;
857
+ displayName: string;
858
+ hasVerifiedBadge?: boolean;
859
+ }
860
+
861
+ interface GroupShout {
862
+ body: string;
863
+ poster: GroupUser;
864
+ created: Date;
865
+ updated: Date;
866
+ }
867
+
868
+ interface GroupDescriptionResult {
869
+ newDescription: string
870
+ }
871
+
872
+ interface GroupNameResult {
873
+ newName: string
874
+ }
875
+
876
+ interface AuditItemActor {
877
+ user: GroupUser;
878
+ role: Role;
879
+ }
880
+
881
+ interface AuditItem {
882
+ actor: AuditItemActor;
883
+ actionType: string;
884
+ description: object;
885
+ created: Date;
886
+ }
887
+
888
+ interface AuditPage {
889
+ data: AuditItem[];
890
+ nextPageCursor?: string;
891
+ previousPageCursor?: string;
892
+ }
893
+
894
+ interface TransactionAgent {
895
+ id: number;
896
+ type: string;
897
+ name: string;
898
+ }
899
+
900
+ interface TransactionDetails {
901
+ id: number;
902
+ name: string;
903
+ type: string;
904
+ }
905
+
906
+ interface TransactionCurrency {
907
+ amount: number;
908
+ type: string;
909
+ }
910
+
911
+ interface TransactionItem {
912
+ id: number;
913
+ transactionType?: string;
914
+ created: Date;
915
+ isPending: boolean;
916
+ agent: TransactionAgent;
917
+ details?: TransactionDetails;
918
+ currency: TransactionCurrency;
919
+ }
920
+
921
+ interface GroupJoinRequester {
922
+ userId: number;
923
+ username: string;
924
+ displayName: string;
925
+ }
926
+
927
+ interface GroupJoinRequest {
928
+ requester: GroupJoinRequester;
929
+ created: Date;
930
+ }
931
+
932
+ interface GroupJoinRequestsPage {
933
+ previousPageCursor?: string;
934
+ nextPageCursor?: string;
935
+ data: GroupJoinRequest[];
936
+ }
937
+
938
+ interface RevenueSummaryResponse {
939
+ recurringRobuxStipend?: number;
940
+ itemSaleRobux?: number;
941
+ purchasedRobux?: number;
942
+ tradeSystemRobux?: number;
943
+ pendingRobux?: number;
944
+ groupPayoutRobux?: number;
945
+ individualToGroupRobux?: number;
946
+ premiumPayouts?: number;
947
+ groupPremiumPayouts?: number;
948
+ adjustmentRobux?: number;
949
+ }
950
+
951
+ interface WallPost {
952
+ id: number;
953
+ poster: {
954
+ user: GroupUser;
955
+ role: Role;
956
+ };
957
+ body: string;
958
+ created: Date;
959
+ updated: Date;
960
+ }
961
+
962
+ interface WallPostPage {
963
+ previousPageCursor?: string;
964
+ nextPageCursor?: string;
965
+ data: WallPost[];
966
+ }
967
+
968
+ /// Party
969
+
970
+ interface PartyData {
971
+ PartyId: number;
972
+ PartyType: string;
973
+ }
974
+
975
+ /// User
976
+
977
+ /**
978
+ * 0 = Inbox
979
+ * 1 = Sent Messages
980
+ * 3 = Archived Messages
981
+ */
982
+ type PrivateMessageTab = 0 | 1 | 3;
983
+
984
+ /**
985
+ * 0 = Offline
986
+ * 1 = Online
987
+ * 2 = InGame
988
+ * 3 = Studio
989
+ */
990
+ type UserPresenceType = 0 | 1 | 2 | 3;
991
+
992
+ // https://noblox.js.org/thumbnailSizes.png | Archived: https://i.imgur.com/UwiKqjs.png
993
+ type BodySizes = 30 | 48 | 60 | 75 | 100 | 110 | 140 | 150 | 180 | 250 | 352 | 420 | 720 | "30x30" | "48x48" | "60x60" | "75x75" | "100x100" | "110x110" | "140x140" | "150x150" | "150x200" | "180x180" | "250x250" | "352x352" | "420x420" | "720x720";
994
+ type BustSizes = 50 | 60 | 75 | "50x50" | "60x60" | "75x75"
995
+ type HeadshotSizes = 48 | 50 | 60 | 75 | 100 | 110 | 150 | 180 | 352 | 420 | 720 | "48x48" | "50x50" | "60x60" | "75x75" | "100x100" | "110x110" | "150x150" | "180x180" | "352x352" | "420x420" | "720x720";
996
+
997
+ interface LoggedInUserData {
998
+ UserID: number,
999
+ UserName: string,
1000
+ RobuxBalance: number,
1001
+ TicketsBalance: number,
1002
+ ThumbnailUrl: string,
1003
+ IsAnyBuildersClubMember: boolean,
1004
+ IsPremium: boolean
1005
+ }
1006
+
1007
+ interface UserLoginApiData {
1008
+ userId: number;
1009
+ }
1010
+
1011
+ interface AvatarEntry {
1012
+ url: string;
1013
+ final: boolean;
1014
+ }
1015
+
1016
+ interface UserStatus {
1017
+ online: boolean;
1018
+ lastSeen: Date;
1019
+ }
1020
+
1021
+ interface FriendRequestEntry {
1022
+ description: string;
1023
+ created: Date;
1024
+ isBanned: boolean;
1025
+ id: number;
1026
+ name: string;
1027
+ displayName: string;
1028
+ }
1029
+
1030
+ interface FriendRequestsPage {
1031
+ previousPageCursor?: string;
1032
+ nextPageCursor?: string;
1033
+ data: FriendRequestEntry[];
1034
+ }
1035
+
1036
+ interface FriendEntry {
1037
+ created: Date;
1038
+ id: number;
1039
+ isBanned: boolean;
1040
+ isDeleted: boolean;
1041
+ isOnline?: boolean;
1042
+ name: string;
1043
+ description?: string;
1044
+ displayName: string;
1045
+ externalAppDisplayName?: string;
1046
+ friendFrequentRank: number;
1047
+ friendFrequentScore: number;
1048
+ presenceType?: UserPresenceType;
1049
+ }
1050
+
1051
+ interface Friends {
1052
+ data: FriendEntry[];
1053
+ }
1054
+
1055
+ interface FollowEntry {
1056
+ isDeleted: false;
1057
+ id: number;
1058
+ name: string;
1059
+ description: string;
1060
+ created: Date;
1061
+ displayName: string;
1062
+ }
1063
+
1064
+ interface FollowingsPage {
1065
+ previousPageCursor?: string;
1066
+ nextPageCursor?: string;
1067
+ data: FollowEntry[];
1068
+ }
1069
+
1070
+ interface FollowersPage {
1071
+ previousPageCursor?: string;
1072
+ nextPageCursor?: string;
1073
+ data: FollowEntry[];
1074
+ }
1075
+
1076
+ //
1077
+
1078
+ interface PrivateMessagesPage {
1079
+ collection: PrivateMessage[];
1080
+ totalPages: number;
1081
+ totalCollectionSize: number;
1082
+ pageNumber: number;
1083
+ }
1084
+
1085
+ //
1086
+
1087
+ interface UserEntry {
1088
+ userId: number;
1089
+ name: string;
1090
+ displayName: string;
1091
+ }
1092
+
1093
+ interface PrivateMessageParent {
1094
+ page: number;
1095
+ }
1096
+
1097
+ interface PrivateMessage {
1098
+ id: number;
1099
+ sender: UserEntry;
1100
+ recipient: UserEntry;
1101
+ subject: string;
1102
+ body: string;
1103
+ created: Date;
1104
+ updated: Date;
1105
+ isRead: boolean;
1106
+ isSystemMessage: boolean;
1107
+ isReportAbuseDisplayed: boolean;
1108
+ parent: PrivateMessageParent;
1109
+ }
1110
+
1111
+ interface NotificationMessage {
1112
+ type: string;
1113
+ [key: string]: any;
1114
+ }
1115
+
1116
+ type FriendRequest = number;
1117
+
1118
+ interface UserPresence {
1119
+ userPresenceType?: UserPresenceType;
1120
+ lastLocation?: string;
1121
+ placeId?: number;
1122
+ rootPlaceId?: number;
1123
+ gameId?: string;
1124
+ universeId?: number;
1125
+ userId?: number;
1126
+ lastOnline?: string;
1127
+ }
1128
+
1129
+ interface PlayerInfo {
1130
+ username: string;
1131
+ displayName: string;
1132
+ blurb: string;
1133
+ joinDate: Date;
1134
+ age?: number;
1135
+ friendCount?: number;
1136
+ followerCount?: number;
1137
+ followingCount?: number;
1138
+ oldNames?: string[];
1139
+ isBanned: boolean;
1140
+ }
1141
+ interface Presences {
1142
+ userPresences: UserPresence[]
1143
+ }
1144
+
1145
+ interface PlayerThumbnailData {
1146
+ targetId: number;
1147
+ state: "Completed" | "Pending" | "Blocked";
1148
+ imageUrl?: string;
1149
+ }
1150
+
1151
+ interface PromotionChannelsResponse {
1152
+ facebook?: string;
1153
+ twitter?: string;
1154
+ youtube?: string;
1155
+ twitch?: string;
1156
+ guilded?: string;
1157
+ }
1158
+
1159
+ /// Badges
1160
+
1161
+ interface BadgeAwarder {
1162
+ id: number;
1163
+ type: string;
1164
+ }
1165
+
1166
+ interface UserBadgeStats {
1167
+ badgeId: number;
1168
+ awardedDate: Date;
1169
+ }
1170
+
1171
+ interface BadgeStatistics {
1172
+ pastDayAwardedCount: number;
1173
+ awardedCount: number;
1174
+ winRatePercentage: number;
1175
+ }
1176
+
1177
+ interface BadgeUniverse {
1178
+ id: number;
1179
+ name: string;
1180
+ rootPlaceId: number;
1181
+ }
1182
+
1183
+ //
1184
+ interface PlayerBadges {
1185
+ id: number;
1186
+ name: string;
1187
+ description?: string;
1188
+ displayName: string;
1189
+ displayDescription?: string;
1190
+ enabled: boolean;
1191
+ iconImageId: number;
1192
+ displayIconImageId: number;
1193
+ awarder: BadgeAwarder;
1194
+ statistics: BadgeStatistics;
1195
+ created: Date;
1196
+ updated: Date;
1197
+ }
1198
+ //
1199
+
1200
+ interface BadgeInfo {
1201
+ id: number;
1202
+ name: string;
1203
+ description?: string;
1204
+ displayName: string;
1205
+ displayDescription?: string;
1206
+ enabled: boolean;
1207
+ iconImageId: number;
1208
+ displayIconImageId: number;
1209
+ created: Date;
1210
+ updated: Date;
1211
+ statistics: BadgeStatistics
1212
+ awardingUniverse: BadgeUniverse
1213
+ }
1214
+
1215
+ //Inventory
1216
+
1217
+ interface AssetOwner {
1218
+ userId: number;
1219
+ username: string;
1220
+ buildersClubMembershipType: number;
1221
+ }
1222
+
1223
+ interface CollectibleEntry {
1224
+ userAssetId: number;
1225
+ serialNumber?: number;
1226
+ assetId: number;
1227
+ name: string;
1228
+ recentAveragePrice: number;
1229
+ originalPrice?: number;
1230
+ assetStock?: number;
1231
+ buildersClubMembershipType: number;
1232
+ }
1233
+ //
1234
+
1235
+ interface InventoryEntry {
1236
+ assetId: number;
1237
+ name: string;
1238
+ assetType: string;
1239
+ created: Date;
1240
+ updated?: Date;
1241
+ assetName?: string;
1242
+ userAssetId?: number;
1243
+ owner?: AssetOwner;
1244
+ }
1245
+
1246
+ ///Trading
1247
+
1248
+ interface UAIDResponse {
1249
+ uaids: number[],
1250
+ failedIds: number[]
1251
+ }
1252
+
1253
+ interface CanTradeResponse {
1254
+ canTrade: boolean,
1255
+ status: string
1256
+ }
1257
+
1258
+ interface TradeUser {
1259
+ userId: number;
1260
+ username: string;
1261
+ displayName: string;
1262
+ }
1263
+
1264
+ interface TradeAsset {
1265
+ id: number,
1266
+ user: TradeUser,
1267
+ created: Date,
1268
+ expiration?: Date,
1269
+ isActive: boolean,
1270
+ status: string
1271
+ }
1272
+
1273
+ interface DetailedTradeAsset {
1274
+ id: number,
1275
+ serialNumber: number,
1276
+ assetId: number,
1277
+ name: string,
1278
+ recentAveragePrice: number,
1279
+ originalPrice: number,
1280
+ assetStock: number,
1281
+ membershipType: string
1282
+ }
1283
+
1284
+ interface DetailedTradeOffer {
1285
+ user: TradeUser,
1286
+ userAssets: DetailedTradeAsset[],
1287
+ robux: number
1288
+ }
1289
+
1290
+ interface TradeOffer {
1291
+ userAssetIds: number[],
1292
+ robux: number
1293
+ }
1294
+
1295
+ interface TradeInfo {
1296
+ offers: DetailedTradeOffer[],
1297
+ id: number,
1298
+ user: TradeUser,
1299
+ created: Date,
1300
+ expiration?: Date,
1301
+ isActive: boolean,
1302
+ status: string
1303
+ }
1304
+
1305
+ interface SendTradeResponse {
1306
+ id: number
1307
+ }
1308
+
1309
+ /// Utility
1310
+
1311
+ type SelectorFunction = (selector: string) => { val(): any };
1312
+ type SortOrder = 'Asc' | 'Desc';
1313
+ type Limit = 10 | 25 | 50 | 100;
1314
+
1315
+ interface Inputs {
1316
+ /**
1317
+ * With a provided name, this returns the input's value.
1318
+ */
1319
+ [name: string]: string;
1320
+ }
1321
+
1322
+ interface GetVerificationResponse {
1323
+ body?: string;
1324
+ inputs: Inputs;
1325
+ header: string;
1326
+ }
1327
+
1328
+ interface HttpOptions {
1329
+ verification?: string;
1330
+ jar?: CookieJar;
1331
+ }
1332
+
1333
+ interface ThreadedPromise extends Promise<void> {
1334
+ getStatus(): number;
1335
+ getCompleted(): number;
1336
+ getExpected(): number;
1337
+ }
1338
+
1339
+ interface GetLatestResponse {
1340
+ latest: number;
1341
+ data: object;
1342
+ repeat?: boolean;
1343
+ }
1344
+
1345
+ interface Datastore {
1346
+ name: string;
1347
+ createdTime: Date;
1348
+ }
1349
+
1350
+ interface DatastoresResult {
1351
+ datastores: Datastore[];
1352
+ nextPageCursor?: string;
1353
+ }
1354
+
1355
+ interface EntryKey {
1356
+ scope: string;
1357
+ key: string;
1358
+ }
1359
+
1360
+ interface DatastoreKeysResult {
1361
+ keys: EntryKey[];
1362
+ nextPageCursor?: string;
1363
+ }
1364
+
1365
+ interface DatastoreEntry {
1366
+ data: any;
1367
+ metadata: {
1368
+ /** (ISO datetime, UTC): the time at which the entry was created */
1369
+ robloxEntryCreatedTime: Date;
1370
+ /** (ISO datetime, UTC): the time at which the entry was updated */
1371
+ lastModified: Date;
1372
+ /** version of the entry being read */
1373
+ robloxEntryVersion: string;
1374
+ robloxEntryAttributes?: string;
1375
+ robloxEntryUserIDs?: string;
1376
+ /** the base-64 encoded MD5 checksum of the content */
1377
+ contentMD5: string;
1378
+ /** the content length in bytes */
1379
+ contentLength: number;
1380
+ }
1381
+ }
1382
+
1383
+ interface EntryVersion {
1384
+ version: string;
1385
+ deleted: boolean;
1386
+ contentLength: number;
1387
+ createdTime: Date;
1388
+ objectCreatedTime: Date;
1389
+ }
1390
+
1391
+ interface EntryVersionsResult {
1392
+ versions: EntryVersion[];
1393
+ nextPageCursor: string;
1394
+ }
1395
+
1396
+ // Functions
1397
+
1398
+ /// AccountInformation
1399
+
1400
+ /**
1401
+ * 🔐 Get the social link data (promotion channels) associated with a user.
1402
+ */
1403
+ function getUserSocialLinks(userId: number, jar?: CookieJar): Promise<PromotionChannelsResponse>;
1404
+
1405
+ /// AccountSettings
1406
+
1407
+ /**
1408
+ * 🔐 Blocks the user with `userId`.
1409
+ */
1410
+ function block(userId: number, jar?: CookieJar): Promise<void>;
1411
+
1412
+ /**
1413
+ * 🔐 Unblocks the user with `userId`.
1414
+ */
1415
+ function unblock(userId: number, jar?: CookieJar): Promise<void>;
1416
+
1417
+ /// Asset
1418
+
1419
+ /**
1420
+ * 🔐 Deletes an item from the logged in user's inventory
1421
+ */
1422
+ function deleteFromInventory(assetId: number, jar?: CookieJar): Promise<void>;
1423
+
1424
+ /**
1425
+ * ✅ Gets `info` of `gamepass` and caches according to settings.
1426
+ */
1427
+ function getGamePassProductInfo(gamepass: number): Promise<GamePassProductInfo>;
1428
+
1429
+ /**
1430
+ * ✅ Gets `info` of `asset` and caches according to settings.
1431
+ */
1432
+ function getProductInfo(asset: number): Promise<ProductInfo>;
1433
+
1434
+ /**
1435
+ * 🔐 Uploads `data` to `asset` with `itemOptions`. If asset is empty a new asset will be created. The assetId is returned as a number. Note that `itemOptions` is required when creating a new asset. It is only optional when updating an old asset, which ignores `itemOptions` and only updates `data`.
1436
+ */
1437
+ function uploadAnimation(data: string | stream.Stream, itemOptions?: UploadModelItemOptions, asset?: number, jar?: CookieJar): Promise<number>;
1438
+
1439
+ /**
1440
+ * 🔐 Uploads an image stored in `file` as an `assetType` with `name`. If `groupId` is specified it will be uploaded to that group. This is for uploading shirts, pants, or decals which have the assetTypes `11`, `12`, and `13`, respectively. Returns the asset `id` of the new item.
1441
+ */
1442
+ function uploadItem(name: string, assetType: UploadItemAssetType, file: string | stream.Stream, groupId?: number, jar?: CookieJar): Promise<UploadItemResponse>;
1443
+
1444
+ /**
1445
+ * 🔐 Uploads `data` to `asset` with `itemOptions`. If asset is empty a new asset will be created. Both the assetId as well as the assetVersionId are returned in a object. Note that `itemOptions` is required when creating a new asset. It is only optional when updating an old asset, which ignores `itemOptions` and only updates `data`.
1446
+ */
1447
+ function uploadModel(data: string | stream.Stream, itemOptions?: UploadModelItemOptions, asset?: number, jar?: CookieJar): Promise<UploadModelResponse>;
1448
+
1449
+ /// Avatar
1450
+
1451
+ /**
1452
+ * ✅ Get the avatar rules.
1453
+ */
1454
+ function avatarRules(option?: "playerAvatarTypes" | "scales" | "wearableAssetTypes" | "bodyColorsPalette" | "basicBodyColorsPalette" | "minimumDeltaEBodyColorDifference" | "proportionsAndBodyTypeEnabledForUser" | "defaultClothingAssetLists" | "bundlesEnabledForUser" | "emotesEnabledForUser" | undefined, jar?: CookieJar): Promise<AvatarRules>;
1455
+
1456
+ function avatarRules(option: "playerAvatarTypes", jar?: CookieJar): Promise<string[]>;
1457
+ function avatarRules(option: "scales", jar?: CookieJar): Promise<AvatarRulesScales>;
1458
+ function avatarRules(option: "wearableAssetTypes", jar?: CookieJar): Promise<WearableAssetType[]>;
1459
+ function avatarRules(option: "bodyColorsPalette", jar?: CookieJar): Promise<BodyColorModel[]>;
1460
+ function avatarRules(option: "basicBodyColorsPalette", jar?: CookieJar): Promise<BodyColorModel[]>;
1461
+ function avatarRules(option: "minimumDeltaEBodyColorDifference", jar?: CookieJar): Promise<number>;
1462
+ function avatarRules(option: "proportionsAndBodyTypeEnabledForUser", jar?: CookieJar): Promise<boolean>;
1463
+ function avatarRules(option: "defaultClothingAssetLists", jar?: CookieJar): Promise<DefaultClothingAssetLists>;
1464
+ function avatarRules(option: "bundlesEnabledForUser", jar?: CookieJar): Promise<boolean>;
1465
+ function avatarRules(option: "emotesEnabledForUser", jar?: CookieJar): Promise<boolean>;
1466
+
1467
+ /**
1468
+ * ✅ Get the assets a given user is wearing.
1469
+ */
1470
+ function currentlyWearing(userId: number): Promise<AssetIdList>;
1471
+
1472
+ /**
1473
+ * ✅ Get a user's avatar.
1474
+ */
1475
+ function getAvatar(userId: number): Promise<AvatarInfo>;
1476
+
1477
+ /**
1478
+ * 🔐 Get the current avatar of the logged in user.
1479
+ */
1480
+ function getCurrentAvatar(option?: "scales" | "playerAvatarType" | "bodyColors" | "assets" | "defaultShirtApplied" | "defaultPantsApplied" | undefined, jar?: CookieJar): Promise<AvatarInfo>;
1481
+
1482
+ function getCurrentAvatar(option: "scales", jar?: CookieJar): Promise<AvatarScale>;
1483
+ function getCurrentAvatar(option: "playerAvatarType", jar?: CookieJar): Promise<PlayerAvatarType>;
1484
+ function getCurrentAvatar(option: "bodyColors", jar?: CookieJar): Promise<AvatarBodyColors>;
1485
+ function getCurrentAvatar(option: "assets", jar?: CookieJar): Promise<AvatarAsset[]>;
1486
+ function getCurrentAvatar(option: "defaultShirtApplied", jar?: CookieJar): Promise<boolean>;
1487
+ function getCurrentAvatar(option: "defaultPantsApplied", jar?: CookieJar): Promise<boolean>;
1488
+
1489
+ /**
1490
+ * 🔐 Get assets recently worn by the logged in user.
1491
+ */
1492
+ function getRecentItems(listType?: RecentItemListType, jar?: CookieJar): Promise<AssetRecentItemsResult>;
1493
+
1494
+ /**
1495
+ * ✅ Get the details of an outfit.
1496
+ */
1497
+ function outfitDetails(outfitId: number): Promise<AvatarOutfitDetails>;
1498
+
1499
+ /**
1500
+ * ✅ Get the outfits of a user.
1501
+ */
1502
+ function outfits(userId: number, page?: number, itemsPerPage?: number): Promise<GetOutfitsResult>;
1503
+
1504
+ /**
1505
+ * 🔐 Redraws the avatar of the logged in user.
1506
+ */
1507
+ function redrawAvatar(jar?: CookieJar): Promise<void>;
1508
+
1509
+ /**
1510
+ * 🔐 Removes the asset with `assetId` from the logged in user's avatar.
1511
+ */
1512
+ function removeAssetId(assetId: number, jar?: CookieJar): Promise<void>;
1513
+
1514
+ /**
1515
+ * 🔐 Sets the body colors of the logged in user's avatar.
1516
+ */
1517
+ function setAvatarBodyColors(args: AvatarBodyColors & { jar?: CookieJar }): Promise<void>;
1518
+
1519
+ /**
1520
+ * 🔐 Sets the scales of the logged in user's avatar.
1521
+ */
1522
+ function setAvatarScales(args: AvatarScale & { jar?: CookieJar }): Promise<void>;
1523
+
1524
+ /**
1525
+ * 🔐 Sets the player avatar type of the logged in user's avatar. (R6/R15)
1526
+ */
1527
+ function setPlayerAvatarType(avatarType: PlayerAvatarType, jar?: CookieJar): Promise<void>;
1528
+
1529
+ /**
1530
+ * 🔐 Sets the assets the logged in user is wearing.
1531
+ */
1532
+ function setWearingAssets(assetIds: number[], jar?: CookieJar): Promise<void>;
1533
+
1534
+ /**
1535
+ * 🔐 Wears a specific asset on the logged in user's avatar.
1536
+ */
1537
+ function wearAssetId(assetId: number, jar?: CookieJar): Promise<void>;
1538
+
1539
+ /// Badges
1540
+
1541
+ /**
1542
+ * ✅ Gets user award date for a badge.
1543
+ */
1544
+ function getAwardedTimestamps(userId: number, badgeId: number[]): Promise<UserBadgeStats>
1545
+
1546
+ /**
1547
+ * ✅ Gets information about a badge.
1548
+ */
1549
+ function getBadgeInfo(badgeId: number): Promise<BadgeInfo>
1550
+
1551
+ /**
1552
+ * ✅ Get the badges in a specific game.
1553
+ */
1554
+ function getGameBadges(universeId: number, limit?: Limit, cursor?: string, sortOrder?: SortOrder): Promise<BadgeInfo>
1555
+
1556
+ /**
1557
+ * ✅ Gets the badges of a user.
1558
+ */
1559
+ function getPlayerBadges(userId: number, limit?: number, sortOrder?: SortOrder): Promise<Array<PlayerBadges>>
1560
+
1561
+ /**
1562
+ * 🔐 Updates badge information.
1563
+ */
1564
+ function updateBadgeInfo(badgeId: number, name?: string, description?: string, enabled?: boolean, jar?: CookieJar): Promise<void>
1565
+
1566
+ /// Chat
1567
+
1568
+ /**
1569
+ * 🔐 Adds a user to a group conversation.
1570
+ */
1571
+ function addUsersToConversation(conversationId: number, userIds: number[], jar?: CookieJar): Promise<ConversationAddResponse>;
1572
+
1573
+ /**
1574
+ * 🔐 Get chat settings.
1575
+ */
1576
+ function chatSettings(jar?: CookieJar): Promise<ChatSettings>;
1577
+
1578
+ /**
1579
+ * 🔐 Get the chat messages of a conversation.
1580
+ */
1581
+ function getChatMessages(conversationId: number, pageSize?: number, exclusiveStartMessageId?: string, jar?: CookieJar): Promise<ChatMessage[]>;
1582
+
1583
+ /**
1584
+ * 🔐 Get conversation details for the conversationIds specified in the parameters
1585
+ */
1586
+ function getConversations(conversationIds: number[], jar?: CookieJar): Promise<ChatConversation[]>;
1587
+
1588
+ /**
1589
+ * 🔐 Get the rollout settings for the logged in user.
1590
+ */
1591
+ function getRolloutSettings(featureNames?: ChatFeatureNames[], jar?: CookieJar): Promise<GetRolloutSettingsResult>;
1592
+
1593
+ /**
1594
+ * 🔐 Get the unread conversation count for the logged in user.
1595
+ */
1596
+ function getUnreadConversationCount(jar?: CookieJar): Promise<GetUnreadConversationCountResult>;
1597
+
1598
+ /**
1599
+ * 🔐 Get the unread messages for the logged in user in the conversations specified in the parameters.
1600
+ */
1601
+ function getUnreadMessages(conversationIds: number[], pageSize?: number, jar?: CookieJar): Promise<ChatConversationWithMessages[]>;
1602
+
1603
+ /**
1604
+ * 🔐 Get conversations for the logged in user.
1605
+ */
1606
+ function getUserConversations(pageNumber?: number, pageSize?: number, jar?: CookieJar): Promise<ChatConversation[]>;
1607
+
1608
+ /**
1609
+ * 🔐 Mark a conversation as read.
1610
+ */
1611
+ function markChatAsRead(conversationId: number, endMessageId: string): Promise<void>;
1612
+
1613
+ /**
1614
+ * 🔐 Mark a conversation as seen.
1615
+ */
1616
+ function markChatAsSeen(conversationIds: number[], jar?: CookieJar): Promise<void>;
1617
+
1618
+ /**
1619
+ * 🔐 Get the latest messages for the conversations specified in the parameters.
1620
+ */
1621
+ function multiGetLatestMessages(conversationIds: number[], pageSize?: number, jar?: CookieJar): Promise<ChatConversationWithMessages[]>;
1622
+
1623
+ /**
1624
+ * 🔐 Removes a user from a group conversation.
1625
+ */
1626
+ function removeFromGroupConversation(conversationId: number, userId: number, jar?: CookieJar): Promise<ConversationRemoveResponse>;
1627
+
1628
+ /**
1629
+ * 🔐 Renames a group conversation.
1630
+ */
1631
+ function renameGroupConversation(conversationId: number, title: string, jar?: CookieJar): Promise<ConversationRenameResponse>;
1632
+
1633
+ /**
1634
+ * 🔐 Sends a chat message to a conversation.
1635
+ */
1636
+ function sendChatMessage(conversationId: number, message: string, jar?: CookieJar): Promise<SendChatResponse>;
1637
+
1638
+ /**
1639
+ * 🔐 Sets the typing status of the logged in user in a conversation.
1640
+ */
1641
+ function setChatUserTyping(conversationId: number, isTyping: boolean, jar?: CookieJar): Promise<UpdateTypingResponse>;
1642
+
1643
+ /**
1644
+ * 🔐 Starts a conversation with a user.
1645
+ */
1646
+ function start121Conversation(userId: number, jar?: CookieJar): Promise<void>;
1647
+
1648
+ /**
1649
+ * 🔐 Starts a cloud edit/team create conversation.
1650
+ */
1651
+ function startCloudEditConversation(placeId: number, jar?: CookieJar): Promise<void>;
1652
+
1653
+ /**
1654
+ * 🔐 Starts a group conversation.
1655
+ */
1656
+ function startGroupConversation(userIds: number[], title: string, jar?: CookieJar): Promise<StartGroupConversationResponse>;
1657
+
1658
+ /// Client
1659
+ /**
1660
+ * 🔐 Sets the API key for the user to enable use of open cloud functions.
1661
+ * This is not the same as a .ROBLOSECURITY cookie.
1662
+ */
1663
+ function setAPIKey(apiKey: string): Promise<void>
1664
+
1665
+ /**
1666
+ * 🔐 Allows the user to login with a provided cookie string, bypassing the username/password captcha issues.
1667
+ * By default, the provided cookie will be validated by making a HTTP request. To disable this behaviour, pass false as the second optional parameter (shouldValidate).
1668
+ */
1669
+ function setCookie<B extends boolean = true>(cookie: string, shouldValidate?: B): B extends false ? boolean : Promise<LoggedInUserData>
1670
+
1671
+ /// DataStores
1672
+
1673
+ /**
1674
+ * ☁️ Marks the entry as deleted by creating a tombstone version. Entries are deleted permanently after 30 days.
1675
+ */
1676
+ function deleteDatastoreEntry(universeId: number, datastoreName: string, entryKey: string, scope?: string, jar?: CookieJar): Promise<void>
1677
+
1678
+ /**
1679
+ * ☁️ Returns the latest value and metadata associated with an entry, or a specific version if versionId is provided.
1680
+ */
1681
+ function getDatastoreEntry(universeId: number, datastoreName: string, entryKey: string, scope?: string, versionId?: string, jar?: CookieJar): Promise<DatastoreEntry>
1682
+
1683
+ /**
1684
+ * ☁️ Returns a list of entry versions of an entry.
1685
+ */
1686
+ function getDatastoreEntryVersion(universeId: number, datastoreName: string, entryKey: string, scope?: string | boolean, startTime?: Date, endTime?: Date, sortOrder?: "Ascending" | "Descending", limit?: number, cursor?: string, jar?: CookieJar): Promise<EntryVersionsResult>
1687
+
1688
+ /**
1689
+ * ☁️ Returns a list of entry keys within a data store.
1690
+ */
1691
+ function getDatastoreKeys(universeId: number, datastoreName: string, scope?: string | boolean, prefix?: string, limit?: number, cursor?: string, jar?: CookieJar): Promise<DatastoreKeysResult>
1692
+
1693
+ /**
1694
+ * ☁️ Returns a list of data stores belonging to a universe.
1695
+ */
1696
+ function getDatastores(universeId: number, prefix?: string, limit?: number, string?: string, jar?: CookieJar): Promise<DatastoresResult>
1697
+
1698
+ /**
1699
+ * ☁️ Increments the value for an entry by a given amount, or create a new entry with that amount.
1700
+ */
1701
+ function incrementDatastoreEntry(universeId: number, datastoreName: string, entryKey: string, incrementBy: number, scope?: string, robloxEntryUserIDs?: number[], robloxEntryAttributes?: object, jar?: CookieJar): Promise<DatastoreEntry>
1702
+
1703
+ /**
1704
+ * ☁️ Sets the value, metadata and user IDs associated with an entry.
1705
+ */
1706
+ function setDatastoreEntry(universeId: number, datastoreName: string, entryKey: string, body: any, scope?: string, matchVersion?: string, exclusiveCreate?: boolean, robloxEntryUserIDs?: number[], robloxEntryAttributes?: object, jar?: CookieJar): Promise<EntryVersion>
1707
+
1708
+ /// Develop
1709
+
1710
+ /**
1711
+ * ✅ Returns whether the user can manage a given asset.
1712
+ */
1713
+ function canManage(userId: number, assetId: number): Promise<boolean>;
1714
+
1715
+ /**
1716
+ * 🔐 Configures an item (shirt, pants, decal, etc.) with the id `id` to have `name` and `description`. If `enableComments` is true comments will be allowed and if `sellForRobux` is set it will be put on sale for that amount of robux.
1717
+ *
1718
+ * NOTE: Use `configureGamePass()` for Game Passes.
1719
+ */
1720
+ function configureItem(id: number, name: string, description: string, enableComments?: boolean, sellForRobux?: boolean, genreSelection?: number, jar?: CookieJar): Promise<ConfigureItemResponse>;
1721
+
1722
+ /**
1723
+ * 🔐 Modifies a universe's settings
1724
+ */
1725
+ function updateUniverse(universeId: number, settings: UniverseSettings, jar?: CookieJar): Promise<UpdateUniverseResponse>;
1726
+
1727
+ /**
1728
+ * 🔐 Updates a universe's public access setting
1729
+ */
1730
+ function updateUniverseAccess(universeId: number, isPublic?: boolean, jar?: CookieJar): Promise<void>;
1731
+
1732
+ /// Economy
1733
+
1734
+ /**
1735
+ * 🔐 Buys asset `asset` with `price` restrictions. This can be a single value or an object with `high` and `low` that sets the respective price limits (both inclusive). This allows you to buy assets with a minimum or maximum amount of robux that can be used or a single required value and therefore guarantees you can't be scammed by a sudden price change. If a price restriction is not set, the asset will be bought for however much it costs (works with free assets). You are able to use product instead of asset, the options in `product` are collected automatically if not provided.
1736
+ */
1737
+ function buy(asset: number | ProductInfo | BuyProductInfo, price?: number | PriceRange, jar?: CookieJar): Promise<BuyAssetResponse>;
1738
+
1739
+ /**
1740
+ * 🔓 Gets the amount of Robux in a group.
1741
+ */
1742
+ function getGroupFunds(group: number): Promise<number>;
1743
+
1744
+ /**
1745
+ * 🔐 Gets recent Robux revenue summary for a group; shows pending Robux. | Requires "Spend group funds" permissions.
1746
+ */
1747
+ function getGroupRevenueSummary(group: number, timeFrame?: "Day" | "Week" | "Month" | "Year"): Promise<RevenueSummaryResponse>;
1748
+
1749
+ /**
1750
+ * 🔐 Gets the transaction history of the specified group.
1751
+ */
1752
+ function getGroupTransactions(group: number, transactionType?: "Sale" | "Purchase" | "AffiliateSale" | "DevEx" | "GroupPayout" | "AdImpressionPayout", limit?: number, sortOrder?: SortOrder, jar?: CookieJar): Promise<TransactionItem[]>;
1753
+
1754
+ /**
1755
+ * ✅ Get the recent sale history (price and volume per day for 180 days) of a limited asset.
1756
+ */
1757
+ function getResaleData(assetId: number): Promise<ResaleDataResponse>;
1758
+
1759
+ /**
1760
+ * 🔐 Gets available resale copies of a limited asset.
1761
+ */
1762
+ function getResellers(assetId: number, limit?: Limit, jar?: CookieJar): Promise<ResellerData[]>;
1763
+
1764
+ /**
1765
+ * 🔐 Gets the transaction history of the logged in user or of the user specified by the jar.
1766
+ */
1767
+ function getUserTransactions(transactionType?: "Sale" | "Purchase" | "AffiliateSale" | "DevEx" | "GroupPayout" | "AdImpressionPayout", limit?: number, sortOrder?: SortOrder, jar?: CookieJar): Promise<TransactionItem[]>;
1768
+
1769
+ /// Friends
1770
+
1771
+ /**
1772
+ * 🔐 Accepts friend requests from `userId`.
1773
+ */
1774
+ function acceptFriendRequest(userId: number, jar?: CookieJar): Promise<void>;
1775
+
1776
+ /**
1777
+ * 🔐 Declines all friend requests.
1778
+ */
1779
+ function declineAllFriendRequest(jar?: CookieJar): Promise<void>;
1780
+
1781
+ /**
1782
+ * 🔐 Declines friend requests from `userId`.
1783
+ */
1784
+ function declineFriendRequest(userId: number, jar?: CookieJar): Promise<void>;
1785
+
1786
+ /**
1787
+ * ✅ Get the followers of a user (users who follow the specified person)
1788
+ */
1789
+ function getFollowers(userId: number, sortOrder?: SortOrder, limit?: Limit, cursor?: string, jar?: CookieJar): Promise<FollowersPage>;
1790
+
1791
+ /**
1792
+ * ✅ Get the followings of a user (users who have been followed by the specified person)
1793
+ */
1794
+ function getFollowings(userId: number, sortOrder?: SortOrder, limit?: Limit, cursor?: string, jar?: CookieJar): Promise<FollowingsPage>;
1795
+
1796
+ /**
1797
+ * 🔐 Gets the pending friend requests of the logged in user.
1798
+ */
1799
+ function getFriendRequests(sortOrder?: SortOrder, limit?: Limit, cursor?: string, jar?: CookieJar): Promise<FriendRequestsPage>;
1800
+
1801
+ /**
1802
+ * ✅ Gets the friends list of the specified user.
1803
+ */
1804
+ function getFriends(userId: number, jar?: CookieJar): Promise<Friends>;
1805
+
1806
+ /**
1807
+ * 🔐 Removes friendship with `userId`.
1808
+ */
1809
+ function removeFriend(userId: number, jar?: CookieJar): Promise<void>;
1810
+
1811
+ /**
1812
+ * 🔐 Sends a friend request to `userId`.
1813
+ */
1814
+ function sendFriendRequest(userId: number, jar?: CookieJar): Promise<void>;
1815
+
1816
+ /**
1817
+ * 🔐 Unfollows the user with `userId`.
1818
+ */
1819
+ function unfollow(userId: number, jar?: CookieJar): Promise<void>;
1820
+
1821
+ /// Games
1822
+
1823
+ /**
1824
+ * 🔐 Adds a developer product to the specified universe.
1825
+ * Warning: The `productId` returned by this function does not match the `productId` used by other endpoints.
1826
+ */
1827
+ function addDeveloperProduct(universeId: number, name: string, priceInRobux: number, description?: string, jar?: CookieJar): Promise<DeveloperProductAddResult>;
1828
+
1829
+ /**
1830
+ * 🔐 Checks to see if the provided `produceName` is able to be used on `productId`.
1831
+ *
1832
+ * NOTE: You actually need a valid `productId` and `universeId` otherwise, the http request returns a `404 Not Found` response.
1833
+ */
1834
+ function checkDeveloperProductName(universeId: number, productName: string, jar?: CookieJar, productId?: number): Promise<CheckDeveloperProductNameResult>;
1835
+
1836
+ /**
1837
+ * 🔐 Configures a game pass with the id `gamePassId` to have a `name`, `description`, `price` in Robux, and `icon` image. If `name` is an empty string, only `price` is changed. Setting `price` to false, 0, or a negative value will place the game pass off-sale.
1838
+ * Returns a `GamePassResponse` with the changed attributes.
1839
+ *
1840
+ * NOTE: Updating `name` will affect `description`: you must repeat `description` with each `name` update, or `description` will be cleared.
1841
+ */
1842
+ function configureGamePass(gamePassId: number, name: string, description?: string, price?: number | boolean, icon?: string | stream.Stream, jar?: CookieJar): Promise<GamePassResponse>;
1843
+
1844
+ /**
1845
+ * 🔐 Returns the existing developer products in a specified game.
1846
+ */
1847
+ function getDeveloperProducts(placeId: number, page: number, jar?: CookieJar): Promise<DeveloperProductsResult>;
1848
+
1849
+ /**
1850
+ * 🔐 Returns data about the existing game instances (servers) of the specified place. You must have permission to view the game's server list to use this. (Must be logged in)
1851
+ */
1852
+ function getGameInstances(placeId: number, serverType?: "Public" | "Friend" | "VIP", sortOrder?: SortOrder, limit?: number): Promise<GameInstance[]>;
1853
+
1854
+ /**
1855
+ * ✅ Gets a game's game passes.
1856
+ */
1857
+ function getGamePasses(universeId: number, limit?: Limit): Promise<GamePassData[]>
1858
+
1859
+ /**
1860
+ * 🔐 Get the social link data associated with a game.
1861
+ */
1862
+ function getGameSocialLinks(universeId: number, jar?: CookieJar): Promise<SocialLinkResponse[]>;
1863
+
1864
+ /**
1865
+ * ✅ Gets a list of games from the specified group.
1866
+ */
1867
+ function getGroupGames(groupId: number, accessFilter?: "All" | "Public" | "Private", sortOrder?: SortOrder, limit?: Limit, cursor?: string): Promise<GroupGameInfo[]>;
1868
+
1869
+ /**
1870
+ * 🔓 Returns information about the universe(s) in question, such as description, name etc; varies based on whether or not you're logged in.
1871
+ */
1872
+ function getUniverseInfo(universeIds: number[] | number, jar?: CookieJar): Promise<UniverseInformation[]>;
1873
+
1874
+ /**
1875
+ * 🔐 Returns information about the place(s) in question, such as name, description, etc.
1876
+ */
1877
+ function getPlaceInfo(placeIds: number[] | number, jar?: CookieJar): Promise<PlaceInformation[]>;
1878
+
1879
+ /**
1880
+ * 🔐 Update a developer product.
1881
+ */
1882
+ function updateDeveloperProduct(universeId: number, productId: number, priceInRobux: number, name?: string, description?: string, iconImageAssetId?: number, jar?: CookieJar): Promise<void>;
1883
+
1884
+ /// Groups
1885
+ /**
1886
+ * 🔐 Moves the user with userId `target` up or down the list of ranks in `group` by `change`. For example `changeRank(group, target, 1)` would promote the user 1 rank and `changeRank(group, target, -1)` would demote them down 1. Note that this simply follows the list, ignoring ambiguous ranks. The full `newRole` as well as the user's original `oldRole` is returned.
1887
+ */
1888
+ function changeRank(group: number, target: number, change: number, jar?: CookieJar): Promise<ChangeRankResult>;
1889
+
1890
+ /**
1891
+ * 🔐 Deletes the wall post with `id` in `group`. If `page` is known it can be inserted to speed up finding the post, otherwise it will search for the post. Alternatively `post` can be passed in, which only has to contain `view` and `parent.index` to work properly. Using `post` will be much faster because it will not have to search for the post first.
1892
+ */
1893
+ function deleteWallPost(group: number, post: number | WallPost, page?: number, jar?: CookieJar): Promise<void>;
1894
+
1895
+ /**
1896
+ * 🔐 Deletes all wall posts sent by the provided user id.
1897
+ */
1898
+ function deleteWallPostsByUser(group: number, userId: number, jar?: CookieJar): Promise<void>;
1899
+
1900
+ /**
1901
+ * 🔐 Alias of `changeRank(group, target, -1)`.
1902
+ */
1903
+ function demote(group: number, target: number, jar?: CookieJar): Promise<ChangeRankResult>;
1904
+
1905
+ /**
1906
+ * 🔐 Exiles user with `userId` target from `group`.
1907
+ */
1908
+ function exile(group: number, target: number, jar?: CookieJar): Promise<void>;
1909
+
1910
+ /**
1911
+ * 🔐 Gets the audit logs of the specified group.
1912
+ */
1913
+ function getAuditLog(group: number, actionType?: "" | "DeletePost" | "RemoveMember" | "AcceptJoinRequest" | "DeclineJoinRequest" | "PostStatus" | "ChangeRank" | "BuyAd" | "SendAllyRequest" | "CreateEnemy" | "AcceptAllyRequest" | "DeclineAllyRequest" | "DeleteAlly" | "DeleteEnemy" | "AddGroupPlace" | "RemoveGroupPlace" | "CreateItems" | "ConfigureItems" | "SpendGroupFunds" | "ChangeOwner" | "Delete" | "AdjustCurrencyAmounts" | "Abandon" | "Claim" | "Rename" | "ChangeDescription" | "InviteToClan" | "KickFromClan" | "CancelClanInvite" | "BuyClan" | "CreateGroupAsset" | "UpdateGroupAsset" | "ConfigureGroupAsset" | "RevertGroupAsset" | "CreateGroupDeveloperProduct" | "ConfigureGroupGame" | "Lock" | "Unlock" | "CreateGamePass" | "CreateBadge" | "ConfigureBadge" | "SavePlace" | "PublishPlace", userId?: number, sortOrder?: SortOrder, limit?: Limit, cursor?: string, jar?: CookieJar): Promise<AuditPage>;
1914
+
1915
+ /**
1916
+ * ✅ Gets a brief overview of the specified group.
1917
+ */
1918
+ function getGroup(groupId: number): Promise<Group>;
1919
+
1920
+ /**
1921
+ * ✅ Gets the groups a player is in.
1922
+ */
1923
+ function getGroups(userId: number): Promise<IGroupPartial[]>
1924
+
1925
+ /**
1926
+ * 🔐 Get the social link data associated with a group.
1927
+ */
1928
+ function getGroupSocialLinks(groupId: number, jar?: CookieJar): Promise<SocialLinkResponse[]>;
1929
+
1930
+ /**
1931
+ * 🔐 Gets a specific group join request, if it exists.
1932
+ */
1933
+ function getJoinRequest(group: number, userId: number, jar?: CookieJar): Promise<GroupJoinRequest>;
1934
+
1935
+ /**
1936
+ * 🔐 Gets the first page of join requests from `group`.
1937
+ */
1938
+ function getJoinRequests(group: number, sortOrder?: SortOrder, limit?: Limit, cursor?: string, jar?: CookieJar): Promise<GroupJoinRequestsPage>;
1939
+
1940
+ /**
1941
+ * ✅ Gets all (or up to limit when provided and greater than 0) players in `group` with the number/array of `roleset`.
1942
+ */
1943
+ function getPlayers(group: number, rolesetId: number[] | number, sortOrder?: SortOrder, limit?: number, jar?: CookieJar): Promise<GroupUser[]>;
1944
+
1945
+ /**
1946
+ * ✅ Gets `rank` of user with `userId` in `group` and caches according to settings.
1947
+ */
1948
+ function getRankInGroup(group: number, userId: number): Promise<number>;
1949
+
1950
+ /**
1951
+ * ✅ Gets the rank `name` of user with `userId` in `group` and caches according to settings.
1952
+ */
1953
+ function getRankNameInGroup(group: number, userId: number): Promise<string>;
1954
+
1955
+ /**
1956
+ * ✅ Returns role information of rank `rank`, which can be a single rank or an array of ranks. The `roles` object can be passed in directly from the `getRoles` function or the `group` id can be given to retrieve it automatically. If an array of ranks is inputted a parallel array of roles is returned. Alternatively, the name `name` of the role can be searched for, this should be used if there are "ambiguous roles" that have the same rank. If ambiguous roles cannot be resolved an error will be thrown. The actual roleset `id` may be used as well.
1957
+ */
1958
+ function getRole(group: number | Role[], roleQuery: number | string): Promise<Role>;
1959
+
1960
+ /**
1961
+ * 🔐 Returns the permissions a role has been assigned.
1962
+ */
1963
+ function getRolePermissions(group: number, rolesetId: number, jar?: CookieJar): Promise<RolePermissions>;
1964
+
1965
+ /**
1966
+ * ✅ Returns role information of a group with groupId `group` in the form `[{"ID":number,"Name":"string","Rank":number},{"ID":number,"Name":"string","Rank":number}]`.
1967
+ */
1968
+ function getRoles(group: number): Promise<Role[]>;
1969
+
1970
+ /**
1971
+ * 🔓 Gets the current shout in `group`. If there is no shout the promise is fulfilled but nothing is returned.
1972
+ */
1973
+ function getShout(group: number, jar?: CookieJar): Promise<GroupShout>;
1974
+
1975
+ /**
1976
+ * 🔓 Gets posts on the `group` wall. Parameter `page` may be a number or array where negative numbers indicate trailing pages, if it is not specified all pages of the wall will be retrieved.
1977
+ * The body of the post is in `content` and the `id` and `name` of the poster are stored in the `author` object. The `id` is the unique ID of the wall post that is internally used by ROBLOX. This serves no real use other than reporting it (although it can be used indirectly to track down specific posts).
1978
+ * The `page` the post was found on and its `index` on that page are both in the `parent` object.
1979
+ * If `view` is true the viewstates of each page will be returned in the `views` object, with each page having its viewstates at the corresponding page number. For example page 5 of the wall will have its view stored in `wall.views[5]`.
1980
+ * The `getStatus` function is returned as a property of the promise and returns the percent completion of the operation.
1981
+ */
1982
+ function getWall(group: number, sortOrder?: SortOrder, limit?: Limit, cursor?: string, jar?: CookieJar): Promise<WallPostPage>;
1983
+
1984
+ /**
1985
+ * 🔐 Performs a payout in group with the groupId `group`. If `recurring` is true this will configure the recurring options for the group's payout replacing all old values, otherwise a one-time-payout is made. To clear the recurring payouts, pass in empty arrays to both member and amount. Argument `member` can either be a single userId or an array of userIds. If it is a single value `amount` must be as well, otherwise `amount` has to be a parallel array of equal length. If `usePercentage` is true `amount` percentage of the total group funds is paid to the members, otherwise it pays `amount` ROBUX. Note that recurring payouts are always percentages, and when `recurring` is true `usePercentage` is ignored.
1986
+ */
1987
+ function groupPayout(group: number, member: number | number[], amount: number | number[], recurring?: boolean, usePercentage?: boolean, jar?: CookieJar): Promise<void>;
1988
+
1989
+ /**
1990
+ * 🔐 Accepts user with `username` into `group`. Note that `username` is case-sensitive.
1991
+ */
1992
+ function handleJoinRequest(group: number, userId: number, accept: boolean, jar?: CookieJar): Promise<void>;
1993
+
1994
+ /**
1995
+ * 🔐 Leaves the group with id `group`. Unless `useCache` is enabled the function will not cache because errors will occur if joining or leaving the same group multiple times, you can enable it if you are only joining or leaving a group once or many differenct groups once.
1996
+ */
1997
+ function leaveGroup(group: number, jar?: CookieJar): Promise<void>;
1998
+
1999
+ /**
2000
+ * 🔐 Alias of `changeRank(group, target, 1)`.
2001
+ */
2002
+ function promote(group: number, target: number, jar?: CookieJar): Promise<ChangeRankResult>;
2003
+
2004
+ /**
2005
+ * ✅ Returns the groups matching a given search term.
2006
+ */
2007
+ function searchGroups(keyword: string, prioritizeExactMatch?: boolean, limit?: number): Promise<GroupSearchItem[]>;
2008
+
2009
+ /**
2010
+ * 🔐 Sets the group description for group with id `group` to `description`.
2011
+ */
2012
+ function setGroupDescription(group: number, description: string, jar?: CookieJar): Promise<GroupDescriptionResult>;
2013
+
2014
+ /**
2015
+ * 🔐 Sets the group name for group with id `group` to `name`.
2016
+ */
2017
+ function setGroupName(group: number, name: string, jar?: CookieJar): Promise<GroupNameResult>;
2018
+
2019
+ /**
2020
+ * 🔐 Changes the rank of the player with the `target` userId in group with `groupId` to the provided rank. If rank <= 255, it is assumes to be rank. If rank is a string, it is assumed to be the name of a rank/role. If rank is > 255, it is assumed to be a rolesetId (which speeds up requests). If two or more ranks share a rank, this will not resolve properly (use the name of the rank instead). You may also pass a Role which can be gotten from `getRoles` or `getRole`.
2021
+ */
2022
+ function setRank(group: number, target: number, rank: number | string | Role, jar?: CookieJar): Promise<Role>;
2023
+
2024
+ /**
2025
+ * 🔐 Shouts message `message` in the group with groupId `group`. Setting `message` to "" will clear the shout.
2026
+ */
2027
+ function shout(group: number, message: string, jar?: CookieJar): Promise<GroupShout>;
2028
+
2029
+ /// Inventory
2030
+
2031
+ /**
2032
+ * 🔐 Get the collectibles of a user.
2033
+ */
2034
+ function getCollectibles(userId: number, assetType?: string, sortOrder?: SortOrder, limit?: number, jar?: CookieJar): Promise<CollectibleEntry[]>;
2035
+
2036
+ /**
2037
+ * 🔓 Get the inventory of a user.
2038
+ */
2039
+ function getInventory(userId: number, assetTypes: Array<string>, sortOrder?: SortOrder, limit?: number, jar?: CookieJar): Promise<InventoryEntry[]>;
2040
+
2041
+ /**
2042
+ * 🔓 Get the inventory of a user by the assetTypeId.
2043
+ */
2044
+ function getInventoryById(userId: number, assetTypeId: number, sortOrder?: SortOrder, limit?: number, jar?: CookieJar): Promise<InventoryEntry[]>;
2045
+
2046
+ /**
2047
+ * ✅ Returns whether a user owns an asset or not
2048
+ */
2049
+ function getOwnership(userId: number, itemTargetId: number, itemType?: "Asset" | "GamePass" | "Badge" | "Bundle"): Promise<boolean>;
2050
+
2051
+ /**
2052
+ * 🔓 Get the UserAssetIDs for assets a user owns.
2053
+ */
2054
+ function getUAIDs(userId: number, assetIds: number[], exclusionList?: number[], jar?: CookieJar): Promise<UAIDResponse>;
2055
+
2056
+ /// ItemConfiguration
2057
+ /**
2058
+ * ✅ Gets a list of assets from the specified group.
2059
+ */
2060
+ function getGroupAssets(groupId: number, assetType: string, sortOrder?: SortOrder, limit?: Limit, cursor?: string, jar?: CookieJar): Promise<GroupAssetInfo[]>;
2061
+
2062
+ /// PremiumFeatures
2063
+ /**
2064
+ * 🔐 Gets whether or not a user has premium.
2065
+ */
2066
+ function getPremium(userId: number, jar?: CookieJar): Promise<boolean>;
2067
+
2068
+ /// Presence
2069
+ /**
2070
+ * 🔐 Gets the presence statuses of the specified users
2071
+ */
2072
+ function getPresences(userIds: number[]): Promise<Presences>;
2073
+
2074
+ /// PrivateMessages
2075
+
2076
+ /**
2077
+ * 🔐 Gets the messages of the logged in user or of the user specified by the jar. Returns by newest to oldest messages.
2078
+ */
2079
+ function getMessages(pageNumber?: number, pageSize?: number, messageTab?: "Archive" | "Inbox" | "Sent", jar?: CookieJar): Promise<PrivateMessagesPage>;
2080
+
2081
+ /**
2082
+ * 🔐 Sends a message with `body` and `subject` to the user with id `recipient`.
2083
+ */
2084
+ function message(recipient: number, subject: string, body: string, replyMessageId?: number, includePreviousMessage?: boolean, jar?: CookieJar): Promise<void>;
2085
+
2086
+ /// Thumbnails
2087
+
2088
+ /**
2089
+ * ✅ Gets the logo of the specified group.
2090
+ */
2091
+ function getLogo(groupId: number, size?: GroupIconSize, circular?: boolean, format?: GroupIconFormat): Promise<string>;
2092
+
2093
+ /**
2094
+ * ✅ Gets the thumbnail of an array of users.
2095
+ */
2096
+ function getPlayerThumbnail(userIds: number | number[], size: BodySizes | BustSizes | HeadshotSizes, format?: "png" | "jpeg", isCircular?: boolean, cropType?: "body" | "bust" | "headshot"): Promise<PlayerThumbnailData[]>;
2097
+
2098
+ /**
2099
+ * ✅ Gets the thumbnail of asset/users.
2100
+ */
2101
+ function getThumbnails(thumbnailRequests: ThumbnailRequest[]): Promise<ThumbnailData[]>;
2102
+
2103
+ /// Trades
2104
+
2105
+ /**
2106
+ * 🔐 Accept an active trade.
2107
+ */
2108
+ function acceptTrade(tradeId: number, jar?: CookieJar): Promise<void>;
2109
+
2110
+ /**
2111
+ * 🔐 Check if the current user can trade with another user.
2112
+ */
2113
+ function canTradeWith(userId: number, jar?: CookieJar): Promise<CanTradeResponse>;
2114
+
2115
+ /**
2116
+ * 🔐 Counter an active incoming trade..
2117
+ */
2118
+ function counterTrade(tradeId: number, targetUserId: number, sendingOffer: TradeOffer, receivingOffer: TradeOffer, jar?: CookieJar): Promise<SendTradeResponse>;
2119
+
2120
+ /**
2121
+ * 🔐 Decline an active trade.
2122
+ */
2123
+ function declineTrade(tradeId: number, jar?: CookieJar): Promise<void>;
2124
+
2125
+ /**
2126
+ * 🔐 Get detailed info about a trade.
2127
+ */
2128
+ function getTradeInfo(tradeId: number, jar?: CookieJar): Promise<TradeInfo>;
2129
+
2130
+ /**
2131
+ * 🔐 Get all trades under a category.
2132
+ */
2133
+ function getTrades(tradeStatusType: string, sortOrder?: SortOrder, limit?: number, jar?: CookieJar): Promise<TradeAsset[]>;
2134
+
2135
+ /**
2136
+ * 🔐 Send a trade to a user.
2137
+ */
2138
+ function sendTrade(targetUserId: number, sendingOffer: TradeOffer, receivingOffer: TradeOffer, jar?: CookieJar): Promise<SendTradeResponse>;
2139
+
2140
+ /// Users
2141
+
2142
+ /**
2143
+ * ✅ Gets the `blurb` of the user with the ID `userId`.
2144
+ */
2145
+ function getBlurb(userId: number): Promise<string>;
2146
+
2147
+ /**
2148
+ * ✅ Gets the `id` of user with `username` and caches according to settings.
2149
+ * Username is not case-sensitive.
2150
+ */
2151
+ function getIdFromUsername<T extends string | string[]>(username: T): T extends string ? Promise<number> : Promise<number[]>;
2152
+
2153
+ /**
2154
+ * ✅ Gets a brief overview of a user.
2155
+ */
2156
+ function getPlayerInfo(userId: number): Promise<PlayerInfo>;
2157
+
2158
+ /**
2159
+ * ✅ Gets `username` of user with `id` and caches according to settings.
2160
+ */
2161
+ function getUsernameFromId(id: number): Promise<string>;
2162
+
2163
+ /// Utility
2164
+
2165
+ /**
2166
+ * 🔐 Removes the `.ROBLOSECURITY` cookie from `jar`. Note that this does not return a new jar, it simply changes the existing one.
2167
+ */
2168
+ function clearSession(jar: CookieJar): Promise<string>;
2169
+
2170
+ /**
2171
+ * 🔐 Gets the verification inputs from `url` and sends a post request with data from `events`, returning the original body before the post request according to `getBody` and obeying the cache based on `ignoreCache`. Use `http` for custom request options for the post request; if url is contained, it will not replace the main url but the url used for getting verification tokens. This function is used for primitive site functions that involve ASP viewstates.
2172
+ */
2173
+ function generalRequest(url: string, events: object, http?: object, ignoreCache?: boolean, getBody?: boolean, jar?: CookieJar): Promise<Object>;
2174
+
2175
+ /**
2176
+ * ✅ Gets the action row for audit log text. Current supported types are: change rank, delete post, and change group status (shouts).
2177
+ */
2178
+ function getAction(row: string): AuditItem;
2179
+
2180
+ /**
2181
+ * 🔐 Gets the current user logged into `jar` and returns an `option` if specified or all options if not.
2182
+ */
2183
+ function getCurrentUser(option?: "UserID" | "UserName" | "RobuxBalance" | "ThumbnailUrl" | "IsAnyBuildersClubMember" | "IsPremium" | undefined, jar?: CookieJar): Promise<LoggedInUserData>;
2184
+
2185
+ /**
2186
+ * 🔐 Gets the current user logged into `jar` and returns an `option` if specified or all options if not.
2187
+ */
2188
+ function getCurrentUser(option: "UserID", jar?: CookieJar): Promise<number>;
2189
+
2190
+ /**
2191
+ * 🔐 Gets the current user logged into `jar` and returns an `option` if specified or all options if not.
2192
+ */
2193
+ function getCurrentUser(option: "UserName", jar?: CookieJar): Promise<string>;
2194
+
2195
+ /**
2196
+ * 🔐 Gets the current user logged into `jar` and returns an `option` if specified or all options if not.
2197
+ */
2198
+ function getCurrentUser(option: "RobuxBalance", jar?: CookieJar): Promise<number>;
2199
+
2200
+ /**
2201
+ * 🔐 Gets the current user logged into `jar` and returns an `option` if specified or all options if not.
2202
+ */
2203
+ function getCurrentUser(option: "ThumbnailUrl", jar?: CookieJar): Promise<string>;
2204
+
2205
+ /**
2206
+ * 🔐 Gets the current user logged into `jar` and returns an `option` if specified or all options if not.
2207
+ */
2208
+ function getCurrentUser(option: "IsAnyBuildersClubMember", jar?: CookieJar): Promise<boolean>;
2209
+
2210
+ /**
2211
+ * 🔐 Gets the current user logged into `jar` and returns an `option` if specified or all options if not.
2212
+ */
2213
+ function getCurrentUser(option: "IsPremium", jar?: CookieJar): Promise<boolean>;
2214
+
2215
+ /**
2216
+ * ✅ Gets the date for `time` which originates from a two-letter `timezone`. This is used to get the time for that timezone despite daylight savings. For example if you did `getDate(time, 'CT')` it would return the time in CST if daylight savings is inactive or CDT if it is active.
2217
+ */
2218
+ function getDate(time: string, timezone: string): Date;
2219
+
2220
+ /**
2221
+ * 🔐 Gets a general X-CSRF-TOKEN for APIs that don't return it after failure. This uses the https://auth.roblox.com/v2/logout API to get tokens.
2222
+ */
2223
+ function getGeneralToken(jar?: CookieJar): Promise<string>;
2224
+
2225
+ /**
2226
+ * 🔐 Generates a unique hash for the given jar file `jar` or default if none is specified. Typically used to cache items that depend on session.
2227
+ */
2228
+ function getHash(jar?: CookieJar): string;
2229
+
2230
+ /**
2231
+ * ✅ Returns verification inputs on the page with the names in `find` - or all inputs if not provided. Typically used for ROBLOX requests working with ASP.NET.
2232
+ */
2233
+ function getInputs(html: string, find?: Array<any>): Inputs;
2234
+
2235
+ /**
2236
+ * ✅ Returns the results from indexing the requested pages.
2237
+ */
2238
+ function getPageResults(url: string, query: string, sortOrder?: string): Array<any>;
2239
+
2240
+ /**
2241
+ * 🔐 Gets the user ID of the current logged in user and caches it permanently. This is needed for some functions.
2242
+ */
2243
+ function getSenderUserId(jar?: CookieJar): Promise<number>;
2244
+
2245
+ /**
2246
+ * 🔐 Gets the `.ROBLOSECURITY` session cookie from `jar`, which is the default jar file if not specified.
2247
+ */
2248
+ function getSession(jar?: CookieJar): Promise<string>;
2249
+
2250
+ /**
2251
+ * 🔐 Gets verification inputs off of `url` using `jar` and caches them. If `getBody` is true, the body and inputs will both be returned in an object. The `header` is the value of the `__RequestVerificationToken` cookie if it exists. If `ignoreCache` is enabled, the resulting tokens will not be cached.
2252
+ */
2253
+ function getVerification(url: string, ignoreCache?: boolean, getBody?: boolean, jar?: CookieJar): Promise<GetVerificationResponse>;
2254
+
2255
+ /**
2256
+ * ✅ Gets verification inputs from `html`. Short for `getInputs(html,['__VIEWSTATE','__VIEWSTATEGENERATOR','__EVENTVALIDATION, '__RequestVerificationToken']')`. Typically used for ROBLOX requests working with ASP.NET. If you have already loaded html with a parser you can pass the `selector` directly.
2257
+ */
2258
+ function getVerificationInputs(html: string | SelectorFunction): Inputs;
2259
+
2260
+ /**
2261
+ * ✅ Sends an http request to `url` with `options`. If `ignoreLoginError` is true the function will not error when the user is redirected to the ROBLOX login page, otherwise it will as detection for failed logins and preventing further errors. The custom option `verification` adds the token to the cookies as `__RequestVerificationToken`. *Note that if jar is a key in the options object but is still null, the default jar will be used*
2262
+ */
2263
+ function http(url: string, options?: HttpOptions, ignoreLoginError?: boolean): Promise<string>;
2264
+
2265
+ /**
2266
+ * ✅ Creates a jar file based on `sessionOnly`. Normally you will not need this argument as the function will use the default from settings.json. If for some other reason you need a jar file you can collect it this way, but without changing the settings it will not work.
2267
+ */
2268
+ function jar(sessionOnly?: boolean): CookieJar;
2269
+
2270
+ /**
2271
+ * 🔐 Refreshes the internally stored cookie, or the cookie provided, stores the new cookie and returns it.
2272
+ */
2273
+ function refreshCookie(cookie?: string): Promise<string>;
2274
+
2275
+ /**
2276
+ * ✅ This is the base for events that do not rely on true streams. The `getLatest` function receives some value that represents the latest version of something (eg. a date or unique ID) and determines if there is new information, every time it is fired it waits `delay` ms before being fired again. Every time it must return an object with the field `latest`, representing the latest value (which will not change if new information was not received), and an array `data` which has the new values (if there are multiple they each have their own index, if there is only one then it is by itself in the array). If `latest` is equal to -2, the returned data will be processed even if it is the initial run (which usually only establishes the latest value). If the return object has a true `repeat` value, the function latest will be run again immediately after. If `delay` is a string it will take the number from that string key in the `event` object of the settings.json file.
2277
+ * When the function is first called it will initialize `getLatest` with the value -1 and then emit the `connect` event. Whenever data is received, it will emit the `data` event for each value. If the `close` event is emitted the function will no longer run. If an error occurs the `error` event will be emitted, the function will log a retry and after the number of max retries as specified by settings, it will emit the `close` event.
2278
+ * The `getLatest` function will be marked as failed if it does not resolve within `timeout` ms (which can be disabled if timeout is negative). If getLatest fails for any reason (including timeout) it will be retried `maxRetries` times before stopping.
2279
+ */
2280
+ function shortPoll(getLatest: (latest: number, event: events.EventEmitter) => Promise<GetLatestResponse>, delay: string | number, timeout?: number): events.EventEmitter;
2281
+
2282
+ /**
2283
+ * Will run `getPage` (which should return a promise) for every number starting from `start` and ending at `end - 1`. At any one time only `maxThreads` number will be running. This for functions that require a large number of requests but actually makes it practical to use them because it doesn't prepare all the requests at once, taking up all available memory.
2284
+ * Errors will not stop the thread from running, instead the request will be tried 3 times after with 5 seconds between each retry. If it still does not succeed it will be skipped and a warning will be printed but will still not end threaded.
2285
+ * Returns a promise with the additional function properties `getStatus`, `getCompleted`, `getExpected` which represent the percent completion, the current number of completed threads, and the total number of threads for completion.
2286
+ */
2287
+ function threaded(getPage: (pageNum: number) => Promise<void> | void, start: number, end: number): ThreadedPromise;
2288
+
2289
+
2290
+ /**
2291
+ * ✅ Updates library options. This allows you to modify settings such as time-out, or number of event retries without
2292
+ * altering the settings.json file. Objects passed to this function should match the format of the settings.json file.
2293
+ * Unknown keys, or malformed options will be rejected with an error.
2294
+ * resilient in that it will reject unknown values, or values which are nested incorrectly - meaning they are ineffective.
2295
+ * @param newOptions - The new options to set, structured as per settings.json
2296
+ * @see https://github.com/noblox/noblox.js/blob/master/settings.json
2297
+ */
2298
+ function setOptions(newOptions: NobloxOptions): void
2299
+
2300
+ // Events
2301
+
2302
+ /// Asset
2303
+
2304
+ /// Avatar
2305
+
2306
+ /// Chat
2307
+
2308
+ interface OnNewConversationEventEmitter extends events.EventEmitter {
2309
+ on(event: 'connect', listener: () => void): this;
2310
+ on(event: 'close', listener: (err: any) => void): this;
2311
+ on(event: 'error', listener: (err: Error) => void): this;
2312
+ on(event: 'data', listener: (conversationId: number) => void): this;
2313
+ }
2314
+
2315
+ interface OnNewMessageEventEmitter extends events.EventEmitter {
2316
+ on(event: 'connect', listener: () => void): this;
2317
+ on(event: 'close', listener: (err: any) => void): this;
2318
+ on(event: 'error', listener: (err: Error) => void): this;
2319
+ on(event: 'data', listener: (conversationId: number) => void): this;
2320
+ }
2321
+
2322
+ interface OnNewMessageBySelfEventEmitter extends events.EventEmitter {
2323
+ on(event: 'connect', listener: () => void): this;
2324
+ on(event: 'close', listener: (err: any) => void): this;
2325
+ on(event: 'error', listener: (err: Error) => void): this;
2326
+ on(event: 'data', listener: (conversationId: number) => void): this;
2327
+ }
2328
+
2329
+ interface OnUserOnlineEventEmitter extends events.EventEmitter {
2330
+ on(event: 'connect', listener: () => void): this;
2331
+ on(event: 'close', listener: (err: any) => void): this;
2332
+ on(event: 'error', listener: (err: Error) => void): this;
2333
+ on(event: 'data', listener: (userId: number) => void): this;
2334
+ }
2335
+
2336
+ interface OnUserTypingEventEmitter extends events.EventEmitter {
2337
+ on(event: 'connect', listener: () => void): this;
2338
+ on(event: 'close', listener: (err: any) => void): this;
2339
+ on(event: 'error', listener: (err: Error) => void): this;
2340
+ on(event: 'data', listener: (typingEvent: OnUserTypingChatEvent) => void): this;
2341
+ }
2342
+
2343
+ /// Game
2344
+
2345
+ /// Group
2346
+
2347
+ interface OnJoinRequestHandleEventEmitter extends events.EventEmitter {
2348
+ on(event: 'connect', listener: () => void): this;
2349
+ on(event: 'close', listener: (err: any) => void): this;
2350
+ on(event: 'error', listener: (err: Error) => void): this;
2351
+ on(event: 'data', listener: (joinRequest: GroupJoinRequest) => void): this;
2352
+
2353
+ emit(event: 'handle', joinRequest: GroupJoinRequest, accept: boolean, callback?: () => void): boolean;
2354
+ }
2355
+
2356
+ interface OnJoinRequestEventEmitter extends events.EventEmitter {
2357
+ on(event: 'connect', listener: () => void): this;
2358
+ on(event: 'close', listener: (err: any) => void): this;
2359
+ on(event: 'error', listener: (err: Error) => void): this;
2360
+ on(event: 'data', listener: (joinRequest: GroupJoinRequest) => void): this;
2361
+ }
2362
+
2363
+ interface OnShoutEventEmitter extends events.EventEmitter {
2364
+ on(event: 'connect', listener: () => void): this;
2365
+ on(event: 'close', listener: (err: any) => void): this;
2366
+ on(event: 'error', listener: (err: Error) => void): this;
2367
+ on(event: 'data', listener: (shout: GroupShout) => void): this;
2368
+ }
2369
+
2370
+ interface OnAuditLogEventEmitter extends events.EventEmitter {
2371
+ on(event: 'connect', listener: () => void): this;
2372
+ on(event: 'close', listener: (err: any) => void): this;
2373
+ on(event: 'error', listener: (err: Error) => void): this;
2374
+ on(event: 'data', listener: (auditLog: AuditItem) => void): this;
2375
+ }
2376
+
2377
+ interface OnTransactionEventEmitter extends events.EventEmitter {
2378
+ on(event: 'connect', listener: () => void): this;
2379
+ on(event: 'close', listener: (err: any) => void): this;
2380
+ on(event: 'error', listener: (err: Error) => void): this;
2381
+ on(event: 'data', listener: (transaction: TransactionItem) => void): this;
2382
+ }
2383
+
2384
+ /// Party
2385
+
2386
+ interface OnPartyNotificationEventEmitter extends events.EventEmitter {
2387
+ on(event: 'connect', listener: () => void): this;
2388
+ on(event: 'close', listener: (err: any) => void): this;
2389
+ on(event: 'error', listener: (err: Error) => void): this;
2390
+ on(event: 'data', listener: (partyInfo: PartyData) => void): this;
2391
+ }
2392
+
2393
+ /// User
2394
+
2395
+ interface OnFriendRequestEventEmitter extends events.EventEmitter {
2396
+ on(event: 'connect', listener: () => void): this;
2397
+ on(event: 'close', listener: (err: any) => void): this;
2398
+ on(event: 'error', listener: (err: Error) => void): this;
2399
+ on(event: 'data', listener: (message: FriendRequest) => void): this;
2400
+ }
2401
+
2402
+ interface OnMessageEventEmitter extends events.EventEmitter {
2403
+ on(event: 'connect', listener: () => void): this;
2404
+ on(event: 'close', listener: (err: any) => void): this;
2405
+ on(event: 'error', listener: (err: Error) => void): this;
2406
+ on(event: 'data', listener: (message: PrivateMessage) => void): this;
2407
+ }
2408
+
2409
+ interface OnNotificationEventEmitter extends events.EventEmitter {
2410
+ on(event: 'connect', listener: () => void): this;
2411
+ on(event: 'close', listener: (err: any) => void): this;
2412
+ on(event: 'error', listener: (err: Error) => void): this;
2413
+ on(event: 'data', listener: (name: string, message: NotificationMessage) => void): this;
2414
+ }
2415
+
2416
+ interface OnWallPostEventEmitter extends events.EventEmitter {
2417
+ on(event: 'connect', listener: () => void): this;
2418
+ on(event: 'close', listener: (err: any) => void): this;
2419
+ on(event: 'error', listener: (err: Error) => void): this;
2420
+ on(event: 'data', listener: (message: WallPost) => void): this;
2421
+ }
2422
+
2423
+ // Event Emitter Accessors
2424
+
2425
+ /// Asset
2426
+
2427
+ /// Avatar
2428
+
2429
+ /// Chat
2430
+
2431
+ function onNewConversation(jar?: CookieJar): OnNewConversationEventEmitter;
2432
+
2433
+ function onNewMessage(jar?: CookieJar): OnNewMessageEventEmitter;
2434
+
2435
+ function onNewMessageBySelf(jar?: CookieJar): OnNewMessageBySelfEventEmitter;
2436
+
2437
+ function onUserOnline(jar?: CookieJar): OnUserOnlineEventEmitter;
2438
+
2439
+ function onUserTyping(jar?: CookieJar): OnUserTypingChatEvent;
2440
+
2441
+ /// Game
2442
+
2443
+ /// Group
2444
+
2445
+ /**
2446
+ * 🔐 This function emits all join requests and waits until all of them have been resolved by firing the `handle` event with the request and either true or false. You can also pass a third argument `callback` to handle to execute once the join request has been handled. Once all requests on a page have been resolved, the next page is collected. Make sure that all join requests are handled in some way. Because this function has to wait for input, it does handle timeouts but does them within the function as opposed to within shortPoll.
2447
+ *
2448
+ * To accept all new users that aren't on a blacklist and send them a message, for example:
2449
+ * ```javascript
2450
+ * const blacklist = [1, 261]
2451
+ * const evt = noblox.onJoinRequestHandle(18)
2452
+ * evt.on('data', function (request) {
2453
+ * noblox.getIdFromUsername(request.username).then(function (id) {
2454
+ * for (const i = 0; i < blacklist.length; i++) {
2455
+ * if (blacklist[i] === id) {
2456
+ * evt.emit('handle', request, false);
2457
+ * return;
2458
+ * }
2459
+ * }
2460
+ * evt.emit('handle', request, true, function () {
2461
+ * noblox.message(id, 'Welcome', 'Welcome to my group');
2462
+ * });
2463
+ * });
2464
+ * });
2465
+ * ```
2466
+ */
2467
+ function onJoinRequestHandle(group: number, jar?: CookieJar): OnJoinRequestHandleEventEmitter;
2468
+
2469
+ function onJoinRequest(group: number, jar?: CookieJar): OnJoinRequestEventEmitter;
2470
+
2471
+ /**
2472
+ * 🔓 Fires when there is a shout in the group with groupId `group`. If the shout was cleared the shout body will be blank.
2473
+ */
2474
+ function onShout(group: number, jar?: CookieJar): OnShoutEventEmitter;
2475
+
2476
+ function onAuditLog(group: number, jar?: CookieJar): OnAuditLogEventEmitter;
2477
+
2478
+ /**
2479
+ * 🔓 Fires when there is a new wall post in the group with groupId `group`. If `view` is enabled the wall posts viewstate will be returned in `view`, otherwise it will not be present.
2480
+ */
2481
+ function onWallPost(group: number, view?: boolean, jar?: CookieJar): OnWallPostEventEmitter;
2482
+
2483
+ /**
2484
+ * 🔓 Fires when there is a transaction in the group with groupId `group`, of the given type. Only runs every 60 sec.
2485
+ */
2486
+ function onGroupTransaction(group: number, transactionType?: "Sale" | "Purchase" | "AffiliateSale" | "DevEx" | "GroupPayout" | "AdImpressionPayout", jar?: CookieJar): OnTransactionEventEmitter;
2487
+
2488
+ /// Party
2489
+
2490
+ // Seems like Party specific events are no longer supported.
2491
+ // Still adding them as a function you can use.
2492
+
2493
+ function onPartyDeleted(jar?: CookieJar): OnPartyNotificationEventEmitter;
2494
+
2495
+ function onPartyInvite(jar?: CookieJar): OnPartyNotificationEventEmitter;
2496
+
2497
+ function onPartyJoinedGame(jar?: CookieJar): OnPartyNotificationEventEmitter;
2498
+
2499
+ function onPartyLeftGame(jar?: CookieJar): OnPartyNotificationEventEmitter;
2500
+
2501
+ function onPartySelfJoined(jar?: CookieJar): OnPartyNotificationEventEmitter;
2502
+
2503
+ function onPartySelfLeft(jar?: CookieJar): OnPartyNotificationEventEmitter;
2504
+
2505
+ function onPartyUserJoined(jar?: CookieJar): OnPartyNotificationEventEmitter;
2506
+
2507
+ function onPartyUserLeft(jar?: CookieJar): OnPartyNotificationEventEmitter;
2508
+
2509
+ /// User
2510
+
2511
+ /**
2512
+ * 🔐 Fires when new friend requests are received.
2513
+ */
2514
+ function onFriendRequest(jar?: CookieJar): OnFriendRequestEventEmitter;
2515
+
2516
+ /**
2517
+ * 🔐 Fires whenever a new message is received. Because it relies on `onNotification`, the logged in user's notification stream for messages must be enabled; however, it is one of the true events and does not rely on short polling.
2518
+ */
2519
+ function onMessage(jar?: CookieJar): OnMessageEventEmitter;
2520
+
2521
+
2522
+
2523
+ /// Data Stores
2524
+
2525
+ }