@meowpanel/api 0.2.0 → 0.4.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.
- package/esm/mod.d.ts +39 -18
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +26 -8
- package/esm/src/client.d.ts +48 -11
- package/esm/src/client.d.ts.map +1 -1
- package/esm/src/client.js +53 -12
- package/esm/src/errors.d.ts +8 -0
- package/esm/src/errors.d.ts.map +1 -1
- package/esm/src/errors.js +10 -0
- package/esm/src/http.d.ts +2 -2
- package/esm/src/http.d.ts.map +1 -1
- package/esm/src/http.js +5 -2
- package/esm/src/namespace.d.ts +1 -1
- package/esm/src/namespace.js +1 -1
- package/esm/src/resources/account.d.ts +104 -19
- package/esm/src/resources/account.d.ts.map +1 -1
- package/esm/src/resources/account.js +112 -13
- package/esm/src/resources/api-keys.d.ts +16 -24
- package/esm/src/resources/api-keys.d.ts.map +1 -1
- package/esm/src/resources/api-keys.js +16 -20
- package/esm/src/resources/auth.d.ts +70 -4
- package/esm/src/resources/auth.d.ts.map +1 -1
- package/esm/src/resources/auth.js +47 -4
- package/esm/src/resources/eggs.d.ts +261 -22
- package/esm/src/resources/eggs.d.ts.map +1 -1
- package/esm/src/resources/eggs.js +261 -25
- package/esm/src/resources/features.d.ts +35 -0
- package/esm/src/resources/features.d.ts.map +1 -0
- package/esm/src/resources/features.js +21 -0
- package/esm/src/resources/hosts.d.ts +143 -18
- package/esm/src/resources/hosts.d.ts.map +1 -1
- package/esm/src/resources/hosts.js +145 -10
- package/esm/src/resources/logs.d.ts +39 -0
- package/esm/src/resources/logs.d.ts.map +1 -0
- package/esm/src/resources/logs.js +38 -0
- package/esm/src/resources/nodes.d.ts +106 -41
- package/esm/src/resources/nodes.d.ts.map +1 -1
- package/esm/src/resources/nodes.js +121 -28
- package/esm/src/resources/permissions.d.ts +45 -0
- package/esm/src/resources/permissions.d.ts.map +1 -0
- package/esm/src/resources/permissions.js +26 -0
- package/esm/src/resources/request-logs.d.ts +91 -0
- package/esm/src/resources/request-logs.d.ts.map +1 -0
- package/esm/src/resources/request-logs.js +70 -0
- package/esm/src/resources/roles.d.ts +128 -0
- package/esm/src/resources/roles.d.ts.map +1 -0
- package/esm/src/resources/roles.js +142 -0
- package/esm/src/resources/server-groups.d.ts +141 -7
- package/esm/src/resources/server-groups.d.ts.map +1 -1
- package/esm/src/resources/server-groups.js +157 -8
- package/esm/src/resources/servers/activity.d.ts +50 -8
- package/esm/src/resources/servers/activity.d.ts.map +1 -1
- package/esm/src/resources/servers/activity.js +54 -13
- package/esm/src/resources/servers/allocations.d.ts +3 -3
- package/esm/src/resources/servers/allocations.d.ts.map +1 -1
- package/esm/src/resources/servers/allocations.js +7 -7
- package/esm/src/resources/servers/backups.d.ts +46 -0
- package/esm/src/resources/servers/backups.d.ts.map +1 -0
- package/esm/src/resources/servers/backups.js +43 -0
- package/esm/src/resources/servers/connection.d.ts +27 -7
- package/esm/src/resources/servers/connection.d.ts.map +1 -1
- package/esm/src/resources/servers/connection.js +28 -7
- package/esm/src/resources/servers/features.d.ts +81 -0
- package/esm/src/resources/servers/features.d.ts.map +1 -0
- package/esm/src/resources/servers/features.js +60 -0
- package/esm/src/resources/servers/files.d.ts +41 -53
- package/esm/src/resources/servers/files.d.ts.map +1 -1
- package/esm/src/resources/servers/files.js +74 -116
- package/esm/src/resources/servers/index.d.ts +46 -27
- package/esm/src/resources/servers/index.d.ts.map +1 -1
- package/esm/src/resources/servers/index.js +26 -12
- package/esm/src/resources/servers/jobs.d.ts +88 -0
- package/esm/src/resources/servers/jobs.d.ts.map +1 -0
- package/esm/src/resources/servers/jobs.js +115 -0
- package/esm/src/resources/servers/node-client.d.ts +33 -0
- package/esm/src/resources/servers/node-client.d.ts.map +1 -0
- package/esm/src/resources/servers/node-client.js +61 -0
- package/esm/src/resources/servers/profiles.d.ts +45 -1
- package/esm/src/resources/servers/profiles.d.ts.map +1 -1
- package/esm/src/resources/servers/profiles.js +55 -2
- package/esm/src/resources/servers/server.d.ts +10 -25
- package/esm/src/resources/servers/server.d.ts.map +1 -1
- package/esm/src/resources/servers/server.js +18 -34
- package/esm/src/resources/servers/sftp.d.ts +21 -19
- package/esm/src/resources/servers/sftp.d.ts.map +1 -1
- package/esm/src/resources/servers/sftp.js +22 -14
- package/esm/src/resources/servers/sub-users.d.ts +99 -0
- package/esm/src/resources/servers/sub-users.d.ts.map +1 -0
- package/esm/src/resources/servers/sub-users.js +94 -0
- package/esm/src/resources/servers/types.d.ts +27 -25
- package/esm/src/resources/servers/types.d.ts.map +1 -1
- package/esm/src/resources/systems.d.ts +124 -0
- package/esm/src/resources/systems.d.ts.map +1 -0
- package/esm/src/resources/systems.js +139 -0
- package/esm/src/resources/users.d.ts +330 -0
- package/esm/src/resources/users.d.ts.map +1 -0
- package/esm/src/resources/users.js +280 -0
- package/esm/src/types.d.ts +18 -1
- package/esm/src/types.d.ts.map +1 -1
- package/esm/src/types.js +11 -0
- package/package.json +1 -1
- package/script/mod.d.ts +39 -18
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +52 -5
- package/script/src/client.d.ts +48 -11
- package/script/src/client.d.ts.map +1 -1
- package/script/src/client.js +53 -12
- package/script/src/errors.d.ts +8 -0
- package/script/src/errors.d.ts.map +1 -1
- package/script/src/errors.js +10 -0
- package/script/src/http.d.ts +2 -2
- package/script/src/http.d.ts.map +1 -1
- package/script/src/http.js +5 -2
- package/script/src/namespace.d.ts +1 -1
- package/script/src/namespace.js +1 -1
- package/script/src/resources/account.d.ts +104 -19
- package/script/src/resources/account.d.ts.map +1 -1
- package/script/src/resources/account.js +114 -13
- package/script/src/resources/api-keys.d.ts +16 -24
- package/script/src/resources/api-keys.d.ts.map +1 -1
- package/script/src/resources/api-keys.js +15 -19
- package/script/src/resources/auth.d.ts +70 -4
- package/script/src/resources/auth.d.ts.map +1 -1
- package/script/src/resources/auth.js +47 -4
- package/script/src/resources/eggs.d.ts +261 -22
- package/script/src/resources/eggs.d.ts.map +1 -1
- package/script/src/resources/eggs.js +267 -26
- package/script/src/resources/features.d.ts +35 -0
- package/script/src/resources/features.d.ts.map +1 -0
- package/script/src/resources/features.js +25 -0
- package/script/src/resources/hosts.d.ts +143 -18
- package/script/src/resources/hosts.d.ts.map +1 -1
- package/script/src/resources/hosts.js +146 -10
- package/script/src/resources/logs.d.ts +39 -0
- package/script/src/resources/logs.d.ts.map +1 -0
- package/script/src/resources/logs.js +42 -0
- package/script/src/resources/nodes.d.ts +106 -41
- package/script/src/resources/nodes.d.ts.map +1 -1
- package/script/src/resources/nodes.js +122 -28
- package/script/src/resources/permissions.d.ts +45 -0
- package/script/src/resources/permissions.d.ts.map +1 -0
- package/script/src/resources/permissions.js +31 -0
- package/script/src/resources/request-logs.d.ts +91 -0
- package/script/src/resources/request-logs.d.ts.map +1 -0
- package/script/src/resources/request-logs.js +75 -0
- package/script/src/resources/roles.d.ts +128 -0
- package/script/src/resources/roles.d.ts.map +1 -0
- package/script/src/resources/roles.js +148 -0
- package/script/src/resources/server-groups.d.ts +141 -7
- package/script/src/resources/server-groups.d.ts.map +1 -1
- package/script/src/resources/server-groups.js +158 -8
- package/script/src/resources/servers/activity.d.ts +50 -8
- package/script/src/resources/servers/activity.d.ts.map +1 -1
- package/script/src/resources/servers/activity.js +54 -12
- package/script/src/resources/servers/allocations.d.ts +3 -3
- package/script/src/resources/servers/allocations.d.ts.map +1 -1
- package/script/src/resources/servers/allocations.js +7 -7
- package/script/src/resources/servers/backups.d.ts +46 -0
- package/script/src/resources/servers/backups.d.ts.map +1 -0
- package/script/src/resources/servers/backups.js +47 -0
- package/script/src/resources/servers/connection.d.ts +27 -7
- package/script/src/resources/servers/connection.d.ts.map +1 -1
- package/script/src/resources/servers/connection.js +28 -7
- package/script/src/resources/servers/features.d.ts +81 -0
- package/script/src/resources/servers/features.d.ts.map +1 -0
- package/script/src/resources/servers/features.js +64 -0
- package/script/src/resources/servers/files.d.ts +41 -53
- package/script/src/resources/servers/files.d.ts.map +1 -1
- package/script/src/resources/servers/files.js +74 -116
- package/script/src/resources/servers/index.d.ts +46 -27
- package/script/src/resources/servers/index.d.ts.map +1 -1
- package/script/src/resources/servers/index.js +26 -12
- package/script/src/resources/servers/jobs.d.ts +88 -0
- package/script/src/resources/servers/jobs.d.ts.map +1 -0
- package/script/src/resources/servers/jobs.js +120 -0
- package/script/src/resources/servers/node-client.d.ts +33 -0
- package/script/src/resources/servers/node-client.d.ts.map +1 -0
- package/script/src/resources/servers/node-client.js +65 -0
- package/script/src/resources/servers/profiles.d.ts +45 -1
- package/script/src/resources/servers/profiles.d.ts.map +1 -1
- package/script/src/resources/servers/profiles.js +55 -2
- package/script/src/resources/servers/server.d.ts +10 -25
- package/script/src/resources/servers/server.d.ts.map +1 -1
- package/script/src/resources/servers/server.js +18 -34
- package/script/src/resources/servers/sftp.d.ts +21 -19
- package/script/src/resources/servers/sftp.d.ts.map +1 -1
- package/script/src/resources/servers/sftp.js +22 -14
- package/script/src/resources/servers/sub-users.d.ts +99 -0
- package/script/src/resources/servers/sub-users.d.ts.map +1 -0
- package/script/src/resources/servers/sub-users.js +99 -0
- package/script/src/resources/servers/types.d.ts +27 -25
- package/script/src/resources/servers/types.d.ts.map +1 -1
- package/script/src/resources/systems.d.ts +124 -0
- package/script/src/resources/systems.d.ts.map +1 -0
- package/script/src/resources/systems.js +145 -0
- package/script/src/resources/users.d.ts +330 -0
- package/script/src/resources/users.d.ts.map +1 -0
- package/script/src/resources/users.js +287 -0
- package/script/src/types.d.ts +18 -1
- package/script/src/types.d.ts.map +1 -1
- package/script/src/types.js +12 -0
- package/esm/src/resources/members.d.ts +0 -138
- package/esm/src/resources/members.d.ts.map +0 -1
- package/esm/src/resources/members.js +0 -122
- package/script/src/resources/members.d.ts +0 -138
- package/script/src/resources/members.d.ts.map +0 -1
- 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
|
-
/**
|
|
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
|
|
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(
|
|
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.
|
|
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,146 @@
|
|
|
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, ResourceColor, ResourceWith } from '../types.js';
|
|
4
5
|
import { type ISODate, type NanoID, type Paginated } from '../types.js';
|
|
5
|
-
import type {
|
|
6
|
-
import {
|
|
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
|
|
12
|
-
color
|
|
13
|
+
name: string;
|
|
14
|
+
color: ResourceColor | null;
|
|
13
15
|
owner_id: string;
|
|
14
|
-
owner?:
|
|
15
|
-
notes
|
|
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
|
-
/**
|
|
30
|
-
name: string
|
|
31
|
-
/**
|
|
32
|
-
color:
|
|
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:
|
|
41
|
+
owner: User | undefined;
|
|
37
42
|
/** Internal notes. */
|
|
38
|
-
notes: string | null
|
|
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
|
+
/** Typed events emitted by {@link HostsNamespace}. */
|
|
78
|
+
export interface HostEvents {
|
|
79
|
+
created: Host;
|
|
80
|
+
updated: Host;
|
|
81
|
+
deleted: NanoID;
|
|
82
|
+
}
|
|
83
|
+
/** A host's WHMCS billing configuration. Credentials are never returned. */
|
|
84
|
+
export interface WhmcsBillingConfig {
|
|
85
|
+
/** The WHMCS base URL. */
|
|
86
|
+
baseUrl: string;
|
|
87
|
+
/** Whether billing is enabled for this host. */
|
|
88
|
+
enabled: boolean;
|
|
89
|
+
/** Whether a Basic-Auth header is configured. The value itself is never returned. */
|
|
90
|
+
basicAuthSet: boolean;
|
|
91
|
+
/** When the config was created. */
|
|
92
|
+
createdAt: Date;
|
|
93
|
+
/** When the config was last updated. */
|
|
94
|
+
updatedAt: Date;
|
|
95
|
+
}
|
|
96
|
+
/** Fields accepted when saving a host's WHMCS billing config. */
|
|
97
|
+
export interface SaveWhmcsBillingPayload {
|
|
98
|
+
/** The WHMCS base URL (http or https). Required on first configuration. */
|
|
99
|
+
baseUrl?: string;
|
|
100
|
+
/** WHMCS API identifier (write-only). Required on first configuration. */
|
|
101
|
+
apiIdentifier?: string;
|
|
102
|
+
/** WHMCS API secret (write-only). Required on first configuration. */
|
|
103
|
+
apiSecret?: string;
|
|
104
|
+
/** Basic-Auth header value. `null` clears it; omit to leave unchanged. */
|
|
105
|
+
basicAuthBase64?: string | null;
|
|
106
|
+
/** Enable or disable billing for this host. */
|
|
107
|
+
enabled?: boolean;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Manages a host's billing provider configuration.
|
|
111
|
+
*
|
|
112
|
+
* Access via `api.hosts.billing(hostId)`.
|
|
113
|
+
*/
|
|
114
|
+
export declare class HostBillingManager {
|
|
115
|
+
private readonly hostId;
|
|
116
|
+
private readonly http;
|
|
117
|
+
/** @internal */
|
|
118
|
+
constructor(hostId: NanoID, http: HttpClient);
|
|
119
|
+
/** Fetch all configured billing providers for this host. */
|
|
120
|
+
providers(): Promise<{
|
|
121
|
+
whmcs: WhmcsBillingConfig | null;
|
|
122
|
+
}>;
|
|
123
|
+
/**
|
|
124
|
+
* Fetch this host's WHMCS billing config.
|
|
125
|
+
*
|
|
126
|
+
* @throws {@link ApiError} with `isNotFound === true` if billing is not configured.
|
|
127
|
+
*/
|
|
128
|
+
getWhmcs(): Promise<WhmcsBillingConfig>;
|
|
129
|
+
/**
|
|
130
|
+
* Save this host's WHMCS billing config. Does not call WHMCS; use {@link testWhmcs} to verify.
|
|
131
|
+
*
|
|
132
|
+
* First-time configuration requires `baseUrl`, `apiIdentifier`, and `apiSecret`.
|
|
133
|
+
*/
|
|
134
|
+
saveWhmcs(payload: SaveWhmcsBillingPayload): Promise<WhmcsBillingConfig>;
|
|
135
|
+
/**
|
|
136
|
+
* Verify the stored WHMCS credentials against the live WHMCS API.
|
|
137
|
+
*
|
|
138
|
+
* @throws {@link ApiError} if billing is not configured (404) or WHMCS rejects the credentials (502).
|
|
139
|
+
*/
|
|
140
|
+
testWhmcs(): Promise<void>;
|
|
141
|
+
/** Remove this host's WHMCS billing config. */
|
|
142
|
+
deleteWhmcs(): Promise<void>;
|
|
143
|
+
}
|
|
46
144
|
/**
|
|
47
145
|
* Namespace for host management.
|
|
48
146
|
*
|
|
@@ -51,20 +149,47 @@ export declare class Host extends ReactiveResource {
|
|
|
51
149
|
* @example
|
|
52
150
|
* ```ts ignore
|
|
53
151
|
* const hosts = await api.hosts.list();
|
|
152
|
+
* const host = await api.hosts.create({ name: 'DC1', hostname: 'host.example.com' });
|
|
54
153
|
* ```
|
|
55
154
|
*/
|
|
56
|
-
export declare class HostsNamespace extends ResourceNamespace<Host> {
|
|
155
|
+
export declare class HostsNamespace extends ResourceNamespace<Host, HostEvents> {
|
|
57
156
|
/** @internal */
|
|
58
157
|
constructor(http: HttpClient);
|
|
59
158
|
/**
|
|
60
159
|
* Fetch a paginated list of physical hosts.
|
|
61
160
|
*
|
|
62
|
-
* @param opts Pagination and
|
|
161
|
+
* @param opts Pagination, search, and include options. Set `includeDeleted` to also return soft-deleted hosts.
|
|
63
162
|
*/
|
|
64
|
-
list(opts?: {
|
|
163
|
+
list<const I extends readonly HostInclude[] = []>(opts?: {
|
|
65
164
|
page?: number;
|
|
66
165
|
perPage?: number;
|
|
67
166
|
search?: string;
|
|
68
|
-
|
|
167
|
+
includeDeleted?: boolean;
|
|
168
|
+
} & IncludeOptions<HostInclude, I>): Promise<Paginated<HostWith<I>>>;
|
|
169
|
+
/**
|
|
170
|
+
* Fetch a single host by ID.
|
|
171
|
+
*
|
|
172
|
+
* @param id The host's NanoID.
|
|
173
|
+
* @param opts Include options. Set `includeDeleted` to return a soft-deleted host.
|
|
174
|
+
*/
|
|
175
|
+
get<const I extends readonly HostInclude[] = []>(id: NanoID, opts?: IncludeOptions<HostInclude, I> & {
|
|
176
|
+
includeDeleted?: boolean;
|
|
177
|
+
}): Promise<HostWith<I>>;
|
|
178
|
+
/** Create a new host. The caller becomes its owner. */
|
|
179
|
+
create(payload: CreateHostPayload): Promise<Host>;
|
|
180
|
+
/** Update a host's name, hostname, color, or notes. */
|
|
181
|
+
update(id: NanoID, payload: UpdateHostPayload): Promise<Host>;
|
|
182
|
+
/** Soft-delete a host. Fails if it still owns nodes, locations, types, or nests. */
|
|
183
|
+
delete(id: NanoID): Promise<void>;
|
|
184
|
+
/** Manage a host's billing provider configuration. */
|
|
185
|
+
billing(hostId: NanoID): HostBillingManager;
|
|
186
|
+
/**
|
|
187
|
+
* Fetch a host's activity feed (activity on the host and its servers, groups, and nodes).
|
|
188
|
+
*
|
|
189
|
+
* @param hostId The host's NanoID.
|
|
190
|
+
* @param opts Pagination and filter options.
|
|
191
|
+
*/
|
|
192
|
+
activities(hostId: NanoID, opts?: ActivityFeedOptions): Promise<Paginated<ActivityLog>>;
|
|
69
193
|
}
|
|
194
|
+
export {};
|
|
70
195
|
//# sourceMappingURL=hosts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosts.d.ts","sourceRoot":"","sources":["../../../src/src/resources/hosts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"hosts.d.ts","sourceRoot":"","sources":["../../../src/src/resources/hosts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,KAAK,OAAO,EAAgB,KAAK,MAAM,EAAE,KAAK,SAAS,EAA4B,MAAM,aAAa,CAAC;AAChH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,WAAW,EAAkB,MAAM,uBAAuB,CAAC;AAEnG,mDAAmD;AACnD,MAAM,WAAW,QAAQ;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC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