@modrinth/api-client 0.30.0 → 0.32.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/dist/index.d.ts +7103 -28
- package/dist/index.js +1 -0
- package/dist/index.js.map +7 -0
- package/package.json +4 -2
- package/dist/core/abstract-client.d.ts +0 -163
- package/dist/core/abstract-feature.d.ts +0 -72
- package/dist/core/abstract-module.d.ts +0 -10
- package/dist/core/abstract-sync.d.ts +0 -61
- package/dist/core/abstract-upload-client.d.ts +0 -20
- package/dist/core/abstract-websocket.d.ts +0 -52
- package/dist/core/errors.d.ts +0 -48
- package/dist/features/auth.d.ts +0 -47
- package/dist/features/circuit-breaker.d.ts +0 -139
- package/dist/features/node-auth.d.ts +0 -58
- package/dist/features/panel-version.d.ts +0 -7
- package/dist/features/retry.d.ts +0 -87
- package/dist/features/verbose-logging.d.ts +0 -6
- package/dist/modules/archon/actions/v1.d.ts +0 -10
- package/dist/modules/archon/backups/v1.d.ts +0 -44
- package/dist/modules/archon/backups-queue/v1.d.ts +0 -25
- package/dist/modules/archon/content/v1.d.ts +0 -48
- package/dist/modules/archon/index.d.ts +0 -8
- package/dist/modules/archon/nodes/internal.d.ts +0 -10
- package/dist/modules/archon/notices/v0.d.ts +0 -38
- package/dist/modules/archon/options/v1.d.ts +0 -9
- package/dist/modules/archon/properties/v1.d.ts +0 -9
- package/dist/modules/archon/server-users/v1.d.ts +0 -30
- package/dist/modules/archon/servers/v0.d.ts +0 -122
- package/dist/modules/archon/servers/v1.d.ts +0 -30
- package/dist/modules/archon/transfers/internal.d.ts +0 -25
- package/dist/modules/archon/types.d.ts +0 -941
- package/dist/modules/index.d.ts +0 -181
- package/dist/modules/iso3166/index.d.ts +0 -24
- package/dist/modules/iso3166/types.d.ts +0 -21
- package/dist/modules/kyros/content/v1.d.ts +0 -23
- package/dist/modules/kyros/files/v0.d.ts +0 -123
- package/dist/modules/kyros/logs/v1.d.ts +0 -6
- package/dist/modules/kyros/types.d.ts +0 -44
- package/dist/modules/kyros/upload-sessions/v1.d.ts +0 -18
- package/dist/modules/labrinth/affiliate/internal.d.ts +0 -30
- package/dist/modules/labrinth/analytics/v3.d.ts +0 -56
- package/dist/modules/labrinth/attribution/internal.d.ts +0 -47
- package/dist/modules/labrinth/auth/internal.d.ts +0 -19
- package/dist/modules/labrinth/auth/v2.d.ts +0 -98
- package/dist/modules/labrinth/billing/internal.d.ts +0 -65
- package/dist/modules/labrinth/campaign/internal.d.ts +0 -10
- package/dist/modules/labrinth/collections.d.ts +0 -80
- package/dist/modules/labrinth/content/v3.d.ts +0 -6
- package/dist/modules/labrinth/external-projects/internal.d.ts +0 -9
- package/dist/modules/labrinth/friends/v3.d.ts +0 -23
- package/dist/modules/labrinth/globals/internal.d.ts +0 -11
- package/dist/modules/labrinth/images/v3.d.ts +0 -7
- package/dist/modules/labrinth/index.d.ts +0 -31
- package/dist/modules/labrinth/limits/v3.d.ts +0 -17
- package/dist/modules/labrinth/moderation/internal.d.ts +0 -12
- package/dist/modules/labrinth/notifications/v2.d.ts +0 -73
- package/dist/modules/labrinth/oauth/internal.d.ts +0 -97
- package/dist/modules/labrinth/organizations/v3.d.ts +0 -66
- package/dist/modules/labrinth/pats/v2.d.ts +0 -31
- package/dist/modules/labrinth/payout/v3.d.ts +0 -30
- package/dist/modules/labrinth/payouts/v3.d.ts +0 -15
- package/dist/modules/labrinth/projects/v2.d.ts +0 -169
- package/dist/modules/labrinth/projects/v3.d.ts +0 -110
- package/dist/modules/labrinth/reports/v3.d.ts +0 -81
- package/dist/modules/labrinth/server-ping/internal.d.ts +0 -10
- package/dist/modules/labrinth/sessions/v2.d.ts +0 -17
- package/dist/modules/labrinth/state/index.d.ts +0 -17
- package/dist/modules/labrinth/tags/v2.d.ts +0 -19
- package/dist/modules/labrinth/teams/v2.d.ts +0 -57
- package/dist/modules/labrinth/teams/v3.d.ts +0 -18
- package/dist/modules/labrinth/tech-review/internal.d.ts +0 -77
- package/dist/modules/labrinth/threads/v3.d.ts +0 -57
- package/dist/modules/labrinth/types.d.ts +0 -2118
- package/dist/modules/labrinth/users/v2.d.ts +0 -101
- package/dist/modules/labrinth/users/v3.d.ts +0 -37
- package/dist/modules/labrinth/versions/v2.d.ts +0 -75
- package/dist/modules/labrinth/versions/v3.d.ts +0 -123
- package/dist/modules/launcher-meta/types.d.ts +0 -25
- package/dist/modules/launcher-meta/v0.d.ts +0 -17
- package/dist/modules/mclogs/insights/v1.d.ts +0 -6
- package/dist/modules/mclogs/logs/v1.d.ts +0 -6
- package/dist/modules/mclogs/types.d.ts +0 -60
- package/dist/modules/paper/types.d.ts +0 -22
- package/dist/modules/paper/v3.d.ts +0 -19
- package/dist/modules/purpur/types.d.ts +0 -15
- package/dist/modules/purpur/v2.d.ts +0 -16
- package/dist/modules/types.d.ts +0 -8
- package/dist/platform/generic.d.ts +0 -28
- package/dist/platform/nuxt.d.ts +0 -88
- package/dist/platform/sync-generic.d.ts +0 -16
- package/dist/platform/tauri.d.ts +0 -35
- package/dist/platform/websocket-generic.d.ts +0 -16
- package/dist/platform/xhr-upload-client.d.ts +0 -15
- package/dist/state/node-auth.d.ts +0 -36
- package/dist/types/client.d.ts +0 -70
- package/dist/types/errors.d.ts +0 -43
- package/dist/types/index.d.ts +0 -10
- package/dist/types/request.d.ts +0 -124
- package/dist/types/upload.d.ts +0 -92
- package/dist/utils/fetch.d.ts +0 -4
- package/dist/utils/jwt-retry.d.ts +0 -5
- package/dist/utils/node-url.d.ts +0 -2
- package/dist/utils/pingtest.d.ts +0 -8
- package/dist/utils/sse.d.ts +0 -24
- package/dist/utils/types.d.ts +0 -2
|
@@ -1,941 +0,0 @@
|
|
|
1
|
-
import type { Labrinth } from '../labrinth/types';
|
|
2
|
-
export declare namespace Archon {
|
|
3
|
-
namespace Nodes {
|
|
4
|
-
namespace Internal {
|
|
5
|
-
type Node = {
|
|
6
|
-
id: string;
|
|
7
|
-
hostname: string;
|
|
8
|
-
region: string;
|
|
9
|
-
created_at: string | null;
|
|
10
|
-
locked: boolean;
|
|
11
|
-
};
|
|
12
|
-
type Server = {
|
|
13
|
-
id: string;
|
|
14
|
-
available: boolean;
|
|
15
|
-
};
|
|
16
|
-
type NodeFull = Node & {
|
|
17
|
-
servers: Server[];
|
|
18
|
-
};
|
|
19
|
-
type Overview = {
|
|
20
|
-
node_hostnames: string[];
|
|
21
|
-
regions: Region[];
|
|
22
|
-
total_servers_active: number;
|
|
23
|
-
};
|
|
24
|
-
type Region = {
|
|
25
|
-
display_name: string;
|
|
26
|
-
country_code: string;
|
|
27
|
-
key: string;
|
|
28
|
-
server_count: number;
|
|
29
|
-
node_count: number;
|
|
30
|
-
};
|
|
31
|
-
type RegionWithStatistics = {
|
|
32
|
-
region: Region;
|
|
33
|
-
active_servers: string[];
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
namespace Notices {
|
|
38
|
-
namespace v0 {
|
|
39
|
-
type Notice = {
|
|
40
|
-
id: number;
|
|
41
|
-
dismissable: boolean;
|
|
42
|
-
title: string | null;
|
|
43
|
-
message: string;
|
|
44
|
-
level: string;
|
|
45
|
-
announced: string;
|
|
46
|
-
};
|
|
47
|
-
type ListedNotice = {
|
|
48
|
-
id: number;
|
|
49
|
-
dismissable: boolean;
|
|
50
|
-
message: string;
|
|
51
|
-
title: string | null;
|
|
52
|
-
level: string;
|
|
53
|
-
announce_at: string;
|
|
54
|
-
expires: string | null;
|
|
55
|
-
assigned: Assignment[];
|
|
56
|
-
dismissed_by: Dismisser[];
|
|
57
|
-
};
|
|
58
|
-
type Dismisser = {
|
|
59
|
-
server: string;
|
|
60
|
-
dismissed_on: string;
|
|
61
|
-
};
|
|
62
|
-
type Assignment = {
|
|
63
|
-
kind: string;
|
|
64
|
-
id: string;
|
|
65
|
-
name: string;
|
|
66
|
-
};
|
|
67
|
-
type AssignmentTarget = {
|
|
68
|
-
server: string;
|
|
69
|
-
} | {
|
|
70
|
-
node: string;
|
|
71
|
-
};
|
|
72
|
-
type Announce = {
|
|
73
|
-
message: string;
|
|
74
|
-
title?: string | null;
|
|
75
|
-
level: string;
|
|
76
|
-
dismissable: boolean;
|
|
77
|
-
announce_at: string;
|
|
78
|
-
expires?: string | null;
|
|
79
|
-
};
|
|
80
|
-
type AnnouncePatch = {
|
|
81
|
-
message?: string;
|
|
82
|
-
title?: string | null;
|
|
83
|
-
level?: string;
|
|
84
|
-
dismissable?: boolean;
|
|
85
|
-
announce_at?: string;
|
|
86
|
-
expires?: string | null;
|
|
87
|
-
};
|
|
88
|
-
type PostNoticeResponseBody = {
|
|
89
|
-
id: number;
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
namespace Actions {
|
|
94
|
-
namespace v1 {
|
|
95
|
-
type SortOrder = 'asc' | 'desc';
|
|
96
|
-
type ActionName = 'server_created' | 'changed_server_name' | 'changed_server_subdomain' | 'server_reallocated' | 'server_plan_changed' | 'user_invited' | 'user_invite_revoked' | 'user_permission_modified' | 'user_removed' | 'addon_added' | 'addon_uploaded' | 'addon_disabled' | 'addon_enabled' | 'addon_deleted' | 'addon_updated' | 'modpack_changed' | 'modpack_unlinked' | 'server_repaired' | 'server_reset' | 'server_started' | 'server_stopped' | 'server_restarted' | 'server_killed' | 'port_allocation_added' | 'port_allocation_removed' | 'loader_version_edited' | 'game_version_edited' | 'server_properties_modified' | 'file_uploaded' | 'file_deleted' | 'file_renamed' | 'file_edited' | 'sftp_login' | 'console_command_executed' | 'console_cleared' | 'backup_created' | 'backup_renamed' | 'backup_restored' | 'backup_deleted' | 'startup_command_modified' | 'java_runtime_modified' | 'java_version_modified';
|
|
97
|
-
type Action = {
|
|
98
|
-
action: ActionName | string;
|
|
99
|
-
metadata?: unknown;
|
|
100
|
-
};
|
|
101
|
-
type UserPermissionsActionMetadata = {
|
|
102
|
-
user_id: string;
|
|
103
|
-
permissions?: ServerUsers.v1.UserScope | null;
|
|
104
|
-
};
|
|
105
|
-
type ActionUser = {
|
|
106
|
-
type: 'user';
|
|
107
|
-
user_id: string;
|
|
108
|
-
} | {
|
|
109
|
-
type: 'support';
|
|
110
|
-
user_id?: string | null;
|
|
111
|
-
};
|
|
112
|
-
type ActionEntry = {
|
|
113
|
-
actor: ActionUser;
|
|
114
|
-
action: Action;
|
|
115
|
-
server_id: string;
|
|
116
|
-
world_id?: string | null;
|
|
117
|
-
timestamp: string;
|
|
118
|
-
};
|
|
119
|
-
type UserResp = {
|
|
120
|
-
username: string;
|
|
121
|
-
avatar_url?: string | null;
|
|
122
|
-
};
|
|
123
|
-
type AddonResp = {
|
|
124
|
-
title: string;
|
|
125
|
-
slug?: string | null;
|
|
126
|
-
icon_url?: string | null;
|
|
127
|
-
version?: string | null;
|
|
128
|
-
};
|
|
129
|
-
type VersionResp = {
|
|
130
|
-
name: string;
|
|
131
|
-
version_number?: string | null;
|
|
132
|
-
};
|
|
133
|
-
type ActionLogResponse = {
|
|
134
|
-
next_offset?: number | null;
|
|
135
|
-
data: ActionEntry[];
|
|
136
|
-
users: Record<string, UserResp>;
|
|
137
|
-
addons: Record<string, AddonResp>;
|
|
138
|
-
versions: Record<string, VersionResp>;
|
|
139
|
-
};
|
|
140
|
-
type ActionLogFilter = {
|
|
141
|
-
users?: string[];
|
|
142
|
-
worlds?: Array<string | null>;
|
|
143
|
-
actions?: ActionName[];
|
|
144
|
-
};
|
|
145
|
-
type ListActionLogOptions = {
|
|
146
|
-
filter?: ActionLogFilter;
|
|
147
|
-
limit?: number;
|
|
148
|
-
offset?: number;
|
|
149
|
-
order?: SortOrder;
|
|
150
|
-
min_datetime?: string;
|
|
151
|
-
max_datetime?: string;
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
namespace Transfers {
|
|
156
|
-
namespace Internal {
|
|
157
|
-
type ProvisionOptions = {
|
|
158
|
-
region?: string | null;
|
|
159
|
-
node_tags: string[];
|
|
160
|
-
};
|
|
161
|
-
type ScheduleServerTransfersRequest = {
|
|
162
|
-
server_ids: string[];
|
|
163
|
-
scheduled_at?: string | null;
|
|
164
|
-
target_region?: string | null;
|
|
165
|
-
node_tags?: string[];
|
|
166
|
-
reason?: string | null;
|
|
167
|
-
};
|
|
168
|
-
type ScheduleNodeTransfersRequest = {
|
|
169
|
-
node_hostnames: string[];
|
|
170
|
-
scheduled_at?: string | null;
|
|
171
|
-
target_region?: string | null;
|
|
172
|
-
node_tags?: string[];
|
|
173
|
-
reason?: string | null;
|
|
174
|
-
cordon_nodes?: boolean;
|
|
175
|
-
tag_nodes?: string | null;
|
|
176
|
-
};
|
|
177
|
-
type ScheduleTransfersResponse = {
|
|
178
|
-
batch_id: number;
|
|
179
|
-
scheduled_count: number;
|
|
180
|
-
};
|
|
181
|
-
type CancelTransfersRequest = {
|
|
182
|
-
batch_ids: number[];
|
|
183
|
-
};
|
|
184
|
-
type CancelTransfersResponse = {
|
|
185
|
-
cancelled_count: number;
|
|
186
|
-
};
|
|
187
|
-
type TransferLogBatchEntry = {
|
|
188
|
-
id: number;
|
|
189
|
-
created_by: string;
|
|
190
|
-
created_at: string;
|
|
191
|
-
reason?: string | null;
|
|
192
|
-
scheduled_at: string;
|
|
193
|
-
cancelled: boolean;
|
|
194
|
-
log_count: number;
|
|
195
|
-
provision_options: ProvisionOptions;
|
|
196
|
-
};
|
|
197
|
-
type TransferHistoryQuery = {
|
|
198
|
-
page?: number;
|
|
199
|
-
page_size?: number;
|
|
200
|
-
};
|
|
201
|
-
type TransferHistoryResponse = {
|
|
202
|
-
batches: TransferLogBatchEntry[];
|
|
203
|
-
total: number;
|
|
204
|
-
page: number;
|
|
205
|
-
page_size: number;
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
namespace Content {
|
|
210
|
-
namespace v1 {
|
|
211
|
-
type AddonKind = 'mod' | 'plugin' | 'datapack' | 'shader' | 'resourcepack';
|
|
212
|
-
type ContentOwnerType = 'user' | 'organization';
|
|
213
|
-
type ContentOwner = {
|
|
214
|
-
id: string;
|
|
215
|
-
name: string;
|
|
216
|
-
type: ContentOwnerType;
|
|
217
|
-
icon_url: string | null;
|
|
218
|
-
};
|
|
219
|
-
type AddonVersion = {
|
|
220
|
-
id: string;
|
|
221
|
-
name: string | null;
|
|
222
|
-
environment?: Labrinth.Projects.v3.Environment | null;
|
|
223
|
-
};
|
|
224
|
-
type Addon = {
|
|
225
|
-
id: string;
|
|
226
|
-
filename: string;
|
|
227
|
-
filesize: number;
|
|
228
|
-
disabled: boolean;
|
|
229
|
-
kind: AddonKind;
|
|
230
|
-
from_modpack: boolean;
|
|
231
|
-
pack_client_retained: boolean;
|
|
232
|
-
pack_client_depends: boolean;
|
|
233
|
-
has_update: string | null;
|
|
234
|
-
name: string | null;
|
|
235
|
-
project_id: string | null;
|
|
236
|
-
version: AddonVersion | null;
|
|
237
|
-
owner: ContentOwner | null;
|
|
238
|
-
icon_url: string | null;
|
|
239
|
-
};
|
|
240
|
-
type Addons = {
|
|
241
|
-
modloader: string | null;
|
|
242
|
-
modloader_version: string | null;
|
|
243
|
-
game_version: string | null;
|
|
244
|
-
modpack: ModpackFields | null;
|
|
245
|
-
addons: Addon[] | null;
|
|
246
|
-
};
|
|
247
|
-
type AddAddonRequest = {
|
|
248
|
-
project_id: string;
|
|
249
|
-
version_id?: string;
|
|
250
|
-
kind?: AddonKind;
|
|
251
|
-
};
|
|
252
|
-
type AddAddonsRequest = AddAddonRequest[];
|
|
253
|
-
type RemoveAddonRequest = {
|
|
254
|
-
kind: AddonKind;
|
|
255
|
-
filename: string;
|
|
256
|
-
};
|
|
257
|
-
type UpdateAddonRequest = {
|
|
258
|
-
filename: string;
|
|
259
|
-
version_id?: string | null;
|
|
260
|
-
};
|
|
261
|
-
type Modloader = 'forge' | 'neo_forge' | 'fabric' | 'quilt' | 'paper' | 'purpur' | 'vanilla';
|
|
262
|
-
type ModpackSpecModrinth = {
|
|
263
|
-
platform: 'modrinth';
|
|
264
|
-
project_id: string;
|
|
265
|
-
version_id: string;
|
|
266
|
-
};
|
|
267
|
-
type ModpackSpecLocalFile = {
|
|
268
|
-
platform: 'local_file';
|
|
269
|
-
filename: string;
|
|
270
|
-
name: string;
|
|
271
|
-
description: string | null;
|
|
272
|
-
};
|
|
273
|
-
type ModpackSpec = ModpackSpecModrinth | ModpackSpecLocalFile;
|
|
274
|
-
type ModpackOwner = {
|
|
275
|
-
id: string;
|
|
276
|
-
name: string;
|
|
277
|
-
type: 'user' | 'organization';
|
|
278
|
-
icon_url: string | null;
|
|
279
|
-
};
|
|
280
|
-
type ModpackFields = {
|
|
281
|
-
spec: ModpackSpec;
|
|
282
|
-
has_update: string | null;
|
|
283
|
-
title: string | null;
|
|
284
|
-
description: string | null;
|
|
285
|
-
icon_url: string | null;
|
|
286
|
-
owner: ModpackOwner | null;
|
|
287
|
-
version_number: string | null;
|
|
288
|
-
date_published: string | null;
|
|
289
|
-
downloads: number | null;
|
|
290
|
-
followers: number | null;
|
|
291
|
-
};
|
|
292
|
-
type KnownPropertiesFields = {
|
|
293
|
-
allow_cheats?: string | null;
|
|
294
|
-
allow_flight?: string | null;
|
|
295
|
-
difficulty?: string | null;
|
|
296
|
-
enforce_whitelist?: string | null;
|
|
297
|
-
force_gamemode?: string | null;
|
|
298
|
-
gamemode?: string | null;
|
|
299
|
-
generate_structures?: string | null;
|
|
300
|
-
generator_settings?: string | null;
|
|
301
|
-
hardcore?: string | null;
|
|
302
|
-
level_seed?: string | null;
|
|
303
|
-
level_type?: string | null;
|
|
304
|
-
max_players?: string | null;
|
|
305
|
-
max_tick_time?: string | null;
|
|
306
|
-
motd?: string | null;
|
|
307
|
-
pause_when_empty_seconds?: string | null;
|
|
308
|
-
player_idle_timeout?: string | null;
|
|
309
|
-
require_resource_pack?: string | null;
|
|
310
|
-
resource_pack?: string | null;
|
|
311
|
-
resource_pack_id?: string | null;
|
|
312
|
-
resource_pack_sha1?: string | null;
|
|
313
|
-
simulation_distance?: string | null;
|
|
314
|
-
spawn_protection?: string | null;
|
|
315
|
-
sync_chunk_writes?: string | null;
|
|
316
|
-
view_distance?: string | null;
|
|
317
|
-
white_list?: string | null;
|
|
318
|
-
};
|
|
319
|
-
type PropertiesFields = {
|
|
320
|
-
known: KnownPropertiesFields;
|
|
321
|
-
custom?: Record<string, string>;
|
|
322
|
-
};
|
|
323
|
-
type PatchPropertiesFields = {
|
|
324
|
-
known?: KnownPropertiesFields;
|
|
325
|
-
custom?: Record<string, string | null>;
|
|
326
|
-
};
|
|
327
|
-
type JreVendor = 'temurin' | 'corretto' | 'graal';
|
|
328
|
-
type RuntimeOptions = {
|
|
329
|
-
java_version: number | null;
|
|
330
|
-
jre_vendor: JreVendor | null;
|
|
331
|
-
original_invocation: string | null;
|
|
332
|
-
startup_command: string | null;
|
|
333
|
-
};
|
|
334
|
-
type PatchRuntimeOptions = {
|
|
335
|
-
java_version?: number | null;
|
|
336
|
-
jre_vendor?: JreVendor | null;
|
|
337
|
-
startup_command?: string | null;
|
|
338
|
-
};
|
|
339
|
-
type InstallWorldContent = {
|
|
340
|
-
content_variant: 'modpack';
|
|
341
|
-
spec: ModpackSpec;
|
|
342
|
-
soft_override: boolean;
|
|
343
|
-
properties?: PropertiesFields | null;
|
|
344
|
-
} | {
|
|
345
|
-
content_variant: 'bare';
|
|
346
|
-
loader: Modloader;
|
|
347
|
-
version: string;
|
|
348
|
-
game_version?: string;
|
|
349
|
-
soft_override: boolean;
|
|
350
|
-
properties?: PropertiesFields | null;
|
|
351
|
-
};
|
|
352
|
-
type AddonDiffVersion = {
|
|
353
|
-
id: string;
|
|
354
|
-
version_number: string;
|
|
355
|
-
};
|
|
356
|
-
type AddonDiffProject = {
|
|
357
|
-
id: string;
|
|
358
|
-
title: string;
|
|
359
|
-
icon_url: string | null;
|
|
360
|
-
slug: string;
|
|
361
|
-
};
|
|
362
|
-
type AddonBaseDiffInfo = {
|
|
363
|
-
current_version: AddonDiffVersion | null;
|
|
364
|
-
new_version: AddonDiffVersion | null;
|
|
365
|
-
file_name: string | null;
|
|
366
|
-
project_id: string | null;
|
|
367
|
-
project: AddonDiffProject | null;
|
|
368
|
-
};
|
|
369
|
-
type AddonDiffAdded = AddonBaseDiffInfo & {
|
|
370
|
-
type: 'added';
|
|
371
|
-
new_version_id: string;
|
|
372
|
-
};
|
|
373
|
-
type AddonDiffRemoved = AddonBaseDiffInfo & {
|
|
374
|
-
type: 'removed';
|
|
375
|
-
};
|
|
376
|
-
type AddonDiffUpdated = AddonBaseDiffInfo & {
|
|
377
|
-
type: 'updated';
|
|
378
|
-
current_version_id: string;
|
|
379
|
-
new_version_id: string;
|
|
380
|
-
};
|
|
381
|
-
type AddonDiff = AddonDiffAdded | AddonDiffRemoved | AddonDiffUpdated;
|
|
382
|
-
type UpdateGameVersionPreview = {
|
|
383
|
-
addon_changes: AddonDiff[];
|
|
384
|
-
new_game_version: string;
|
|
385
|
-
new_loader_version: string;
|
|
386
|
-
has_unknown_content: boolean;
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
namespace ServerUsers {
|
|
391
|
-
namespace v1 {
|
|
392
|
-
type ServerUserRole = 'Owner' | 'Editor' | 'Viewer' | 'Unknown';
|
|
393
|
-
type AssignableServerUserRole = Exclude<ServerUserRole, 'Owner' | 'Unknown'>;
|
|
394
|
-
const UserScope: {
|
|
395
|
-
readonly NONE: "";
|
|
396
|
-
readonly SERVER_ADMIN: "SERVER_ADMIN";
|
|
397
|
-
readonly BASE_READ: "BASE_READ";
|
|
398
|
-
readonly POWER_ACTIONS: "POWER_ACTIONS";
|
|
399
|
-
readonly EXEC_COMMANDS: "EXEC_COMMANDS";
|
|
400
|
-
readonly FILES_WRITE: "FILES_WRITE";
|
|
401
|
-
readonly SETUP: "SETUP";
|
|
402
|
-
readonly BACKUPS: "BACKUPS";
|
|
403
|
-
readonly ADVANCED: "ADVANCED";
|
|
404
|
-
readonly RESET_SERVER: "RESET_SERVER";
|
|
405
|
-
readonly MANAGE_USERS: "MANAGE_USERS";
|
|
406
|
-
readonly SUPPORT_AGENT: "SUPPORT_AGENT";
|
|
407
|
-
readonly INFRA_MANAGER: "INFRA_MANAGER";
|
|
408
|
-
readonly INFRA_MANAGER_READ: "INFRA_MANAGER_READ";
|
|
409
|
-
readonly INFRA_SERVERS_XFER: "INFRA_SERVERS_XFER";
|
|
410
|
-
readonly INFRA_USERS: "INFRA_USERS";
|
|
411
|
-
};
|
|
412
|
-
type UserScope = string | number;
|
|
413
|
-
type UserResp = {
|
|
414
|
-
id: string;
|
|
415
|
-
username: string;
|
|
416
|
-
avatar_url?: string | null;
|
|
417
|
-
};
|
|
418
|
-
type ServerUser = {
|
|
419
|
-
user: UserResp;
|
|
420
|
-
added_on?: string | null;
|
|
421
|
-
last_invite_sent?: string | null;
|
|
422
|
-
permissions: UserScope;
|
|
423
|
-
};
|
|
424
|
-
type AddServerUserRequest = {
|
|
425
|
-
server_id?: string | null;
|
|
426
|
-
user_id: string;
|
|
427
|
-
added_on?: string | null;
|
|
428
|
-
role: ServerUserRole;
|
|
429
|
-
};
|
|
430
|
-
type ReinviteResponse = {
|
|
431
|
-
sent: boolean;
|
|
432
|
-
cooldown_seconds: number | null;
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
namespace Servers {
|
|
437
|
-
namespace v0 {
|
|
438
|
-
type ServerGetResponse = {
|
|
439
|
-
servers: Server[];
|
|
440
|
-
pagination: Pagination;
|
|
441
|
-
users: Record<string, ServerOwner>;
|
|
442
|
-
};
|
|
443
|
-
type Pagination = {
|
|
444
|
-
current_page: number;
|
|
445
|
-
page_size: number;
|
|
446
|
-
total_pages: number;
|
|
447
|
-
total_items: number;
|
|
448
|
-
};
|
|
449
|
-
type ServerOwner = {
|
|
450
|
-
id: string;
|
|
451
|
-
username: string;
|
|
452
|
-
avatar_url?: string | null;
|
|
453
|
-
};
|
|
454
|
-
type Status = 'installing' | 'broken' | 'available' | 'suspended';
|
|
455
|
-
type SuspensionReason = 'moderated' | 'paymentfailed' | 'cancelled' | 'upgrading' | 'other';
|
|
456
|
-
type Loader = 'Forge' | 'NeoForge' | 'Fabric' | 'Quilt' | 'Purpur' | 'Spigot' | 'Vanilla' | 'Paper';
|
|
457
|
-
type Game = 'Minecraft';
|
|
458
|
-
type UpstreamKind = 'modpack' | 'none';
|
|
459
|
-
type Server = {
|
|
460
|
-
server_id: string;
|
|
461
|
-
name: string;
|
|
462
|
-
owner_id: string;
|
|
463
|
-
net: Net;
|
|
464
|
-
game: Game;
|
|
465
|
-
backup_quota: number;
|
|
466
|
-
used_backup_quota: number;
|
|
467
|
-
status: Status;
|
|
468
|
-
suspension_reason: SuspensionReason | null;
|
|
469
|
-
loader: Loader | null;
|
|
470
|
-
loader_version: string | null;
|
|
471
|
-
mc_version: string | null;
|
|
472
|
-
upstream: Upstream | null;
|
|
473
|
-
sftp_username: string;
|
|
474
|
-
sftp_password: string;
|
|
475
|
-
sftp_host: string;
|
|
476
|
-
datacenter: string;
|
|
477
|
-
notices: Notice[];
|
|
478
|
-
node: NodeInfo | null;
|
|
479
|
-
flows: Flows;
|
|
480
|
-
is_medal: boolean;
|
|
481
|
-
current_user_permissions: UserScope;
|
|
482
|
-
medal_expires?: string;
|
|
483
|
-
};
|
|
484
|
-
type UserScope = number;
|
|
485
|
-
type Net = {
|
|
486
|
-
ip: string | null;
|
|
487
|
-
port: number;
|
|
488
|
-
domain: string;
|
|
489
|
-
};
|
|
490
|
-
type Upstream = {
|
|
491
|
-
kind: UpstreamKind;
|
|
492
|
-
version_id: string;
|
|
493
|
-
project_id: string;
|
|
494
|
-
};
|
|
495
|
-
type Notice = {
|
|
496
|
-
id: number;
|
|
497
|
-
dismissable: boolean;
|
|
498
|
-
title: string;
|
|
499
|
-
message: string;
|
|
500
|
-
level: string;
|
|
501
|
-
announced: string;
|
|
502
|
-
};
|
|
503
|
-
type NodeInfo = {
|
|
504
|
-
token: string;
|
|
505
|
-
instance: string;
|
|
506
|
-
};
|
|
507
|
-
type Flows = {
|
|
508
|
-
intro: boolean;
|
|
509
|
-
};
|
|
510
|
-
type GetServersOptions = {
|
|
511
|
-
limit?: number;
|
|
512
|
-
offset?: number;
|
|
513
|
-
};
|
|
514
|
-
type StockRequest = {
|
|
515
|
-
cpu?: number;
|
|
516
|
-
memory_mb?: number;
|
|
517
|
-
swap_mb?: number;
|
|
518
|
-
storage_mb?: number;
|
|
519
|
-
};
|
|
520
|
-
type StockResponse = {
|
|
521
|
-
available: number;
|
|
522
|
-
};
|
|
523
|
-
type JWTAuth = {
|
|
524
|
-
url: string;
|
|
525
|
-
token: string;
|
|
526
|
-
};
|
|
527
|
-
type ReinstallLoaderRequest = {
|
|
528
|
-
loader: string;
|
|
529
|
-
loader_version?: string;
|
|
530
|
-
game_version?: string;
|
|
531
|
-
};
|
|
532
|
-
type ReinstallModpackRequest = {
|
|
533
|
-
project_id: string;
|
|
534
|
-
version_id?: string;
|
|
535
|
-
};
|
|
536
|
-
type ReinstallRequest = ReinstallLoaderRequest | ReinstallModpackRequest;
|
|
537
|
-
type MrpackReinstallAuth = {
|
|
538
|
-
url: string;
|
|
539
|
-
token: string;
|
|
540
|
-
};
|
|
541
|
-
type Allocation = {
|
|
542
|
-
port: number;
|
|
543
|
-
name: string;
|
|
544
|
-
};
|
|
545
|
-
type StartupConfig = {
|
|
546
|
-
invocation: string;
|
|
547
|
-
original_invocation: string;
|
|
548
|
-
jdk_version: 'lts8' | 'lts11' | 'lts17' | 'lts21';
|
|
549
|
-
jdk_build: 'corretto' | 'temurin' | 'graal';
|
|
550
|
-
};
|
|
551
|
-
}
|
|
552
|
-
namespace v1 {
|
|
553
|
-
type ServerFull = {
|
|
554
|
-
id: string;
|
|
555
|
-
name: string;
|
|
556
|
-
subdomain: string;
|
|
557
|
-
specs: ServerResources;
|
|
558
|
-
sftp_username: string;
|
|
559
|
-
sftp_password: string;
|
|
560
|
-
tags: string[];
|
|
561
|
-
location: ServerLocation;
|
|
562
|
-
worlds: WorldFull[];
|
|
563
|
-
};
|
|
564
|
-
type ServerResources = {
|
|
565
|
-
cpu: number;
|
|
566
|
-
memory_mb: number;
|
|
567
|
-
storage_mb: number;
|
|
568
|
-
swap_mb: number;
|
|
569
|
-
};
|
|
570
|
-
type ServerLocation = {
|
|
571
|
-
status: 'assigned';
|
|
572
|
-
location_metadata: {
|
|
573
|
-
region: string;
|
|
574
|
-
region_should_be_user_displayed: boolean;
|
|
575
|
-
hostname: string;
|
|
576
|
-
is_decommissioned_node: boolean;
|
|
577
|
-
};
|
|
578
|
-
} | {
|
|
579
|
-
status: 'unassigned';
|
|
580
|
-
};
|
|
581
|
-
type WorldFull = {
|
|
582
|
-
id: string;
|
|
583
|
-
name: string;
|
|
584
|
-
created_at: string;
|
|
585
|
-
is_active: boolean;
|
|
586
|
-
/**
|
|
587
|
-
* @deprecated Prefer `client.archon.backups_queue_v1.list()` for queue-aware backup state.
|
|
588
|
-
*/
|
|
589
|
-
backups: Archon.Backups.v1.Backup[];
|
|
590
|
-
content: WorldContentInfo | null;
|
|
591
|
-
readiness: WorldReadiness;
|
|
592
|
-
};
|
|
593
|
-
type WorldReadiness = {
|
|
594
|
-
data_synchronized_fetched: boolean;
|
|
595
|
-
};
|
|
596
|
-
type WorldContentInfo = {
|
|
597
|
-
modloader: string;
|
|
598
|
-
modloader_version: string;
|
|
599
|
-
game_version: string;
|
|
600
|
-
java_version: number | null;
|
|
601
|
-
invocation: string | null;
|
|
602
|
-
original_invocation: string | null;
|
|
603
|
-
};
|
|
604
|
-
type Region = {
|
|
605
|
-
shortcode: string;
|
|
606
|
-
country_code: string;
|
|
607
|
-
display_name: string;
|
|
608
|
-
lat: number;
|
|
609
|
-
lon: number;
|
|
610
|
-
zone: string;
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
namespace Backups {
|
|
615
|
-
/**
|
|
616
|
-
* @deprecated Use {@link Archon.BackupsQueue.v1} and `client.archon.backups_queue_v1` instead.
|
|
617
|
-
*/
|
|
618
|
-
namespace v1 {
|
|
619
|
-
/** @deprecated Use {@link Archon.BackupsQueue.v1} instead. */
|
|
620
|
-
type BackupState = 'ongoing' | 'done' | 'failed' | 'cancelled' | 'unchanged';
|
|
621
|
-
/** @deprecated Use {@link Archon.BackupsQueue.v1} instead. */
|
|
622
|
-
type BackupTask = 'file' | 'create' | 'restore';
|
|
623
|
-
/** @deprecated Use {@link Archon.BackupsQueue.v1} instead. */
|
|
624
|
-
type BackupStatus = 'pending' | 'in_progress' | 'timed_out' | 'error' | 'done';
|
|
625
|
-
/** @deprecated Use {@link Archon.BackupsQueue.v1} instead. */
|
|
626
|
-
type BackupTaskProgress = {
|
|
627
|
-
progress: number;
|
|
628
|
-
state: BackupState;
|
|
629
|
-
};
|
|
630
|
-
/** @deprecated Use {@link Archon.BackupsQueue.v1.BackupQueueBackup} instead. */
|
|
631
|
-
type Backup = {
|
|
632
|
-
id: string;
|
|
633
|
-
physical_id: string;
|
|
634
|
-
name: string;
|
|
635
|
-
created_at: string;
|
|
636
|
-
automated: boolean;
|
|
637
|
-
status: BackupStatus;
|
|
638
|
-
interrupted: boolean;
|
|
639
|
-
ongoing: boolean;
|
|
640
|
-
locked: boolean;
|
|
641
|
-
task?: {
|
|
642
|
-
file?: BackupTaskProgress;
|
|
643
|
-
create?: BackupTaskProgress;
|
|
644
|
-
restore?: BackupTaskProgress;
|
|
645
|
-
};
|
|
646
|
-
};
|
|
647
|
-
/** @deprecated Use {@link Archon.BackupsQueue.v1.BackupRequest} instead. */
|
|
648
|
-
type BackupRequest = {
|
|
649
|
-
name: string;
|
|
650
|
-
};
|
|
651
|
-
/** @deprecated Use {@link Archon.BackupsQueue.v1} instead. */
|
|
652
|
-
type PatchBackup = {
|
|
653
|
-
name?: string;
|
|
654
|
-
};
|
|
655
|
-
/** @deprecated Use {@link Archon.BackupsQueue.v1.PostBackupQueueResponse} instead. */
|
|
656
|
-
type PostBackupResponse = {
|
|
657
|
-
id: string;
|
|
658
|
-
};
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
namespace BackupsQueue {
|
|
662
|
-
namespace v1 {
|
|
663
|
-
type BackupQueueOperationType = 'create' | 'restore';
|
|
664
|
-
type BackupQueueState = 'pending' | 'ongoing' | 'completed' | 'cancelled' | 'failed' | 'timed_out';
|
|
665
|
-
type BackupStatus = 'pending' | 'in_progress' | 'timed_out' | 'error' | 'done';
|
|
666
|
-
type BackupRequest = {
|
|
667
|
-
name: string;
|
|
668
|
-
};
|
|
669
|
-
type PostBackupQueueResponse = {
|
|
670
|
-
id: string;
|
|
671
|
-
};
|
|
672
|
-
type UserInfo = {
|
|
673
|
-
id: string;
|
|
674
|
-
username: string;
|
|
675
|
-
avatar_url: string | null;
|
|
676
|
-
};
|
|
677
|
-
type DeleteManyBackupRequest = {
|
|
678
|
-
backup_ids: string[];
|
|
679
|
-
};
|
|
680
|
-
type ActiveOperation = {
|
|
681
|
-
backup_id: string;
|
|
682
|
-
operation_type: BackupQueueOperationType;
|
|
683
|
-
operation_id: number | null;
|
|
684
|
-
has_parent: boolean;
|
|
685
|
-
scheduled_for: string;
|
|
686
|
-
started_at: string | null;
|
|
687
|
-
synthetic_legacy: boolean;
|
|
688
|
-
user_info: UserInfo | null;
|
|
689
|
-
};
|
|
690
|
-
type BackupQueueOperation = {
|
|
691
|
-
operation_type: BackupQueueOperationType;
|
|
692
|
-
operation_id: number | null;
|
|
693
|
-
state: BackupQueueState;
|
|
694
|
-
scheduled_for: string;
|
|
695
|
-
started_at: string | null;
|
|
696
|
-
completed_at: string | null;
|
|
697
|
-
has_parent: boolean;
|
|
698
|
-
error: string | null;
|
|
699
|
-
should_prompt: boolean;
|
|
700
|
-
synthetic_legacy: boolean;
|
|
701
|
-
user_info: UserInfo | null;
|
|
702
|
-
};
|
|
703
|
-
type BackupQueueBackup = {
|
|
704
|
-
id: string;
|
|
705
|
-
name: string;
|
|
706
|
-
created_at: string;
|
|
707
|
-
status: BackupStatus;
|
|
708
|
-
locked: boolean;
|
|
709
|
-
automated: boolean;
|
|
710
|
-
history: BackupQueueOperation[];
|
|
711
|
-
};
|
|
712
|
-
type BackupsQueueResponse = {
|
|
713
|
-
active_operations: ActiveOperation[];
|
|
714
|
-
backups: BackupQueueBackup[];
|
|
715
|
-
};
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
namespace Sync {
|
|
719
|
-
namespace v1 {
|
|
720
|
-
type SyncCategory = 'backup' | 'users' | 'server' | 'protocol' | 'world';
|
|
721
|
-
type SyncIntent = 'all' | SyncCategory | SyncCategory[];
|
|
722
|
-
type BackupOperationStatus = 'completed' | 'cancelled' | 'failed' | 'timed-out';
|
|
723
|
-
type ServerNetworkPort = {
|
|
724
|
-
port: number;
|
|
725
|
-
name: string;
|
|
726
|
-
};
|
|
727
|
-
type ProtocolResetEvent = {
|
|
728
|
-
type: 'protocol.reset';
|
|
729
|
-
};
|
|
730
|
-
type ProtocolInvalidEvent = {
|
|
731
|
-
type: 'protocol.invalid';
|
|
732
|
-
};
|
|
733
|
-
type ProtocolErrorEvent = {
|
|
734
|
-
type: 'protocol.error';
|
|
735
|
-
error: string;
|
|
736
|
-
};
|
|
737
|
-
type BackupNewEvent = {
|
|
738
|
-
type: 'backup.new';
|
|
739
|
-
id: string;
|
|
740
|
-
};
|
|
741
|
-
type BackupPatchEvent = {
|
|
742
|
-
type: 'backup.patch';
|
|
743
|
-
world_id: string;
|
|
744
|
-
backup_id: string;
|
|
745
|
-
name: string;
|
|
746
|
-
};
|
|
747
|
-
type BackupDeleteEvent = {
|
|
748
|
-
type: 'backup.delete';
|
|
749
|
-
world_id: string;
|
|
750
|
-
backup_id: string;
|
|
751
|
-
};
|
|
752
|
-
type BackupOperationStartEvent = {
|
|
753
|
-
type: 'backup.operation.create.init' | 'backup.operation.create.start' | 'backup.operation.restore.init' | 'backup.operation.restore.start';
|
|
754
|
-
world_id: string;
|
|
755
|
-
backup_id: string;
|
|
756
|
-
operation_id: number;
|
|
757
|
-
};
|
|
758
|
-
type BackupOperationDoneEvent = {
|
|
759
|
-
type: 'backup.operation.create.done' | 'backup.operation.restore.done';
|
|
760
|
-
world_id: string;
|
|
761
|
-
backup_id: string;
|
|
762
|
-
operation_id: number;
|
|
763
|
-
status: BackupOperationStatus;
|
|
764
|
-
};
|
|
765
|
-
type ServerPatchEvent = {
|
|
766
|
-
type: 'server.patch';
|
|
767
|
-
name: string;
|
|
768
|
-
subdomain: string;
|
|
769
|
-
};
|
|
770
|
-
type ServerNetworkPatchEvent = {
|
|
771
|
-
type: 'server.network.patch';
|
|
772
|
-
ports: ServerNetworkPort[];
|
|
773
|
-
};
|
|
774
|
-
type ServerTransferEvent = {
|
|
775
|
-
type: 'server.transfer.start' | 'server.transfer.done';
|
|
776
|
-
target_node: string;
|
|
777
|
-
};
|
|
778
|
-
type UsersPatchEvent = {
|
|
779
|
-
type: 'users.patch';
|
|
780
|
-
};
|
|
781
|
-
type WorldPatchEvent = {
|
|
782
|
-
type: 'world.patch';
|
|
783
|
-
world_id: string;
|
|
784
|
-
name: string;
|
|
785
|
-
};
|
|
786
|
-
type WorldStartupPatchEvent = {
|
|
787
|
-
type: 'world.startup.patch';
|
|
788
|
-
world_id: string;
|
|
789
|
-
java_version: number | null;
|
|
790
|
-
invocation: string | null;
|
|
791
|
-
original_invocation: string | null;
|
|
792
|
-
};
|
|
793
|
-
type WorldContentAddonPatchEvent = {
|
|
794
|
-
type: 'world.content.addon.patch';
|
|
795
|
-
world_id: string;
|
|
796
|
-
specs: Archon.Content.v1.Addon[];
|
|
797
|
-
};
|
|
798
|
-
type WorldContentBaseUpdateEvent = {
|
|
799
|
-
type: 'world.content.base.update';
|
|
800
|
-
world_id: string;
|
|
801
|
-
spec: Archon.Content.v1.Addons;
|
|
802
|
-
};
|
|
803
|
-
type SyncEvent = ProtocolResetEvent | ProtocolInvalidEvent | ProtocolErrorEvent | BackupNewEvent | BackupPatchEvent | BackupDeleteEvent | BackupOperationStartEvent | BackupOperationDoneEvent | ServerPatchEvent | ServerNetworkPatchEvent | ServerTransferEvent | UsersPatchEvent | WorldPatchEvent | WorldStartupPatchEvent | WorldContentAddonPatchEvent | WorldContentBaseUpdateEvent;
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
namespace Websocket {
|
|
807
|
-
namespace v0 {
|
|
808
|
-
type WSAuth = {
|
|
809
|
-
url: string;
|
|
810
|
-
token: string;
|
|
811
|
-
};
|
|
812
|
-
type BackupState = 'pending' | 'ongoing' | 'done' | 'failed' | 'cancelled' | 'unchanged' | 'damaged';
|
|
813
|
-
type BackupTask = 'file' | 'create' | 'restore';
|
|
814
|
-
type WSBackupProgressEvent = {
|
|
815
|
-
event: 'backup-progress';
|
|
816
|
-
id: string;
|
|
817
|
-
task: BackupTask;
|
|
818
|
-
state: BackupState;
|
|
819
|
-
progress: number;
|
|
820
|
-
start_time?: number | null;
|
|
821
|
-
finish_time?: number | null;
|
|
822
|
-
};
|
|
823
|
-
type WSLogEvent = {
|
|
824
|
-
event: 'log';
|
|
825
|
-
stream: 'stdout' | 'stderr';
|
|
826
|
-
message: string;
|
|
827
|
-
};
|
|
828
|
-
type WSLog4jEvent = {
|
|
829
|
-
event: 'log4j';
|
|
830
|
-
logger_name?: string;
|
|
831
|
-
level?: string;
|
|
832
|
-
thread_name?: string;
|
|
833
|
-
timestamp_millis?: number;
|
|
834
|
-
message?: string;
|
|
835
|
-
throwable?: string;
|
|
836
|
-
};
|
|
837
|
-
type WSStatsEvent = {
|
|
838
|
-
event: 'stats';
|
|
839
|
-
cpu_percent: number;
|
|
840
|
-
ram_usage_bytes: number;
|
|
841
|
-
ram_total_bytes: number;
|
|
842
|
-
storage_usage_bytes: number;
|
|
843
|
-
storage_total_bytes: number;
|
|
844
|
-
net_tx_bytes: number;
|
|
845
|
-
net_rx_bytes: number;
|
|
846
|
-
};
|
|
847
|
-
type PowerState = 'running' | 'stopped' | 'starting' | 'stopping' | 'crashed';
|
|
848
|
-
type WSPowerStateEvent = {
|
|
849
|
-
event: 'power-state';
|
|
850
|
-
state: PowerState;
|
|
851
|
-
oom_killed?: boolean;
|
|
852
|
-
exit_code?: number;
|
|
853
|
-
};
|
|
854
|
-
type WSAuthExpiringEvent = {
|
|
855
|
-
event: 'auth-expiring';
|
|
856
|
-
};
|
|
857
|
-
type WSAuthIncorrectEvent = {
|
|
858
|
-
event: 'auth-incorrect';
|
|
859
|
-
};
|
|
860
|
-
type WSAuthOkEvent = {
|
|
861
|
-
event: 'auth-ok';
|
|
862
|
-
};
|
|
863
|
-
type WSInstallationResultEvent = WSInstallationResultOkEvent | WSInstallationResultErrEvent;
|
|
864
|
-
type WSInstallationResultOkEvent = {
|
|
865
|
-
event: 'installation-result';
|
|
866
|
-
result: 'ok';
|
|
867
|
-
};
|
|
868
|
-
type WSInstallationResultErrEvent = {
|
|
869
|
-
event: 'installation-result';
|
|
870
|
-
result: 'err';
|
|
871
|
-
reason?: string;
|
|
872
|
-
};
|
|
873
|
-
type WSUptimeEvent = {
|
|
874
|
-
event: 'uptime';
|
|
875
|
-
uptime: number;
|
|
876
|
-
};
|
|
877
|
-
type WSNewModEvent = {
|
|
878
|
-
event: 'new-mod';
|
|
879
|
-
project_id: string;
|
|
880
|
-
version_id: string;
|
|
881
|
-
};
|
|
882
|
-
type FilesystemOpKind = 'unarchive';
|
|
883
|
-
type FilesystemOpState = 'queued' | 'ongoing' | 'done' | 'cancelled' | 'failure-corrupted' | 'failure-invalid-path';
|
|
884
|
-
type FilesystemOperation = {
|
|
885
|
-
op: FilesystemOpKind;
|
|
886
|
-
id: string;
|
|
887
|
-
progress: number;
|
|
888
|
-
bytes_processed: number;
|
|
889
|
-
files_processed: number;
|
|
890
|
-
state: FilesystemOpState;
|
|
891
|
-
mime: string;
|
|
892
|
-
current_file?: string;
|
|
893
|
-
invalid_path?: string;
|
|
894
|
-
src: string;
|
|
895
|
-
started: string;
|
|
896
|
-
};
|
|
897
|
-
type QueuedFilesystemOp = {
|
|
898
|
-
op: FilesystemOpKind;
|
|
899
|
-
src: string;
|
|
900
|
-
};
|
|
901
|
-
type WSFilesystemOpsEvent = {
|
|
902
|
-
event: 'filesystem-ops';
|
|
903
|
-
all: FilesystemOperation[];
|
|
904
|
-
};
|
|
905
|
-
type ReadinessState = 'deprovisioned' | 'waiting_active_world' | 'waiting_world_spec_details_for_progress' | 'pulling_world_data' | 'migration_zfs' | 'sync_content' | 'container_readying' | 'ready';
|
|
906
|
-
type FlattenedPowerState = 'not_ready' | 'starting' | 'running' | 'stopping' | 'idle';
|
|
907
|
-
type SyncInstallPhase = 'Analyzing' | 'InstallingPack' | 'InstallingLoader' | 'Addons';
|
|
908
|
-
type SyncContentProgress = {
|
|
909
|
-
started_at: string;
|
|
910
|
-
phase: SyncInstallPhase;
|
|
911
|
-
percent: number;
|
|
912
|
-
};
|
|
913
|
-
type SyncContentError = {
|
|
914
|
-
step: string;
|
|
915
|
-
description: string;
|
|
916
|
-
};
|
|
917
|
-
type WSStateEvent = {
|
|
918
|
-
event: 'state';
|
|
919
|
-
debug: string;
|
|
920
|
-
power_variant: FlattenedPowerState;
|
|
921
|
-
exit_code?: number | null;
|
|
922
|
-
was_oom?: boolean;
|
|
923
|
-
target: 'start' | 'stop' | 'restart' | null;
|
|
924
|
-
uptime: number;
|
|
925
|
-
progress: SyncContentProgress | null;
|
|
926
|
-
content_error: SyncContentError | null;
|
|
927
|
-
};
|
|
928
|
-
type WSOutgoingMessage = WSAuthMessage | WSCommandMessage;
|
|
929
|
-
type WSAuthMessage = {
|
|
930
|
-
event: 'auth';
|
|
931
|
-
jwt: string;
|
|
932
|
-
};
|
|
933
|
-
type WSCommandMessage = {
|
|
934
|
-
event: 'command';
|
|
935
|
-
cmd: string;
|
|
936
|
-
};
|
|
937
|
-
type WSEvent = WSBackupProgressEvent | WSLogEvent | WSLog4jEvent | WSStatsEvent | WSPowerStateEvent | WSStateEvent | WSAuthExpiringEvent | WSAuthIncorrectEvent | WSAuthOkEvent | WSInstallationResultEvent | WSUptimeEvent | WSNewModEvent | WSFilesystemOpsEvent;
|
|
938
|
-
type WSEventType = WSEvent['event'];
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
}
|