@wavezfm/api 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +338 -0
  2. package/dist/core/ApiError.d.ts +14 -0
  3. package/dist/core/ApiError.js +20 -0
  4. package/dist/core/ApiError.js.map +1 -0
  5. package/dist/core/api.d.ts +27 -0
  6. package/dist/core/api.js +327 -0
  7. package/dist/core/api.js.map +1 -0
  8. package/dist/core/i18n.d.ts +3 -0
  9. package/dist/core/i18n.js +97 -0
  10. package/dist/core/i18n.js.map +1 -0
  11. package/dist/index.d.ts +379 -0
  12. package/dist/index.js +47 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/realtime/roomBot.d.ts +2 -0
  15. package/dist/realtime/roomBot.js +215 -0
  16. package/dist/realtime/roomBot.js.map +1 -0
  17. package/dist/resources/auth.d.ts +35 -0
  18. package/dist/resources/auth.js +30 -0
  19. package/dist/resources/auth.js.map +1 -0
  20. package/dist/resources/billing.d.ts +45 -0
  21. package/dist/resources/billing.js +29 -0
  22. package/dist/resources/billing.js.map +1 -0
  23. package/dist/resources/chat.d.ts +27 -0
  24. package/dist/resources/chat.js +38 -0
  25. package/dist/resources/chat.js.map +1 -0
  26. package/dist/resources/friend.d.ts +23 -0
  27. package/dist/resources/friend.js +35 -0
  28. package/dist/resources/friend.js.map +1 -0
  29. package/dist/resources/playlist.d.ts +64 -0
  30. package/dist/resources/playlist.js +61 -0
  31. package/dist/resources/playlist.js.map +1 -0
  32. package/dist/resources/room.d.ts +50 -0
  33. package/dist/resources/room.js +152 -0
  34. package/dist/resources/room.js.map +1 -0
  35. package/dist/resources/roomBot.d.ts +45 -0
  36. package/dist/resources/roomBot.js +75 -0
  37. package/dist/resources/roomBot.js.map +1 -0
  38. package/dist/resources/settings.d.ts +43 -0
  39. package/dist/resources/settings.js +38 -0
  40. package/dist/resources/settings.js.map +1 -0
  41. package/dist/resources/shop.d.ts +11 -0
  42. package/dist/resources/shop.js +22 -0
  43. package/dist/resources/shop.js.map +1 -0
  44. package/dist/resources/source.d.ts +14 -0
  45. package/dist/resources/source.js +50 -0
  46. package/dist/resources/source.js.map +1 -0
  47. package/dist/resources/system.d.ts +6 -0
  48. package/dist/resources/system.js +20 -0
  49. package/dist/resources/system.js.map +1 -0
  50. package/dist/resources/user.d.ts +7 -0
  51. package/dist/resources/user.js +19 -0
  52. package/dist/resources/user.js.map +1 -0
  53. package/dist/types.d.ts +374 -0
  54. package/dist/types.js +2 -0
  55. package/dist/types.js.map +1 -0
  56. package/package.json +97 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"room.js","sourceRoot":"","sources":["../../src/resources/room.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAQ5C,MAAM,uBAAuB,GACzB,gEAAgE,CAAC;AACrE,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAoB;IACvD,YAAY;IACZ,WAAW;IACX,WAAW;IACX,aAAa;CAChB,CAAC,CAAC;AAEH,SAAS,qBAAqB,CAC1B,GAAY,EACZ,UAUuC,EACvC,IAAY;IAEZ,OAAO,IAAI,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE;QAC/C,MAAM,EAAE,GAAG;QACX,UAAU,EAAE,aAAa;QACzB,IAAI;KACP,CAAC,CAAC;AACP,CAAC;AAED,SAAS,2BAA2B,CAChC,GAAY,EACZ,KAMC;IAED,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IAC/C,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,IAAI,iBAAiB,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QAChE,MAAM,qBAAqB,CACvB,GAAG,EACH,gCAAgC,EAChC,uBAAuB,CAC1B,CAAC;IACN,CAAC;IAED,IAAI,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ,IAAI,KAAK,CAAC,YA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import type { ApiLike, RoomBotState } from "../types";
2
+ export declare function createRoomBotResource(api: ApiLike): {
3
+ getState(roomId: string): Promise<import("..").ApiSuccessResponse<RoomBotState>>;
4
+ getMessages(roomId: string, limit?: number, offset?: number): Promise<import("..").ApiSuccessResponse<{
5
+ bot: Record<string, unknown>;
6
+ history: boolean;
7
+ messages: unknown[];
8
+ }>>;
9
+ sendMessage(roomId: string, input: {
10
+ content: string;
11
+ }): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
12
+ deleteMessage(roomId: string, messageId: string, message?: Record<string, unknown>): Promise<import("..").ApiSuccessResponse<{
13
+ success: true;
14
+ }>>;
15
+ pinMessage(roomId: string, messageId: string, message?: Record<string, unknown>): Promise<import("..").ApiSuccessResponse<{
16
+ success: true;
17
+ }>>;
18
+ clearPinnedMessage(roomId: string): Promise<import("..").ApiSuccessResponse<{
19
+ success: true;
20
+ }>>;
21
+ clearChat(roomId: string): Promise<import("..").ApiSuccessResponse<{
22
+ success: true;
23
+ }>>;
24
+ getManagement(roomId: string): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
25
+ listEmojis(roomId: string): Promise<import("..").ApiSuccessResponse<unknown[]>>;
26
+ listAuditLogs(roomId: string, limit?: number): Promise<import("..").ApiSuccessResponse<{
27
+ logs: unknown[];
28
+ }>>;
29
+ updateSettings(roomId: string, input: Record<string, unknown>): Promise<import("..").ApiSuccessResponse<{
30
+ room: Record<string, unknown>;
31
+ }>>;
32
+ updateLinkFilters(roomId: string, input: {
33
+ blockAllLinks: boolean;
34
+ blockedLinkPatterns: string[];
35
+ commandAnnouncement?: Record<string, unknown>;
36
+ }): Promise<import("..").ApiSuccessResponse<{
37
+ room: Record<string, unknown>;
38
+ }>>;
39
+ setRole(roomId: string, userId: string, role: string): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
40
+ setQueueAccess(roomId: string, userId: string, blocked: boolean): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
41
+ unban(roomId: string, userId: string): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
42
+ createEmoji(roomId: string, input: Record<string, unknown>): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
43
+ updateEmoji(roomId: string, emojiId: string, input: Record<string, unknown>): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
44
+ deleteEmoji(roomId: string, emojiId: string): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
45
+ };
@@ -0,0 +1,75 @@
1
+ export function createRoomBotResource(api) {
2
+ return {
3
+ getState(roomId) {
4
+ return api.get(`/bot/rooms/${encodeURIComponent(roomId)}/state`, { authMode: "room-bot" });
5
+ },
6
+ getMessages(roomId, limit = 50, offset = 0) {
7
+ return api.get(`/bot/rooms/${encodeURIComponent(roomId)}/messages`, {
8
+ authMode: "room-bot",
9
+ query: {
10
+ limit,
11
+ offset,
12
+ },
13
+ });
14
+ },
15
+ sendMessage(roomId, input) {
16
+ return api.post(`/bot/rooms/${encodeURIComponent(roomId)}/messages`, input, { authMode: "room-bot" });
17
+ },
18
+ deleteMessage(roomId, messageId, message) {
19
+ return api.delete(`/bot/rooms/${encodeURIComponent(roomId)}/messages/${encodeURIComponent(messageId)}`, {
20
+ authMode: "room-bot",
21
+ body: message ? { message } : undefined,
22
+ });
23
+ },
24
+ pinMessage(roomId, messageId, message) {
25
+ return api.put(`/bot/rooms/${encodeURIComponent(roomId)}/pinned-message/${encodeURIComponent(messageId)}`, message ? { message } : {}, { authMode: "room-bot" });
26
+ },
27
+ clearPinnedMessage(roomId) {
28
+ return api.delete(`/bot/rooms/${encodeURIComponent(roomId)}/pinned-message`, { authMode: "room-bot" });
29
+ },
30
+ clearChat(roomId) {
31
+ return api.post(`/bot/rooms/${encodeURIComponent(roomId)}/clear-chat`, {}, { authMode: "room-bot" });
32
+ },
33
+ getManagement(roomId) {
34
+ return api.get(`/bot/rooms/${encodeURIComponent(roomId)}/management`, { authMode: "room-bot" });
35
+ },
36
+ listEmojis(roomId) {
37
+ return api.get(`/bot/rooms/${encodeURIComponent(roomId)}/emojis`, { authMode: "room-bot" });
38
+ },
39
+ listAuditLogs(roomId, limit) {
40
+ return api.get(`/bot/rooms/${encodeURIComponent(roomId)}/audit-logs`, {
41
+ authMode: "room-bot",
42
+ query: limit ? { limit } : undefined,
43
+ });
44
+ },
45
+ updateSettings(roomId, input) {
46
+ return api.patch(`/bot/rooms/${encodeURIComponent(roomId)}/settings`, input, { authMode: "room-bot" });
47
+ },
48
+ updateLinkFilters(roomId, input) {
49
+ return api.patch(`/bot/rooms/${encodeURIComponent(roomId)}/link-filters`, input, { authMode: "room-bot" });
50
+ },
51
+ setRole(roomId, userId, role) {
52
+ return api.put(`/bot/rooms/${encodeURIComponent(roomId)}/roles/${encodeURIComponent(userId)}`, { role }, { authMode: "room-bot" });
53
+ },
54
+ setQueueAccess(roomId, userId, blocked) {
55
+ return api.put(`/bot/rooms/${encodeURIComponent(roomId)}/queue-access/${encodeURIComponent(userId)}`, { blocked }, { authMode: "room-bot" });
56
+ },
57
+ unban(roomId, userId) {
58
+ return api.delete(`/bot/rooms/${encodeURIComponent(roomId)}/bans/${encodeURIComponent(userId)}`, {
59
+ authMode: "room-bot",
60
+ });
61
+ },
62
+ createEmoji(roomId, input) {
63
+ return api.post(`/bot/rooms/${encodeURIComponent(roomId)}/emojis`, input, { authMode: "room-bot" });
64
+ },
65
+ updateEmoji(roomId, emojiId, input) {
66
+ return api.patch(`/bot/rooms/${encodeURIComponent(roomId)}/emojis/${encodeURIComponent(emojiId)}`, input, { authMode: "room-bot" });
67
+ },
68
+ deleteEmoji(roomId, emojiId) {
69
+ return api.delete(`/bot/rooms/${encodeURIComponent(roomId)}/emojis/${encodeURIComponent(emojiId)}`, {
70
+ authMode: "room-bot",
71
+ });
72
+ },
73
+ };
74
+ }
75
+ //# sourceMappingURL=roomBot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roomBot.js","sourceRoot":"","sources":["../../src/resources/roomBot.ts"],"names":[],"mappings":"AAEA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AAW,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAChF;gBACI,QAAQ,EAAE,UAAU;aACvB,CACJ,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,43 @@
1
+ import type { ApiLike, TwoFactorStatus, UserSettings } from "../types";
2
+ export declare function createSettingsResource(api: ApiLike): {
3
+ get(): Promise<import("..").ApiSuccessResponse<UserSettings>>;
4
+ update(input: {
5
+ bio?: string;
6
+ timeFormat?: "12h" | "24h";
7
+ notifyChatMentions?: boolean;
8
+ playMentionSound?: boolean;
9
+ presenceStatus?: "online" | "busy" | "away";
10
+ selectedBadgeIds?: string[];
11
+ showChatBadge?: boolean;
12
+ }): Promise<import("..").ApiSuccessResponse<UserSettings>>;
13
+ getTwoFactor(): Promise<import("..").ApiSuccessResponse<TwoFactorStatus>>;
14
+ sendPhoneVerification(input: {
15
+ phoneNumber: string;
16
+ password: string;
17
+ }): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
18
+ verifyPhoneNumber(input: {
19
+ phoneNumber: string;
20
+ otp: string;
21
+ password: string;
22
+ }): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
23
+ startEmailTwoFactor(input: {
24
+ password: string;
25
+ }): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
26
+ startSmsTwoFactor(input: {
27
+ password: string;
28
+ }): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
29
+ verifyOtpTwoFactor(input: {
30
+ code: string;
31
+ password: string;
32
+ }): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
33
+ startAuthenticatorTwoFactor(input: {
34
+ password: string;
35
+ }): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
36
+ verifyAuthenticatorTwoFactor(input: {
37
+ code: string;
38
+ password: string;
39
+ }): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
40
+ disableTwoFactor(input: {
41
+ password: string;
42
+ }): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
43
+ };
@@ -0,0 +1,38 @@
1
+ export function createSettingsResource(api) {
2
+ return {
3
+ get() {
4
+ return api.get("/settings");
5
+ },
6
+ update(input) {
7
+ return api.patch("/settings", input);
8
+ },
9
+ getTwoFactor() {
10
+ return api.get("/settings/two-factor");
11
+ },
12
+ sendPhoneVerification(input) {
13
+ return api.post("/settings/two-factor/phone/send", input);
14
+ },
15
+ verifyPhoneNumber(input) {
16
+ return api.post("/settings/two-factor/phone/verify", input);
17
+ },
18
+ startEmailTwoFactor(input) {
19
+ return api.post("/settings/two-factor/email/start", input);
20
+ },
21
+ startSmsTwoFactor(input) {
22
+ return api.post("/settings/two-factor/sms/start", input);
23
+ },
24
+ verifyOtpTwoFactor(input) {
25
+ return api.post("/settings/two-factor/otp/verify", input);
26
+ },
27
+ startAuthenticatorTwoFactor(input) {
28
+ return api.post("/settings/two-factor/authy/start", input);
29
+ },
30
+ verifyAuthenticatorTwoFactor(input) {
31
+ return api.post("/settings/two-factor/authy/verify", input);
32
+ },
33
+ disableTwoFactor(input) {
34
+ return api.post("/settings/two-factor/disable", input);
35
+ },
36
+ };
37
+ }
38
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/resources/settings.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,sBAAsB,CAAC,GAAY;IAC/C,OAAO;QACH,GAAG;YACC,OAAO,GAAG,CAAC,GAAG,CAAe,WAAW,CAAC,CAAC;QAC9C,CAAC;QAED,MAAM,CAAC,KAQN;YACG,OAAO,GAAG,CAAC,KAAK,CAAe,WAAW,EAAE,KAAK,CAAC,CAAC;QACvD,CAAC;QAED,YAAY;YACR,OAAO,GAAG,CAAC,GAAG,CAAkB,sBAAsB,CAAC,CAAC;QAC5D,CAAC;QAED,qBAAqB,CAAC,KAGrB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,iCAAiC,EACjC,KAAK,CACR,CAAC;QACN,CAAC;QAED,iBAAiB,CAAC,KAIjB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,mCAAmC,EACnC,KAAK,CACR,CAAC;QACN,CAAC;QAED,mBAAmB,CAAC,KAA2B;YAC3C,OAAO,GAAG,CAAC,IAAI,CACX,kCAAkC,EAClC,KAAK,CACR,CAAC;QACN,CAAC;QAED,iBAAiB,CAAC,KAA2B;YACzC,OAAO,GAAG,CAAC,IAAI,CACX,gCAAgC,EAChC,KAAK,CACR,CAAC;QACN,CAAC;QAED,kBAAkB,CAAC,KAAyC;YACxD,OAAO,GAAG,CAAC,IAAI,CACX,iCAAiC,EACjC,KAAK,CACR,CAAC;QACN,CAAC;QAED,2BAA2B,CAAC,KAA2B;YACnD,OAAO,GAAG,CAAC,IAAI,CACX,kCAAkC,EAClC,KAAK,CACR,CAAC;QACN,CAAC;QAED,4BAA4B,CAAC,KAG5B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,mCAAmC,EACnC,KAAK,CACR,CAAC;QACN,CAAC;QAED,gBAAgB,CAAC,KAA2B;YACxC,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,KAAK,CACR,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ApiLike, InventoryResponse, StoreCatalogResponse, WalletBalance } from "../types";
2
+ export declare function createShopResource(api: ApiLike): {
3
+ getCatalog(): Promise<import("..").ApiSuccessResponse<StoreCatalogResponse>>;
4
+ getWallet(): Promise<import("..").ApiSuccessResponse<WalletBalance>>;
5
+ purchase(input: {
6
+ itemId: string;
7
+ idempotencyKey?: string;
8
+ }): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
9
+ equip(itemId: string): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
10
+ getInventory(): Promise<import("..").ApiSuccessResponse<InventoryResponse>>;
11
+ };
@@ -0,0 +1,22 @@
1
+ export function createShopResource(api) {
2
+ return {
3
+ getCatalog() {
4
+ return api.get("/store", {
5
+ authMode: "none",
6
+ });
7
+ },
8
+ getWallet() {
9
+ return api.get("/wallet");
10
+ },
11
+ purchase(input) {
12
+ return api.post("/store/purchase", input);
13
+ },
14
+ equip(itemId) {
15
+ return api.post("/store/equip", { itemId });
16
+ },
17
+ getInventory() {
18
+ return api.get("/inventory");
19
+ },
20
+ };
21
+ }
22
+ //# sourceMappingURL=shop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shop.js","sourceRoot":"","sources":["../../src/resources/shop.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,kBAAkB,CAAC,GAAY;IAC3C,OAAO;QACH,UAAU;YACN,OAAO,GAAG,CAAC,GAAG,CAAuB,QAAQ,EAAE;gBAC3C,QAAQ,EAAE,MAAM;aACnB,CAAC,CAAC;QACP,CAAC;QAED,SAAS;YACL,OAAO,GAAG,CAAC,GAAG,CAAgB,SAAS,CAAC,CAAC;QAC7C,CAAC;QAED,QAAQ,CAAC,KAAkD;YACvD,OAAO,GAAG,CAAC,IAAI,CAA0B,iBAAiB,EAAE,KAAK,CAAC,CAAC;QACvE,CAAC;QAED,KAAK,CAAC,MAAc;YAChB,OAAO,GAAG,CAAC,IAAI,CAA0B,cAAc,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QACzE,CAAC;QAED,YAAY;YACR,OAAO,GAAG,CAAC,GAAG,CAAoB,YAAY,CAAC,CAAC;QACpD,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { ApiLike, MediaSearchResult } from "../types";
2
+ export declare function createSourceResource(api: ApiLike): {
3
+ search(source: string, query: string, limit?: number): Promise<import("..").ApiSuccessResponse<MediaSearchResult[]>>;
4
+ searchYouTube(query: string, limit?: number): Promise<import("..").ApiSuccessResponse<MediaSearchResult[]>>;
5
+ searchSoundCloud(query: string, limit?: number): Promise<import("..").ApiSuccessResponse<MediaSearchResult[]>>;
6
+ searchAll(query: string, limit?: number): Promise<{
7
+ data: {
8
+ youtube: MediaSearchResult[];
9
+ soundcloud: MediaSearchResult[];
10
+ };
11
+ status: number;
12
+ headers: Headers;
13
+ }>;
14
+ };
@@ -0,0 +1,50 @@
1
+ export function createSourceResource(api) {
2
+ return {
3
+ search(source, query, limit = 8) {
4
+ return api.get("/media/search", {
5
+ query: {
6
+ source,
7
+ q: query,
8
+ limit,
9
+ },
10
+ });
11
+ },
12
+ searchYouTube(query, limit = 8) {
13
+ return api.get("/media/search", {
14
+ query: {
15
+ source: "youtube",
16
+ q: query,
17
+ limit,
18
+ },
19
+ });
20
+ },
21
+ searchSoundCloud(query, limit = 8) {
22
+ return api.get("/media/search", {
23
+ query: {
24
+ source: "soundcloud",
25
+ q: query,
26
+ limit,
27
+ },
28
+ });
29
+ },
30
+ async searchAll(query, limit = 8) {
31
+ const [youtube, soundcloud] = await Promise.all([
32
+ api.get("/media/search", {
33
+ query: { source: "youtube", q: query, limit },
34
+ }),
35
+ api.get("/media/search", {
36
+ query: { source: "soundcloud", q: query, limit },
37
+ }),
38
+ ]);
39
+ return {
40
+ data: {
41
+ youtube: youtube.data,
42
+ soundcloud: soundcloud.data,
43
+ },
44
+ status: 200,
45
+ headers: youtube.headers,
46
+ };
47
+ },
48
+ };
49
+ }
50
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/resources/source.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAAC,GAAY;IAC7C,OAAO;QACH,MAAM,CAAC,MAAc,EAAE,KAAa,EAAE,KAAK,GAAG,CAAC;YAC3C,OAAO,GAAG,CAAC,GAAG,CAAsB,eAAe,EAAE;gBACjD,KAAK,EAAE;oBACH,MAAM;oBACN,CAAC,EAAE,KAAK;oBACR,KAAK;iBACR;aACJ,CAAC,CAAC;QACP,CAAC;QAED,aAAa,CAAC,KAAa,EAAE,KAAK,GAAG,CAAC;YAClC,OAAO,GAAG,CAAC,GAAG,CAAsB,eAAe,EAAE;gBACjD,KAAK,EAAE;oBACH,MAAM,EAAE,SAAS;oBACjB,CAAC,EAAE,KAAK;oBACR,KAAK;iBACR;aACJ,CAAC,CAAC;QACP,CAAC;QAED,gBAAgB,CAAC,KAAa,EAAE,KAAK,GAAG,CAAC;YACrC,OAAO,GAAG,CAAC,GAAG,CAAsB,eAAe,EAAE;gBACjD,KAAK,EAAE;oBACH,MAAM,EAAE,YAAY;oBACpB,CAAC,EAAE,KAAK;oBACR,KAAK;iBACR;aACJ,CAAC,CAAC;QACP,CAAC;QAED,KAAK,CAAC,SAAS,CAAC,KAAa,EAAE,KAAK,GAAG,CAAC;YACpC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;gBAC5C,GAAG,CAAC,GAAG,CAAsB,eAAe,EAAE;oBAC1C,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE;iBAChD,CAAC;gBACF,GAAG,CAAC,GAAG,CAAsB,eAAe,EAAE;oBAC1C,KAAK,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE;iBACnD,CAAC;aACL,CAAC,CAAC;YAEH,OAAO;gBACH,IAAI,EAAE;oBACF,OAAO,EAAE,OAAO,CAAC,IAAI;oBACrB,UAAU,EAAE,UAAU,CAAC,IAAI;iBAC9B;gBACD,MAAM,EAAE,GAAG;gBACX,OAAO,EAAE,OAAO,CAAC,OAAO;aAC3B,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ApiLike, SystemPublicStats, SystemStatus } from "../types";
2
+ export declare function createSystemResource(api: ApiLike): {
3
+ status(): Promise<import("..").ApiSuccessResponse<SystemStatus>>;
4
+ publicStats(): Promise<import("..").ApiSuccessResponse<SystemPublicStats>>;
5
+ health(): Promise<import("..").ApiSuccessResponse<Record<string, unknown>>>;
6
+ };
@@ -0,0 +1,20 @@
1
+ export function createSystemResource(api) {
2
+ return {
3
+ status() {
4
+ return api.get("/system/status", {
5
+ authMode: "none",
6
+ });
7
+ },
8
+ publicStats() {
9
+ return api.get("/system/public-stats", {
10
+ authMode: "none",
11
+ });
12
+ },
13
+ health() {
14
+ return api.get(api.getSiteURL("/health"), {
15
+ authMode: "none",
16
+ });
17
+ },
18
+ };
19
+ }
20
+ //# sourceMappingURL=system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system.js","sourceRoot":"","sources":["../../src/resources/system.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAAC,GAAY;IAC7C,OAAO;QACH,MAAM;YACF,OAAO,GAAG,CAAC,GAAG,CAAe,gBAAgB,EAAE;gBAC3C,QAAQ,EAAE,MAAM;aACnB,CAAC,CAAC;QACP,CAAC;QAED,WAAW;YACP,OAAO,GAAG,CAAC,GAAG,CAAoB,sBAAsB,EAAE;gBACtD,QAAQ,EAAE,MAAM;aACnB,CAAC,CAAC;QACP,CAAC;QAED,MAAM;YACF,OAAO,GAAG,CAAC,GAAG,CAA0B,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;gBAC/D,QAAQ,EAAE,MAAM;aACnB,CAAC,CAAC;QACP,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ApiLike, BadgeAssignment, UserProfile } from "../types";
2
+ export declare function createUserResource(api: ApiLike): {
3
+ getById(userId: string): Promise<import("..").ApiSuccessResponse<UserProfile>>;
4
+ getByUsername(username: string): Promise<import("..").ApiSuccessResponse<UserProfile>>;
5
+ getBadges(userId: string): Promise<import("..").ApiSuccessResponse<BadgeAssignment[]>>;
6
+ listAllBadges(): Promise<import("..").ApiSuccessResponse<BadgeAssignment[]>>;
7
+ };
@@ -0,0 +1,19 @@
1
+ export function createUserResource(api) {
2
+ return {
3
+ getById(userId) {
4
+ return api.get(`/users/${encodeURIComponent(userId)}`);
5
+ },
6
+ getByUsername(username) {
7
+ return api.get(`/users/by-username/${encodeURIComponent(username)}`);
8
+ },
9
+ getBadges(userId) {
10
+ return api.get(`/users/${encodeURIComponent(userId)}/badges`);
11
+ },
12
+ listAllBadges() {
13
+ return api.get("/badges", {
14
+ authMode: "none",
15
+ });
16
+ },
17
+ };
18
+ }
19
+ //# sourceMappingURL=user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/resources/user.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CAAC,GAAY;IAC3C,OAAO;QACH,OAAO,CAAC,MAAc;YAClB,OAAO,GAAG,CAAC,GAAG,CAAc,UAAU,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACxE,CAAC;QAED,aAAa,CAAC,QAAgB;YAC1B,OAAO,GAAG,CAAC,GAAG,CACV,sBAAsB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CACvD,CAAC;QACN,CAAC;QAED,SAAS,CAAC,MAAc;YACpB,OAAO,GAAG,CAAC,GAAG,CACV,UAAU,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAChD,CAAC;QACN,CAAC;QAED,aAAa;YACT,OAAO,GAAG,CAAC,GAAG,CAAoB,SAAS,EAAE;gBACzC,QAAQ,EAAE,MAAM;aACnB,CAAC,CAAC;QACP,CAAC;KACJ,CAAC;AACN,CAAC"}