@meowpanel/api 0.1.0-alpha.11 → 1.0.0-beta.2

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 (297) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +40 -0
  3. package/esm/mod.d.ts +87 -1
  4. package/esm/mod.d.ts.map +1 -1
  5. package/esm/mod.js +85 -1
  6. package/esm/src/client.d.ts +248 -0
  7. package/esm/src/client.d.ts.map +1 -0
  8. package/esm/src/client.js +235 -0
  9. package/esm/src/emitter.d.ts +53 -0
  10. package/esm/src/emitter.d.ts.map +1 -0
  11. package/esm/src/emitter.js +55 -0
  12. package/esm/src/errors.d.ts +42 -0
  13. package/esm/src/errors.d.ts.map +1 -0
  14. package/esm/src/errors.js +45 -0
  15. package/esm/src/http.d.ts +157 -0
  16. package/esm/src/http.d.ts.map +1 -0
  17. package/esm/src/http.js +317 -0
  18. package/esm/src/namespace.d.ts +59 -0
  19. package/esm/src/namespace.d.ts.map +1 -0
  20. package/esm/src/namespace.js +79 -0
  21. package/esm/src/reactive.d.ts +29 -0
  22. package/esm/src/reactive.d.ts.map +1 -0
  23. package/esm/src/reactive.js +35 -0
  24. package/esm/src/resources/account.d.ts +125 -0
  25. package/esm/src/resources/account.d.ts.map +1 -0
  26. package/esm/src/resources/account.js +151 -0
  27. package/esm/src/resources/api-keys.d.ts +116 -0
  28. package/esm/src/resources/api-keys.d.ts.map +1 -0
  29. package/esm/src/resources/api-keys.js +105 -0
  30. package/esm/src/resources/auth.d.ts +57 -0
  31. package/esm/src/resources/auth.d.ts.map +1 -0
  32. package/esm/src/resources/auth.js +39 -0
  33. package/esm/src/resources/eggs.d.ts +238 -0
  34. package/esm/src/resources/eggs.d.ts.map +1 -0
  35. package/esm/src/resources/eggs.js +187 -0
  36. package/esm/src/resources/hosts.d.ts +62 -0
  37. package/esm/src/resources/hosts.d.ts.map +1 -0
  38. package/esm/src/resources/hosts.js +62 -0
  39. package/esm/src/resources/members.d.ts +138 -0
  40. package/esm/src/resources/members.d.ts.map +1 -0
  41. package/esm/src/resources/members.js +122 -0
  42. package/esm/src/resources/nodes.d.ts +397 -0
  43. package/esm/src/resources/nodes.d.ts.map +1 -0
  44. package/esm/src/resources/nodes.js +352 -0
  45. package/esm/src/resources/server-groups.d.ts +150 -0
  46. package/esm/src/resources/server-groups.d.ts.map +1 -0
  47. package/esm/src/resources/server-groups.js +111 -0
  48. package/esm/src/resources/servers/activity.d.ts +120 -0
  49. package/esm/src/resources/servers/activity.d.ts.map +1 -0
  50. package/esm/src/resources/servers/activity.js +163 -0
  51. package/esm/src/resources/servers/allocations.d.ts +125 -0
  52. package/esm/src/resources/servers/allocations.d.ts.map +1 -0
  53. package/esm/src/resources/servers/allocations.js +137 -0
  54. package/esm/src/resources/servers/connection.d.ts +108 -0
  55. package/esm/src/resources/servers/connection.d.ts.map +1 -0
  56. package/esm/src/resources/servers/connection.js +169 -0
  57. package/esm/src/resources/servers/files.d.ts +164 -0
  58. package/esm/src/resources/servers/files.d.ts.map +1 -0
  59. package/esm/src/resources/servers/files.js +281 -0
  60. package/esm/src/resources/servers/index.d.ts +126 -0
  61. package/esm/src/resources/servers/index.d.ts.map +1 -0
  62. package/esm/src/resources/servers/index.js +135 -0
  63. package/esm/src/resources/servers/profiles.d.ts +138 -0
  64. package/esm/src/resources/servers/profiles.d.ts.map +1 -0
  65. package/esm/src/resources/servers/profiles.js +177 -0
  66. package/esm/src/resources/servers/server.d.ts +136 -0
  67. package/esm/src/resources/servers/server.d.ts.map +1 -0
  68. package/esm/src/resources/servers/server.js +202 -0
  69. package/esm/src/resources/servers/sftp.d.ts +147 -0
  70. package/esm/src/resources/servers/sftp.d.ts.map +1 -0
  71. package/esm/src/resources/servers/sftp.js +153 -0
  72. package/esm/src/resources/servers/types.d.ts +199 -0
  73. package/esm/src/resources/servers/types.d.ts.map +1 -0
  74. package/esm/src/resources/servers/types.js +1 -0
  75. package/esm/src/sse.d.ts +53 -0
  76. package/esm/src/sse.d.ts.map +1 -0
  77. package/esm/src/sse.js +133 -0
  78. package/esm/src/types.d.ts +126 -0
  79. package/esm/src/types.d.ts.map +1 -0
  80. package/esm/src/types.js +21 -0
  81. package/package.json +4 -92
  82. package/script/mod.d.ts +87 -1
  83. package/script/mod.d.ts.map +1 -1
  84. package/script/mod.js +132 -3
  85. package/script/src/client.d.ts +248 -0
  86. package/script/src/client.d.ts.map +1 -0
  87. package/script/src/client.js +239 -0
  88. package/script/src/emitter.d.ts +53 -0
  89. package/script/src/emitter.d.ts.map +1 -0
  90. package/script/src/emitter.js +59 -0
  91. package/script/src/errors.d.ts +42 -0
  92. package/script/src/errors.d.ts.map +1 -0
  93. package/script/src/errors.js +49 -0
  94. package/script/src/http.d.ts +157 -0
  95. package/script/src/http.d.ts.map +1 -0
  96. package/script/src/http.js +321 -0
  97. package/script/src/namespace.d.ts +59 -0
  98. package/script/src/namespace.d.ts.map +1 -0
  99. package/script/src/namespace.js +83 -0
  100. package/script/src/reactive.d.ts +29 -0
  101. package/script/src/reactive.d.ts.map +1 -0
  102. package/script/src/reactive.js +39 -0
  103. package/script/src/resources/account.d.ts +125 -0
  104. package/script/src/resources/account.d.ts.map +1 -0
  105. package/script/src/resources/account.js +158 -0
  106. package/script/src/resources/api-keys.d.ts +116 -0
  107. package/script/src/resources/api-keys.d.ts.map +1 -0
  108. package/script/src/resources/api-keys.js +110 -0
  109. package/script/src/resources/auth.d.ts +57 -0
  110. package/script/src/resources/auth.d.ts.map +1 -0
  111. package/script/src/resources/auth.js +43 -0
  112. package/script/src/resources/eggs.d.ts +238 -0
  113. package/script/src/resources/eggs.d.ts.map +1 -0
  114. package/script/src/resources/eggs.js +193 -0
  115. package/script/src/resources/hosts.d.ts +62 -0
  116. package/script/src/resources/hosts.d.ts.map +1 -0
  117. package/script/src/resources/hosts.js +67 -0
  118. package/script/src/resources/members.d.ts +138 -0
  119. package/script/src/resources/members.d.ts.map +1 -0
  120. package/script/src/resources/members.js +127 -0
  121. package/script/src/resources/nodes.d.ts +397 -0
  122. package/script/src/resources/nodes.d.ts.map +1 -0
  123. package/script/src/resources/nodes.js +362 -0
  124. package/script/src/resources/server-groups.d.ts +150 -0
  125. package/script/src/resources/server-groups.d.ts.map +1 -0
  126. package/script/src/resources/server-groups.js +116 -0
  127. package/script/src/resources/servers/activity.d.ts +120 -0
  128. package/script/src/resources/servers/activity.d.ts.map +1 -0
  129. package/script/src/resources/servers/activity.js +170 -0
  130. package/script/src/resources/servers/allocations.d.ts +125 -0
  131. package/script/src/resources/servers/allocations.d.ts.map +1 -0
  132. package/script/src/resources/servers/allocations.js +142 -0
  133. package/script/src/resources/servers/connection.d.ts +108 -0
  134. package/script/src/resources/servers/connection.d.ts.map +1 -0
  135. package/script/src/resources/servers/connection.js +173 -0
  136. package/script/src/resources/servers/files.d.ts +164 -0
  137. package/script/src/resources/servers/files.d.ts.map +1 -0
  138. package/script/src/resources/servers/files.js +286 -0
  139. package/script/src/resources/servers/index.d.ts +126 -0
  140. package/script/src/resources/servers/index.d.ts.map +1 -0
  141. package/script/src/resources/servers/index.js +139 -0
  142. package/script/src/resources/servers/profiles.d.ts +138 -0
  143. package/script/src/resources/servers/profiles.d.ts.map +1 -0
  144. package/script/src/resources/servers/profiles.js +182 -0
  145. package/script/src/resources/servers/server.d.ts +136 -0
  146. package/script/src/resources/servers/server.d.ts.map +1 -0
  147. package/script/src/resources/servers/server.js +206 -0
  148. package/script/src/resources/servers/sftp.d.ts +147 -0
  149. package/script/src/resources/servers/sftp.d.ts.map +1 -0
  150. package/script/src/resources/servers/sftp.js +158 -0
  151. package/script/src/resources/servers/types.d.ts +199 -0
  152. package/script/src/resources/servers/types.d.ts.map +1 -0
  153. package/script/src/resources/servers/types.js +2 -0
  154. package/script/src/sse.d.ts +53 -0
  155. package/script/src/sse.d.ts.map +1 -0
  156. package/script/src/sse.js +137 -0
  157. package/script/src/types.d.ts +126 -0
  158. package/script/src/types.d.ts.map +1 -0
  159. package/script/src/types.js +25 -0
  160. package/esm/api.d.ts +0 -76
  161. package/esm/api.d.ts.map +0 -1
  162. package/esm/api.js +0 -187
  163. package/esm/components/auth.d.ts +0 -15
  164. package/esm/components/auth.d.ts.map +0 -1
  165. package/esm/components/auth.js +0 -13
  166. package/esm/components/connection/abstract.d.ts +0 -23
  167. package/esm/components/connection/abstract.d.ts.map +0 -1
  168. package/esm/components/connection/abstract.js +0 -43
  169. package/esm/components/connection/sse.d.ts +0 -20
  170. package/esm/components/connection/sse.d.ts.map +0 -1
  171. package/esm/components/connection/sse.js +0 -65
  172. package/esm/components/egg/egg.d.ts +0 -32
  173. package/esm/components/egg/egg.d.ts.map +0 -1
  174. package/esm/components/egg/egg.js +0 -70
  175. package/esm/components/group.d.ts +0 -14
  176. package/esm/components/group.d.ts.map +0 -1
  177. package/esm/components/group.js +0 -33
  178. package/esm/components/member_2.d.ts +0 -69
  179. package/esm/components/member_2.d.ts.map +0 -1
  180. package/esm/components/member_2.js +0 -140
  181. package/esm/components/node.d.ts +0 -78
  182. package/esm/components/node.d.ts.map +0 -1
  183. package/esm/components/node.js +0 -342
  184. package/esm/components/server/activity.d.ts +0 -45
  185. package/esm/components/server/activity.d.ts.map +0 -1
  186. package/esm/components/server/activity.js +0 -158
  187. package/esm/components/server/allocations.d.ts +0 -45
  188. package/esm/components/server/allocations.d.ts.map +0 -1
  189. package/esm/components/server/allocations.js +0 -146
  190. package/esm/components/server/files.d.ts +0 -50
  191. package/esm/components/server/files.d.ts.map +0 -1
  192. package/esm/components/server/files.js +0 -90
  193. package/esm/components/server/power.d.ts +0 -21
  194. package/esm/components/server/power.d.ts.map +0 -1
  195. package/esm/components/server/power.js +0 -43
  196. package/esm/components/server/profiles.d.ts +0 -63
  197. package/esm/components/server/profiles.d.ts.map +0 -1
  198. package/esm/components/server/profiles.js +0 -163
  199. package/esm/components/server/server.d.ts +0 -141
  200. package/esm/components/server/server.d.ts.map +0 -1
  201. package/esm/components/server/server.js +0 -358
  202. package/esm/components/server/sftp.d.ts +0 -31
  203. package/esm/components/server/sftp.d.ts.map +0 -1
  204. package/esm/components/server/sftp.js +0 -84
  205. package/esm/components/server/startup.d.ts +0 -17
  206. package/esm/components/server/startup.d.ts.map +0 -1
  207. package/esm/components/server/startup.js +0 -21
  208. package/esm/components/server/stats.d.ts +0 -19
  209. package/esm/components/server/stats.d.ts.map +0 -1
  210. package/esm/components/server/stats.js +0 -46
  211. package/esm/utils/cache.d.ts +0 -20
  212. package/esm/utils/cache.d.ts.map +0 -1
  213. package/esm/utils/cache.js +0 -66
  214. package/esm/utils/event.d.ts +0 -38
  215. package/esm/utils/event.d.ts.map +0 -1
  216. package/esm/utils/event.js +0 -71
  217. package/esm/utils/object.d.ts +0 -58
  218. package/esm/utils/object.d.ts.map +0 -1
  219. package/esm/utils/object.js +0 -86
  220. package/esm/utils/subscribe.d.ts +0 -37
  221. package/esm/utils/subscribe.d.ts.map +0 -1
  222. package/esm/utils/subscribe.js +0 -29
  223. package/esm/utils/timer.d.ts +0 -13
  224. package/esm/utils/timer.d.ts.map +0 -1
  225. package/esm/utils/timer.js +0 -32
  226. package/esm/utils/units.d.ts +0 -18
  227. package/esm/utils/units.d.ts.map +0 -1
  228. package/esm/utils/units.js +0 -82
  229. package/script/api.d.ts +0 -76
  230. package/script/api.d.ts.map +0 -1
  231. package/script/api.js +0 -192
  232. package/script/components/auth.d.ts +0 -15
  233. package/script/components/auth.d.ts.map +0 -1
  234. package/script/components/auth.js +0 -17
  235. package/script/components/connection/abstract.d.ts +0 -23
  236. package/script/components/connection/abstract.d.ts.map +0 -1
  237. package/script/components/connection/abstract.js +0 -47
  238. package/script/components/connection/sse.d.ts +0 -20
  239. package/script/components/connection/sse.d.ts.map +0 -1
  240. package/script/components/connection/sse.js +0 -69
  241. package/script/components/egg/egg.d.ts +0 -32
  242. package/script/components/egg/egg.d.ts.map +0 -1
  243. package/script/components/egg/egg.js +0 -74
  244. package/script/components/group.d.ts +0 -14
  245. package/script/components/group.d.ts.map +0 -1
  246. package/script/components/group.js +0 -37
  247. package/script/components/member_2.d.ts +0 -69
  248. package/script/components/member_2.d.ts.map +0 -1
  249. package/script/components/member_2.js +0 -146
  250. package/script/components/node.d.ts +0 -78
  251. package/script/components/node.d.ts.map +0 -1
  252. package/script/components/node.js +0 -349
  253. package/script/components/server/activity.d.ts +0 -45
  254. package/script/components/server/activity.d.ts.map +0 -1
  255. package/script/components/server/activity.js +0 -164
  256. package/script/components/server/allocations.d.ts +0 -45
  257. package/script/components/server/allocations.d.ts.map +0 -1
  258. package/script/components/server/allocations.js +0 -152
  259. package/script/components/server/files.d.ts +0 -50
  260. package/script/components/server/files.d.ts.map +0 -1
  261. package/script/components/server/files.js +0 -94
  262. package/script/components/server/power.d.ts +0 -21
  263. package/script/components/server/power.d.ts.map +0 -1
  264. package/script/components/server/power.js +0 -47
  265. package/script/components/server/profiles.d.ts +0 -63
  266. package/script/components/server/profiles.d.ts.map +0 -1
  267. package/script/components/server/profiles.js +0 -168
  268. package/script/components/server/server.d.ts +0 -141
  269. package/script/components/server/server.d.ts.map +0 -1
  270. package/script/components/server/server.js +0 -362
  271. package/script/components/server/sftp.d.ts +0 -31
  272. package/script/components/server/sftp.d.ts.map +0 -1
  273. package/script/components/server/sftp.js +0 -88
  274. package/script/components/server/startup.d.ts +0 -17
  275. package/script/components/server/startup.d.ts.map +0 -1
  276. package/script/components/server/startup.js +0 -25
  277. package/script/components/server/stats.d.ts +0 -19
  278. package/script/components/server/stats.d.ts.map +0 -1
  279. package/script/components/server/stats.js +0 -50
  280. package/script/utils/cache.d.ts +0 -20
  281. package/script/utils/cache.d.ts.map +0 -1
  282. package/script/utils/cache.js +0 -70
  283. package/script/utils/event.d.ts +0 -38
  284. package/script/utils/event.d.ts.map +0 -1
  285. package/script/utils/event.js +0 -75
  286. package/script/utils/object.d.ts +0 -58
  287. package/script/utils/object.d.ts.map +0 -1
  288. package/script/utils/object.js +0 -90
  289. package/script/utils/subscribe.d.ts +0 -37
  290. package/script/utils/subscribe.d.ts.map +0 -1
  291. package/script/utils/subscribe.js +0 -32
  292. package/script/utils/timer.d.ts +0 -13
  293. package/script/utils/timer.d.ts.map +0 -1
  294. package/script/utils/timer.js +0 -36
  295. package/script/utils/units.d.ts +0 -18
  296. package/script/utils/units.d.ts.map +0 -1
  297. package/script/utils/units.js +0 -86
