@meowpanel/api 0.3.0 → 0.5.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 (201) hide show
  1. package/esm/mod.d.ts +37 -16
  2. package/esm/mod.d.ts.map +1 -1
  3. package/esm/mod.js +25 -7
  4. package/esm/src/client.d.ts +48 -11
  5. package/esm/src/client.d.ts.map +1 -1
  6. package/esm/src/client.js +53 -12
  7. package/esm/src/http.d.ts +2 -2
  8. package/esm/src/http.d.ts.map +1 -1
  9. package/esm/src/http.js +5 -2
  10. package/esm/src/namespace.d.ts +1 -1
  11. package/esm/src/namespace.js +1 -1
  12. package/esm/src/resources/account.d.ts +50 -19
  13. package/esm/src/resources/account.d.ts.map +1 -1
  14. package/esm/src/resources/account.js +51 -13
  15. package/esm/src/resources/api-keys.d.ts +16 -24
  16. package/esm/src/resources/api-keys.d.ts.map +1 -1
  17. package/esm/src/resources/api-keys.js +16 -20
  18. package/esm/src/resources/auth.d.ts +70 -4
  19. package/esm/src/resources/auth.d.ts.map +1 -1
  20. package/esm/src/resources/auth.js +47 -4
  21. package/esm/src/resources/eggs.d.ts +261 -22
  22. package/esm/src/resources/eggs.d.ts.map +1 -1
  23. package/esm/src/resources/eggs.js +261 -25
  24. package/esm/src/resources/features.d.ts +35 -0
  25. package/esm/src/resources/features.d.ts.map +1 -0
  26. package/esm/src/resources/features.js +21 -0
  27. package/esm/src/resources/hosts.d.ts +151 -21
  28. package/esm/src/resources/hosts.d.ts.map +1 -1
  29. package/esm/src/resources/hosts.js +143 -10
  30. package/esm/src/resources/logs.d.ts +39 -0
  31. package/esm/src/resources/logs.d.ts.map +1 -0
  32. package/esm/src/resources/logs.js +38 -0
  33. package/esm/src/resources/nodes.d.ts +108 -33
  34. package/esm/src/resources/nodes.d.ts.map +1 -1
  35. package/esm/src/resources/nodes.js +116 -24
  36. package/esm/src/resources/permissions.d.ts +45 -0
  37. package/esm/src/resources/permissions.d.ts.map +1 -0
  38. package/esm/src/resources/permissions.js +26 -0
  39. package/esm/src/resources/request-logs.d.ts +91 -0
  40. package/esm/src/resources/request-logs.d.ts.map +1 -0
  41. package/esm/src/resources/request-logs.js +70 -0
  42. package/esm/src/resources/roles.d.ts +128 -0
  43. package/esm/src/resources/roles.d.ts.map +1 -0
  44. package/esm/src/resources/roles.js +142 -0
  45. package/esm/src/resources/server-groups.d.ts +141 -7
  46. package/esm/src/resources/server-groups.d.ts.map +1 -1
  47. package/esm/src/resources/server-groups.js +157 -8
  48. package/esm/src/resources/servers/activity.d.ts +50 -8
  49. package/esm/src/resources/servers/activity.d.ts.map +1 -1
  50. package/esm/src/resources/servers/activity.js +54 -13
  51. package/esm/src/resources/servers/allocations.d.ts +3 -3
  52. package/esm/src/resources/servers/allocations.d.ts.map +1 -1
  53. package/esm/src/resources/servers/allocations.js +7 -7
  54. package/esm/src/resources/servers/backups.d.ts +46 -0
  55. package/esm/src/resources/servers/backups.d.ts.map +1 -0
  56. package/esm/src/resources/servers/backups.js +43 -0
  57. package/esm/src/resources/servers/connection.d.ts +33 -13
  58. package/esm/src/resources/servers/connection.d.ts.map +1 -1
  59. package/esm/src/resources/servers/connection.js +32 -11
  60. package/esm/src/resources/servers/features.d.ts +81 -0
  61. package/esm/src/resources/servers/features.d.ts.map +1 -0
  62. package/esm/src/resources/servers/features.js +60 -0
  63. package/esm/src/resources/servers/files.d.ts +41 -53
  64. package/esm/src/resources/servers/files.d.ts.map +1 -1
  65. package/esm/src/resources/servers/files.js +74 -116
  66. package/esm/src/resources/servers/index.d.ts +46 -27
  67. package/esm/src/resources/servers/index.d.ts.map +1 -1
  68. package/esm/src/resources/servers/index.js +26 -12
  69. package/esm/src/resources/servers/jobs.d.ts +88 -0
  70. package/esm/src/resources/servers/jobs.d.ts.map +1 -0
  71. package/esm/src/resources/servers/jobs.js +115 -0
  72. package/esm/src/resources/servers/node-client.d.ts +33 -0
  73. package/esm/src/resources/servers/node-client.d.ts.map +1 -0
  74. package/esm/src/resources/servers/node-client.js +61 -0
  75. package/esm/src/resources/servers/profiles.d.ts +83 -18
  76. package/esm/src/resources/servers/profiles.d.ts.map +1 -1
  77. package/esm/src/resources/servers/profiles.js +78 -11
  78. package/esm/src/resources/servers/server.d.ts +13 -28
  79. package/esm/src/resources/servers/server.d.ts.map +1 -1
  80. package/esm/src/resources/servers/server.js +21 -37
  81. package/esm/src/resources/servers/sftp.d.ts +12 -19
  82. package/esm/src/resources/servers/sftp.d.ts.map +1 -1
  83. package/esm/src/resources/servers/sftp.js +10 -14
  84. package/esm/src/resources/servers/sub-users.d.ts +99 -0
  85. package/esm/src/resources/servers/sub-users.d.ts.map +1 -0
  86. package/esm/src/resources/servers/sub-users.js +94 -0
  87. package/esm/src/resources/servers/types.d.ts +30 -28
  88. package/esm/src/resources/servers/types.d.ts.map +1 -1
  89. package/esm/src/resources/systems.d.ts +124 -0
  90. package/esm/src/resources/systems.d.ts.map +1 -0
  91. package/esm/src/resources/systems.js +139 -0
  92. package/esm/src/resources/users.d.ts +330 -0
  93. package/esm/src/resources/users.d.ts.map +1 -0
  94. package/esm/src/resources/users.js +280 -0
  95. package/esm/src/types.d.ts +18 -1
  96. package/esm/src/types.d.ts.map +1 -1
  97. package/esm/src/types.js +11 -0
  98. package/package.json +1 -1
  99. package/script/mod.d.ts +37 -16
  100. package/script/mod.d.ts.map +1 -1
  101. package/script/mod.js +50 -5
  102. package/script/src/client.d.ts +48 -11
  103. package/script/src/client.d.ts.map +1 -1
  104. package/script/src/client.js +53 -12
  105. package/script/src/http.d.ts +2 -2
  106. package/script/src/http.d.ts.map +1 -1
  107. package/script/src/http.js +5 -2
  108. package/script/src/namespace.d.ts +1 -1
  109. package/script/src/namespace.js +1 -1
  110. package/script/src/resources/account.d.ts +50 -19
  111. package/script/src/resources/account.d.ts.map +1 -1
  112. package/script/src/resources/account.js +50 -12
  113. package/script/src/resources/api-keys.d.ts +16 -24
  114. package/script/src/resources/api-keys.d.ts.map +1 -1
  115. package/script/src/resources/api-keys.js +15 -19
  116. package/script/src/resources/auth.d.ts +70 -4
  117. package/script/src/resources/auth.d.ts.map +1 -1
  118. package/script/src/resources/auth.js +47 -4
  119. package/script/src/resources/eggs.d.ts +261 -22
  120. package/script/src/resources/eggs.d.ts.map +1 -1
  121. package/script/src/resources/eggs.js +267 -26
  122. package/script/src/resources/features.d.ts +35 -0
  123. package/script/src/resources/features.d.ts.map +1 -0
  124. package/script/src/resources/features.js +25 -0
  125. package/script/src/resources/hosts.d.ts +151 -21
  126. package/script/src/resources/hosts.d.ts.map +1 -1
  127. package/script/src/resources/hosts.js +144 -10
  128. package/script/src/resources/logs.d.ts +39 -0
  129. package/script/src/resources/logs.d.ts.map +1 -0
  130. package/script/src/resources/logs.js +42 -0
  131. package/script/src/resources/nodes.d.ts +108 -33
  132. package/script/src/resources/nodes.d.ts.map +1 -1
  133. package/script/src/resources/nodes.js +117 -24
  134. package/script/src/resources/permissions.d.ts +45 -0
  135. package/script/src/resources/permissions.d.ts.map +1 -0
  136. package/script/src/resources/permissions.js +31 -0
  137. package/script/src/resources/request-logs.d.ts +91 -0
  138. package/script/src/resources/request-logs.d.ts.map +1 -0
  139. package/script/src/resources/request-logs.js +75 -0
  140. package/script/src/resources/roles.d.ts +128 -0
  141. package/script/src/resources/roles.d.ts.map +1 -0
  142. package/script/src/resources/roles.js +148 -0
  143. package/script/src/resources/server-groups.d.ts +141 -7
  144. package/script/src/resources/server-groups.d.ts.map +1 -1
  145. package/script/src/resources/server-groups.js +158 -8
  146. package/script/src/resources/servers/activity.d.ts +50 -8
  147. package/script/src/resources/servers/activity.d.ts.map +1 -1
  148. package/script/src/resources/servers/activity.js +54 -12
  149. package/script/src/resources/servers/allocations.d.ts +3 -3
  150. package/script/src/resources/servers/allocations.d.ts.map +1 -1
  151. package/script/src/resources/servers/allocations.js +7 -7
  152. package/script/src/resources/servers/backups.d.ts +46 -0
  153. package/script/src/resources/servers/backups.d.ts.map +1 -0
  154. package/script/src/resources/servers/backups.js +47 -0
  155. package/script/src/resources/servers/connection.d.ts +33 -13
  156. package/script/src/resources/servers/connection.d.ts.map +1 -1
  157. package/script/src/resources/servers/connection.js +32 -11
  158. package/script/src/resources/servers/features.d.ts +81 -0
  159. package/script/src/resources/servers/features.d.ts.map +1 -0
  160. package/script/src/resources/servers/features.js +64 -0
  161. package/script/src/resources/servers/files.d.ts +41 -53
  162. package/script/src/resources/servers/files.d.ts.map +1 -1
  163. package/script/src/resources/servers/files.js +74 -116
  164. package/script/src/resources/servers/index.d.ts +46 -27
  165. package/script/src/resources/servers/index.d.ts.map +1 -1
  166. package/script/src/resources/servers/index.js +26 -12
  167. package/script/src/resources/servers/jobs.d.ts +88 -0
  168. package/script/src/resources/servers/jobs.d.ts.map +1 -0
  169. package/script/src/resources/servers/jobs.js +120 -0
  170. package/script/src/resources/servers/node-client.d.ts +33 -0
  171. package/script/src/resources/servers/node-client.d.ts.map +1 -0
  172. package/script/src/resources/servers/node-client.js +65 -0
  173. package/script/src/resources/servers/profiles.d.ts +83 -18
  174. package/script/src/resources/servers/profiles.d.ts.map +1 -1
  175. package/script/src/resources/servers/profiles.js +77 -10
  176. package/script/src/resources/servers/server.d.ts +13 -28
  177. package/script/src/resources/servers/server.d.ts.map +1 -1
  178. package/script/src/resources/servers/server.js +21 -37
  179. package/script/src/resources/servers/sftp.d.ts +12 -19
  180. package/script/src/resources/servers/sftp.d.ts.map +1 -1
  181. package/script/src/resources/servers/sftp.js +10 -14
  182. package/script/src/resources/servers/sub-users.d.ts +99 -0
  183. package/script/src/resources/servers/sub-users.d.ts.map +1 -0
  184. package/script/src/resources/servers/sub-users.js +99 -0
  185. package/script/src/resources/servers/types.d.ts +30 -28
  186. package/script/src/resources/servers/types.d.ts.map +1 -1
  187. package/script/src/resources/systems.d.ts +124 -0
  188. package/script/src/resources/systems.d.ts.map +1 -0
  189. package/script/src/resources/systems.js +145 -0
  190. package/script/src/resources/users.d.ts +330 -0
  191. package/script/src/resources/users.d.ts.map +1 -0
  192. package/script/src/resources/users.js +287 -0
  193. package/script/src/types.d.ts +18 -1
  194. package/script/src/types.d.ts.map +1 -1
  195. package/script/src/types.js +12 -0
  196. package/esm/src/resources/members.d.ts +0 -138
  197. package/esm/src/resources/members.d.ts.map +0 -1
  198. package/esm/src/resources/members.js +0 -122
  199. package/script/src/resources/members.d.ts +0 -138
  200. package/script/src/resources/members.d.ts.map +0 -1
  201. package/script/src/resources/members.js +0 -127
