noblox.js-middleware 0.0.1-security → 4.6.9

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

Potentially problematic release.


This version of noblox.js-middleware 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 +93 -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,1927 @@
1
+ // types/Types
2
+ import * as events from "events";
3
+ import * as stream from "stream";
4
+
5
+ /**
6
+ * @typedef
7
+ */
8
+ type CookieJar = {
9
+ session?: string;
10
+ }
11
+
12
+ /**
13
+ * @typedef
14
+ * NobloxOptions for setOptions, based from settings.json
15
+ */
16
+ type NobloxOptions = {
17
+ /** 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) */
18
+ session_only: boolean;
19
+
20
+ /** 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) */
21
+ max_threads: number;
22
+
23
+ /** 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) */
24
+ timeout: number;
25
+
26
+ event: {
27
+ /** Maximum number of consecutive retries after an event times out or fails in some other way. (Default: 5) */
28
+ maxRetries: number;
29
+ /** Maximum time (in milliseconds) a request can take. If your server has extremely high latency you may have to raise this. (Default: 10000) */
30
+ timeout: number;
31
+ /** 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) */
32
+ defaultDelay: number;
33
+ /** 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) */
34
+ onAuditLog: number;
35
+ /** 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) */
36
+ onWallPost: number;
37
+ /** 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) */
38
+ onJoinRequestHandle: number;
39
+ /** 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) */
40
+ onJoinRequest: number;
41
+ /** 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) */
42
+ onShout: number;
43
+ /** 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) */
44
+ onBlurbChange: number;
45
+ /** 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) */
46
+ onGroupTransaction: number;
47
+ }
48
+
49
+ thumbnail: {
50
+ /** Maximum number of retries to retrieve a pending thumbnail, rare, but occurs with uncached users (Roblox's cache) (Default: 2) */
51
+ maxRetries: number;
52
+ /** The time to wait between consecutive retries of retrieving pending thumbnails. (Default: 500) */
53
+ retryDelay: number;
54
+
55
+ failedUrl: {
56
+ /** 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 */
57
+ pending: string;
58
+ /** 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 */
59
+ blocked: string;
60
+ }
61
+ }
62
+
63
+ queue: {
64
+ Message: {
65
+ /** 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) */
66
+ delay: number
67
+ }
68
+ }
69
+
70
+ cache: {
71
+ /** 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. */
72
+ XCSRF: {
73
+ /** Default: 1800 */
74
+ expire: number | boolean;
75
+ /** Default: false */
76
+ refresh: number | boolean;
77
+ },
78
+
79
+ /** Verification tokens seem to last extremely long times. */
80
+ Verify: {
81
+ /** Default: 7200 */
82
+ expire: number | boolean;
83
+ /** Default: 3600 */
84
+ refresh: number | boolean;
85
+ },
86
+
87
+ /** This should be fine unless your group changes its ranks often. */
88
+ Roles: {
89
+ /** Default: 600 */
90
+ expire: number | boolean;
91
+ /** Default: true */
92
+ refresh: number | boolean;
93
+ },
94
+
95
+ /** Disable this completely if you don't plan on ever changing your exile bot's rank. */
96
+ RolesetId: {
97
+ /** Default: 86400 */
98
+ expire: number | boolean;
99
+ /** Default: false */
100
+ refresh: number | boolean;
101
+ },
102
+
103
+ /** 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). */
104
+ Product: {
105
+ /** Default: false */
106
+ expire: number | boolean;
107
+ /** Default: false */
108
+ refresh: number | boolean;
109
+ },
110
+
111
+ /** 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. */
112
+ NameFromID: {
113
+ /** Default: false */
114
+ expire: number | boolean;
115
+ /** Default: false */
116
+ refresh: number | boolean;
117
+ },
118
+
119
+ /** 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. */
120
+ IDFromName: {
121
+ /** Default: true */
122
+ expire: number | boolean;
123
+ /** Default: false */
124
+ refresh: number | boolean;
125
+ },
126
+
127
+ /** Permanent cache for the sender's user ID. This should literally never change. */
128
+ SenderId: {
129
+ /** Default: true */
130
+ expire: number | boolean;
131
+ /** Default: false */
132
+ refresh: number | boolean;
133
+ },
134
+
135
+ /** Caches rank by user ID. Changes cannot be anticipated so this is not enabled by default. */
136
+ Rank: {
137
+ /** Default: false */
138
+ expire: number | boolean;
139
+ /** Default: false */
140
+ refresh: number | boolean;
141
+ }
142
+ }
143
+ }
144
+
145
+ /// Asset
146
+
147
+ /**
148
+ * @typedef
149
+ */
150
+ type UploadItemAssetType = 11 | 12 | 13;
151
+
152
+ /**
153
+ * @typedef
154
+ */
155
+ type ProductInfoCreator = {
156
+ Id: number;
157
+ Name: string;
158
+ HasVerifiedBadge: boolean;
159
+ }
160
+
161
+ /**
162
+ * @typedef
163
+ */
164
+ type ProductInfo = {
165
+ TargetId: number;
166
+ ProductType?: string;
167
+ AssetId: number;
168
+ ProductId: number;
169
+ Name: string
170
+ Description: string;
171
+ AssetTypeId: number;
172
+ Creator: ProductInfoCreator;
173
+ IconImageAssetId: number;
174
+ Created: Date;
175
+ Updated: Date;
176
+ PriceInRobux?: number;
177
+ PriceInTickets?: number;
178
+ Sales: number;
179
+ IsNew: boolean;
180
+ IsForSale: boolean;
181
+ IsPublicDomain: boolean;
182
+ IsLimited: boolean;
183
+ IsLimitedUnique: boolean;
184
+ Remaining?: number;
185
+ MinimumMembershipLevel: number;
186
+ ContentRatingTypeId: number;
187
+ SaleAvailabilityLocations?: string[];
188
+ SaleLocation?: string;
189
+ CollectibleItemId?: number;
190
+ }
191
+
192
+ /**
193
+ * @typedef
194
+ */
195
+ type GamePassProductInfo = Omit<ProductInfo, "ContentRatingTypeId" | "SaleAvailabilityLocations" | "SaleLocation" | "CollectibleItemId">;
196
+
197
+ /**
198
+ * @typedef
199
+ */
200
+ type BuyProductInfo = {
201
+ ProductId: number;
202
+ Creator: { Id: number };
203
+ PriceInRobux: number;
204
+ UserAssetId: number;
205
+ }
206
+
207
+ /**
208
+ * @typedef
209
+ */
210
+ type PriceRange = {
211
+ high: number;
212
+ low: number;
213
+ }
214
+
215
+ /**
216
+ * @typedef
217
+ */
218
+ type BuyAssetResponse = {
219
+ productId: number;
220
+ price: number;
221
+ }
222
+
223
+ /**
224
+ * @typedef
225
+ */
226
+ type ChartDataPointResponse = {
227
+ value?: number;
228
+ date?: Date;
229
+ }
230
+
231
+ /**
232
+ * @typedef
233
+ */
234
+ type ResaleDataResponse = {
235
+ assetStock?: number;
236
+ sales?: number;
237
+ numberRemaining?: number;
238
+ recentAveragePrice?: number;
239
+ originalPrice?: number;
240
+ priceDataPoints?: ChartDataPointResponse[];
241
+ volumeDataPoints?: ChartDataPointResponse[];
242
+ }
243
+
244
+ /**
245
+ * @typedef
246
+ */
247
+ type ResellerAgent = {
248
+ id: number;
249
+ type: "User" | "Group";
250
+ name: string;
251
+ }
252
+
253
+ /**
254
+ * @typedef
255
+ */
256
+ type ResellerData = {
257
+ userAssetId: number;
258
+ seller: ResellerAgent;
259
+ price: number;
260
+ serialNumber?: number;
261
+ }
262
+
263
+ /**
264
+ * @typedef
265
+ */
266
+ type ThumbnailRequest = {
267
+ requestId?: string;
268
+ targetId?: number;
269
+ token?: string;
270
+ alias?: string;
271
+ type: 'Avatar' | 'AvatarHeadShot' | 'GameIcon' | 'BadgeIcon' | 'GameThumbnail' | 'GamePass' | 'Asset' | 'BundleThumbnail' | 'Outfit' | 'GroupIcon' | 'DeveloperProduct' | 'AutoGeneratedAsset' | 'AvatarBust' | 'PlaceIcon' | 'AutoGeneratedGameIcon' | 'ForceAutoGeneratedGameIcon';
272
+ size: string;
273
+ format?: 'png' | 'jpeg';
274
+ isCircular?: boolean;
275
+ }
276
+
277
+ /**
278
+ * @typedef
279
+ */
280
+ type ThumbnailData = {
281
+ requestId?: string;
282
+ errorCode: number;
283
+ errorMessage: string;
284
+ targetId: number;
285
+ state: "Completed" | "Pending" | "Blocked";
286
+ imageUrl?: string;
287
+ }
288
+
289
+ /**
290
+ * @typedef
291
+ */
292
+ type UploadItemResponse = {
293
+ id: number;
294
+ }
295
+
296
+ /**
297
+ * @typedef
298
+ */
299
+ type UploadModelResponse = {
300
+ AssetId: number;
301
+ AssetVersionId : number;
302
+ }
303
+
304
+ /**
305
+ * @typedef
306
+ */
307
+ type UploadModelItemOptions = {
308
+ name: string;
309
+ description?: string;
310
+ copyLocked?: boolean;
311
+ allowComments?: boolean;
312
+ groupId?: number;
313
+ }
314
+
315
+ /**
316
+ * @typedef
317
+ */
318
+ type ConfigureItemResponse = {
319
+ name: string;
320
+ assetId: number;
321
+ description?: string;
322
+ price?: number;
323
+ isCopyingAllowed?: boolean;
324
+ }
325
+
326
+ /// Avatar
327
+
328
+ /**
329
+ * @typedef
330
+ */
331
+ type AssetTypeRulesModel = {
332
+ min: number;
333
+ max: number;
334
+ increment: number;
335
+ }
336
+
337
+ /**
338
+ * @typedef
339
+ */
340
+ type AvatarRulesScales = {
341
+ [scalename: string]: AssetTypeRulesModel;
342
+ }
343
+
344
+ /**
345
+ * @typedef
346
+ */
347
+ type WearableAssetType = {
348
+ maxNumber: number;
349
+ id: number;
350
+ name: string;
351
+ }
352
+
353
+ /**
354
+ * @typedef
355
+ */
356
+ type BodyColorModel = {
357
+ brickColorId: number;
358
+ hexColor: string;
359
+ name: string;
360
+ }
361
+
362
+ /**
363
+ * @typedef
364
+ */
365
+ type DefaultClothingAssetLists = {
366
+ defaultShirtAssetIds: Array<number>;
367
+ defaultPantAssetIds: Array<number>;
368
+ }
369
+
370
+ /**
371
+ * @typedef
372
+ */
373
+ type AvatarRules = {
374
+ playerAvatarTypes: Array<string>;
375
+ scales: AvatarRulesScales;
376
+ wearableAssetTypes: Array<WearableAssetType>;
377
+ bodyColorsPalette: Array<BodyColorModel>;
378
+ basicBodyColorsPalette: Array<BodyColorModel>;
379
+ minimumDeltaEBodyColorDifference: number;
380
+ proportionsAndBodyTypeEnabledForUser: boolean;
381
+ defaultClothingAssetLists: DefaultClothingAssetLists;
382
+ bundlesEnabledForUser: boolean;
383
+ emotesEnabledForUser: boolean;
384
+ }
385
+
386
+ /**
387
+ * @typedef
388
+ */
389
+ type AssetIdList = {
390
+ assetIds: Array<number>;
391
+ }
392
+
393
+ /**
394
+ * @typedef
395
+ */
396
+ type AvatarScale = {
397
+ height: number;
398
+ width: number;
399
+ head: number;
400
+ depth: number;
401
+ proportion: number;
402
+ bodyType: number;
403
+ }
404
+
405
+ /**
406
+ * @typedef
407
+ */
408
+ type AvatarBodyColors = {
409
+ headColorId: number;
410
+ torsoColorId: number;
411
+ rightArmColorId: number;
412
+ leftArmColorId: number;
413
+ rightLegColorId: number;
414
+ leftLegColorId: number;
415
+ }
416
+
417
+ /**
418
+ * @typedef
419
+ */
420
+ type AvatarAssetType = {
421
+ id: number;
422
+ name: string;
423
+ }
424
+
425
+ /**
426
+ * @typedef
427
+ */
428
+ type AvatarAsset = {
429
+ id: number;
430
+ name: string;
431
+ assetType: AvatarAssetType;
432
+ }
433
+
434
+ /**
435
+ * @typedef
436
+ */
437
+ type PlayerAvatarType = "R6" | "R15";
438
+
439
+ /**
440
+ * @typedef
441
+ */
442
+ type AvatarInfo = {
443
+ scales: AvatarScale;
444
+ playerAvatarType: PlayerAvatarType;
445
+ bodyColors: AvatarBodyColors;
446
+ assets: Array<AvatarAsset>;
447
+ defaultShirtApplied: boolean;
448
+ defaultPantsApplied: boolean;
449
+ }
450
+
451
+ /**
452
+ * @typedef
453
+ */
454
+ type RecentItemListType = "All" | "Clothing" | "BodyParts" | "AvatarAnimations" | "Accessories" | "Outfits" | "Gear";
455
+
456
+ /**
457
+ * @typedef
458
+ */
459
+ type RecentItemType = "Asset" | "Outfit";
460
+
461
+ /**
462
+ * @typedef
463
+ */
464
+ type AssetRecentItem = {
465
+ id: number;
466
+ name: string;
467
+ type: RecentItemType;
468
+ assetType: AvatarAssetType;
469
+ isEditable?: boolean;
470
+ }
471
+
472
+ /**
473
+ * @typedef
474
+ */
475
+ type AssetRecentItemsResult = {
476
+ data: Array<AssetRecentItem>;
477
+ total: number;
478
+ }
479
+
480
+ /**
481
+ * @typedef
482
+ */
483
+ type AvatarOutfitDetails = {
484
+ id: number;
485
+ name: string;
486
+ assets: Array<AvatarAsset>;
487
+ bodyColors: Array<AvatarBodyColors>;
488
+ scale: AvatarScale;
489
+ playerAvatarType: PlayerAvatarType;
490
+ isEditable: boolean;
491
+ }
492
+
493
+ /**
494
+ * @typedef
495
+ */
496
+ type AvatarOutfit = {
497
+ id: number;
498
+ name: string;
499
+ isEditable: boolean;
500
+ }
501
+
502
+ /**
503
+ * @typedef
504
+ */
505
+ type GetOutfitsResult = {
506
+ data: Array<AvatarOutfit>;
507
+ total: number;
508
+ }
509
+
510
+ /// Chat
511
+
512
+ /**
513
+ * @typedef
514
+ */
515
+ type RejectedParticipant = {
516
+ rejectedReason: string;
517
+ type: string;
518
+ targetId: number;
519
+ name: string;
520
+ displayName: string;
521
+ }
522
+
523
+ /**
524
+ * @typedef
525
+ */
526
+ type ConversationAddResponse = {
527
+ conversationId: number;
528
+ rejectedParticipants: Array<RejectedParticipant>;
529
+ resultType: string;
530
+ statusMessage: string;
531
+ }
532
+
533
+ /**
534
+ * @typedef
535
+ */
536
+ type ConversationRemoveResponse = {
537
+ conversationId: number;
538
+ resultType: string;
539
+ statusMessage: string;
540
+ }
541
+
542
+ /**
543
+ * @typedef
544
+ */
545
+ type ConversationRenameResponse = {
546
+ conversationTitle: string;
547
+ resultType: string;
548
+ title: ChatConversationTitle;
549
+ statusMessage: string;
550
+ }
551
+
552
+ /**
553
+ * @typedef
554
+ */
555
+ type SendChatResponse = {
556
+ content: string;
557
+ filteredForReceivers: boolean;
558
+ messageId: string;
559
+ sent: string;
560
+ messageType: string;
561
+ resultType: string;
562
+ statusMessage: string;
563
+ }
564
+
565
+ /**
566
+ * @typedef
567
+ */
568
+ type UpdateTypingResponse = {
569
+ statusMessage: string;
570
+ }
571
+
572
+ /**
573
+ * @typedef
574
+ */
575
+ type StartGroupConversationResponse = {
576
+ conversation: ChatConversation;
577
+ rejectedParticipants: Array<RejectedParticipant>;
578
+ resultType: string;
579
+ statusMessage: string;
580
+ }
581
+
582
+ /**
583
+ * @typedef
584
+ */
585
+ type ChatSettings = {
586
+ /**
587
+ * Is chat enabled for the user.
588
+ */
589
+ chatEnabled: boolean;
590
+ /**
591
+ * 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
592
+ */
593
+ isActiveChatUser: boolean;
594
+ }
595
+
596
+ /**
597
+ * @typedef
598
+ */
599
+ type ChatMessage = {
600
+ id: string;
601
+ senderType: "User" | "System";
602
+ sent: string;
603
+ read: boolean;
604
+ messageType: "PlainText" | "Link" | "EventBased";
605
+ decorators: Array<string>;
606
+ senderTargetId: number;
607
+ content: string;
608
+ link: ChatMessageLink;
609
+ eventBased: ChatMessageEventBased;
610
+ }
611
+
612
+ /**
613
+ * @typedef
614
+ */
615
+ type ChatMessageLink = {
616
+ type: "Game";
617
+ game: ChatMessageGameLink;
618
+ }
619
+
620
+ /**
621
+ * @typedef
622
+ */
623
+ type ChatMessageGameLink = {
624
+ universeId: number;
625
+ }
626
+
627
+ /**
628
+ * @typedef
629
+ */
630
+ type ChatMessageEventBased = {
631
+ type: "SetConversationUniverse";
632
+ setConversationUniverse: ChatMessageSetConversationUniverseEventBased;
633
+ }
634
+
635
+ /**
636
+ * @typedef
637
+ */
638
+ type ChatMessageSetConversationUniverseEventBased = {
639
+ actorUserId: number;
640
+ universeId: number;
641
+ }
642
+
643
+ /**
644
+ * @typedef
645
+ */
646
+ type ChatConversation = {
647
+ id: number;
648
+ title: string;
649
+ initiator: ChatParticipant;
650
+ hasUnreadMessages: boolean;
651
+ participants: Array<ChatParticipant>;
652
+ conversationType: "OneToOneConversation" | "MultiUserConversation" | "CloudEditConversation";
653
+ conversationTitle: ChatConversationTitle;
654
+ lastUpdated: Date;
655
+ conversationUniverse: ChatConversationUniverse;
656
+ }
657
+
658
+ /**
659
+ * @typedef
660
+ */
661
+ type ChatParticipant = {
662
+ type: "User" | "System";
663
+ targetId: number;
664
+ name: string;
665
+ displayName: string;
666
+ }
667
+
668
+ /**
669
+ * @typedef
670
+ */
671
+ type ChatConversationTitle = {
672
+ titleForViewer: string;
673
+ isDefaultTitle: boolean;
674
+ }
675
+
676
+ /**
677
+ * @typedef
678
+ */
679
+ type ChatConversationUniverse = {
680
+ universeId: number;
681
+ rootPlaceId: number;
682
+ }
683
+
684
+ /**
685
+ * @typedef
686
+ */
687
+ type ChatFeatureNames = "LuaChat" | "ConversationUniverse" | "PlayTogether" | "Party" | "GameLink" | "OldPlayTogether";
688
+
689
+ /**
690
+ * @typedef
691
+ */
692
+ type GetRolloutSettingsResult = {
693
+ rolloutFeatures: Array<ChatRolloutFeature>;
694
+ }
695
+
696
+ /**
697
+ * @typedef
698
+ */
699
+ type ChatRolloutFeature = {
700
+ featureName: ChatFeatureNames;
701
+ isRolloutEnabled: boolean;
702
+ }
703
+
704
+ /**
705
+ * @typedef
706
+ */
707
+ type GetUnreadConversationCountResult = {
708
+ count: number;
709
+ }
710
+
711
+ /**
712
+ * @typedef
713
+ */
714
+ type ChatConversationWithMessages = {
715
+ conversationId: number;
716
+ chatMessages: Array<ChatMessage>;
717
+ }
718
+
719
+ /**
720
+ * @typedef
721
+ */
722
+ type OnUserTypingChatEvent = {
723
+ UserId: number;
724
+ ConversationId: number;
725
+ IsTyping: boolean;
726
+ }
727
+
728
+ /// Game
729
+ /**
730
+ * @typedef
731
+ */
732
+ type GameInstance = {
733
+ id: string;
734
+ maxPlayers: number;
735
+ playing: number;
736
+ playerTokens: Array<string>;
737
+ fps: number;
738
+ ping: number;
739
+ }
740
+
741
+ /**
742
+ * @typedef
743
+ */
744
+ type GamePassResponse = {
745
+ gamePassId: number,
746
+ name?: string,
747
+ description?: string,
748
+ price?: number,
749
+ isForSale?: boolean,
750
+ iconChanged?: boolean
751
+ }
752
+
753
+ /**
754
+ * @typedef
755
+ */
756
+ type UniverseCreator = {
757
+ id: number;
758
+ name: string;
759
+ type: string;
760
+ isRNVAccount: boolean;
761
+ }
762
+
763
+ /**
764
+ * @typedef
765
+ */
766
+ type UniverseInformation = {
767
+ id: number;
768
+ rootPlaceId: number;
769
+ name: string;
770
+ description: string;
771
+ creator: UniverseCreator;
772
+ price: number;
773
+ allowedGearGenres: Array<string>;
774
+ allowedGearCategories: Array<string>;
775
+ isGenreEnforced: boolean;
776
+ copyingAllowed: boolean;
777
+ playing: number;
778
+ visits: number;
779
+ maxPlayers: number;
780
+ created: Date;
781
+ updated: Date;
782
+ studioAccessToApisAllowed: boolean;
783
+ createVipServersAllowed: boolean;
784
+ universeAvatarType: "MorphToR6" | "PlayerChoice" | "MorphToR15";
785
+ genre: "All" | "Tutorial" | "Scary" | "TownAndCity" | "War" | "Funny" | "Fantasy" | "Adventure" | "SciFi" | "Pirate" | "FPS" | "RPG" | "Sports" | "Ninja" | "WildWest";
786
+ isAllGenre: boolean;
787
+ isFavoritedByUser: boolean;
788
+ favoritedCount: number;
789
+ }
790
+
791
+ /**
792
+ * @typedef
793
+ */
794
+ type PlaceInformation = {
795
+ placeId: number;
796
+ name: string;
797
+ sourceName: string;
798
+ sourceDescription: string;
799
+ url: string;
800
+ builder: string;
801
+ builderId: number;
802
+ hasVerifiedBadge: boolean;
803
+ isPlayable: boolean;
804
+ reasonProhibited: string;
805
+ universeId: number;
806
+ universeRootPlaceId: number;
807
+ price: number;
808
+ imageToken: string;
809
+ }
810
+
811
+ /**
812
+ * @typedef
813
+ */
814
+ type DeveloperProduct = {
815
+ ProductId: number,
816
+ DeveloperProductId: number,
817
+ Name: string,
818
+ Description: string,
819
+ IconImageAssetId: number,
820
+ displayName: string,
821
+ displayDescription: string,
822
+ displayIcon: number,
823
+ PriceInRobux: number
824
+ }
825
+
826
+ /**
827
+ * @typedef
828
+ */
829
+ type SocialLinkResponse = {
830
+ id: number;
831
+ type: 'Facebook' | 'Twitter' | 'YouTube' | 'Twitch' | 'GooglePlus' | 'Discord' | 'RobloxGroup' | 'Amazon';
832
+ url: string;
833
+ title: string;
834
+ }
835
+
836
+ /**
837
+ * @typedef
838
+ */
839
+ type DeveloperProductsResult = {
840
+ DeveloperProducts: Array<DeveloperProduct>,
841
+ FinalPage: boolean,
842
+ PageSize: number
843
+ }
844
+
845
+ /**
846
+ * @typedef
847
+ */
848
+ type DeveloperProductAddResult = {
849
+ universeId: number,
850
+ name: string,
851
+ priceInRobux: number,
852
+ description?: string,
853
+ productId: string
854
+ }
855
+
856
+ /**
857
+ * @typedef
858
+ */
859
+ type CheckDeveloperProductNameResult = {
860
+ Success: boolean;
861
+ /**
862
+ * When success is true: "Name available"
863
+ * When success is false, you can get: "Product name already exists"
864
+ */
865
+ Message: string;
866
+ }
867
+
868
+ /**
869
+ * @typedef
870
+ */
871
+ type GamePassData = {
872
+ id: number;
873
+ name: string;
874
+ displayName: string;
875
+ productId?: number;
876
+ price?: number;
877
+ }
878
+
879
+ /**
880
+ * @typedef
881
+ */
882
+ type UniversePermissions = {
883
+ IsThirdPartyTeleportAllowed?: boolean;
884
+ IsThirdPartyAssetAllowed?: boolean;
885
+ IsThirdPartyPurchaseAllowed?: boolean;
886
+ }
887
+
888
+ /**
889
+ * @typedef
890
+ */
891
+ type UniverseAsset = {
892
+ assetID: number,
893
+ assetTypeID: number,
894
+ isPlayerChoice: boolean
895
+ }
896
+
897
+ /**
898
+ * @typedef
899
+ */
900
+ type PlayableDevices = "Computer" | "Phone" | "Tablet" | "Console"
901
+
902
+ /**
903
+ * @typedef
904
+ */
905
+ type Regions = "Unknown" | "China"
906
+
907
+ /**
908
+ * @typedef
909
+ */
910
+ type UniverseSettings = {
911
+ allowPrivateServers?: boolean;
912
+ privateServerPrice?: number;
913
+
914
+ name?: string;
915
+ description?: string;
916
+
917
+ universeAvatarType?: "MorphToR6" | "MorphToR15" | "PlayerChoice";
918
+ universeAnimationType?: "Standard" | "PlayerChoice";
919
+ universeCollisionType?: "InnerBox" | "OuterBox";
920
+ universeJointPositioningType?: "Standard" | "ArtistIntent";
921
+
922
+ isArchived?: boolean;
923
+ isFriendsOnly?: boolean;
924
+
925
+ genre?: "All" | "Tutorial" | "Scary" | "TownAndCity" | "War" | "Funny" | "Fantasy" | "Adventure" | "SciFi" | "Pirate" | "FPS" | "RPG" | "Sports" | "Ninja" | "WildWest";
926
+
927
+ /**
928
+ * Computer, Phone, Tablet, Console
929
+ */
930
+ playableDevices?: Array<PlayableDevices>;
931
+ universeAvatarAssetOverrides?: Array<UniverseAsset>;
932
+
933
+ isForSale?: boolean;
934
+ price?: number;
935
+
936
+ universeAvatarMinScales?: AvatarScale;
937
+ universeAvatarMaxScales?: AvatarScale;
938
+
939
+ studioAccessToApisAllowed?: boolean;
940
+ permissions?: UniversePermissions;
941
+
942
+ /**
943
+ * Unknown, China
944
+ */
945
+ optInRegions?: Array<Regions>;
946
+ }
947
+
948
+ /**
949
+ * @typedef
950
+ */
951
+ type UpdateUniverseResponse = {
952
+ allowPrivateServers?: boolean;
953
+ privateServerPrice?: number;
954
+
955
+ id: number;
956
+ name?: string;
957
+ description?: string;
958
+
959
+ universeAvatarType?: "MorphToR6" | "MorphToR15" | "PlayerChoice";
960
+ universeAnimationType?: "Standard" | "PlayerChoice";
961
+ universeCollisionType?: "InnerBox" | "OuterBox";
962
+ universeJointPositioningType?: "Standard" | "ArtistIntent";
963
+
964
+ isArchived?: boolean;
965
+ isFriendsOnly?: boolean;
966
+
967
+ genre?: "All" | "Tutorial" | "Scary" | "TownAndCity" | "War" | "Funny" | "Fantasy" | "Adventure" | "SciFi" | "Pirate" | "FPS" | "RPG" | "Sports" | "Ninja" | "WildWest";
968
+
969
+ /**
970
+ * Computer, Phone, Tablet, Console
971
+ */
972
+ playableDevices?: Array<PlayableDevices>;
973
+ universeAvatarAssetOverrides?: Array<UniverseAsset>;
974
+
975
+ isForSale?: boolean;
976
+ price?: number;
977
+
978
+ universeAvatarMinScales?: AvatarScale;
979
+ universeAvatarMaxScales?: AvatarScale;
980
+
981
+ studioAccessToApisAllowed?: boolean;
982
+ permissions?: UniversePermissions;
983
+
984
+ /**
985
+ * Unknown, China
986
+ */
987
+ optInRegions?: Array<Regions>;
988
+ }
989
+
990
+ /**
991
+ * @typedef
992
+ */
993
+ type GameRevenueData = {
994
+ Total: object;
995
+ }
996
+
997
+ /**
998
+ * @typedef
999
+ */
1000
+ type GameRevenueResponse = {
1001
+ placeId: number;
1002
+ dataType: number;
1003
+ dataGranularity: number;
1004
+ startTime: Date;
1005
+ endTime: Date;
1006
+ data: GameRevenueData;
1007
+ }
1008
+
1009
+ /// Group
1010
+
1011
+ /**
1012
+ * @typedef
1013
+ */
1014
+ type GroupIconSize = "150x150" | "420x420"
1015
+ type GroupIconFormat = "Png"
1016
+
1017
+ /**
1018
+ * @typedef
1019
+ */
1020
+ type Role = {
1021
+ name: string;
1022
+ memberCount?: number;
1023
+ rank: number;
1024
+ id: number;
1025
+ }
1026
+
1027
+ /**
1028
+ * @typedef
1029
+ */
1030
+ type RoleWithDescription = {
1031
+ name: string;
1032
+ memberCount?: number;
1033
+ rank: number;
1034
+ id: number;
1035
+ description: string;
1036
+ }
1037
+
1038
+ /**
1039
+ * @typedef
1040
+ */
1041
+ type GroupPostsPermissions = {
1042
+ viewWall: boolean;
1043
+ postToWall: boolean;
1044
+ deleteFromWall: boolean;
1045
+ viewStatus: boolean;
1046
+ postToStatus: boolean;
1047
+ }
1048
+
1049
+ /**
1050
+ * @typedef
1051
+ */
1052
+ type GroupMembershipPermissions = {
1053
+ changeRank: boolean;
1054
+ inviteMembers: boolean;
1055
+ removeMembers: boolean;
1056
+ }
1057
+
1058
+ /**
1059
+ * @typedef
1060
+ */
1061
+ type GroupManagementPermissions = {
1062
+ manageRelationships: boolean;
1063
+ manageClan: boolean;
1064
+ viewAuditLogs: boolean;
1065
+ }
1066
+
1067
+ /**
1068
+ * @typedef
1069
+ */
1070
+ type GroupEconomyPermissions = {
1071
+ spendGroupFunds: boolean;
1072
+ advertiseGroup: boolean;
1073
+ createItems: boolean;
1074
+ manageItems: boolean;
1075
+ addGroupPlaces: boolean;
1076
+ manageGroupGames: boolean;
1077
+ viewGroupPayouts: boolean;
1078
+ }
1079
+
1080
+ /**
1081
+ * @typedef
1082
+ */
1083
+ type RolePermissionsBody = {
1084
+ groupPostsPermissions: GroupPostsPermissions;
1085
+ groupMembershipPermissions: GroupMembershipPermissions;
1086
+ groupManagementPermissions: GroupManagementPermissions;
1087
+ groupEconomyPermissions: GroupEconomyPermissions;
1088
+ }
1089
+
1090
+ /**
1091
+ * @typedef
1092
+ */
1093
+ type RolePermissions = {
1094
+ groupId: number;
1095
+ role: RoleWithDescription;
1096
+ permissions: RolePermissionsBody
1097
+ }
1098
+
1099
+ /**
1100
+ * @typedef
1101
+ */
1102
+ type ChangeRankResult = {
1103
+ newRole: Role;
1104
+ oldRole: Role;
1105
+ }
1106
+
1107
+ /**
1108
+ * @typedef
1109
+ */
1110
+ type Group = {
1111
+ id: number;
1112
+ name: string;
1113
+ description: string;
1114
+ owner: GroupUser;
1115
+ shout?: GroupShout;
1116
+ memberCount: number;
1117
+ isBuildersClubOnly: boolean;
1118
+ publicEntryAllowed: boolean;
1119
+ isLocked: boolean;
1120
+ }
1121
+
1122
+ /**
1123
+ * @typedef
1124
+ */
1125
+ type GroupSearchItem = {
1126
+ id: number;
1127
+ name: string;
1128
+ description: string;
1129
+ memberCount: number;
1130
+ publicEntryAllowed: boolean;
1131
+ created: Date;
1132
+ updated: Date;
1133
+ }
1134
+
1135
+ /**
1136
+ * @typedef
1137
+ */
1138
+ type GroupGameInfo = {
1139
+ id: number;
1140
+ name: string;
1141
+ description: string;
1142
+ creator: { id: number; type: string; };
1143
+ rootPlace: { id: number; type: string; };
1144
+ created: Date;
1145
+ updated: Date;
1146
+ placeVisits: number;
1147
+ }
1148
+
1149
+ /**
1150
+ * @typedef
1151
+ */
1152
+ type GroupAssetInfo = {
1153
+ assetId: number;
1154
+ name: string;
1155
+ }
1156
+
1157
+ /**
1158
+ * @typedef
1159
+ */
1160
+ type IGroupPartial = {
1161
+ Name: string;
1162
+ Id: number;
1163
+ EmblemUrl: string;
1164
+ MemberCount: number;
1165
+ Rank: number;
1166
+ Role: string;
1167
+ RoleId: number;
1168
+ IsPrimary: boolean;
1169
+ }
1170
+
1171
+ /**
1172
+ * @typedef
1173
+ */
1174
+ type GroupView = {
1175
+ __VIEWSTATE: string;
1176
+ __VIEWSTATEGENERATOR: string;
1177
+ __EVENTVALIDATION: string;
1178
+ __RequestVerificationToken: string;
1179
+ }
1180
+
1181
+ /**
1182
+ * @typedef
1183
+ */
1184
+ type GroupUser = {
1185
+ userId: number;
1186
+ username: string;
1187
+ displayName: string;
1188
+ hasVerifiedBadge?: boolean;
1189
+ }
1190
+
1191
+ /**
1192
+ * @typedef
1193
+ */
1194
+ type GroupShout = {
1195
+ body: string;
1196
+ poster: GroupUser;
1197
+ created: Date;
1198
+ updated: Date;
1199
+ }
1200
+
1201
+ /**
1202
+ * @typedef
1203
+ */
1204
+ type GroupDescriptionResult = {
1205
+ newDescription: string
1206
+ }
1207
+
1208
+ /**
1209
+ * @typedef
1210
+ */
1211
+ type GroupNameResult = {
1212
+ newName: string
1213
+ }
1214
+
1215
+ /**
1216
+ * @typedef
1217
+ */
1218
+ type AuditItemActor = {
1219
+ user: GroupUser;
1220
+ role: Role;
1221
+ }
1222
+
1223
+ /**
1224
+ * @typedef
1225
+ */
1226
+ type AuditItem = {
1227
+ actor: AuditItemActor;
1228
+ actionType: string;
1229
+ description: object;
1230
+ created: Date;
1231
+ }
1232
+
1233
+ /**
1234
+ * @typedef
1235
+ */
1236
+ type AuditPage = {
1237
+ data: Array<AuditItem>;
1238
+ nextPageCursor?: string;
1239
+ previousPageCursor?: string;
1240
+ }
1241
+
1242
+ /**
1243
+ * @typedef
1244
+ */
1245
+ type TransactionAgent = {
1246
+ id: number;
1247
+ type: string;
1248
+ name: string;
1249
+ }
1250
+
1251
+ /**
1252
+ * @typedef
1253
+ */
1254
+ type TransactionDetails = {
1255
+ id: number;
1256
+ name: string;
1257
+ type: string;
1258
+ }
1259
+
1260
+ /**
1261
+ * @typedef
1262
+ */
1263
+ type TransactionCurrency = {
1264
+ amount: number;
1265
+ type: string;
1266
+ }
1267
+
1268
+ /**
1269
+ * @typedef
1270
+ */
1271
+ type TransactionItem = {
1272
+ id: number;
1273
+ transactionType?: string;
1274
+ created: Date;
1275
+ isPending: boolean;
1276
+ agent: TransactionAgent;
1277
+ details?: TransactionDetails;
1278
+ currency: TransactionCurrency;
1279
+ }
1280
+
1281
+ /**
1282
+ * @typedef
1283
+ */
1284
+ type GroupJoinRequester = {
1285
+ userId: number;
1286
+ username: string;
1287
+ displayName: string;
1288
+ }
1289
+
1290
+ /**
1291
+ * @typedef
1292
+ */
1293
+ type GroupJoinRequest = {
1294
+ requester: GroupJoinRequester;
1295
+ created: Date;
1296
+ }
1297
+
1298
+ /**
1299
+ * @typedef
1300
+ */
1301
+ type GroupJoinRequestsPage = {
1302
+ previousPageCursor?: string;
1303
+ nextPageCursor?: string;
1304
+ data: Array<GroupJoinRequest>;
1305
+ }
1306
+
1307
+ /**
1308
+ * @typedef
1309
+ */
1310
+ type RevenueSummaryResponse = {
1311
+ recurringRobuxStipend?: number;
1312
+ itemSaleRobux?: number;
1313
+ purchasedRobux?: number;
1314
+ tradeSystemRobux?: number;
1315
+ pendingRobux?: number;
1316
+ groupPayoutRobux?: number;
1317
+ individualToGroupRobux?: number;
1318
+ premiumPayouts?: number;
1319
+ groupPremiumPayouts?: number;
1320
+ adjustmentRobux?: number;
1321
+ }
1322
+
1323
+ /**
1324
+ * @typedef
1325
+ */
1326
+ type WallPost = {
1327
+ id: number;
1328
+ poster: GroupUser;
1329
+ body: string;
1330
+ created: Date;
1331
+ updated: Date;
1332
+ }
1333
+
1334
+ /**
1335
+ * @typedef
1336
+ */
1337
+ type WallPostPage = {
1338
+ previousPageCursor?: string;
1339
+ nextPageCursor?: string;
1340
+ data: Array<WallPost>;
1341
+ }
1342
+
1343
+ /// Party
1344
+
1345
+ /**
1346
+ * @typedef
1347
+ */
1348
+ type PartyData = {
1349
+ PartyId: number;
1350
+ PartyType: string;
1351
+ }
1352
+
1353
+ /// User
1354
+
1355
+ /**
1356
+ * 0 = Inbox
1357
+ * 1 = Sent Messages
1358
+ * 3 = Archived Messages
1359
+ */
1360
+ type PrivateMessageTab = 0 | 1 | 3;
1361
+
1362
+ /**
1363
+ * 0 = Offline
1364
+ * 1 = Online
1365
+ * 2 = InGame
1366
+ * 3 = Studio
1367
+ */
1368
+ type UserPresenceType = 0 | 1 | 2 | 3
1369
+
1370
+ /**
1371
+ * @typedef
1372
+ */
1373
+ type LoggedInUserData = {
1374
+ UserID: number,
1375
+ UserName: string,
1376
+ RobuxBalance: number,
1377
+ TicketsBalance: number,
1378
+ ThumbnailUrl: string,
1379
+ IsAnyBuildersClubMember: boolean,
1380
+ IsPremium: boolean
1381
+ }
1382
+
1383
+ /**
1384
+ * @typedef
1385
+ */
1386
+ type UserLoginApiData = {
1387
+ userId: number;
1388
+ }
1389
+
1390
+ /**
1391
+ * @typedef
1392
+ */
1393
+ type AvatarEntry = {
1394
+ url: string;
1395
+ final: boolean;
1396
+ }
1397
+
1398
+ /**
1399
+ * @typedef
1400
+ */
1401
+ type UserStatus = {
1402
+ online: boolean;
1403
+ lastSeen: Date;
1404
+ }
1405
+
1406
+ /**
1407
+ * @typedef
1408
+ */
1409
+ type FriendRequestEntry = {
1410
+ description: string;
1411
+ created: Date;
1412
+ isBanned: boolean;
1413
+ id: number;
1414
+ name: string;
1415
+ displayName: string;
1416
+ }
1417
+
1418
+ /**
1419
+ * @typedef
1420
+ */
1421
+ type FriendRequestsPage = {
1422
+ previousPageCursor?: string;
1423
+ nextPageCursor?: string;
1424
+ data: Array<FriendRequestEntry>;
1425
+ }
1426
+
1427
+ /**
1428
+ * @typedef
1429
+ */
1430
+ type FriendEntry = {
1431
+ created: Date;
1432
+ id: number;
1433
+ isBanned: boolean;
1434
+ isDeleted: boolean;
1435
+ isOnline?: boolean;
1436
+ name: string;
1437
+ description?: string;
1438
+ displayName: string;
1439
+ externalAppDisplayName?: string;
1440
+ friendFrequentRank: number;
1441
+ friendFrequentScore: number;
1442
+ presenceType?: UserPresenceType;
1443
+ }
1444
+
1445
+ /**
1446
+ * @typedef
1447
+ */
1448
+ type Friends = {
1449
+ friends: Array<FriendEntry>;
1450
+ }
1451
+
1452
+ /**
1453
+ * @typedef
1454
+ */
1455
+ type FollowEntry = {
1456
+ isDeleted: false;
1457
+ id: number;
1458
+ name: string;
1459
+ description: string;
1460
+ created: Date;
1461
+ displayName: string;
1462
+ }
1463
+
1464
+ /**
1465
+ * @typedef
1466
+ */
1467
+ type FollowingsPage = {
1468
+ previousPageCursor?: string;
1469
+ nextPageCursor?: string;
1470
+ data: Array<FollowEntry>;
1471
+ }
1472
+
1473
+ /**
1474
+ * @typedef
1475
+ */
1476
+ type FollowersPage = {
1477
+ previousPageCursor?: string;
1478
+ nextPageCursor?: string;
1479
+ data: Array<FollowEntry>;
1480
+ }
1481
+
1482
+ /**
1483
+ * @typedef
1484
+ */
1485
+ type PrivateMessagesPage = {
1486
+ collection: Array<PrivateMessage>;
1487
+ totalPages: number;
1488
+ totalCollectionSize: number;
1489
+ pageNumber: number;
1490
+ }
1491
+
1492
+ /**
1493
+ * @typedef
1494
+ */
1495
+ type UserEntry = {
1496
+ userId: number;
1497
+ name: string;
1498
+ displayName: string;
1499
+ }
1500
+
1501
+ /**
1502
+ * @typedef
1503
+ */
1504
+ type PrivateMessageParent = {
1505
+ page: number;
1506
+ }
1507
+
1508
+ /**
1509
+ * @typedef
1510
+ */
1511
+ type PrivateMessage = {
1512
+ id: number;
1513
+ sender: UserEntry;
1514
+ recipient: UserEntry;
1515
+ subject: string;
1516
+ body: string;
1517
+ created: Date;
1518
+ updated: Date;
1519
+ isRead: boolean;
1520
+ isSystemMessage: boolean;
1521
+ isReportAbuseDisplayed: boolean;
1522
+ parent: PrivateMessageParent;
1523
+ }
1524
+
1525
+ /**
1526
+ * @typedef
1527
+ */
1528
+ type NotificationMessage = {
1529
+ type: string;
1530
+ [key: string]: any;
1531
+ }
1532
+
1533
+ /**
1534
+ * @typedef
1535
+ */
1536
+ type FriendRequest = number;
1537
+
1538
+ /**
1539
+ * @typedef
1540
+ */
1541
+ type UserPresence = {
1542
+ userPresenceType?: UserPresenceType;
1543
+ lastLocation?: string;
1544
+ placeId?: number;
1545
+ rootPlaceId?: number;
1546
+ gameId?: string;
1547
+ universeId?: number;
1548
+ userId?: number;
1549
+ lastOnline?: string;
1550
+ }
1551
+
1552
+ /**
1553
+ * @typedef
1554
+ */
1555
+ type PlayerInfo = {
1556
+ username: string;
1557
+ displayName: string;
1558
+ blurb: string;
1559
+ joinDate: Date;
1560
+ age?: number;
1561
+ friendCount?: number;
1562
+ followerCount?: number;
1563
+ followingCount?: number;
1564
+ oldNames?: Array<string>;
1565
+ isBanned: boolean;
1566
+ }
1567
+
1568
+ /**
1569
+ * @typedef
1570
+ */
1571
+ type Presences = {
1572
+ userPresences: Array<UserPresence>;
1573
+ }
1574
+
1575
+ /**
1576
+ * @typedef
1577
+ */
1578
+ type PlayerThumbnailData = {
1579
+ targetId: number;
1580
+ state: string;
1581
+ imageUrl: string;
1582
+ }
1583
+
1584
+ /**
1585
+ * @typedef
1586
+ */
1587
+ type PromotionChannelsResponse = {
1588
+ facebook?: string;
1589
+ twitter?: string;
1590
+ youtube?: string;
1591
+ twitch?: string;
1592
+ guilded?: string;
1593
+ }
1594
+
1595
+ /// Badges
1596
+
1597
+ /**
1598
+ * @typedef
1599
+ */
1600
+ type BadgeAwarder = {
1601
+ id: number;
1602
+ type: string;
1603
+ }
1604
+
1605
+ /**
1606
+ * @typedef
1607
+ */
1608
+ type UserBadgeStats = {
1609
+ badgeId: number;
1610
+ awardedDate: Date;
1611
+ }
1612
+
1613
+ /**
1614
+ * @typedef
1615
+ */
1616
+ type BadgeStatistics = {
1617
+ pastDayAwardedCount: number;
1618
+ awardedCount: number;
1619
+ winRatePercentage: number;
1620
+ }
1621
+
1622
+ /**
1623
+ * @typedef
1624
+ */
1625
+ type BadgeUniverse = {
1626
+ id: number;
1627
+ name: string;
1628
+ rootPlaceId: number;
1629
+ }
1630
+
1631
+ /**
1632
+ * @typedef
1633
+ */
1634
+ type PlayerBadges = {
1635
+ id: number;
1636
+ name: string;
1637
+ description?: string;
1638
+ displayName: string;
1639
+ displayDescription?: string;
1640
+ enabled: boolean;
1641
+ iconImageId: number;
1642
+ displayIconImageId: number;
1643
+ awarder: BadgeAwarder;
1644
+ statistics: BadgeStatistics;
1645
+ created: Date;
1646
+ updated: Date;
1647
+ }
1648
+
1649
+ /**
1650
+ * @typedef
1651
+ */
1652
+ type BadgeInfo = {
1653
+ id: number;
1654
+ name: string;
1655
+ description?: string;
1656
+ displayName: string;
1657
+ displayDescription?: string;
1658
+ enabled: boolean;
1659
+ iconImageId: number;
1660
+ displayIconImageId: number;
1661
+ created: Date;
1662
+ updated: Date;
1663
+ statistics: BadgeStatistics
1664
+ awardingUniverse: BadgeUniverse
1665
+ }
1666
+
1667
+ //Inventory
1668
+
1669
+ /**
1670
+ * @typedef
1671
+ */
1672
+ type AssetOwner = {
1673
+ userId: number;
1674
+ username: string;
1675
+ buildersClubMembershipType: number;
1676
+ }
1677
+
1678
+ /**
1679
+ * @typedef
1680
+ */
1681
+ type CollectibleEntry = {
1682
+ userAssetId: number;
1683
+ serialNumber?: number;
1684
+ assetId: number;
1685
+ name: string;
1686
+ recentAveragePrice: number;
1687
+ originalPrice?: number;
1688
+ assetStock?: number;
1689
+ buildersClubMembershipType: number;
1690
+ }
1691
+
1692
+ /**
1693
+ * @typedef
1694
+ */
1695
+ type Collectibles = {
1696
+ collectibles: Array<CollectibleEntry>;
1697
+ }
1698
+
1699
+ /**
1700
+ * @typedef
1701
+ */
1702
+ type InventoryEntry = {
1703
+ assetId: number;
1704
+ name: string;
1705
+ assetType: string;
1706
+ created: Date;
1707
+ updated?: Date;
1708
+ assetName?: string;
1709
+ userAssetId?: number;
1710
+ owner?: AssetOwner;
1711
+ }
1712
+
1713
+ /**
1714
+ * @typedef
1715
+ */
1716
+ type Inventory = {
1717
+ items: Array<InventoryEntry>;
1718
+ }
1719
+
1720
+ ///Trading
1721
+
1722
+ /**
1723
+ * @typedef
1724
+ */
1725
+ type UAIDResponse = {
1726
+ uaids: Array<number>,
1727
+ failedIds: Array<number>
1728
+ }
1729
+
1730
+ /**
1731
+ * @typedef
1732
+ */
1733
+ type CanTradeResponse = {
1734
+ canTrade: boolean,
1735
+ status: string
1736
+ }
1737
+
1738
+ /**
1739
+ * @typedef
1740
+ */
1741
+ type TradeUser = {
1742
+ userId: number;
1743
+ username: string;
1744
+ displayName: string;
1745
+ }
1746
+
1747
+ /**
1748
+ * @typedef
1749
+ */
1750
+ type TradeAsset = {
1751
+ id: number,
1752
+ user: TradeUser,
1753
+ created: Date,
1754
+ expiration?: Date,
1755
+ isActive: boolean,
1756
+ status: string
1757
+ }
1758
+
1759
+ /**
1760
+ * @typedef
1761
+ */
1762
+ type DetailedTradeAsset = {
1763
+ id: number,
1764
+ serialNumber: number,
1765
+ assetId: number,
1766
+ name: string,
1767
+ recentAveragePrice: number,
1768
+ originalPrice: number,
1769
+ assetStock: number,
1770
+ membershipType: string
1771
+ }
1772
+
1773
+ /**
1774
+ * @typedef
1775
+ */
1776
+ type DetailedTradeOffer = {
1777
+ user: TradeUser,
1778
+ userAssets: Array<DetailedTradeAsset>,
1779
+ robux: number
1780
+ }
1781
+
1782
+ /**
1783
+ * @typedef
1784
+ */
1785
+ type TradeOffer = {
1786
+ userAssetIds: Array<number>,
1787
+ robux: number
1788
+ }
1789
+
1790
+ /**
1791
+ * @typedef
1792
+ */
1793
+ type TradeInfo = {
1794
+ offers: Array<DetailedTradeOffer>,
1795
+ id: number,
1796
+ user: TradeUser,
1797
+ created: Date,
1798
+ expiration?: Date,
1799
+ isActive: boolean,
1800
+ status: string
1801
+ }
1802
+
1803
+ /**
1804
+ * @typedef
1805
+ */
1806
+ type SendTradeResponse = {
1807
+ id: number
1808
+ }
1809
+
1810
+ /// Utility
1811
+
1812
+ /**
1813
+ * @typedef
1814
+ */
1815
+ type SelectorFunction = (selector: string) => {val(): any};
1816
+ type SortOrder = 'Asc' | 'Desc';
1817
+ type Limit = 10 | 25 | 50 | 100;
1818
+
1819
+ /**
1820
+ * @typedef
1821
+ */
1822
+ type Inputs = {
1823
+ /**
1824
+ * With a provided name, this returns the input's value.
1825
+ */
1826
+ [name: string]: string;
1827
+ }
1828
+
1829
+ /**
1830
+ * @typedef
1831
+ */
1832
+ type GetVerificationResponse = {
1833
+ body?: string;
1834
+ inputs: Inputs;
1835
+ header: string;
1836
+ }
1837
+
1838
+ /**
1839
+ * @typedef
1840
+ */
1841
+ type HttpOptions = {
1842
+ verification?: string;
1843
+ jar?: CookieJar;
1844
+ }
1845
+
1846
+ /**
1847
+ * @typedef
1848
+ */
1849
+ type GetLatestResponse = {
1850
+ latest: number;
1851
+ data: object;
1852
+ repeat?: boolean;
1853
+ }
1854
+
1855
+ /// Datastores
1856
+
1857
+ /**
1858
+ * @typedef
1859
+ */
1860
+ type Datastore = {
1861
+ name: string;
1862
+ createdTime: Date;
1863
+ }
1864
+
1865
+ /**
1866
+ * @typedef
1867
+ */
1868
+ type DatastoresResult = {
1869
+ datastores: Datastore[];
1870
+ nextPageCursor?: string;
1871
+ }
1872
+
1873
+ /**
1874
+ * @typedef
1875
+ */
1876
+ type EntryKey = {
1877
+ scope: string;
1878
+ key: string;
1879
+ }
1880
+
1881
+ /**
1882
+ * @typedef
1883
+ */
1884
+ type DatastoreKeysResult = {
1885
+ keys: EntryKey[];
1886
+ nextPageCursor?: string;
1887
+ }
1888
+
1889
+ /**
1890
+ * @typedef
1891
+ */
1892
+ type DatastoreEntry = {
1893
+ data: any;
1894
+ metadata: {
1895
+ /** (ISO datetime, UTC): the time at which the entry was created */
1896
+ robloxEntryCreatedTime: Date;
1897
+ /** (ISO datetime, UTC): the time at which the entry was updated */
1898
+ lastModified: Date;
1899
+ /** version of the entry being read */
1900
+ robloxEntryVersion: string;
1901
+ robloxEntryAttributes?: string;
1902
+ robloxEntryUserIDs?: string;
1903
+ /** the base-64 encoded MD5 checksum of the content */
1904
+ contentMD5: string;
1905
+ /** the content length in bytes */
1906
+ contentLength: number;
1907
+ }
1908
+ }
1909
+
1910
+ /**
1911
+ * @typedef
1912
+ */
1913
+ type EntryVersion = {
1914
+ version: string;
1915
+ deleted: boolean;
1916
+ contentLength: number;
1917
+ createdTime: Date;
1918
+ objectCreatedTime: Date;
1919
+ }
1920
+
1921
+ /**
1922
+ * @typedef
1923
+ */
1924
+ type EntryVersionsResult = {
1925
+ versions: EntryVersion[];
1926
+ nextPageCursor: string;
1927
+ }