@@ -0,0 +1,239 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MeowPanelApi = void 0;
4
+ const http_js_1 = require("./http.js");
5
+ const sse_js_1 = require("./sse.js");
6
+ const account_js_1 = require("./resources/account.js");
7
+ const auth_js_1 = require("./resources/auth.js");
8
+ const api_keys_js_1 = require("./resources/api-keys.js");
9
+ const eggs_js_1 = require("./resources/eggs.js");
10
+ const hosts_js_1 = require("./resources/hosts.js");
11
+ const members_js_1 = require("./resources/members.js");
12
+ const nodes_js_1 = require("./resources/nodes.js");
13
+ const server_groups_js_1 = require("./resources/server-groups.js");
14
+ const index_js_1 = require("./resources/servers/index.js");
15
+ /**
16
+ * The root MeowPanel API client.
17
+ *
18
+ * Instantiate once and reuse across your application. All namespaces implement the
19
+ * readable store contract so they can be used directly in reactive templates.
20
+ *
21
+ * @example
22
+ * ```ts ignore
23
+ * import { MeowPanelApi } from '@meowpanel/api';
24
+ *
25
+ * const api = new MeowPanelApi({
26
+ * url: 'https://panel.example.com',
27
+ * token: 'your-bearer-token',
28
+ * });
29
+ *
30
+ * // Fetch resources
31
+ * const me = await api.account.get();
32
+ * const servers = await api.servers.list({ include: ['status'] });
33
+ * const members = await api.members.list();
34
+ *
35
+ * // Reactive store: {#each $api.servers as server} ... {/each}
36
+ *
37
+ * // Listen for mutations
38
+ * api.servers.on('created', (server) => console.log('New server:', server.name));
39
+ * api.members.on('updated', (member) => console.log('Member updated:', member.nickname));
40
+ *
41
+ * // Panel-level SSE
42
+ * const sse = api.connectSse();
43
+ * sse.connect((event, data) => console.log('Panel event:', event, data));
44
+ * ```
45
+ */
46
+ class MeowPanelApi {
47
+ http;
48
+ sseConnections = new Set();
49
+ /**
50
+ * Fetch authentication configuration (available login providers).
51
+ *
52
+ * @example
53
+ * ```ts ignore
54
+ * const { providers } = await api.auth.getMeta();
55
+ * if (providers.whmcs) console.log(providers.whmcs.fields.display_name);
56
+ * ```
57
+ */
58
+ auth;
59
+ /**
60
+ * Access and update the currently authenticated account (me).
61
+ *
62
+ * @example
63
+ * ```ts ignore
64
+ * const me = await api.account.get();
65
+ * await api.account.update({ display: { theme: 'dark' } });
66
+ * await api.account.uploadAvatar(imageBlob, 'image/png');
67
+ * ```
68
+ */
69
+ account;
70
+ /**
71
+ * Manage API keys for the current account.
72
+ *
73
+ * @example
74
+ * ```ts ignore
75
+ * const key = await api.apiKeys.create('CI/CD Pipeline');
76
+ * console.log(key.token); // Save this!
77
+ * ```
78
+ */
79
+ apiKeys;
80
+ /**
81
+ * Manage member (user) accounts.
82
+ *
83
+ * Supports reactive subscriptions via `$api.members`.
84
+ *
85
+ * @example
86
+ * ```ts ignore
87
+ * const members = await api.members.list();
88
+ * const member = await api.members.get(id);
89
+ * await api.members.update(id, { nickname: 'newname' });
90
+ * ```
91
+ */
92
+ members;
93
+ /**
94
+ * Manage nodes (daemon servers).
95
+ *
96
+ * Supports reactive subscriptions via `$api.nodes`.
97
+ *
98
+ * @example
99
+ * ```ts ignore
100
+ * const nodes = await api.nodes.list();
101
+ * const node = await api.nodes.get(id, { includeConnection: true });
102
+ * ```
103
+ */
104
+ nodes;
105
+ /**
106
+ * Manage eggs (game/application configuration templates).
107
+ *
108
+ * Supports reactive subscriptions via `$api.eggs`.
109
+ *
110
+ * @example
111
+ * ```ts ignore
112
+ * const eggs = await api.eggs.list();
113
+ * await api.eggs.update(id, { name: 'Paper Minecraft' });
114
+ * await api.eggs.delete(id);
115
+ * ```
116
+ */
117
+ eggs;
118
+ /**
119
+ * View physical host machines.
120
+ *
121
+ * Supports reactive subscriptions via `$api.hosts`.
122
+ *
123
+ * @example
124
+ * ```ts ignore
125
+ * const hosts = await api.hosts.list();
126
+ * ```
127
+ */
128
+ hosts;
129
+ /**
130
+ * Manage server groups (node + resource limits containers).
131
+ *
132
+ * Supports reactive subscriptions via `$api.serverGroups`.
133
+ *
134
+ * @example
135
+ * ```ts ignore
136
+ * const groups = await api.serverGroups.list();
137
+ * const group = await api.serverGroups.create({ nodeId, limits: { ramMb: 1024 } });
138
+ * ```
139
+ */
140
+ serverGroups;
141
+ /**
142
+ * Manage game servers.
143
+ *
144
+ * Supports reactive subscriptions via `$api.servers`.
145
+ *
146
+ * @example
147
+ * ```ts ignore
148
+ * const servers = await api.servers.list({ include: ['status'] });
149
+ * const server = await api.servers.get(id);
150
+ * await server.sendPower('start');
151
+ * await server.sendCommand('say Hello!');
152
+ *
153
+ * // File management
154
+ * const entries = await server.files.list('/');
155
+ * await server.files.write('/motd.txt', 'Hello World');
156
+ *
157
+ * // Real-time events
158
+ * const conn = await server.createConnection();
159
+ * conn.on('console_output', (line) => console.log(line));
160
+ * conn.on('stats', (stats) => console.log(`CPU: ${stats.cpuAbsolute}%`));
161
+ * await conn.open();
162
+ * ```
163
+ */
164
+ servers;
165
+ constructor(options) {
166
+ const userCallback = options.onTokenRefresh;
167
+ this.http = new http_js_1.HttpClient({
168
+ url: options.url.toString(),
169
+ token: options.token,
170
+ fetch: options.fetch,
171
+ logger: options.logger,
172
+ credentials: options.credentials,
173
+ onTokenRefresh: (token) => {
174
+ for (const sse of this.sseConnections) {
175
+ sse.updateToken(token);
176
+ }
177
+ userCallback?.(token);
178
+ },
179
+ });
180
+ this.auth = new auth_js_1.AuthResource(this.http);
181
+ this.account = new account_js_1.AccountResource(this.http);
182
+ this.apiKeys = new api_keys_js_1.ApiKeysNamespace(this.http);
183
+ this.members = new members_js_1.MembersNamespace(this.http);
184
+ this.nodes = new nodes_js_1.NodesNamespace(this.http);
185
+ this.eggs = new eggs_js_1.EggsNamespace(this.http);
186
+ this.hosts = new hosts_js_1.HostsNamespace(this.http);
187
+ this.serverGroups = new server_groups_js_1.ServerGroupsNamespace(this.http);
188
+ this.servers = new index_js_1.ServersNamespace(this.http);
189
+ }
190
+ /**
191
+ * Update the bearer token used for all subsequent API requests.
192
+ *
193
+ * Useful when a session token is refreshed.
194
+ *
195
+ * @param token The new bearer token.
196
+ */
197
+ setToken(token) {
198
+ this.http.setToken(token);
199
+ }
200
+ /**
201
+ * Create a panel-level Server-Sent Events connection to Nexus.
202
+ *
203
+ * The panel SSE stream (`GET /v1/sse`) broadcasts events for mutations
204
+ * across the panel (e.g. server updates, member changes).
205
+ *
206
+ * The connection is not opened until you call `.connect()` on the returned object.
207
+ *
208
+ * @example
209
+ * ```ts ignore
210
+ * const sse = api.connectSse();
211
+ * sse.connect(
212
+ * (event, data) => {
213
+ * const payload = JSON.parse(data);
214
+ * console.log('Panel event:', event, payload);
215
+ * },
216
+ * (err) => console.error('SSE error:', err),
217
+ * );
218
+ *
219
+ * // Later...
220
+ * sse.disconnect();
221
+ * ```
222
+ */
223
+ connectSse() {
224
+ const url = this.http.buildUrl('/sse');
225
+ const sse = new sse_js_1.SseConnection(url, this.http.getToken());
226
+ this.sseConnections.add(sse);
227
+ return sse;
228
+ }
229
+ /**
230
+ * Manually trigger a token refresh.
231
+ *
232
+ * Typically not needed as the client refreshes automatically when using
233
+ * JWT tokens that are about to expire.
234
+ */
235
+ refresh(opts) {
236
+ return this.auth.refresh(opts);
237
+ }
238
+ }
239
+ exports.MeowPanelApi = MeowPanelApi;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * A typed event handler function.
3
+ *
4
+ * @template T The event map (event names → payload types).
5
+ * @template K The specific event key being handled.
6
+ */
7
+ export type EventHandler<T extends object, K extends keyof T> = (payload: T[K]) => void;
8
+ /**
9
+ * A lightweight typed event emitter.
10
+ *
11
+ * Provides strongly-typed {@link on}, {@link off}, and {@link emit} methods so that
12
+ * consumers can react to mutations without polling.
13
+ *
14
+ * @template T A record mapping event names to their payload types.
15
+ *
16
+ * @example
17
+ * ```ts ignore
18
+ * type ServerEvents = { updated: Server; deleted: NanoID };
19
+ * const emitter = new TypedEmitter<ServerEvents>();
20
+ *
21
+ * const handler = (server: Server) => console.log('Updated:', server.name);
22
+ * emitter.on('updated', handler);
23
+ * emitter.emit('updated', someServer);
24
+ * emitter.off('updated', handler);
25
+ * ```
26
+ */
27
+ export declare class TypedEmitter<T extends object> {
28
+ private readonly listeners;
29
+ /**
30
+ * Register a handler for the given event.
31
+ *
32
+ * @param event The event name to listen for.
33
+ * @param handler Callback invoked with the event payload.
34
+ */
35
+ on<K extends keyof T>(event: K, handler: EventHandler<T, K>): void;
36
+ /**
37
+ * Unregister a previously registered handler.
38
+ *
39
+ * @param event The event name.
40
+ * @param handler The exact handler reference that was passed to {@link on}.
41
+ */
42
+ off<K extends keyof T>(event: K, handler: EventHandler<T, K>): void;
43
+ /**
44
+ * Dispatch an event to all registered handlers for the given event name.
45
+ *
46
+ * @param event The event name.
47
+ * @param payload The event payload passed to each handler.
48
+ */
49
+ emit<K extends keyof T>(event: K, payload: T[K]): void;
50
+ /** Remove all registered listeners for all events. */
51
+ removeAllListeners(): void;
52
+ }
53
+ //# sourceMappingURL=emitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../src/src/emitter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAExF;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,YAAY,CAAC,CAAC,SAAS,MAAM;IACzC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqD;IAE/E;;;;;OAKG;IACI,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI;IAKzE;;;;;OAKG;IACI,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI;IAI1E;;;;;OAKG;IACI,IAAI,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;IAI7D,sDAAsD;IAC/C,kBAAkB,IAAI,IAAI;CAGjC"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TypedEmitter = void 0;
4
+ /**
5
+ * A lightweight typed event emitter.
6
+ *
7
+ * Provides strongly-typed {@link on}, {@link off}, and {@link emit} methods so that
8
+ * consumers can react to mutations without polling.
9
+ *
10
+ * @template T A record mapping event names to their payload types.
11
+ *
12
+ * @example
13
+ * ```ts ignore
14
+ * type ServerEvents = { updated: Server; deleted: NanoID };
15
+ * const emitter = new TypedEmitter<ServerEvents>();
16
+ *
17
+ * const handler = (server: Server) => console.log('Updated:', server.name);
18
+ * emitter.on('updated', handler);
19
+ * emitter.emit('updated', someServer);
20
+ * emitter.off('updated', handler);
21
+ * ```
22
+ */
23
+ class TypedEmitter {
24
+ listeners = new Map();
25
+ /**
26
+ * Register a handler for the given event.
27
+ *
28
+ * @param event The event name to listen for.
29
+ * @param handler Callback invoked with the event payload.
30
+ */
31
+ on(event, handler) {
32
+ if (!this.listeners.has(event))
33
+ this.listeners.set(event, new Set());
34
+ this.listeners.get(event).add(handler);
35
+ }
36
+ /**
37
+ * Unregister a previously registered handler.
38
+ *
39
+ * @param event The event name.
40
+ * @param handler The exact handler reference that was passed to {@link on}.
41
+ */
42
+ off(event, handler) {
43
+ this.listeners.get(event)?.delete(handler);
44
+ }
45
+ /**
46
+ * Dispatch an event to all registered handlers for the given event name.
47
+ *
48
+ * @param event The event name.
49
+ * @param payload The event payload passed to each handler.
50
+ */
51
+ emit(event, payload) {
52
+ this.listeners.get(event)?.forEach((h) => h(payload));
53
+ }
54
+ /** Remove all registered listeners for all events. */
55
+ removeAllListeners() {
56
+ this.listeners.clear();
57
+ }
58
+ }
59
+ exports.TypedEmitter = TypedEmitter;
@@ -0,0 +1,42 @@
1
+ /** Options for constructing an {@link ApiError}. */
2
+ export interface ApiErrorOptions {
3
+ /** Human-readable description of the error. */
4
+ message: string;
5
+ /** HTTP status code of the failing response. */
6
+ status: number;
7
+ /** Optional URL to documentation about this error. */
8
+ helpUrl?: string | null;
9
+ }
10
+ /**
11
+ * An error returned by the MeowPanel API.
12
+ *
13
+ * All {@link HttpClient} methods throw this when the server responds with a non-2xx status code.
14
+ *
15
+ * @example
16
+ * ```ts ignore
17
+ * try {
18
+ * const server = await api.servers.get(id);
19
+ * } catch (e) {
20
+ * if (e instanceof ApiError) {
21
+ * if (e.isNotFound) console.error('Server not found');
22
+ * if (e.isAuthError) console.error('Access denied:', e.message);
23
+ * }
24
+ * }
25
+ * ```
26
+ */
27
+ export declare class ApiError extends Error {
28
+ /** HTTP status code of the error response. */
29
+ readonly status: number;
30
+ /** Optional documentation URL, or `null` if not provided by the API. */
31
+ readonly helpUrl: string | null;
32
+ constructor(options: ApiErrorOptions);
33
+ /** `true` when the API returned `404 Not Found`. */
34
+ get isNotFound(): boolean;
35
+ /** `true` when the API returned `401 Unauthorized` or `403 Forbidden`. */
36
+ get isAuthError(): boolean;
37
+ /** `true` when the API returned `400 Bad Request` or `422 Unprocessable Entity`. */
38
+ get isValidationError(): boolean;
39
+ /** `true` when the API returned a `5xx` server error. */
40
+ get isServerError(): boolean;
41
+ }
42
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/src/errors.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,MAAM,WAAW,eAAe;IAC/B,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,QAAS,SAAQ,KAAK;IAClC,8CAA8C;IAC9C,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,wEAAwE;IACxE,SAAgB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEpB,OAAO,EAAE,eAAe;IAO3C,oDAAoD;IACpD,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED,0EAA0E;IAC1E,IAAW,WAAW,IAAI,OAAO,CAEhC;IAED,oFAAoF;IACpF,IAAW,iBAAiB,IAAI,OAAO,CAEtC;IAED,yDAAyD;IACzD,IAAW,aAAa,IAAI,OAAO,CAElC;CACD"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiError = void 0;
4
+ /**
5
+ * An error returned by the MeowPanel API.
6
+ *
7
+ * All {@link HttpClient} methods throw this when the server responds with a non-2xx status code.
8
+ *
9
+ * @example
10
+ * ```ts ignore
11
+ * try {
12
+ * const server = await api.servers.get(id);
13
+ * } catch (e) {
14
+ * if (e instanceof ApiError) {
15
+ * if (e.isNotFound) console.error('Server not found');
16
+ * if (e.isAuthError) console.error('Access denied:', e.message);
17
+ * }
18
+ * }
19
+ * ```
20
+ */
21
+ class ApiError extends Error {
22
+ /** HTTP status code of the error response. */
23
+ status;
24
+ /** Optional documentation URL, or `null` if not provided by the API. */
25
+ helpUrl;
26
+ constructor(options) {
27
+ super(options.message);
28
+ this.name = 'ApiError';
29
+ this.status = options.status;
30
+ this.helpUrl = options.helpUrl ?? null;
31
+ }
32
+ /** `true` when the API returned `404 Not Found`. */
33
+ get isNotFound() {
34
+ return this.status === 404;
35
+ }
36
+ /** `true` when the API returned `401 Unauthorized` or `403 Forbidden`. */
37
+ get isAuthError() {
38
+ return this.status === 401 || this.status === 403;
39
+ }
40
+ /** `true` when the API returned `400 Bad Request` or `422 Unprocessable Entity`. */
41
+ get isValidationError() {
42
+ return this.status === 400 || this.status === 422;
43
+ }
44
+ /** `true` when the API returned a `5xx` server error. */
45
+ get isServerError() {
46
+ return this.status >= 500;
47
+ }
48
+ }
49
+ exports.ApiError = ApiError;
@@ -0,0 +1,157 @@
1
+ import { ApiError } from './errors.js';
2
+ import type { ListOptions, Paginated } from './types.js';
3
+ /** Configuration for {@link HttpClient}. */
4
+ export interface HttpClientOptions {
5
+ /** Base URL of the MeowPanel Nexus API, e.g. `https://panel.example.com`. */
6
+ url: string;
7
+ /** Bearer token used to authenticate every request. */
8
+ token?: string;
9
+ /** Custom fetch implementation. Defaults to `globalThis.fetch`. */
10
+ fetch?: typeof globalThis.fetch;
11
+ /** Optional callback invoked for every outgoing request lifecycle event. */
12
+ logger?: HttpLogger;
13
+ /**
14
+ * The `credentials` mode for all fetch requests.
15
+ *
16
+ * Set to `'include'` for browser apps that rely on cookie-based authentication
17
+ * (e.g. session cookies set by the auth endpoint).
18
+ *
19
+ * Defaults to `undefined` (browser default is `'same-origin'`).
20
+ */
21
+ credentials?: RequestCredentials;
22
+ /** Callback invoked when the access token is refreshed. */
23
+ onTokenRefresh?: (token: string) => void;
24
+ }
25
+ /** Typed lifecycle code emitted by {@link HttpClient}'s optional logger. */
26
+ export type HttpLogCode = 'request.start' | 'request.success' | 'request.error';
27
+ /** Common fields included with every HTTP log event. */
28
+ interface HttpLogEventBase {
29
+ code: HttpLogCode;
30
+ method: string;
31
+ path: string;
32
+ url: string;
33
+ params?: Record<string, string | number | boolean | undefined>;
34
+ }
35
+ /** Emitted immediately before a request is sent. */
36
+ export interface HttpRequestStartLogEvent extends HttpLogEventBase {
37
+ code: 'request.start';
38
+ }
39
+ /** Emitted after a successful response is received. */
40
+ export interface HttpRequestSuccessLogEvent extends HttpLogEventBase {
41
+ code: 'request.success';
42
+ status: number;
43
+ durationMs: number;
44
+ }
45
+ /** Emitted when a request fails due to an HTTP or transport error. */
46
+ export interface HttpRequestErrorLogEvent extends HttpLogEventBase {
47
+ code: 'request.error';
48
+ status?: number;
49
+ durationMs: number;
50
+ error: Error;
51
+ }
52
+ /** Union of all events emitted to the optional HTTP logger. */
53
+ export type HttpLogEvent = HttpRequestStartLogEvent | HttpRequestSuccessLogEvent | HttpRequestErrorLogEvent;
54
+ /** Callback invoked for outgoing request lifecycle events. */
55
+ export type HttpLogger = (event: HttpLogEvent) => void;
56
+ /** Per-request options shared across all {@link HttpClient} methods. */
57
+ export interface RequestOptions {
58
+ /** Query parameters to append to the URL. Undefined values are omitted. */
59
+ params?: Record<string, string | number | boolean | undefined>;
60
+ /** AbortSignal for cancelling the request. */
61
+ signal?: AbortSignal;
62
+ }
63
+ /**
64
+ * A thin `fetch` wrapper providing bearer auth, JSON serialization, error parsing,
65
+ * and paginated list support.
66
+ *
67
+ * All methods throw {@link ApiError} for non-2xx HTTP responses.
68
+ */
69
+ export declare class HttpClient {
70
+ protected baseUrl: string;
71
+ protected token: string;
72
+ protected readonly fetchImpl: typeof globalThis.fetch;
73
+ protected readonly logger?: HttpLogger;
74
+ protected readonly credentials?: RequestCredentials;
75
+ protected readonly onTokenRefresh?: (token: string) => void;
76
+ private refreshPromise;
77
+ constructor(options: HttpClientOptions);
78
+ /** Replace the bearer token for all subsequent requests. */
79
+ setToken(token: string): void;
80
+ /** Return the current bearer token. */
81
+ getToken(): string;
82
+ /** Build a fully qualified URL with optional query parameters. */
83
+ buildUrl(path: string, params?: Record<string, string | number | boolean | undefined>): string;
84
+ /** Shared headers sent with every JSON request. */
85
+ protected get defaultHeaders(): Record<string, string>;
86
+ /** Parse a non-2xx response body into an {@link ApiError}. */
87
+ protected parseError(response: Response): Promise<ApiError>;
88
+ private log;
89
+ private executeFetch;
90
+ /** Extract the `exp` claim from a JWT without verification. Returns 0 for non-JWT tokens. */
91
+ private getTokenExp;
92
+ /** Refresh the access token if it's a JWT and about to expire. */
93
+ private refreshTokenIfNeeded;
94
+ /** Force a token refresh regardless of expiry. Only works if credentials are set (cookie auth). */
95
+ private forceRefresh;
96
+ /**
97
+ * Perform a raw `fetch` and throw {@link ApiError} on non-2xx responses.
98
+ *
99
+ * Proactively refreshes JWT tokens that are about to expire and retries
100
+ * once on `401 Unauthorized` after forcing a token refresh.
101
+ *
102
+ * @param path Path relative to the API base URL, e.g. `/servers`.
103
+ * @param init Standard `RequestInit` options.
104
+ * @param params Query parameters to append.
105
+ */
106
+ fetch(path: string, init?: RequestInit, params?: Record<string, string | number | boolean | undefined>): Promise<Response>;
107
+ /**
108
+ * GET and deserialize a JSON response body.
109
+ *
110
+ * @param path Path relative to the API base URL.
111
+ * @param opts Additional request options.
112
+ */
113
+ get<T>(path: string, opts?: RequestOptions): Promise<T>;
114
+ /**
115
+ * POST with an optional JSON body. Returns `undefined` for `204 No Content`.
116
+ *
117
+ * @param path Path relative to the API base URL.
118
+ * @param body Request body, serialized as JSON.
119
+ * @param opts Additional request options.
120
+ */
121
+ post<T = void>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
122
+ /**
123
+ * PATCH with an optional JSON body. Returns `undefined` for `204 No Content`.
124
+ *
125
+ * @param path Path relative to the API base URL.
126
+ * @param body Partial update body, serialized as JSON.
127
+ * @param opts Additional request options.
128
+ */
129
+ patch<T = void>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
130
+ /**
131
+ * DELETE a resource.
132
+ *
133
+ * @param path Path relative to the API base URL.
134
+ * @param opts Additional request options.
135
+ */
136
+ delete(path: string, opts?: RequestOptions): Promise<void>;
137
+ /**
138
+ * PUT raw body content (e.g. for binary or multipart uploads).
139
+ *
140
+ * @param path Path relative to the API base URL.
141
+ * @param body Raw body content.
142
+ * @param contentType The `Content-Type` header value.
143
+ * @param opts Additional request options.
144
+ */
145
+ put<T = void>(path: string, body: BodyInit, contentType: string, opts?: RequestOptions): Promise<T>;
146
+ /**
147
+ * GET a paginated list, parsing the `Content-Range` header for metadata when available.
148
+ *
149
+ * The `Content-Range` header format expected is: `items {from}-{to}/{total}`.
150
+ *
151
+ * @param path Path relative to the API base URL.
152
+ * @param opts Pagination and search options.
153
+ */
154
+ list<T>(path: string, opts?: ListOptions, extraParams?: Record<string, string | number | boolean | undefined>): Promise<Paginated<T>>;
155
+ }
156
+ export {};
157
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/src/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEzD,4CAA4C;AAC5C,MAAM,WAAW,iBAAiB;IACjC,6EAA6E;IAC7E,GAAG,EAAE,MAAM,CAAC;IACZ,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,4EAA4E;IAC5E,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,4EAA4E;AAC5E,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAEhF,wDAAwD;AACxD,UAAU,gBAAgB;IACzB,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;CAC/D;AAED,oDAAoD;AACpD,MAAM,WAAW,wBAAyB,SAAQ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