@@ -7,8 +7,6 @@ import { joinIncludes, toNanoID } from '../types.js';
7
7
  export class EggNest extends ReactiveResource {
8
8
  /** Unique NanoID of this nest. */
9
9
  id;
10
- /** The issuer type. */
11
- issuerType;
12
10
  /** Display name of the nest, e.g. `"Minecraft"`. */
13
11
  name;
14
12
  /** Description of the nest. */
@@ -21,13 +19,65 @@ export class EggNest extends ReactiveResource {
21
19
  constructor(data) {
22
20
  super();
23
21
  this.id = toNanoID(data.id);
24
- this.issuerType = data.issuer_type;
25
22
  this.name = data.name;
26
23
  this.description = data.description;
27
24
  this.createdAt = new Date(data.created_at);
28
25
  this.updatedAt = new Date(data.updated_at);
29
26
  }
30
27
  }
28
+ function makeEggImage(data) {
29
+ return {
30
+ id: toNanoID(data.id),
31
+ name: data.name,
32
+ image: data.image,
33
+ createdAt: new Date(data.created_at),
34
+ updatedAt: new Date(data.updated_at),
35
+ };
36
+ }
37
+ /**
38
+ * An egg environment variable.
39
+ *
40
+ * Retrieved via {@link EggVariablesManager.list} or {@link EggVariablesManager.get}.
41
+ */
42
+ export class EggVariable extends ReactiveResource {
43
+ /** The variable's unique NanoID. */
44
+ id;
45
+ /** Display name, e.g. `"Server Jar File"`. */
46
+ name;
47
+ /** Description shown to the user. */
48
+ description;
49
+ /** The environment variable name, e.g. `"SERVER_JARFILE"`. */
50
+ envVariable;
51
+ /** The default value. */
52
+ defaultValue;
53
+ /** Whether the value is visible to the server user. */
54
+ userViewable;
55
+ /** Whether the server user may change the value. */
56
+ userEditable;
57
+ /** Validation rules string, e.g. `"required|string"`. */
58
+ rules;
59
+ /** When this variable was created. */
60
+ createdAt;
61
+ /** When this variable was last updated. */
62
+ updatedAt;
63
+ /** @internal */
64
+ constructor(data) {
65
+ super();
66
+ this.id = toNanoID(data.id);
67
+ this.name = data.name;
68
+ this.description = data.description;
69
+ this.envVariable = data.env_variable;
70
+ this.defaultValue = data.default_value;
71
+ this.userViewable = data.user_viewable;
72
+ this.userEditable = data.user_editable;
73
+ this.rules = data.rules;
74
+ this.createdAt = new Date(data.created_at);
75
+ this.updatedAt = new Date(data.updated_at);
76
+ }
77
+ }
78
+ function makeFeatureGrant(data) {
79
+ return { name: data.name, defaultEnabled: data.default_enabled, locked: data.locked, obsolete: data.obsolete };
80
+ }
31
81
  /**
32
82
  * An egg - a game or application configuration template that defines how a server
33
83
  * is installed, started, and stopped.
@@ -37,8 +87,6 @@ export class EggNest extends ReactiveResource {
37
87
  export class Egg extends ReactiveResource {
38
88
  /** The egg's unique NanoID. */
39
89
  id;
40
- /** The issuer type. */
41
- issuerType;
42
90
  /** Display name of the egg, e.g. `"Vanilla Minecraft"`. */
43
91
  name;
44
92
  /** Description of the egg. */
@@ -59,11 +107,13 @@ export class Egg extends ReactiveResource {
59
107
  stopCommand;
60
108
  /** When `true`, the server's outgoing IP is forced to match the allocation IP. */
61
109
  forceOutgoingIp;
62
- /** Installer configuration for this egg. */
110
+ /** URL of the egg's background image. Requires `?include=app_background_url`. */
111
+ appBackgroundUrl;
112
+ /** Installer configuration for this egg. Requires `?include=installer`. */
63
113
  installer;
64
- /** Process configuration (startup, stop, logging). */
114
+ /** Process configuration. Requires `?include=process` and `egg.config.process.read`. */
65
115
  process;
66
- /** Docker image variants for this egg. */
116
+ /** Docker image variants for this egg. Requires `?include=images`. */
67
117
  images;
68
118
  /** When this egg was created. */
69
119
  createdAt;
@@ -73,7 +123,6 @@ export class Egg extends ReactiveResource {
73
123
  constructor(data) {
74
124
  super();
75
125
  this.id = toNanoID(data.id);
76
- this.issuerType = data.issuer_type;
77
126
  this.name = data.name;
78
127
  this.description = data.description;
79
128
  this.nestId = toNanoID(data.nest_id);
@@ -81,6 +130,7 @@ export class Egg extends ReactiveResource {
81
130
  this.startupCommand = data.startup_command;
82
131
  this.stopCommand = data.stop_command;
83
132
  this.forceOutgoingIp = data.force_outgoing_ip;
133
+ this.appBackgroundUrl = data.app_background_url;
84
134
  this.installer = data.installer
85
135
  ? {
86
136
  image: data.installer.image,
@@ -97,17 +147,158 @@ export class Egg extends ReactiveResource {
97
147
  fileBlacklistRegex: data.process.file_blacklist_regex,
98
148
  }
99
149
  : data.process;
100
- this.images = data.images?.map((img) => ({
101
- id: toNanoID(img.id),
102
- name: img.name,
103
- image: img.image,
104
- createdAt: new Date(img.created_at),
105
- updatedAt: new Date(img.updated_at),
106
- }));
150
+ this.images = data.images?.map(makeEggImage);
107
151
  this.createdAt = new Date(data.created_at);
108
152
  this.updatedAt = new Date(data.updated_at);
109
153
  }
110
154
  }
155
+ function configStartupBody(startup) {
156
+ return { done: startup.done, user_interaction: startup.userInteraction, strip_ansi: startup.stripAnsi };
157
+ }
158
+ /**
159
+ * Manages egg nests (categories).
160
+ *
161
+ * Access via `api.eggs.nests`.
162
+ */
163
+ export class EggNestsManager {
164
+ http;
165
+ /** @internal */
166
+ constructor(http) {
167
+ this.http = http;
168
+ }
169
+ /** Fetch all nests readable by the caller. */
170
+ async list() {
171
+ const data = await this.http.get('/eggs/nests');
172
+ return data.map((d) => new EggNest(d));
173
+ }
174
+ /** Fetch a single nest by ID. */
175
+ async get(id) {
176
+ return new EggNest(await this.http.get(`/eggs/nests/${id}`));
177
+ }
178
+ /** Create a nest. Omit `hostId` for a global nest. */
179
+ async create(payload) {
180
+ const data = await this.http.post('/eggs/nests', {
181
+ name: payload.name,
182
+ description: payload.description,
183
+ host_id: payload.hostId,
184
+ });
185
+ return new EggNest(data);
186
+ }
187
+ /** Update a nest's name or description. */
188
+ async update(id, payload) {
189
+ return new EggNest(await this.http.patch(`/eggs/nests/${id}`, payload));
190
+ }
191
+ /** Delete a nest. Fails if it still contains eggs. */
192
+ async delete(id) {
193
+ await this.http.delete(`/eggs/nests/${id}`);
194
+ }
195
+ }
196
+ function variableBody(payload) {
197
+ return {
198
+ name: payload.name,
199
+ description: payload.description,
200
+ env_variable: payload.envVariable,
201
+ default_value: payload.defaultValue,
202
+ user_viewable: payload.userViewable,
203
+ user_editable: payload.userEditable,
204
+ rules: payload.rules,
205
+ };
206
+ }
207
+ /**
208
+ * Manages the environment variables of a specific egg.
209
+ *
210
+ * Access via `api.eggs.variables(eggId)`.
211
+ */
212
+ export class EggVariablesManager {
213
+ eggId;
214
+ http;
215
+ /** @internal */
216
+ constructor(eggId, http) {
217
+ this.eggId = eggId;
218
+ this.http = http;
219
+ }
220
+ /** List the egg's variables. */
221
+ async list() {
222
+ const data = await this.http.get(`/eggs/${this.eggId}/variables`);
223
+ return data.map((d) => new EggVariable(d));
224
+ }
225
+ /** Fetch a single variable by ID. */
226
+ async get(variableId) {
227
+ return new EggVariable(await this.http.get(`/eggs/${this.eggId}/variables/${variableId}`));
228
+ }
229
+ /** Create a variable. */
230
+ async create(payload) {
231
+ return new EggVariable(await this.http.post(`/eggs/${this.eggId}/variables`, variableBody(payload)));
232
+ }
233
+ /** Update a variable. */
234
+ async update(variableId, payload) {
235
+ return new EggVariable(await this.http.patch(`/eggs/${this.eggId}/variables/${variableId}`, variableBody(payload)));
236
+ }
237
+ /** Delete a variable. */
238
+ async delete(variableId) {
239
+ await this.http.delete(`/eggs/${this.eggId}/variables/${variableId}`);
240
+ }
241
+ }
242
+ /**
243
+ * Manages the Docker image variants of a specific egg.
244
+ *
245
+ * Access via `api.eggs.images(eggId)`.
246
+ */
247
+ export class EggImagesManager {
248
+ eggId;
249
+ http;
250
+ /** @internal */
251
+ constructor(eggId, http) {
252
+ this.eggId = eggId;
253
+ this.http = http;
254
+ }
255
+ /** List the egg's images. */
256
+ async list() {
257
+ const data = await this.http.get(`/eggs/${this.eggId}/images`);
258
+ return data.map(makeEggImage);
259
+ }
260
+ /** Add an image to the egg. */
261
+ async create(payload) {
262
+ return makeEggImage(await this.http.post(`/eggs/${this.eggId}/images`, payload));
263
+ }
264
+ /** Remove an image. Fails if it is in use or is the egg's last image. */
265
+ async delete(imageId) {
266
+ await this.http.delete(`/eggs/${this.eggId}/images/${imageId}`);
267
+ }
268
+ }
269
+ /**
270
+ * Manages the feature grants attached to a specific egg.
271
+ *
272
+ * Access via `api.eggs.features(eggId)`.
273
+ */
274
+ export class EggFeaturesManager {
275
+ eggId;
276
+ http;
277
+ /** @internal */
278
+ constructor(eggId, http) {
279
+ this.eggId = eggId;
280
+ this.http = http;
281
+ }
282
+ /** List the egg's feature grants. */
283
+ async list() {
284
+ const data = await this.http.get(`/eggs/${this.eggId}/features`);
285
+ return data.map(makeFeatureGrant);
286
+ }
287
+ /**
288
+ * Grant a feature on the egg, or update its policy (upsert).
289
+ *
290
+ * @param feature The feature key.
291
+ * @param policy Defaults to `defaultEnabled: true`, `locked: false`.
292
+ */
293
+ async set(feature, policy = {}) {
294
+ const data = await this.http.put(`/eggs/${this.eggId}/features/${encodeURIComponent(feature)}`, JSON.stringify({ default_enabled: policy.defaultEnabled, locked: policy.locked }), 'application/json');
295
+ return makeFeatureGrant(data);
296
+ }
297
+ /** Remove a feature grant from the egg. */
298
+ async remove(feature) {
299
+ await this.http.delete(`/eggs/${this.eggId}/features/${encodeURIComponent(feature)}`);
300
+ }
301
+ }
111
302
  /**
112
303
  * Namespace for egg management.
113
304
  *
@@ -118,13 +309,16 @@ export class Egg extends ReactiveResource {
118
309
  * const eggs = await api.eggs.list();
119
310
  * const egg = await api.eggs.get(id);
120
311
  * await api.eggs.update(id, { name: 'Paper Minecraft' });
121
- * await api.eggs.delete(id);
312
+ * await api.eggs.variables(id).create({ name: 'Jar', description: '', envVariable: 'JAR', defaultValue: 'server.jar' });
122
313
  * ```
123
314
  */
124
315
  export class EggsNamespace extends ResourceNamespace {
316
+ /** Manage egg nests (categories). */
317
+ nests;
125
318
  /** @internal */
126
319
  constructor(http) {
127
320
  super(http);
321
+ this.nests = new EggNestsManager(http);
128
322
  }
129
323
  /**
130
324
  * Fetch a paginated list of eggs.
@@ -155,6 +349,32 @@ export class EggsNamespace extends ResourceNamespace {
155
349
  const data = await this.http.get(`/eggs/${id}`, { params });
156
350
  return new Egg(data);
157
351
  }
352
+ /** Create a new egg. */
353
+ async create(payload) {
354
+ const body = {
355
+ nest_id: payload.nestId,
356
+ name: payload.name,
357
+ description: payload.description,
358
+ startup_command: payload.startupCommand,
359
+ stop_command: payload.stopCommand,
360
+ installer: {
361
+ image: payload.installer.image,
362
+ entry_command: payload.installer.entryCommand,
363
+ script: payload.installer.script,
364
+ },
365
+ images: payload.images,
366
+ force_outgoing_ip: payload.forceOutgoingIp,
367
+ file_blacklist_regex: payload.fileBlacklistRegex,
368
+ config_files: payload.configFiles,
369
+ config_startup: payload.configStartup ? configStartupBody(payload.configStartup) : undefined,
370
+ config_logs: payload.configLogs,
371
+ };
372
+ const data = await this.http.post('/eggs', body);
373
+ const egg = new Egg(data);
374
+ this.addToCache(egg);
375
+ this.emit('created', egg);
376
+ return egg;
377
+ }
158
378
  /**
159
379
  * Update an egg's configuration.
160
380
  *
@@ -165,20 +385,16 @@ export class EggsNamespace extends ResourceNamespace {
165
385
  const body = {};
166
386
  if (payload.name !== undefined)
167
387
  body['name'] = payload.name;
168
- if (payload.description !== undefined) {
388
+ if (payload.description !== undefined)
169
389
  body['description'] = payload.description;
170
- }
171
390
  if (payload.nestId !== undefined)
172
391
  body['nest_id'] = payload.nestId;
173
- if (payload.startupCommand !== undefined) {
392
+ if (payload.startupCommand !== undefined)
174
393
  body['startup_command'] = payload.startupCommand;
175
- }
176
- if (payload.stopCommand !== undefined) {
394
+ if (payload.stopCommand !== undefined)
177
395
  body['stop_command'] = payload.stopCommand;
178
- }
179
- if (payload.forceOutgoingIp !== undefined) {
396
+ if (payload.forceOutgoingIp !== undefined)
180
397
  body['force_outgoing_ip'] = payload.forceOutgoingIp;
181
- }
182
398
  if (payload.installer) {
183
399
  body['installer'] = {
184
400
  image: payload.installer.image,
@@ -186,6 +402,14 @@ export class EggsNamespace extends ResourceNamespace {
186
402
  script: payload.installer.script,
187
403
  };
188
404
  }
405
+ if (payload.configFiles !== undefined)
406
+ body['config_files'] = payload.configFiles;
407
+ if (payload.configStartup !== undefined)
408
+ body['config_startup'] = configStartupBody(payload.configStartup);
409
+ if (payload.configLogs !== undefined)
410
+ body['config_logs'] = payload.configLogs;
411
+ if (payload.fileBlacklistRegex !== undefined)
412
+ body['file_blacklist_regex'] = payload.fileBlacklistRegex;
189
413
  const data = await this.http.patch(`/eggs/${id}`, body);
190
414
  const egg = new Egg(data);
191
415
  this.upsertCache(egg);
@@ -202,4 +426,16 @@ export class EggsNamespace extends ResourceNamespace {
202
426
  this.removeFromCache(id);
203
427
  this.emit('deleted', id);
204
428
  }
429
+ /** Manage a specific egg's variables. */
430
+ variables(eggId) {
431
+ return new EggVariablesManager(eggId, this.http);
432
+ }
433
+ /** Manage a specific egg's images. */
434
+ images(eggId) {
435
+ return new EggImagesManager(eggId, this.http);
436
+ }
437
+ /** Manage a specific egg's feature grants. */
438
+ features(eggId) {
439
+ return new EggFeaturesManager(eggId, this.http);
440
+ }
205
441
  }
@@ -0,0 +1,35 @@
1
+ import type { HttpClient } from '../http.js';
2
+ /** The variant options a feature offers. */
3
+ export interface FeatureVariants {
4
+ /** The allowed variant values. */
5
+ options: string[];
6
+ /** The default variant. */
7
+ default: string;
8
+ }
9
+ /** A code-defined feature in the catalog. */
10
+ export interface FeatureCatalogEntry {
11
+ /** The feature key, e.g. `"minecraft.players"`. */
12
+ name: string;
13
+ /** The feature's settings and their default values, keyed by setting name. */
14
+ settings: Record<string, unknown>;
15
+ /** The variant options, or `null` when the feature has none. */
16
+ variants: FeatureVariants | null;
17
+ }
18
+ /**
19
+ * The code-defined feature catalog.
20
+ *
21
+ * Access via `api.features`. Per-server feature state is managed via `server.features`.
22
+ *
23
+ * @example
24
+ * ```ts ignore
25
+ * const catalog = await api.features.list();
26
+ * ```
27
+ */
28
+ export declare class FeaturesResource {
29
+ private readonly http;
30
+ /** @internal */
31
+ constructor(http: HttpClient);
32
+ /** List the available features and their defaults. */
33
+ list(): Promise<FeatureCatalogEntry[]>;
34
+ }
35
+ //# sourceMappingURL=features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../../src/src/resources/features.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,4CAA4C;AAC5C,MAAM,WAAW,eAAe;IAC/B,kCAAkC;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,6CAA6C;AAC7C,MAAM,WAAW,mBAAmB;IACnC,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,gEAAgE;IAChE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,qBAAa,gBAAgB;IAET,OAAO,CAAC,QAAQ,CAAC,IAAI;IADxC,gBAAgB;gBACoB,IAAI,EAAE,UAAU;IAEpD,sDAAsD;IAC/C,IAAI,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;CAG7C"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The code-defined feature catalog.
3
+ *
4
+ * Access via `api.features`. Per-server feature state is managed via `server.features`.
5
+ *
6
+ * @example
7
+ * ```ts ignore
8
+ * const catalog = await api.features.list();
9
+ * ```
10
+ */
11
+ export class FeaturesResource {
12
+ http;
13
+ /** @internal */
14
+ constructor(http) {
15
+ this.http = http;
16
+ }
17
+ /** List the available features and their defaults. */
18
+ list() {
19
+ return this.http.get('/features');
20
+ }
21
+ }
@@ -1,48 +1,158 @@
1
1
  import type { HttpClient } from '../http.js';
2
2
  import { ResourceNamespace } from '../namespace.js';
3
3
  import { ReactiveResource } from '../reactive.js';
4
+ import type { IncludeOptions, ListOptions, ResourceColor, ResourceWith } from '../types.js';
4
5
  import { type ISODate, type NanoID, type Paginated } from '../types.js';
5
- import type { MemberData } from './members.js';
6
- import { Member } from './members.js';
6
+ import type { UserData } from './users.js';
7
+ import { User } from './users.js';
8
+ import { type ActivityFeedOptions, type ActivityLog } from './servers/activity.js';
7
9
  /** Raw API shape for a physical host. @internal */
8
10
  export interface HostData {
9
11
  id: string;
10
12
  hostname: string;
11
- name?: string | null;
12
- color?: string | null;
13
+ name: string;
14
+ color: ResourceColor | null;
13
15
  owner_id: string;
14
- owner?: MemberData;
15
- notes?: string | null;
16
+ owner?: UserData;
17
+ notes: string | null;
16
18
  created_at: ISODate;
17
19
  updated_at: ISODate;
20
+ deleted_at: ISODate | null;
18
21
  }
19
22
  /**
20
23
  * A physical host machine on which nodes are deployed.
21
24
  *
22
- * Retrieved via {@link HostsNamespace.list}.
25
+ * Retrieved via {@link HostsNamespace.list} or {@link HostsNamespace.get}.
23
26
  */
24
27
  export declare class Host extends ReactiveResource {
25
28
  /** The host's unique NanoID. */
26
29
  readonly id: NanoID;
27
30
  /** The host's hostname, e.g. `"host.example.com"`. */
28
31
  hostname: string;
29
- /** Optional display name for the host. */
30
- name: string | null | undefined;
31
- /** Optional color used in the UI for grouping. */
32
- color: string | null | undefined;
33
- /** The owner's NanoID. Always present. */
32
+ /** Display name for the host. */
33
+ name: string;
34
+ /** Color used in the UI for grouping, or `null`. */
35
+ color: ResourceColor | null;
36
+ /** The owner's bare NanoID (parsed from the namespaced `owner_id`). Always present. */
34
37
  readonly ownerId: NanoID;
38
+ /** The owner's issuer type, e.g. `'user'` or `'system'`. */
39
+ readonly ownerType: string;
35
40
  /** The full owner object. Requires `?include=owner`. */
36
- owner: Member | undefined;
41
+ owner: User | undefined;
37
42
  /** Internal notes. */
38
- notes: string | null | undefined;
43
+ notes: string | null;
39
44
  /** When this host was registered. */
40
45
  createdAt: Date;
41
46
  /** When this host was last updated. */
42
47
  updatedAt: Date;
48
+ /** When this host was soft-deleted, or `null` if active. */
49
+ deletedAt: Date | null;
43
50
  /** @internal */
44
51
  constructor(data: HostData);
45
52
  }
53
+ /** Fields accepted when creating a host. */
54
+ export interface CreateHostPayload {
55
+ name: string;
56
+ hostname: string;
57
+ color?: ResourceColor;
58
+ notes?: string;
59
+ }
60
+ /** Fields accepted when updating a host. All optional. */
61
+ export interface UpdateHostPayload {
62
+ name?: string;
63
+ hostname?: string;
64
+ color?: ResourceColor;
65
+ notes?: string;
66
+ }
67
+ /** Valid include keys for host endpoints. */
68
+ export type HostInclude = 'owner';
69
+ /** Maps each {@link HostInclude} key to the field(s) it guarantees on the {@link Host} instance. */
70
+ interface HostIncludeMap {
71
+ owner: {
72
+ owner: User;
73
+ };
74
+ }
75
+ /** A {@link Host} with specific include fields guaranteed to be populated. */
76
+ export type HostWith<I extends readonly HostInclude[] = []> = ResourceWith<Host, HostIncludeMap, I>;
77
+ /** Options for {@link HostsNamespace.list}. */
78
+ export interface HostListOptions extends ListOptions {
79
+ /**
80
+ * Soft-delete visibility.
81
+ * - `none` (the default) - returns only active hosts
82
+ * - `all` - also includes soft-deleted hosts you can access
83
+ * - `only` - returns just those
84
+ *
85
+ * Soft-deleted hosts require the `host.read.deleted` permission.
86
+ */
87
+ deleted?: 'none' | 'all' | 'only';
88
+ }
89
+ /** Typed events emitted by {@link HostsNamespace}. */
90
+ export interface HostEvents {
91
+ created: Host;
92
+ updated: Host;
93
+ deleted: NanoID;
94
+ }
95
+ /** A host's WHMCS billing configuration. Credentials are never returned. */
96
+ export interface WhmcsBillingConfig {
97
+ /** The WHMCS base URL. */
98
+ baseUrl: string;
99
+ /** Whether billing is enabled for this host. */
100
+ enabled: boolean;
101
+ /** Whether a Basic-Auth header is configured. The value itself is never returned. */
102
+ basicAuthSet: boolean;
103
+ /** When the config was created. */
104
+ createdAt: Date;
105
+ /** When the config was last updated. */
106
+ updatedAt: Date;
107
+ }
108
+ /** Fields accepted when saving a host's WHMCS billing config. */
109
+ export interface SaveWhmcsBillingPayload {
110
+ /** The WHMCS base URL (http or https). Required on first configuration. */
111
+ baseUrl?: string;
112
+ /** WHMCS API identifier (write-only). Required on first configuration. */
113
+ apiIdentifier?: string;
114
+ /** WHMCS API secret (write-only). Required on first configuration. */
115
+ apiSecret?: string;
116
+ /** Basic-Auth header value. `null` clears it; omit to leave unchanged. */
117
+ basicAuthBase64?: string | null;
118
+ /** Enable or disable billing for this host. */
119
+ enabled?: boolean;
120
+ }
121
+ /**
122
+ * Manages a host's billing provider configuration.
123
+ *
124
+ * Access via `api.hosts.billing(hostId)`.
125
+ */
126
+ export declare class HostBillingManager {
127
+ private readonly hostId;
128
+ private readonly http;
129
+ /** @internal */
130
+ constructor(hostId: NanoID, http: HttpClient);
131
+ /** Fetch all configured billing providers for this host. */
132
+ providers(): Promise<{
133
+ whmcs: WhmcsBillingConfig | null;
134
+ }>;
135
+ /**
136
+ * Fetch this host's WHMCS billing config.
137
+ *
138
+ * @throws {@link ApiError} with `isNotFound === true` if billing is not configured.
139
+ */
140
+ getWhmcs(): Promise<WhmcsBillingConfig>;
141
+ /**
142
+ * Save this host's WHMCS billing config. Does not call WHMCS; use {@link testWhmcs} to verify.
143
+ *
144
+ * First-time configuration requires `baseUrl`, `apiIdentifier`, and `apiSecret`.
145
+ */
146
+ saveWhmcs(payload: SaveWhmcsBillingPayload): Promise<WhmcsBillingConfig>;
147
+ /**
148
+ * Verify the stored WHMCS credentials against the live WHMCS API.
149
+ *
150
+ * @throws {@link ApiError} if billing is not configured (404) or WHMCS rejects the credentials (502).
151
+ */
152
+ testWhmcs(): Promise<void>;
153
+ /** Remove this host's WHMCS billing config. */
154
+ deleteWhmcs(): Promise<void>;
155
+ }
46
156
  /**
47
157
  * Namespace for host management.
48
158
  *
@@ -51,20 +161,40 @@ export declare class Host extends ReactiveResource {
51
161
  * @example
52
162
  * ```ts ignore
53
163
  * const hosts = await api.hosts.list();
164
+ * const host = await api.hosts.create({ name: 'DC1', hostname: 'host.example.com' });
54
165
  * ```
55
166
  */
56
- export declare class HostsNamespace extends ResourceNamespace<Host> {
167
+ export declare class HostsNamespace extends ResourceNamespace<Host, HostEvents> {
57
168
  /** @internal */
58
169
  constructor(http: HttpClient);
59
170
  /**
60
171
  * Fetch a paginated list of physical hosts.
61
172
  *
62
- * @param opts Pagination and search options.
173
+ * @param opts Pagination, search, soft-delete visibility, and include options.
174
+ */
175
+ list<const I extends readonly HostInclude[] = []>(opts?: HostListOptions & IncludeOptions<HostInclude, I>): Promise<Paginated<HostWith<I>>>;
176
+ /**
177
+ * Fetch a single host by ID.
178
+ *
179
+ * @param id The host's NanoID.
180
+ * @param opts Include options. A soft-deleted host resolves when the caller holds `host.read.deleted`.
181
+ */
182
+ get<const I extends readonly HostInclude[] = []>(id: NanoID, opts?: IncludeOptions<HostInclude, I>): Promise<HostWith<I>>;
183
+ /** Create a new host. The caller becomes its owner. */
184
+ create(payload: CreateHostPayload): Promise<Host>;
185
+ /** Update a host's name, hostname, color, or notes. */
186
+ update(id: NanoID, payload: UpdateHostPayload): Promise<Host>;
187
+ /** Soft-delete a host. Fails if it still owns nodes, locations, types, or nests. */
188
+ delete(id: NanoID): Promise<void>;
189
+ /** Manage a host's billing provider configuration. */
190
+ billing(hostId: NanoID): HostBillingManager;
191
+ /**
192
+ * Fetch a host's activity feed (activity on the host and its servers, groups, and nodes).
193
+ *
194
+ * @param hostId The host's NanoID.
195
+ * @param opts Pagination and filter options.
63
196
  */
64
- list(opts?: {
65
- page?: number;
66
- perPage?: number;
67
- search?: string;
68
- }): Promise<Paginated<Host>>;
197
+ activities(hostId: NanoID, opts?: ActivityFeedOptions): Promise<Paginated<ActivityLog>>;
69
198
  }
199
+ export {};
70
200
  //# sourceMappingURL=hosts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hosts.d.ts","sourceRoot":"","sources":["../../../src/src/res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