@ejercito-fam/habbo-api 1.0.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,446 @@
1
+ 'use strict';
2
+
3
+ var safeFetch = require('@skyra/safe-fetch');
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+
8
+ // src/constants.ts
9
+ var HotelDomainTLD = /* @__PURE__ */ ((HotelDomainTLD2) => {
10
+ HotelDomainTLD2["Brazilian"] = ".com.br";
11
+ HotelDomainTLD2["Danish"] = ".dk";
12
+ HotelDomainTLD2["Dutch"] = ".nl";
13
+ HotelDomainTLD2["Finnish"] = ".fi";
14
+ HotelDomainTLD2["French"] = ".fr";
15
+ HotelDomainTLD2["German"] = ".de";
16
+ HotelDomainTLD2["International"] = ".com";
17
+ HotelDomainTLD2["Italian"] = ".it";
18
+ HotelDomainTLD2["Spanish"] = ".es";
19
+ HotelDomainTLD2["Turkish"] = ".com.tr";
20
+ return HotelDomainTLD2;
21
+ })(HotelDomainTLD || {});
22
+ var HotelDomainURL = {
23
+ Brazilian: `https://www.habbo${".com.br" /* Brazilian */}`,
24
+ Danish: `https://www.habbo${".dk" /* Danish */}`,
25
+ Dutch: `https://www.habbo${".nl" /* Dutch */}`,
26
+ Finnish: `https://www.habbo${".fi" /* Finnish */}`,
27
+ French: `https://www.habbo${".fr" /* French */}`,
28
+ German: `https://www.habbo${".de" /* German */}`,
29
+ International: `https://www.habbo${".com" /* International */}`,
30
+ Italian: `https://www.habbo${".it" /* Italian */}`,
31
+ Spanish: `https://www.habbo${".es" /* Spanish */}`,
32
+ Turkish: `https://www.habbo${".com.tr" /* Turkish */}`
33
+ };
34
+ var BaseAPI = class {
35
+ static {
36
+ __name(this, "BaseAPI");
37
+ }
38
+ baseURL;
39
+ timeout;
40
+ constructor(baseURL, timeout) {
41
+ this.baseURL = baseURL;
42
+ this.timeout = timeout ?? null;
43
+ }
44
+ formatURL(route) {
45
+ return new URL(route, this.baseURL);
46
+ }
47
+ fetch(url, options) {
48
+ return safeFetch.safeFetch(url, { headers: { "Content-Type": "application/json" }, signal: this.#getSignalOrDefault(options) });
49
+ }
50
+ #getSignalOrDefault(options) {
51
+ if (typeof options === "object" && options !== null) {
52
+ if (typeof options.signal === "number") return AbortSignal.timeout(options.signal);
53
+ if (typeof options.signal === "object" && options.signal !== null) return options.signal;
54
+ }
55
+ if (typeof this.timeout === "number") return AbortSignal.timeout(this.timeout);
56
+ return null;
57
+ }
58
+ };
59
+
60
+ // src/routes/achievements.ts
61
+ var AchievementsAPI = class extends BaseAPI {
62
+ static {
63
+ __name(this, "AchievementsAPI");
64
+ }
65
+ /**
66
+ * Get all achievements
67
+ *
68
+ * @param options - The options for the API call
69
+ */
70
+ getAll(options) {
71
+ const url = this.formatURL("/api/public/achievements");
72
+ return safeFetch.Json(this.fetch(url, options));
73
+ }
74
+ /**
75
+ * Get the achievements from a specified user ID
76
+ *
77
+ * @param id - The ID of the user
78
+ * @param options - The options for the API call
79
+ */
80
+ getByUserId(id, options) {
81
+ const url = this.formatURL(`/api/public/achievements/${id}`);
82
+ return safeFetch.Json(this.fetch(url, options));
83
+ }
84
+ /**
85
+ * Get the image URL for an achievement
86
+ *
87
+ * @param achievementName - The name of the achievement, retrieved from {@linkcode AchievementData.name}
88
+ *
89
+ * @unstable This feature is not documented, use at your own risk
90
+ */
91
+ getImageURL(achievementName) {
92
+ return new URL(`https://images.habbo.com/c_images/album1584/${achievementName}.png`);
93
+ }
94
+ };
95
+ var AchievementDataState = /* @__PURE__ */ ((AchievementDataState2) => {
96
+ AchievementDataState2["Enabled"] = "ENABLED";
97
+ AchievementDataState2["Archived"] = "ARCHIVED";
98
+ AchievementDataState2["OffSeason"] = "OFF_SEASON";
99
+ return AchievementDataState2;
100
+ })(AchievementDataState || {});
101
+ var GroupsAPI = class extends BaseAPI {
102
+ static {
103
+ __name(this, "GroupsAPI");
104
+ }
105
+ /**
106
+ * Get the data for a group given its identifier
107
+ *
108
+ * @param id - The ID of the group
109
+ * @param options - The options for the API call
110
+ */
111
+ getByUniqueId(id, options) {
112
+ const url = this.formatURL(`/api/public/groups/${id}`);
113
+ return safeFetch.Json(this.fetch(url, options));
114
+ }
115
+ /**
116
+ * Get the members from a group given its identifier
117
+ *
118
+ * @param id - The ID of the group
119
+ * @param options - The options for the API call
120
+ */
121
+ getGroupMembers(id, options) {
122
+ const url = this.formatURL(`/api/public/groups/${id}/members`);
123
+ return safeFetch.Json(this.fetch(url, options));
124
+ }
125
+ /**
126
+ * Get the image URL for a badge
127
+ *
128
+ * @param badgeCode - The badge's code, retrieved from {@linkcode HabboGroup.badgeCode}
129
+ *
130
+ * @unstable This feature is not documented, use at your own risk
131
+ */
132
+ getGroupBadgeImageURL(badgeCode) {
133
+ return this.formatURL(`/habbo-imaging/badge/${badgeCode}`);
134
+ }
135
+ };
136
+ var HabboGroupType = /* @__PURE__ */ ((HabboGroupType3) => {
137
+ HabboGroupType3["NORMAL"] = "NORMAL";
138
+ HabboGroupType3["FAVOURITE"] = "EXCLUSIVE";
139
+ HabboGroupType3["PRIVATE"] = "CLOSED";
140
+ return HabboGroupType3;
141
+ })(HabboGroupType || {});
142
+ var ListsAPI = class extends BaseAPI {
143
+ static {
144
+ __name(this, "ListsAPI");
145
+ }
146
+ /**
147
+ * Get the hot looks from the hotel
148
+ *
149
+ * @param options - The options for the API call
150
+ */
151
+ async getHotLooks(options) {
152
+ const url = this.formatURL("/api/public/lists/hotlooks");
153
+ const data = await this.fetch(url, options);
154
+ return data.map(async (result) => this.#parseHotLooksXML(await result.text())).intoPromise();
155
+ }
156
+ #parseHotLooksXML(data) {
157
+ const urlResult = /url="(.*)"/.exec(data);
158
+ if (urlResult === null) throw new SyntaxError("Could not read hot looks");
159
+ const url = urlResult[1];
160
+ const entries = [];
161
+ for (const result of data.matchAll(/gender="(\w)" figure="(.+)" hash="(.+)"/g)) {
162
+ entries.push({ gender: result[1], figure: result[2], hash: result[3] });
163
+ }
164
+ if (entries.length === 0) throw new SyntaxError("Could not read hot looks");
165
+ return { url, entries };
166
+ }
167
+ };
168
+ var MarketplaceAPI = class extends BaseAPI {
169
+ static {
170
+ __name(this, "MarketplaceAPI");
171
+ }
172
+ /**
173
+ * Get the marketplace stats for a room item
174
+ *
175
+ * @param roomItemName - The name of the room item
176
+ * @param options - The options for the API call
177
+ */
178
+ getRoomItemStats(roomItemName, options) {
179
+ const url = this.formatURL(`/api/public/marketplace/stats/roomItem/${roomItemName}`);
180
+ return safeFetch.Json(this.fetch(url, options));
181
+ }
182
+ /**
183
+ * Get the marketplace stats for a wall item
184
+ *
185
+ * @param wallItemName - The name of the wall item
186
+ * @param options - The options for the API call
187
+ */
188
+ getWallItemStats(wallItemName, options) {
189
+ const url = this.formatURL(`/api/public/marketplace/stats/wallItem/${wallItemName}`);
190
+ return safeFetch.Json(this.fetch(url, options));
191
+ }
192
+ };
193
+
194
+ // src/routes/ping.ts
195
+ var PingAPI = class extends BaseAPI {
196
+ static {
197
+ __name(this, "PingAPI");
198
+ }
199
+ /**
200
+ * Pings Habbo, returning the measured time using {@linkcode performance.now()}
201
+ *
202
+ * @param options - The options for the API call
203
+ */
204
+ async get(options) {
205
+ const url = this.formatURL("/api/public/ping");
206
+ const now = performance.now();
207
+ return (await this.fetch(url, options)).match({
208
+ ok: /* @__PURE__ */ __name(() => performance.now() - now, "ok"),
209
+ err: /* @__PURE__ */ __name(() => null, "err")
210
+ });
211
+ }
212
+ };
213
+ var RoomsAPI = class extends BaseAPI {
214
+ static {
215
+ __name(this, "RoomsAPI");
216
+ }
217
+ /**
218
+ * Get a room by its ID
219
+ *
220
+ * @param roomId - The ID of the room
221
+ * @param options - The options for the API call
222
+ */
223
+ async getById(roomId, options) {
224
+ const url = this.formatURL(`/api/public/rooms/${roomId}`);
225
+ return safeFetch.Json(this.fetch(url, options));
226
+ }
227
+ };
228
+
229
+ // src/common.ts
230
+ function isNullish(value) {
231
+ return value == null;
232
+ }
233
+ __name(isNullish, "isNullish");
234
+
235
+ // src/routes/users.ts
236
+ var UsersAPI = class extends BaseAPI {
237
+ static {
238
+ __name(this, "UsersAPI");
239
+ }
240
+ /**
241
+ * Get a user by its username
242
+ *
243
+ * @param username - The username to search a Habbo user by
244
+ * @param options - The options for the API call
245
+ */
246
+ getByUsername(username, options) {
247
+ const url = this.formatURL("/api/public/users");
248
+ url.searchParams.set("name", username);
249
+ return safeFetch.Json(this.fetch(url, options));
250
+ }
251
+ /**
252
+ * Get a user by its ID
253
+ *
254
+ * @param uniqueId - The ID to search a Habbo user by
255
+ * @param options - The options for the API call
256
+ */
257
+ getByUniqueId(uniqueId, options) {
258
+ const url = this.formatURL(`/api/public/users/${uniqueId}`);
259
+ return safeFetch.Json(this.fetch(url, options));
260
+ }
261
+ /**
262
+ * Get a user's friends
263
+ *
264
+ * @param uniqueId - The ID to search a Habbo user by
265
+ * @param options - The options for the API call
266
+ */
267
+ getUserFriends(uniqueId, options) {
268
+ const url = this.formatURL(`/api/public/users/${uniqueId}/friends`);
269
+ return safeFetch.Json(this.fetch(url, options));
270
+ }
271
+ /**
272
+ * Get a user's groups
273
+ *
274
+ * @param uniqueId - The ID to search a Habbo user by
275
+ * @param options - The options for the API call
276
+ */
277
+ getUserGroups(uniqueId, options) {
278
+ const url = this.formatURL(`/api/public/users/${uniqueId}/groups`);
279
+ return safeFetch.Json(this.fetch(url, options));
280
+ }
281
+ /**
282
+ * Get a user's rooms
283
+ *
284
+ * @param uniqueId - The ID to search a Habbo user by
285
+ * @param options - The options for the API call
286
+ */
287
+ getUserRooms(uniqueId, options) {
288
+ const url = this.formatURL(`/api/public/users/${uniqueId}/rooms`);
289
+ return safeFetch.Json(this.fetch(url, options));
290
+ }
291
+ /**
292
+ * Get a user's badges
293
+ *
294
+ * @param uniqueId - The ID to search a Habbo user by
295
+ * @param options - The options for the API call
296
+ */
297
+ getUserBadges(uniqueId, options) {
298
+ const url = this.formatURL(`/api/public/users/${uniqueId}/badges`);
299
+ return safeFetch.Json(this.fetch(url, options));
300
+ }
301
+ /**
302
+ * Get a user's profile
303
+ *
304
+ * @param uniqueId - The ID to search a Habbo user by
305
+ * @param options - The options for the API call
306
+ */
307
+ getUserProfile(uniqueId, options) {
308
+ const url = this.formatURL(`/api/public/users/${uniqueId}/profile`);
309
+ return safeFetch.Json(this.fetch(url, options));
310
+ }
311
+ /**
312
+ * Get a user's photos
313
+ *
314
+ * @param uniqueId - The ID to search a Habbo user by
315
+ * @param options - The options for the API call
316
+ */
317
+ getUserPhotos(uniqueId, options) {
318
+ const url = this.formatURL(`/extradata/public/users/${uniqueId}/photos`);
319
+ return safeFetch.Json(this.fetch(url, options));
320
+ }
321
+ /**
322
+ * Get a user's figure
323
+ *
324
+ * @param options - The options for the image
325
+ */
326
+ getUserFigureImageURL(options) {
327
+ const url = this.formatURL("/habbo-imaging/avatarimage");
328
+ if ("figure" in options && !isNullish(options.figure)) {
329
+ url.searchParams.append("figure", options.figure);
330
+ if (!isNullish(options.gender)) url.searchParams.append("gender", HabboFigureGender[options.gender]);
331
+ } else if ("user" in options && !isNullish(options.user)) {
332
+ url.searchParams.append("user", options.user);
333
+ } else {
334
+ throw new Error("You must define `figure` or `user` in the options");
335
+ }
336
+ if (!isNullish(options.action)) {
337
+ const habboAction = HabboFigureAction[options.action];
338
+ url.searchParams.append(
339
+ "action",
340
+ isNullish(options.hand) ? habboAction : `${habboAction}=${HabboFigureHand[options.hand]}`
341
+ );
342
+ }
343
+ if (!isNullish(options.direction)) url.searchParams.append("direction", HabboFigureDirection[options.direction]);
344
+ if (!isNullish(options.headDirection)) url.searchParams.append("head_direction", HabboFigureDirection[options.headDirection]);
345
+ if (!isNullish(options.gesture)) url.searchParams.append("gesture", HabboFigureGesture[options.gesture]);
346
+ if (!isNullish(options.size)) url.searchParams.append("size", HabboFigureSize[options.size]);
347
+ if (!isNullish(options.headOnly)) url.searchParams.append("headonly", options.headOnly ? "1" : "0");
348
+ return url;
349
+ }
350
+ };
351
+ var HabboFigureAction = {
352
+ // Main Actions
353
+ lay: "lay",
354
+ sit: "sit",
355
+ respect: "respect",
356
+ walk: "wlk",
357
+ wave: "wav",
358
+ carry: "crr",
359
+ drink: "drk",
360
+ sign: "sig",
361
+ blow: "blw",
362
+ laugh: "laugh"
363
+ };
364
+ var HabboFigureHand = {
365
+ nothing: "0",
366
+ carrot: "2",
367
+ coffee: "6",
368
+ cocktail: "667",
369
+ habbo_cola: "5",
370
+ ice_cream: "3",
371
+ japanese_tea: "42",
372
+ love_potion: "9",
373
+ radioactive: "44",
374
+ tomato: "43",
375
+ water: "1"
376
+ };
377
+ var HabboFigureGesture = {
378
+ nothing: "nrm",
379
+ happy: "sml",
380
+ sad: "sad",
381
+ angry: "agr",
382
+ surprised: "srp",
383
+ sleeping: "eyb",
384
+ speaking: "spk"
385
+ };
386
+ var HabboFigureSize = { small: "s", normal: "m", large: "l" };
387
+ var HabboFigureDirection = { nw: "0", w: "1", sw: "2", s: "3", se: "4", e: "5", ne: "6", n: "7" };
388
+ var HabboFigureGender = { male: "M", female: "F" };
389
+ var HabboFigureGestureKeys = Object.keys(HabboFigureGesture);
390
+ var HabboFigureActionKeys = Object.keys(HabboFigureAction);
391
+ var HabboFigureHandKeys = Object.keys(HabboFigureHand);
392
+ var HabboFigureSizeKeys = Object.keys(HabboFigureSize);
393
+ var HabboFigureDirectionKeys = Object.keys(HabboFigureDirection);
394
+ var HabboFigureGenderKeys = Object.keys(HabboFigureGender);
395
+
396
+ // src/habbo.ts
397
+ var Habbo = class {
398
+ static {
399
+ __name(this, "Habbo");
400
+ }
401
+ achievements;
402
+ groups;
403
+ lists;
404
+ marketplace;
405
+ ping;
406
+ rooms;
407
+ users;
408
+ constructor(options) {
409
+ const baseURL = options?.baseURL ?? HotelDomainURL.International;
410
+ const timeout = options?.timeout ?? null;
411
+ this.achievements = new AchievementsAPI(baseURL, timeout);
412
+ this.groups = new GroupsAPI(baseURL, timeout);
413
+ this.lists = new ListsAPI(baseURL, timeout);
414
+ this.marketplace = new MarketplaceAPI(baseURL, timeout);
415
+ this.ping = new PingAPI(baseURL, timeout);
416
+ this.rooms = new RoomsAPI(baseURL, timeout);
417
+ this.users = new UsersAPI(baseURL, timeout);
418
+ }
419
+ };
420
+
421
+ exports.AchievementDataState = AchievementDataState;
422
+ exports.AchievementsAPI = AchievementsAPI;
423
+ exports.GroupsAPI = GroupsAPI;
424
+ exports.Habbo = Habbo;
425
+ exports.HabboFigureAction = HabboFigureAction;
426
+ exports.HabboFigureActionKeys = HabboFigureActionKeys;
427
+ exports.HabboFigureDirection = HabboFigureDirection;
428
+ exports.HabboFigureDirectionKeys = HabboFigureDirectionKeys;
429
+ exports.HabboFigureGender = HabboFigureGender;
430
+ exports.HabboFigureGenderKeys = HabboFigureGenderKeys;
431
+ exports.HabboFigureGesture = HabboFigureGesture;
432
+ exports.HabboFigureGestureKeys = HabboFigureGestureKeys;
433
+ exports.HabboFigureHand = HabboFigureHand;
434
+ exports.HabboFigureHandKeys = HabboFigureHandKeys;
435
+ exports.HabboFigureSize = HabboFigureSize;
436
+ exports.HabboFigureSizeKeys = HabboFigureSizeKeys;
437
+ exports.HabboGroupType = HabboGroupType;
438
+ exports.HotelDomainTLD = HotelDomainTLD;
439
+ exports.HotelDomainURL = HotelDomainURL;
440
+ exports.ListsAPI = ListsAPI;
441
+ exports.MarketplaceAPI = MarketplaceAPI;
442
+ exports.PingAPI = PingAPI;
443
+ exports.RoomsAPI = RoomsAPI;
444
+ exports.UsersAPI = UsersAPI;
445
+ //# sourceMappingURL=index.cjs.map
446
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/constants.ts","../../src/routes/base.ts","../../src/routes/achievements.ts","../../src/routes/groups.ts","../../src/routes/lists.ts","../../src/routes/marketplace.ts","../../src/routes/ping.ts","../../src/routes/rooms.ts","../../src/common.ts","../../src/routes/users.ts","../../src/habbo.ts"],"names":["HotelDomainTLD","safeFetch","Json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AAA,IAAA,CAAK,MAAS,GAAA,IAAI,SAAU,CAAA,OAAA,EAAS,OAAO,CAAA;AAC5C,IAAA,IAAA,CAAK,KAAQ,GAAA,IAAI,QAAS,CAAA,OAAA,EAAS,OAAO,CAAA;AAC1C,IAAA,IAAA,CAAK,WAAc,GAAA,IAAI,cAAe,CAAA,OAAA,EAAS,OAAO,CAAA;AACtD,IAAA,IAAA,CAAK,IAAO,GAAA,IAAI,OAAQ,CAAA,OAAA,EAAS,OAAO,CAAA;AACxC,IAAA,IAAA,CAAK,KAAQ,GAAA,IAAI,QAAS,CAAA,OAAA,EAAS,OAAO,CAAA;AAC1C,IAAA,IAAA,CAAK,KAAQ,GAAA,IAAI,QAAS,CAAA,OAAA,EAAS,OAAO,CAAA;AAAA;AAE5C","file":"index.cjs","sourcesContent":["export enum HotelDomainTLD {\n\tBrazilian = '.com.br',\n\tDanish = '.dk',\n\tDutch = '.nl',\n\tFinnish = '.fi',\n\tFrench = '.fr',\n\tGerman = '.de',\n\tInternational = '.com',\n\tItalian = '.it',\n\tSpanish = '.es',\n\tTurkish = '.com.tr'\n}\n\nexport const HotelDomainURL = {\n\tBrazilian: `https://www.habbo${HotelDomainTLD.Brazilian}`,\n\tDanish: `https://www.habbo${HotelDomainTLD.Danish}`,\n\tDutch: `https://www.habbo${HotelDomainTLD.Dutch}`,\n\tFinnish: `https://www.habbo${HotelDomainTLD.Finnish}`,\n\tFrench: `https://www.habbo${HotelDomainTLD.French}`,\n\tGerman: `https://www.habbo${HotelDomainTLD.German}`,\n\tInternational: `https://www.habbo${HotelDomainTLD.International}`,\n\tItalian: `https://www.habbo${HotelDomainTLD.Italian}`,\n\tSpanish: `https://www.habbo${HotelDomainTLD.Spanish}`,\n\tTurkish: `https://www.habbo${HotelDomainTLD.Turkish}`\n} as const;\n","import { safeFetch, type FetchResult } from '@skyra/safe-fetch';\n\nexport abstract class BaseAPI {\n\tprotected readonly baseURL: string;\n\tprotected readonly timeout: number | null;\n\n\tpublic constructor(baseURL: string, timeout?: number | null | undefined) {\n\t\tthis.baseURL = baseURL;\n\t\tthis.timeout = timeout ?? null;\n\t}\n\n\tprotected formatURL(route: string): URL {\n\t\treturn new URL(route, this.baseURL);\n\t}\n\n\tprotected fetch(url: string | URL, options?: APIOptions): Promise<FetchResult<Response>> {\n\t\treturn safeFetch(url, { headers: { 'Content-Type': 'application/json' }, signal: this.#getSignalOrDefault(options) });\n\t}\n\n\t#getSignalOrDefault(options?: APIOptions): AbortSignal | null {\n\t\tif (typeof options === 'object' && options !== null) {\n\t\t\tif (typeof options.signal === 'number') return AbortSignal.timeout(options.signal);\n\t\t\tif (typeof options.signal === 'object' && options.signal !== null) return options.signal;\n\t\t}\n\n\t\tif (typeof this.timeout === 'number') return AbortSignal.timeout(this.timeout);\n\t\treturn null;\n\t}\n}\n\nexport interface APIOptions {\n\tsignal?: AbortSignal | number | null | undefined;\n}\n","import { Json, type FetchResult } from '@skyra/safe-fetch';\nimport { BaseAPI, type APIOptions } from './base.js';\nimport type { HabboUserId } from './users.js';\n\nexport class AchievementsAPI extends BaseAPI {\n\t/**\n\t * Get all achievements\n\t *\n\t * @param options - The options for the API call\n\t */\n\tpublic getAll(options?: APIOptions): Promise<FetchResult<Achievement[]>> {\n\t\tconst url = this.formatURL('/api/public/achievements');\n\t\treturn Json<Achievement[]>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get the achievements from a specified user ID\n\t *\n\t * @param id - The ID of the user\n\t * @param options - The options for the API call\n\t */\n\tpublic getByUserId(id: HabboUserId, options?: APIOptions): Promise<FetchResult<UserAchievement[]>> {\n\t\tconst url = this.formatURL(`/api/public/achievements/${id}`);\n\t\treturn Json<UserAchievement[]>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get the image URL for an achievement\n\t *\n\t * @param achievementName - The name of the achievement, retrieved from {@linkcode AchievementData.name}\n\t *\n\t * @unstable This feature is not documented, use at your own risk\n\t */\n\tpublic getImageURL(achievementName: string): URL {\n\t\treturn new URL(`https://images.habbo.com/c_images/album1584/${achievementName}.png`);\n\t}\n}\n\nexport interface Achievement {\n\tachievement: AchievementData;\n\tlevelRequirements: AchievementRequirements;\n}\n\nexport interface UserAchievement {\n\tachievement: AchievementData;\n\tlevel: number;\n\tscore: number;\n}\n\nexport interface AchievementData {\n\tid: number;\n\tname: string;\n\tcreationTime: `${bigint}-${bigint}-${bigint}`;\n\tstate: AchievementDataState;\n\tcategory: string;\n}\n\nexport enum AchievementDataState {\n\tEnabled = 'ENABLED',\n\tArchived = 'ARCHIVED',\n\tOffSeason = 'OFF_SEASON'\n}\n\nexport interface AchievementRequirements {\n\tlevel: number;\n\trequiredScore: number;\n}\n","import { Json, type FetchResult } from '@skyra/safe-fetch';\nimport { BaseAPI, type APIOptions } from './base.js';\n\nexport class GroupsAPI extends BaseAPI {\n\t/**\n\t * Get the data for a group given its identifier\n\t *\n\t * @param id - The ID of the group\n\t * @param options - The options for the API call\n\t */\n\tpublic getByUniqueId(id: HabboGroupId, options?: APIOptions): Promise<FetchResult<HabboGroup>> {\n\t\tconst url = this.formatURL(`/api/public/groups/${id}`);\n\t\treturn Json<HabboGroup>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get the members from a group given its identifier\n\t *\n\t * @param id - The ID of the group\n\t * @param options - The options for the API call\n\t */\n\tpublic getGroupMembers(id: HabboGroupId, options?: APIOptions): Promise<FetchResult<HabboGroupMember[]>> {\n\t\tconst url = this.formatURL(`/api/public/groups/${id}/members`);\n\t\treturn Json<HabboGroupMember[]>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get the image URL for a badge\n\t *\n\t * @param badgeCode - The badge's code, retrieved from {@linkcode HabboGroup.badgeCode}\n\t *\n\t * @unstable This feature is not documented, use at your own risk\n\t */\n\tpublic getGroupBadgeImageURL(badgeCode: string): URL {\n\t\treturn this.formatURL(`/habbo-imaging/badge/${badgeCode}`);\n\t}\n}\n\nexport type HabboGroupId = `g-hh${string}-${string};`\n\n/**\n * Represents a Habbo group.\n */\nexport interface HabboGroup {\n\t/**\n\t * The unique identifier of the group.\n\t */\n\tid: HabboGroupId;\n\n\t/**\n\t * The name of the group.\n\t */\n\tname: string;\n\n\t/**\n\t * The description of the group.\n\t */\n\tdescription: string;\n\n\t/**\n\t * The type of the group.\n\t */\n\ttype: HabboGroupType;\n\n\t/**\n\t * The ID of the room associated with the group, or null if no room is associated.\n\t */\n\troomId: number | null;\n\n\t/**\n\t * The badge code of the group.\n\t */\n\tbadgeCode: string;\n}\n\n/**\n * Enum representing the type of a Habbo group.\n */\nexport enum HabboGroupType {\n\t/**\n\t * A normal group (public).\n\t */\n\tNORMAL = 'NORMAL',\n\n\t/**\n\t * A favourite (exclusive) group.\n\t */\n\tFAVOURITE = 'EXCLUSIVE',\n\n\t/**\n\t * A private (closed) group.\n\t */\n\tPRIVATE = 'CLOSED'\n}\n\n/**\n * Represents a member of a Habbo group.\n */\nexport interface HabboGroupMember {\n\t/**\n\t * Indicates whether the member is online.\n\t */\n\tonline: boolean;\n\n\t/**\n\t * The gender of the member.\n\t */\n\tgender: 'm' | 'f';\n\n\t/**\n\t * The motto of the member.\n\t */\n\tmotto: string;\n\n\t/**\n\t * The figure of the member in the Habbo world.\n\t */\n\thabboFigure: string;\n\n\t/**\n\t * The date since the member joined the group.\n\t */\n\tmemberSince: string;\n\n\t/**\n\t * The unique identifier of the member.\n\t */\n\tuniqueId: string;\n\n\t/**\n\t * The name of the member.\n\t */\n\tname: string;\n\n\t/**\n\t * Indicates whether the member is an admin of the group.\n\t */\n\tisAdmin: boolean;\n}\n","import { type FetchResult } from '@skyra/safe-fetch';\nimport { BaseAPI, type APIOptions } from './base.js';\n\nexport class ListsAPI extends BaseAPI {\n\t/**\n\t * Get the hot looks from the hotel\n\t *\n\t * @param options - The options for the API call\n\t */\n\tpublic async getHotLooks(options: APIOptions): Promise<FetchResult<HabboHotLookList>> {\n\t\tconst url = this.formatURL('/api/public/lists/hotlooks');\n\t\tconst data = await this.fetch(url, options);\n\t\treturn data.map(async (result) => this.#parseHotLooksXML(await result.text())).intoPromise();\n\t}\n\n\t#parseHotLooksXML(data: string): HabboHotLookList {\n\t\tconst urlResult = /url=\"(.*)\"/.exec(data);\n\t\tif (urlResult === null) throw new SyntaxError('Could not read hot looks');\n\n\t\tconst url = urlResult[1];\n\t\tconst entries = [] as HabboHotLookListItem[];\n\t\tfor (const result of data.matchAll(/gender=\"(\\w)\" figure=\"(.+)\" hash=\"(.+)\"/g)) {\n\t\t\tentries.push({ gender: result[1] as 'f' | 'm', figure: result[2], hash: result[3] });\n\t\t}\n\n\t\tif (entries.length === 0) throw new SyntaxError('Could not read hot looks');\n\n\t\treturn { url, entries };\n\t}\n}\n\nexport interface HabboHotLookList {\n\turl: string;\n\tentries: HabboHotLookListItem[];\n}\n\nexport interface HabboHotLookListItem {\n\tgender: 'f' | 'm';\n\tfigure: string;\n\thash: string;\n}\n","import { Json, type FetchResult } from '@skyra/safe-fetch';\nimport { BaseAPI, type APIOptions } from './base.js';\n\nexport class MarketplaceAPI extends BaseAPI {\n\t/**\n\t * Get the marketplace stats for a room item\n\t *\n\t * @param roomItemName - The name of the room item\n\t * @param options - The options for the API call\n\t */\n\tpublic getRoomItemStats(roomItemName: string, options?: APIOptions): Promise<FetchResult<MarketplaceStats>> {\n\t\tconst url = this.formatURL(`/api/public/marketplace/stats/roomItem/${roomItemName}`);\n\t\treturn Json<MarketplaceStats>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get the marketplace stats for a wall item\n\t *\n\t * @param wallItemName - The name of the wall item\n\t * @param options - The options for the API call\n\t */\n\tpublic getWallItemStats(wallItemName: string, options?: APIOptions): Promise<FetchResult<MarketplaceStats>> {\n\t\tconst url = this.formatURL(`/api/public/marketplace/stats/wallItem/${wallItemName}`);\n\t\treturn Json<MarketplaceStats>(this.fetch(url, options));\n\t}\n}\n\nexport interface MarketplaceStats {\n\tstatus: 'OK';\n\tstatsDate: `${bigint}-${bigint}-${bigint}`;\n\tsoldItemCount: number;\n\tcreditSum: number;\n\taveragePrice: number;\n\ttotalOpenOffers: number;\n\thistoryLimitInDays: number;\n}\n","import { type APIOptions, BaseAPI } from './base.js';\n\nexport class PingAPI extends BaseAPI {\n\t/**\n\t * Pings Habbo, returning the measured time using {@linkcode performance.now()}\n\t *\n\t * @param options - The options for the API call\n\t */\n\tpublic async get(options?: APIOptions): Promise<number | null> {\n\t\tconst url = this.formatURL('/api/public/ping');\n\t\tconst now = performance.now();\n\t\treturn (await this.fetch(url, options)).match({\n\t\t\tok: () => performance.now() - now,\n\t\t\terr: () => null\n\t\t});\n\t}\n}\n","import { type FetchResult, Json } from '@skyra/safe-fetch';\nimport { type APIOptions, BaseAPI } from './base.js';\n\nexport class RoomsAPI extends BaseAPI {\n\t/**\n\t * Get a room by its ID\n\t *\n\t * @param roomId - The ID of the room\n\t * @param options - The options for the API call\n\t */\n\tpublic async getById(roomId: number, options?: APIOptions): Promise<FetchResult<HabboRoom>> {\n\t\tconst url = this.formatURL(`/api/public/rooms/${roomId}`);\n\t\treturn Json<HabboRoom>(this.fetch(url, options));\n\t}\n}\n\nexport interface HabboRoom {\n\tid: number;\n\tname: string;\n\tdescription: string;\n\tcreationTime: `${bigint}-${bigint}-${bigint}T${string}`;\n\thabboGroupId: string;\n\ttags: string[];\n\tmaximumVisitors: number;\n\tshowOwnerName: boolean;\n\townerName: string;\n\townerUniqueId: string;\n\tcategories: string[];\n\tthumbnailUrl: string;\n\timageUrl: string;\n\trating: number;\n\tuniqueId: HabboRoomUniqueId;\n}\n\nexport type HabboRoomUniqueId = `r-hh${string}-${string}`;\n","export function isNullish(value: unknown): value is null | undefined {\n\treturn value == null;\n}\n","import { Json, type FetchResult } from '@skyra/safe-fetch';\nimport { isNullish } from '../common.js';\nimport { BaseAPI, type APIOptions } from './base.js';\nimport { HabboGroupType } from './groups.js';\n\nexport class UsersAPI extends BaseAPI {\n\t/**\n\t * Get a user by its username\n\t *\n\t * @param username - The username to search a Habbo user by\n\t * @param options - The options for the API call\n\t */\n\tpublic getByUsername(username: string, options?: APIOptions): Promise<FetchResult<HabboUser>> {\n\t\tconst url = this.formatURL('/api/public/users');\n\t\turl.searchParams.set('name', username);\n\t\treturn Json<HabboUser>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get a user by its ID\n\t *\n\t * @param uniqueId - The ID to search a Habbo user by\n\t * @param options - The options for the API call\n\t */\n\tpublic getByUniqueId(uniqueId: string, options?: APIOptions): Promise<FetchResult<HabboUser>> {\n\t\tconst url = this.formatURL(`/api/public/users/${uniqueId}`);\n\t\treturn Json<HabboUser>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get a user's friends\n\t *\n\t * @param uniqueId - The ID to search a Habbo user by\n\t * @param options - The options for the API call\n\t */\n\tpublic getUserFriends(uniqueId: string, options?: APIOptions): Promise<FetchResult<HabboUserFriend[]>> {\n\t\tconst url = this.formatURL(`/api/public/users/${uniqueId}/friends`);\n\t\treturn Json<HabboUserFriend[]>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get a user's groups\n\t *\n\t * @param uniqueId - The ID to search a Habbo user by\n\t * @param options - The options for the API call\n\t */\n\tpublic getUserGroups(uniqueId: string, options?: APIOptions): Promise<FetchResult<HabboUserGroup[]>> {\n\t\tconst url = this.formatURL(`/api/public/users/${uniqueId}/groups`);\n\t\treturn Json<HabboUserGroup[]>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get a user's rooms\n\t *\n\t * @param uniqueId - The ID to search a Habbo user by\n\t * @param options - The options for the API call\n\t */\n\tpublic getUserRooms(uniqueId: string, options?: APIOptions): Promise<FetchResult<HabboUserRoom[]>> {\n\t\tconst url = this.formatURL(`/api/public/users/${uniqueId}/rooms`);\n\t\treturn Json<HabboUserRoom[]>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get a user's badges\n\t *\n\t * @param uniqueId - The ID to search a Habbo user by\n\t * @param options - The options for the API call\n\t */\n\tpublic getUserBadges(uniqueId: string, options?: APIOptions): Promise<FetchResult<HabboUserBadge[]>> {\n\t\tconst url = this.formatURL(`/api/public/users/${uniqueId}/badges`);\n\t\treturn Json<HabboUserBadge[]>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get a user's profile\n\t *\n\t * @param uniqueId - The ID to search a Habbo user by\n\t * @param options - The options for the API call\n\t */\n\tpublic getUserProfile(uniqueId: string, options?: APIOptions): Promise<FetchResult<HabboUserProfile>> {\n\t\tconst url = this.formatURL(`/api/public/users/${uniqueId}/profile`);\n\t\treturn Json<HabboUserProfile>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get a user's photos\n\t *\n\t * @param uniqueId - The ID to search a Habbo user by\n\t * @param options - The options for the API call\n\t */\n\tpublic getUserPhotos(uniqueId: string, options?: APIOptions): Promise<FetchResult<HabboUserPhotos[]>> {\n\t\tconst url = this.formatURL(`/extradata/public/users/${uniqueId}/photos`);\n\t\treturn Json<HabboUserPhotos[]>(this.fetch(url, options));\n\t}\n\n\t/**\n\t * Get a user's figure\n\t *\n\t * @param options - The options for the image\n\t */\n\tpublic getUserFigureImageURL(options: HabboFigureName | HabboFigureStatic): URL {\n\t\tconst url = this.formatURL('/habbo-imaging/avatarimage');\n\n\t\tif ('figure' in options && !isNullish(options.figure)) {\n\t\t\turl.searchParams.append('figure', options.figure);\n\t\t\tif (!isNullish(options.gender)) url.searchParams.append('gender', HabboFigureGender[options.gender]);\n\t\t} else if ('user' in options && !isNullish(options.user)) {\n\t\t\turl.searchParams.append('user', options.user);\n\t\t} else {\n\t\t\tthrow new Error('You must define `figure` or `user` in the options');\n\t\t}\n\n\t\tif (!isNullish(options.action)) {\n\t\t\tconst habboAction = HabboFigureAction[options.action];\n\t\t\turl.searchParams.append(\n\t\t\t\t'action',\n\t\t\t\tisNullish(options.hand) //\n\t\t\t\t\t? habboAction\n\t\t\t\t\t: `${habboAction}=${HabboFigureHand[options.hand]}`\n\t\t\t);\n\t\t}\n\t\tif (!isNullish(options.direction)) url.searchParams.append('direction', HabboFigureDirection[options.direction]);\n\t\tif (!isNullish(options.headDirection)) url.searchParams.append('head_direction', HabboFigureDirection[options.headDirection]);\n\t\tif (!isNullish(options.gesture)) url.searchParams.append('gesture', HabboFigureGesture[options.gesture]);\n\t\tif (!isNullish(options.size)) url.searchParams.append('size', HabboFigureSize[options.size]);\n\t\tif (!isNullish(options.headOnly)) url.searchParams.append('headonly', options.headOnly ? '1' : '0');\n\n\t\treturn url;\n\t}\n}\n\nexport type HabboUserId = `hh${string}-${string}`;\n\n/**\n * Represents a Habbo user.\n */\nexport interface HabboUser {\n\t/**\n\t * The unique identifier of the user.\n\t */\n\tuniqueId: HabboUserId;\n\t/**\n\t * The name of the user.\n\t */\n\tname: string;\n\t/**\n\t * The figure string of the user.\n\t */\n\tfigureString: string;\n\t/**\n\t * The motto of the user.\n\t */\n\tmotto: string;\n\t/**\n\t * Indicates whether the user is online.\n\t */\n\tonline: boolean;\n\t/**\n\t * The last access time of the user.\n\t */\n\tlastAccessTime: string;\n\t/**\n\t * The date when the user became a member.\n\t */\n\tmemberSince: string;\n\t/**\n\t * Indicates whether the user's profile is visible.\n\t */\n\tprofileVisible: boolean;\n\t/**\n\t * The current level of the user.\n\t */\n\tcurrentLevel: number;\n\t/**\n\t * The percentage of the current level completed by the user.\n\t */\n\tcurrentLevelCompletePercent: number;\n\t/**\n\t * The total experience points of the user.\n\t */\n\ttotalExperience: number;\n\t/**\n\t * The number of star gems the user has.\n\t */\n\tstarGemCount: number;\n\t/**\n\t * The badges selected by the user.\n\t */\n\tselectedBadges: HabboUserSelectedBadge[];\n}\n\n/**\n * Represents a room owned by a Habbo user.\n */\nexport interface HabboUserRoom {\n\t/**\n\t * The unique identifier of the room.\n\t */\n\tid: number;\n\t/**\n\t * The name of the room.\n\t */\n\tname: string;\n\t/**\n\t * The description of the room.\n\t */\n\tdescription: string;\n\t/**\n\t * The creation time of the room.\n\t */\n\tcreationTime: string;\n\t/**\n\t * The unique identifier of the Habbo group associated with the room.\n\t */\n\thabboGroupId: string;\n\t/**\n\t * The tags associated with the room.\n\t */\n\ttags: string[];\n\t/**\n\t * The maximum number of visitors allowed in the room.\n\t */\n\tmaximumVisitors: number;\n\t/**\n\t * Indicates whether the owner's name is shown.\n\t */\n\tshowOwnerName: boolean;\n\t/**\n\t * The name of the room owner.\n\t */\n\townerName: string;\n\t/**\n\t * The unique identifier of the room owner.\n\t */\n\townerUniqueId: string;\n\t/**\n\t * The categories associated with the room.\n\t */\n\tcategories: string[];\n\t/**\n\t * The URL of the room's thumbnail image.\n\t */\n\tthumbnailUrl: string;\n\t/**\n\t * The URL of the room's image.\n\t */\n\timageUrl: string;\n\t/**\n\t * The rating of the room.\n\t */\n\trating: number;\n\t/**\n\t * The unique identifier of the room.\n\t */\n\tuniqueId: string;\n}\n\n/**\n * Represents a group associated with a Habbo user.\n */\nexport interface HabboUserGroup {\n\t/**\n\t * Indicates whether the group is online.\n\t */\n\tonline: boolean;\n\t/**\n\t * The unique identifier of the group.\n\t */\n\tid: string;\n\t/**\n\t * The name of the group.\n\t */\n\tname: string;\n\t/**\n\t * The description of the group.\n\t */\n\tdescription: string;\n\t/**\n\t * The type of the group.\n\t */\n\ttype: HabboGroupType;\n\t/**\n\t * The unique identifier of the room associated with the group.\n\t */\n\troomId: string;\n\t/**\n\t * The badge code of the group.\n\t */\n\tbadgeCode: string;\n\t/**\n\t * The primary color of the group.\n\t */\n\tprimaryColour: string;\n\t/**\n\t * The secondary color of the group.\n\t */\n\tsecondaryColour: string;\n\t/**\n\t * Indicates whether the user is an admin of the group.\n\t */\n\tisAdmin: boolean;\n}\n\n/**\n * Represents a badge owned by a Habbo user.\n */\nexport interface HabboUserBadge {\n\t/**\n\t * The code of the badge.\n\t */\n\tcode: string;\n\t/**\n\t * The name of the badge.\n\t */\n\tname: string;\n\t/**\n\t * The description of the badge.\n\t */\n\tdescription: string;\n}\n\n/**\n * Represents a selected badge of a Habbo user.\n */\nexport interface HabboUserSelectedBadge extends HabboUserBadge {\n\t/**\n\t * The index of the badge.\n\t */\n\tbadgeIndex: number;\n}\n\n/**\n * Represents a friend of a Habbo user.\n */\nexport interface HabboUserFriend {\n\t/**\n\t * The unique identifier of the friend.\n\t */\n\tuniqueId: string;\n\t/**\n\t * The name of the friend.\n\t */\n\tname: string;\n\t/**\n\t * The figure string of the friend.\n\t */\n\tfigureString: string;\n\t/**\n\t * The motto of the friend.\n\t */\n\tmotto: string;\n\t/**\n\t * Indicates whether the friend is online.\n\t */\n\tonline: boolean;\n}\n\n/**\n * Represents the profile of a Habbo user.\n */\nexport interface HabboUserProfile {\n\t/**\n\t * The unique identifier of the user.\n\t */\n\tuniqueId: string;\n\t/**\n\t * The name of the user.\n\t */\n\tname: string;\n\t/**\n\t * The figure string of the user.\n\t */\n\tfigureString: string;\n\t/**\n\t * The motto of the user.\n\t */\n\tmotto: string;\n\t/**\n\t * Indicates whether the user is online.\n\t */\n\tonline: boolean;\n\t/**\n\t * The last access time of the user.\n\t */\n\tlastAccessTime: string;\n\t/**\n\t * The date when the user became a member.\n\t */\n\tmemberSince: string;\n\t/**\n\t * Indicates whether the user's profile is visible.\n\t */\n\tprofileVisible: boolean;\n\t/**\n\t * The current level of the user.\n\t */\n\tcurrentLevel: number;\n\t/**\n\t * The percentage of the current level completed by the user.\n\t */\n\tcurrentLevelCompletePercent: number;\n\t/**\n\t * The total experience points of the user.\n\t */\n\ttotalExperience: number;\n\t/**\n\t * The number of star gems the user has.\n\t */\n\tstarGemCount: number;\n\t/**\n\t * The badges selected by the user.\n\t */\n\tselectedBadges: HabboUserSelectedBadge[];\n\t/**\n\t * The groups the user is a member of.\n\t */\n\tgroups: HabboUserGroup[];\n\t/**\n\t * The badges owned by the user.\n\t */\n\tbadges: HabboUserBadge[];\n\t/**\n\t * The friends of the user.\n\t */\n\tfriends: HabboUserFriend[];\n\t/**\n\t * The rooms owned by the user.\n\t */\n\trooms: HabboUserRoom[];\n}\n\n/**\n * Represents photos associated with a Habbo user.\n */\nexport interface HabboUserPhotos {\n\t/**\n\t * The unique identifier of the room where the photo was taken.\n\t */\n\troom_id: number;\n\t/**\n\t * The unique identifier of the photo creator.\n\t */\n\tcreator_id: number;\n\t/**\n\t * The name of the photo creator.\n\t */\n\tcreator_name: string;\n\t/**\n\t * The time when the photo was taken.\n\t */\n\ttime: number;\n\t/**\n\t * The version of the photo.\n\t */\n\tversion: number;\n\t/**\n\t * The URL of the photo.\n\t */\n\turl: string;\n\t/**\n\t * The type of the photo.\n\t */\n\ttype: string;\n\t/**\n\t * The unique identifier of the photo creator.\n\t */\n\tcreator_uniqueId: string;\n\t/**\n\t * The tags associated with the photo.\n\t */\n\ttags: string[];\n\t/**\n\t * The URL of the photo preview.\n\t */\n\tpreviewUrl: string;\n\t/**\n\t * The unique identifier of the photo.\n\t */\n\tid: string;\n\t/**\n\t * The likes associated with the photo.\n\t */\n\tlikes: string[];\n}\n\nexport interface HabboFigureName extends HabboFigureBase {\n\t/**\n\t * The Habbo username.\n\t */\n\tuser: string;\n}\n\nexport interface HabboFigureStatic extends HabboFigureBase {\n\t/**\n\t * The Habbo figure to use.\n\t */\n\tfigure: string;\n\t/**\n\t * The Habbo's gender.\n\t */\n\tgender?: keyof typeof HabboFigureGender | undefined | null;\n}\n\nexport interface HabboFigureBase {\n\t/**\n\t * The action the user should perform.\n\t */\n\taction?: keyof typeof HabboFigureAction | undefined | null;\n\t/**\n\t * The hand item, will override {@linkcode HabboFigureBase.action} to `'crr'`.\n\t */\n\thand?: keyof typeof HabboFigureHand | undefined | null;\n\t/**\n\t * The Habbo's direction.\n\t */\n\tdirection?: keyof typeof HabboFigureDirection | undefined | null;\n\t/**\n\t * The Habbo's head direction.\n\t */\n\theadDirection?: keyof typeof HabboFigureDirection | undefined | null;\n\t/**\n\t * The gesture, if any.\n\t */\n\tgesture?: keyof typeof HabboFigureGesture | undefined | null;\n\t/**\n\t * The size of the character.\n\t */\n\tsize?: keyof typeof HabboFigureSize | undefined | null;\n\t/**\n\t * Whether or not to render only the head.\n\t */\n\theadOnly?: boolean | undefined | null;\n}\n\nexport const HabboFigureAction = {\n\t// Main Actions\n\tlay: 'lay',\n\tsit: 'sit',\n\trespect: 'respect',\n\twalk: 'wlk',\n\twave: 'wav',\n\tcarry: 'crr',\n\tdrink: 'drk',\n\tsign: 'sig',\n\tblow: 'blw',\n\tlaugh: 'laugh'\n} as const;\n\nexport const HabboFigureHand = {\n\tnothing: '0',\n\tcarrot: '2',\n\tcoffee: '6',\n\tcocktail: '667',\n\thabbo_cola: '5',\n\tice_cream: '3',\n\tjapanese_tea: '42',\n\tlove_potion: '9',\n\tradioactive: '44',\n\ttomato: '43',\n\twater: '1'\n} as const;\n\nexport const HabboFigureGesture = {\n\tnothing: 'nrm',\n\thappy: 'sml',\n\tsad: 'sad',\n\tangry: 'agr',\n\tsurprised: 'srp',\n\tsleeping: 'eyb',\n\tspeaking: 'spk'\n} as const;\n\nexport const HabboFigureSize = { small: 's', normal: 'm', large: 'l' } as const;\nexport const HabboFigureDirection = { nw: '0', w: '1', sw: '2', s: '3', se: '4', e: '5', ne: '6', n: '7' } as const;\nexport const HabboFigureGender = { male: 'M', female: 'F' } as const;\n\nexport const HabboFigureGestureKeys = Object.keys(HabboFigureGesture) as (keyof typeof HabboFigureGesture)[];\nexport const HabboFigureActionKeys = Object.keys(HabboFigureAction) as (keyof typeof HabboFigureAction)[];\nexport const HabboFigureHandKeys = Object.keys(HabboFigureHand) as (keyof typeof HabboFigureHand)[];\nexport const HabboFigureSizeKeys = Object.keys(HabboFigureSize) as (keyof typeof HabboFigureSize)[];\nexport const HabboFigureDirectionKeys = Object.keys(HabboFigureDirection) as (keyof typeof HabboFigureDirection)[];\nexport const HabboFigureGenderKeys = Object.keys(HabboFigureGender) as (keyof typeof HabboFigureGender)[];\n","import { HotelDomainURL } from './constants.js';\nimport { AchievementsAPI } from './routes/achievements.js';\nimport { GroupsAPI } from './routes/groups.js';\nimport { ListsAPI } from './routes/lists.js';\nimport { MarketplaceAPI } from './routes/marketplace.js';\nimport { PingAPI } from './routes/ping.js';\nimport { RoomsAPI } from './routes/rooms.js';\nimport { UsersAPI } from './routes/users.js';\n\nexport class Habbo {\n\tpublic readonly achievements: AchievementsAPI;\n\tpublic readonly groups: GroupsAPI;\n\tpublic readonly lists: ListsAPI;\n\tpublic readonly marketplace: MarketplaceAPI;\n\tpublic readonly ping: PingAPI;\n\tpublic readonly rooms: RoomsAPI;\n\tpublic readonly users: UsersAPI;\n\n\tpublic constructor(options?: HabboOptions) {\n\t\tconst baseURL = options?.baseURL ?? HotelDomainURL.International;\n\t\tconst timeout = options?.timeout ?? null;\n\n\t\tthis.achievements = new AchievementsAPI(baseURL, timeout);\n\t\tthis.groups = new GroupsAPI(baseURL, timeout);\n\t\tthis.lists = new ListsAPI(baseURL, timeout);\n\t\tthis.marketplace = new MarketplaceAPI(baseURL, timeout);\n\t\tthis.ping = new PingAPI(baseURL, timeout);\n\t\tthis.rooms = new RoomsAPI(baseURL, timeout);\n\t\tthis.users = new UsersAPI(baseURL, timeout);\n\t}\n}\n\nexport interface HabboOptions {\n\tbaseURL?: string | null | undefined;\n\ttimeout?: number | null | undefined;\n}\n"]}