@pelican.ts/sdk 0.3.4-next.3 → 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/.husky/pre-commit +3 -0
- package/biome.json +39 -0
- package/bun.lock +24 -1
- package/dist/api/index.d.mts +1641 -0
- package/dist/api/index.d.ts +1641 -0
- package/dist/api/index.js +2100 -0
- package/dist/api/index.mjs +2062 -0
- package/dist/index.d.mts +622 -1430
- package/dist/index.d.ts +622 -1430
- package/dist/index.js +532 -444
- package/dist/index.mjs +531 -442
- package/dist/types.d.ts +61 -4
- package/package.json +15 -4
- package/src/api/client/types/server.ts +2 -2
- package/src/api/client/types/user.ts +1 -1
- package/src/api/client/types/websocket.ts +1 -1
- package/src/api/index.ts +17 -0
- package/src/humane/Account.ts +84 -0
- package/src/humane/Client.ts +43 -0
- package/src/humane/Server.ts +217 -0
- package/src/humane/ServerAllocation.ts +39 -0
- package/src/humane/ServerBackup.ts +37 -0
- package/src/humane/ServerDatabase.ts +36 -0
- package/src/humane/ServerFile.ts +73 -0
- package/src/humane/ServerSchedule.ts +126 -0
- package/src/humane/ServerUser.ts +42 -0
- package/src/index.ts +5 -14
- package/src/utils/sized.ts +1 -3
|
@@ -0,0 +1,1641 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import WebSocket from 'isomorphic-ws';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
|
|
5
|
+
type ExactlyOneKey<K extends keyof any, V, KK extends keyof any = K> = {
|
|
6
|
+
[P in K]: {
|
|
7
|
+
[Q in P]: V;
|
|
8
|
+
} & {
|
|
9
|
+
[Q in Exclude<KK, P>]?: never;
|
|
10
|
+
} extends infer O ? {
|
|
11
|
+
[Q in keyof O]: O[Q];
|
|
12
|
+
} : never;
|
|
13
|
+
}[K];
|
|
14
|
+
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
15
|
+
type Nullable<T> = T | null;
|
|
16
|
+
|
|
17
|
+
type User = {
|
|
18
|
+
uuid: string;
|
|
19
|
+
username: string;
|
|
20
|
+
email: string;
|
|
21
|
+
language: string;
|
|
22
|
+
image: string;
|
|
23
|
+
admin: boolean;
|
|
24
|
+
root_admin: boolean;
|
|
25
|
+
"2fa_enabled": boolean;
|
|
26
|
+
created_at: string;
|
|
27
|
+
updated_at: string;
|
|
28
|
+
};
|
|
29
|
+
type APIKey = {
|
|
30
|
+
identifier: string;
|
|
31
|
+
description: string;
|
|
32
|
+
allowed_ips: string[];
|
|
33
|
+
last_used_at: Nullable<string>;
|
|
34
|
+
created_at: string;
|
|
35
|
+
};
|
|
36
|
+
type SSHKey = {
|
|
37
|
+
name: string;
|
|
38
|
+
fingerprint: string;
|
|
39
|
+
pubic_key: string;
|
|
40
|
+
created_at: string;
|
|
41
|
+
};
|
|
42
|
+
type Permission = {
|
|
43
|
+
description: string;
|
|
44
|
+
keys: Record<string, string>;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
declare class Account {
|
|
48
|
+
private readonly r;
|
|
49
|
+
constructor(requester: AxiosInstance);
|
|
50
|
+
info: () => Promise<User>;
|
|
51
|
+
updateEmail: (newEmail: string, password: string) => Promise<void>;
|
|
52
|
+
updatePassword: (newPassword: string) => Promise<void>;
|
|
53
|
+
apiKeys: {
|
|
54
|
+
list: () => Promise<APIKey[]>;
|
|
55
|
+
create: (description: string, allowed_ips?: string[]) => Promise<APIKey & {
|
|
56
|
+
secret_token: string;
|
|
57
|
+
}>;
|
|
58
|
+
delete: (identifier: string) => Promise<void>;
|
|
59
|
+
};
|
|
60
|
+
sshKeys: {
|
|
61
|
+
list: () => Promise<SSHKey[]>;
|
|
62
|
+
create: (name: string, public_key: string) => Promise<SSHKey>;
|
|
63
|
+
delete: (fingerprint: string) => Promise<void>;
|
|
64
|
+
};
|
|
65
|
+
twoFactor: {
|
|
66
|
+
info: () => Promise<{
|
|
67
|
+
image_url_data: string;
|
|
68
|
+
}>;
|
|
69
|
+
enable: (code: string) => Promise<{
|
|
70
|
+
tokens: string[];
|
|
71
|
+
}>;
|
|
72
|
+
disable: (password: string) => Promise<void>;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
type GenericResponse<T, N extends string = string, M = undefined> = {
|
|
77
|
+
object: N;
|
|
78
|
+
attributes: T;
|
|
79
|
+
meta?: M;
|
|
80
|
+
};
|
|
81
|
+
type PaginationMeta = {
|
|
82
|
+
total: number;
|
|
83
|
+
count: number;
|
|
84
|
+
per_page: number;
|
|
85
|
+
current_page: number;
|
|
86
|
+
total_pages: number;
|
|
87
|
+
links: any;
|
|
88
|
+
};
|
|
89
|
+
type GenericListResponse<T> = {
|
|
90
|
+
object: "list";
|
|
91
|
+
data: T[];
|
|
92
|
+
meta?: {
|
|
93
|
+
pagination: PaginationMeta;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
type CustomListResponse<T, M> = {
|
|
97
|
+
object: "list";
|
|
98
|
+
data: T[];
|
|
99
|
+
meta?: M;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
type EggVariable = {
|
|
103
|
+
name: string;
|
|
104
|
+
description: string;
|
|
105
|
+
env_variable: string;
|
|
106
|
+
default_value: string;
|
|
107
|
+
server_value: string;
|
|
108
|
+
is_editable: boolean;
|
|
109
|
+
rules: string;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
type ServerSubuser = {
|
|
113
|
+
uuid: string;
|
|
114
|
+
username: string;
|
|
115
|
+
email: string;
|
|
116
|
+
language: string;
|
|
117
|
+
image: string;
|
|
118
|
+
admin: false;
|
|
119
|
+
root_admin: false;
|
|
120
|
+
"2fa_enabled": boolean;
|
|
121
|
+
created_at: string;
|
|
122
|
+
permissions: SubuserPermission[] | string[];
|
|
123
|
+
};
|
|
124
|
+
type SubuserPermission = "activity.read" | "allocation.create" | "allocation.delete" | "allocation.read" | "allocation.update" | "backup.create" | "backup.delete" | "backup.download" | "backup.read" | "backup.restore" | "control.console" | "control.restart" | "control.start" | "control.stop" | "database.create" | "database.delete" | "database.read" | "database.update" | "database.view-password" | "file.archive" | "file.create" | "file.delete" | "file.read" | "file.read-content" | "file.sftp" | "file.update" | "schedule.create" | "schedule.delete" | "schedule.read" | "schedule.update" | "settings.description" | "settings.reinstall" | "settings.rename" | "startup.docker-image" | "startup.read" | "startup.update" | "user.create" | "user.delete" | "user.read" | "user.update" | "websocket.connect";
|
|
125
|
+
|
|
126
|
+
type ServerLimits = {
|
|
127
|
+
memory: number;
|
|
128
|
+
swap: number;
|
|
129
|
+
disk: number;
|
|
130
|
+
io: number;
|
|
131
|
+
cpu: number;
|
|
132
|
+
threads: Nullable<number | string>;
|
|
133
|
+
oom_disabled: boolean;
|
|
134
|
+
oom_killer: boolean;
|
|
135
|
+
};
|
|
136
|
+
type FeatureLimits = {
|
|
137
|
+
databases: number;
|
|
138
|
+
allocations: number;
|
|
139
|
+
backups: number;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
type ServerAllocation = {
|
|
143
|
+
id: number;
|
|
144
|
+
ip: string;
|
|
145
|
+
alias: Nullable<string>;
|
|
146
|
+
port: number;
|
|
147
|
+
notes: Nullable<string>;
|
|
148
|
+
is_default: boolean;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
type Server = {
|
|
152
|
+
server_owner: boolean;
|
|
153
|
+
identifier: string;
|
|
154
|
+
internal_id?: number;
|
|
155
|
+
uuid: string;
|
|
156
|
+
name: string;
|
|
157
|
+
node: string;
|
|
158
|
+
is_node_under_maintenance: boolean;
|
|
159
|
+
sftp_details: {
|
|
160
|
+
ip: string;
|
|
161
|
+
alias: Nullable<string>;
|
|
162
|
+
port: number;
|
|
163
|
+
};
|
|
164
|
+
description: string;
|
|
165
|
+
limits: ServerLimits;
|
|
166
|
+
invocation: string;
|
|
167
|
+
docker_image: string;
|
|
168
|
+
egg_features: Nullable<string[]>;
|
|
169
|
+
feature_limits: FeatureLimits;
|
|
170
|
+
status: Nullable<unknown>;
|
|
171
|
+
is_suspended: boolean;
|
|
172
|
+
is_installing: boolean;
|
|
173
|
+
is_transferring: boolean;
|
|
174
|
+
relationships: {
|
|
175
|
+
allocations: GenericListResponse<GenericResponse<ServerAllocation, "allocation">>;
|
|
176
|
+
variables: GenericListResponse<GenericResponse<EggVariable, "egg_variable">>;
|
|
177
|
+
egg?: GenericResponse<{
|
|
178
|
+
uuid: string;
|
|
179
|
+
name: string;
|
|
180
|
+
}, "egg">;
|
|
181
|
+
subusers?: GenericListResponse<GenericResponse<ServerSubuser, "server_subuser">>;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
type ServerStats = {
|
|
185
|
+
current_state: "installing" | "install_failed" | "reinstall_failed" | "suspended" | "restoring_backup" | "running" | "stopped" | "offline";
|
|
186
|
+
is_suspended: boolean;
|
|
187
|
+
resources: ServerResources;
|
|
188
|
+
};
|
|
189
|
+
type ServerResources = {
|
|
190
|
+
memory_bytes: number;
|
|
191
|
+
cpu_absolute: number;
|
|
192
|
+
disk_bytes: number;
|
|
193
|
+
network_tx_bytes: number;
|
|
194
|
+
network_rx_bytes: number;
|
|
195
|
+
uptime: number;
|
|
196
|
+
};
|
|
197
|
+
type ServerActivityLog = {
|
|
198
|
+
id: string;
|
|
199
|
+
event: string;
|
|
200
|
+
is_api: boolean;
|
|
201
|
+
ip: string;
|
|
202
|
+
description: Nullable<string>;
|
|
203
|
+
properties: Record<string, string>;
|
|
204
|
+
has_additional_metadata: boolean;
|
|
205
|
+
timestamp: string;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
type ServerDatabase = {
|
|
209
|
+
id: string;
|
|
210
|
+
host: {
|
|
211
|
+
address: string;
|
|
212
|
+
port: number;
|
|
213
|
+
};
|
|
214
|
+
name: string;
|
|
215
|
+
username: string;
|
|
216
|
+
connections_from: string;
|
|
217
|
+
max_connections: number;
|
|
218
|
+
relationships?: {
|
|
219
|
+
password: GenericResponse<{
|
|
220
|
+
password: string;
|
|
221
|
+
}, "database_password">;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
declare class ServerDatabases {
|
|
226
|
+
private readonly r;
|
|
227
|
+
private readonly id;
|
|
228
|
+
constructor(requester: AxiosInstance, id: string);
|
|
229
|
+
list: (include?: ("password")[], page?: number) => Promise<ServerDatabase[]>;
|
|
230
|
+
create: (database: string, remote: string) => Promise<ServerDatabase>;
|
|
231
|
+
rotatePassword: (database_id: string) => Promise<ServerDatabase>;
|
|
232
|
+
delete: (database_id: string) => Promise<void>;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
type FileObject = {
|
|
236
|
+
name: string;
|
|
237
|
+
mode: string;
|
|
238
|
+
mode_bits: string;
|
|
239
|
+
size: number;
|
|
240
|
+
is_file: boolean;
|
|
241
|
+
is_symlink: boolean;
|
|
242
|
+
mimetype: string;
|
|
243
|
+
created_at: string;
|
|
244
|
+
modified_at: string;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
declare class ServerFiles {
|
|
248
|
+
private readonly r;
|
|
249
|
+
private readonly id;
|
|
250
|
+
constructor(requester: AxiosInstance, id: string);
|
|
251
|
+
list: (path?: string) => Promise<FileObject[]>;
|
|
252
|
+
/**
|
|
253
|
+
* Return the contents of a file. To read binary file (non-editable) use {@link download} instead
|
|
254
|
+
*/
|
|
255
|
+
contents: (path: string) => Promise<string>;
|
|
256
|
+
downloadGetUrl: (path: string) => Promise<string>;
|
|
257
|
+
download: (path: string) => Promise<ArrayBuffer>;
|
|
258
|
+
rename: (root: string | undefined, files: {
|
|
259
|
+
from: string;
|
|
260
|
+
to: string;
|
|
261
|
+
}[]) => Promise<void>;
|
|
262
|
+
copy: (location: string) => Promise<void>;
|
|
263
|
+
write: (path: string, content: string) => Promise<void>;
|
|
264
|
+
compress: (root: string | undefined, files: string[], archive_name?: string, extension?: "zip" | "tgz" | "tar.gz" | "txz" | "tar.xz" | "tbz2" | "tar.bz2") => Promise<void>;
|
|
265
|
+
decompress: (root: string | undefined, file: string) => Promise<void>;
|
|
266
|
+
delete: (root: string | undefined, files: string[]) => Promise<void>;
|
|
267
|
+
createFolder: (root: string | undefined, name: string) => Promise<void>;
|
|
268
|
+
chmod: (root: string | undefined, files: Array<{
|
|
269
|
+
file: string;
|
|
270
|
+
mode: number;
|
|
271
|
+
}>) => Promise<void>;
|
|
272
|
+
pullFromRemote: (url: string, directory?: string, filename?: string, // Unused
|
|
273
|
+
use_header?: boolean, // Unused
|
|
274
|
+
foreground?: boolean) => Promise<void>;
|
|
275
|
+
uploadGetUrl: () => Promise<string>;
|
|
276
|
+
upload: (file: File, root?: string) => Promise<void>;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
type Schedule = {
|
|
280
|
+
id: number;
|
|
281
|
+
name: string;
|
|
282
|
+
cron: {
|
|
283
|
+
day_of_week: string;
|
|
284
|
+
day_of_month: string;
|
|
285
|
+
hour: string;
|
|
286
|
+
minute: string;
|
|
287
|
+
};
|
|
288
|
+
is_active: boolean;
|
|
289
|
+
is_processing: boolean;
|
|
290
|
+
only_when_online: boolean;
|
|
291
|
+
last_run_at: Nullable<string>;
|
|
292
|
+
next_run_at: string;
|
|
293
|
+
created_at: string;
|
|
294
|
+
updated_at: string;
|
|
295
|
+
relationships: {
|
|
296
|
+
tasks: GenericListResponse<GenericResponse<ScheduleTask, "schedule_task">>;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
type ScheduleTask = {
|
|
300
|
+
id: number;
|
|
301
|
+
sequence_id: number;
|
|
302
|
+
action: "command" | "power" | "backup" | "delete_files";
|
|
303
|
+
payload: string;
|
|
304
|
+
time_offset: number;
|
|
305
|
+
is_queued: boolean;
|
|
306
|
+
continue_on_failure: boolean;
|
|
307
|
+
created_at: string;
|
|
308
|
+
updated_at: Nullable<string>;
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
declare class ServerSchedules {
|
|
312
|
+
private readonly r;
|
|
313
|
+
private readonly id;
|
|
314
|
+
constructor(requester: AxiosInstance, id: string);
|
|
315
|
+
list: () => Promise<Schedule[]>;
|
|
316
|
+
create: (params: ScheduleCreateParams) => Promise<Schedule>;
|
|
317
|
+
control: (sched_id: number) => ScheduleControl;
|
|
318
|
+
}
|
|
319
|
+
type ScheduleCreateParams = {
|
|
320
|
+
name: string;
|
|
321
|
+
is_active?: boolean;
|
|
322
|
+
only_when_online?: boolean;
|
|
323
|
+
minute: string;
|
|
324
|
+
hour: string;
|
|
325
|
+
day_of_week: string;
|
|
326
|
+
month: string;
|
|
327
|
+
day_of_month: string;
|
|
328
|
+
};
|
|
329
|
+
declare class ScheduleControl {
|
|
330
|
+
private r;
|
|
331
|
+
private readonly id;
|
|
332
|
+
private readonly sched_id;
|
|
333
|
+
constructor(requester: AxiosInstance, id: string, sched_id: number);
|
|
334
|
+
info: () => Promise<Schedule>;
|
|
335
|
+
update: (params: ScheduleCreateParams) => Promise<Schedule>;
|
|
336
|
+
delete: () => Promise<void>;
|
|
337
|
+
execute: () => Promise<void>;
|
|
338
|
+
tasks: {
|
|
339
|
+
create: (opts: PartialBy<Pick<ScheduleTask, "action" | "payload" | "time_offset" | "sequence_id" | "continue_on_failure">, "payload" | "sequence_id" | "continue_on_failure">) => Promise<ScheduleTask>;
|
|
340
|
+
update: <T extends "command" | "power" | "backup" | "delete_files">(task_id: number, opts: PartialBy<Pick<ScheduleTask, "action" | "payload" | "time_offset" | "sequence_id" | "continue_on_failure">, "payload" | "sequence_id" | "continue_on_failure">) => Promise<ScheduleTask>;
|
|
341
|
+
delete: (task_id: number) => Promise<void>;
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
declare class ServerAllocations {
|
|
346
|
+
private readonly r;
|
|
347
|
+
private readonly id;
|
|
348
|
+
constructor(requester: AxiosInstance, id: string);
|
|
349
|
+
list: () => Promise<ServerAllocation[]>;
|
|
350
|
+
autoAssign: () => Promise<ServerAllocation>;
|
|
351
|
+
setNotes: (alloc_id: number, notes: string) => Promise<ServerAllocation>;
|
|
352
|
+
setPrimary: (alloc_id: number) => Promise<ServerAllocation>;
|
|
353
|
+
unassign: (alloc_id: number) => Promise<void>;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
declare class ServerUsers {
|
|
357
|
+
private readonly r;
|
|
358
|
+
private readonly id;
|
|
359
|
+
constructor(requester: AxiosInstance, id: string);
|
|
360
|
+
list: () => Promise<ServerSubuser[]>;
|
|
361
|
+
create: (email: string, permissions: SubuserPermission[] | string[]) => Promise<ServerSubuser>;
|
|
362
|
+
info: (user_uuid: string) => Promise<ServerSubuser>;
|
|
363
|
+
update: (user_uuid: string, permissions: SubuserPermission[] | string[]) => Promise<ServerSubuser>;
|
|
364
|
+
delete: (user_uuid: string) => Promise<void>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
type ServerBackup = {
|
|
368
|
+
uuid: string;
|
|
369
|
+
is_successful: boolean;
|
|
370
|
+
is_locked: boolean;
|
|
371
|
+
name: string;
|
|
372
|
+
ignored_files: string[];
|
|
373
|
+
checksum: Nullable<string>;
|
|
374
|
+
bytes: number;
|
|
375
|
+
created_at: string;
|
|
376
|
+
completed_at: Nullable<string>;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
declare class ServerBackups {
|
|
380
|
+
private readonly r;
|
|
381
|
+
private readonly id;
|
|
382
|
+
constructor(requester: AxiosInstance, id: string);
|
|
383
|
+
list: (page?: number) => Promise<ServerBackup[]>;
|
|
384
|
+
create: (args: {
|
|
385
|
+
name?: string;
|
|
386
|
+
is_locked: boolean;
|
|
387
|
+
ignored_files: string[];
|
|
388
|
+
}) => Promise<ServerBackup>;
|
|
389
|
+
info: (backup_uuid: string) => Promise<ServerBackup>;
|
|
390
|
+
downloadGetUrl: (backup_uuid: string) => Promise<string>;
|
|
391
|
+
download: (backup_uuid: string) => Promise<ArrayBuffer>;
|
|
392
|
+
delete: (backup_uuid: string) => Promise<void>;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
type StartupParams = {
|
|
396
|
+
name: string;
|
|
397
|
+
description: string;
|
|
398
|
+
env_variables: string;
|
|
399
|
+
default_value: string;
|
|
400
|
+
server_value: string;
|
|
401
|
+
is_editable: boolean;
|
|
402
|
+
rules: string;
|
|
403
|
+
};
|
|
404
|
+
type StartupMeta = {
|
|
405
|
+
startup_command: string;
|
|
406
|
+
raw_startup_command: string;
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
declare class ServerStartup {
|
|
410
|
+
private readonly r;
|
|
411
|
+
private readonly id;
|
|
412
|
+
constructor(requester: AxiosInstance, id: string);
|
|
413
|
+
list: () => Promise<CustomListResponse<StartupParams, StartupMeta>>;
|
|
414
|
+
set: (key: string, value: string) => Promise<StartupParams>;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
declare class ServerSettings {
|
|
418
|
+
private readonly r;
|
|
419
|
+
private readonly id;
|
|
420
|
+
constructor(requester: AxiosInstance, id: string);
|
|
421
|
+
rename: (name: string) => Promise<void>;
|
|
422
|
+
updateDescription: (description: Nullable<string>) => Promise<void>;
|
|
423
|
+
reinstall: () => Promise<void>;
|
|
424
|
+
changeDockerImage: (image: string) => Promise<void>;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Source: https://github.com/pterodactyl/panel/blob/1.0-develop/resources/scripts/components/server/events.ts
|
|
429
|
+
*/
|
|
430
|
+
declare enum SOCKET_EVENT {
|
|
431
|
+
AUTH_SUCCESS = "auth success",
|
|
432
|
+
DAEMON_MESSAGE = "daemon message",
|
|
433
|
+
DAEMON_ERROR = "daemon error",
|
|
434
|
+
INSTALL_OUTPUT = "install output",
|
|
435
|
+
INSTALL_STARTED = "install started",
|
|
436
|
+
INSTALL_COMPLETED = "install completed",
|
|
437
|
+
CONSOLE_OUTPUT = "console output",
|
|
438
|
+
STATUS = "status",
|
|
439
|
+
STATS = "stats",
|
|
440
|
+
TRANSFER_LOGS = "transfer logs",
|
|
441
|
+
TRANSFER_STATUS = "transfer status",
|
|
442
|
+
BACKUP_COMPLETED = "backup completed",
|
|
443
|
+
BACKUP_RESTORE_COMPLETED = "backup restore completed",
|
|
444
|
+
TOKEN_EXPIRING = "token expiring",
|
|
445
|
+
TOKEN_EXPIRED = "token expired",
|
|
446
|
+
JWT_ERROR = "jwt error"
|
|
447
|
+
}
|
|
448
|
+
type BackupCompletedJson = {
|
|
449
|
+
checksum: string;
|
|
450
|
+
checksum_type: 'sha1';
|
|
451
|
+
file_size: number;
|
|
452
|
+
is_successful: boolean;
|
|
453
|
+
uuid: string;
|
|
454
|
+
};
|
|
455
|
+
type PowerState = 'starting' | 'stopping' | 'running' | 'offline';
|
|
456
|
+
type StatsWsJson = {
|
|
457
|
+
memory_bytes: number;
|
|
458
|
+
memory_limit_bytes: number;
|
|
459
|
+
cpu_absolute: number;
|
|
460
|
+
network: {
|
|
461
|
+
rx_bytes: number;
|
|
462
|
+
tx_bytes: number;
|
|
463
|
+
};
|
|
464
|
+
state: PowerState;
|
|
465
|
+
uptime: number;
|
|
466
|
+
disk_bytes: number;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
type ServerSignalOption = 'start' | 'stop' | 'restart' | 'kill';
|
|
470
|
+
|
|
471
|
+
type SocketEventPayloadMap = {
|
|
472
|
+
[SOCKET_EVENT.AUTH_SUCCESS]: undefined;
|
|
473
|
+
[SOCKET_EVENT.STATUS]: PowerState;
|
|
474
|
+
[SOCKET_EVENT.CONSOLE_OUTPUT]: string;
|
|
475
|
+
[SOCKET_EVENT.STATS]: StatsWsJson;
|
|
476
|
+
[SOCKET_EVENT.DAEMON_ERROR]: undefined;
|
|
477
|
+
[SOCKET_EVENT.DAEMON_MESSAGE]: string;
|
|
478
|
+
[SOCKET_EVENT.INSTALL_OUTPUT]: string;
|
|
479
|
+
[SOCKET_EVENT.INSTALL_STARTED]: undefined;
|
|
480
|
+
[SOCKET_EVENT.INSTALL_COMPLETED]: undefined;
|
|
481
|
+
[SOCKET_EVENT.TRANSFER_LOGS]: string;
|
|
482
|
+
[SOCKET_EVENT.TRANSFER_STATUS]: string;
|
|
483
|
+
[SOCKET_EVENT.BACKUP_COMPLETED]: BackupCompletedJson;
|
|
484
|
+
[SOCKET_EVENT.BACKUP_RESTORE_COMPLETED]: undefined;
|
|
485
|
+
[SOCKET_EVENT.TOKEN_EXPIRING]: undefined;
|
|
486
|
+
[SOCKET_EVENT.TOKEN_EXPIRED]: undefined;
|
|
487
|
+
[SOCKET_EVENT.JWT_ERROR]: string;
|
|
488
|
+
};
|
|
489
|
+
type Listener<E extends SOCKET_EVENT> = SocketEventPayloadMap[E] extends undefined ? () => void : (payload: SocketEventPayloadMap[E]) => void;
|
|
490
|
+
type CloseEventLike = Parameters<NonNullable<WebSocket["onclose"]>>[0];
|
|
491
|
+
type ErrorEventLike = Parameters<NonNullable<WebSocket["onerror"]>>[0];
|
|
492
|
+
declare class ServerWebsocket {
|
|
493
|
+
private readonly r;
|
|
494
|
+
private readonly serverId;
|
|
495
|
+
private socket?;
|
|
496
|
+
private currentToken?;
|
|
497
|
+
private readonly bus;
|
|
498
|
+
private debugLogging;
|
|
499
|
+
private stripColors;
|
|
500
|
+
private detachMessageListener?;
|
|
501
|
+
constructor(requester: AxiosInstance, id: string, stripColors?: boolean);
|
|
502
|
+
on<E extends SOCKET_EVENT>(event: E, listener: Listener<E>): () => void;
|
|
503
|
+
deregister<E extends SOCKET_EVENT>(event: E, listener: Listener<E>): void;
|
|
504
|
+
private emit;
|
|
505
|
+
connect(resumable?: boolean, debugLogging?: boolean): Promise<void>;
|
|
506
|
+
onSocketDisconnect(handler: (event: CloseEventLike) => void): void;
|
|
507
|
+
onSocketError(handler: (event: ErrorEventLike) => void): void;
|
|
508
|
+
makeResumable(disconnectsToo: boolean): void;
|
|
509
|
+
private attachMessageListener;
|
|
510
|
+
private handleIncomingMessage;
|
|
511
|
+
private parseMessage;
|
|
512
|
+
private normalisePayload;
|
|
513
|
+
private dispatchMessage;
|
|
514
|
+
private refreshCredentials;
|
|
515
|
+
private authenticate;
|
|
516
|
+
disconnect(): void;
|
|
517
|
+
requestStats(): void;
|
|
518
|
+
requestLogs(): void;
|
|
519
|
+
private send;
|
|
520
|
+
getStats(): Promise<StatsWsJson>;
|
|
521
|
+
getLogs(): Promise<string[]>;
|
|
522
|
+
sendPoweraction(action: ServerSignalOption): void;
|
|
523
|
+
sendCommand(cmd: string): void;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
declare class ServerActivity {
|
|
527
|
+
private readonly r;
|
|
528
|
+
private readonly id;
|
|
529
|
+
constructor(r: AxiosInstance, id: string);
|
|
530
|
+
list: (page?: number, per_page?: number) => Promise<ServerActivityLog[]>;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
declare class ServerClient {
|
|
534
|
+
private readonly r;
|
|
535
|
+
private readonly id;
|
|
536
|
+
activity: ServerActivity;
|
|
537
|
+
databases: ServerDatabases;
|
|
538
|
+
files: ServerFiles;
|
|
539
|
+
schedules: ServerSchedules;
|
|
540
|
+
allocations: ServerAllocations;
|
|
541
|
+
users: ServerUsers;
|
|
542
|
+
backups: ServerBackups;
|
|
543
|
+
startup: ServerStartup;
|
|
544
|
+
variables: ServerStartup;
|
|
545
|
+
settings: ServerSettings;
|
|
546
|
+
constructor(requester: AxiosInstance, id: string);
|
|
547
|
+
info: (include?: ("egg" | "subusers")[]) => Promise<Server>;
|
|
548
|
+
websocket: (stripColors?: boolean) => ServerWebsocket;
|
|
549
|
+
resources: () => Promise<ServerStats>;
|
|
550
|
+
command: (command: string) => Promise<void>;
|
|
551
|
+
power: (signal: "start" | "stop" | "restart" | "kill") => Promise<void>;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
declare class Client$1 {
|
|
555
|
+
account: Account;
|
|
556
|
+
private readonly r;
|
|
557
|
+
constructor(requester: AxiosInstance);
|
|
558
|
+
get $r(): AxiosInstance;
|
|
559
|
+
listPermissions: () => Promise<Record<string, Permission>>;
|
|
560
|
+
listServers: (type?: "accessible" | "mine" | "admin" | "admin-all", page?: number, per_page?: number, include?: ("egg" | "subusers")[]) => Promise<Server[]>;
|
|
561
|
+
server: (uuid: string) => ServerClient;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
type Container = {
|
|
565
|
+
startup_command: string;
|
|
566
|
+
image: string;
|
|
567
|
+
installed: number;
|
|
568
|
+
environment: Record<string, string>;
|
|
569
|
+
ports: number[];
|
|
570
|
+
volumes: string[];
|
|
571
|
+
network_mode: string;
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
type ApplicationServer = {
|
|
575
|
+
id: number;
|
|
576
|
+
external_id: Nullable<string>;
|
|
577
|
+
uuid: string;
|
|
578
|
+
identifier: string;
|
|
579
|
+
name: string;
|
|
580
|
+
description: string;
|
|
581
|
+
status: Nullable<unknown>;
|
|
582
|
+
docker_labels: Record<string, string>;
|
|
583
|
+
suspended: boolean;
|
|
584
|
+
limits: ServerLimits;
|
|
585
|
+
feature_limits: FeatureLimits;
|
|
586
|
+
user: number;
|
|
587
|
+
node: number;
|
|
588
|
+
allocation: number;
|
|
589
|
+
egg: number;
|
|
590
|
+
container: Container;
|
|
591
|
+
created_at: string;
|
|
592
|
+
updated_at: Nullable<string>;
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
type ApplicationUser = {
|
|
596
|
+
id: number;
|
|
597
|
+
external_id: Nullable<string>;
|
|
598
|
+
uuid: string;
|
|
599
|
+
username: string;
|
|
600
|
+
email: string;
|
|
601
|
+
language: string;
|
|
602
|
+
root_admin: string;
|
|
603
|
+
"2fa_enabled": boolean;
|
|
604
|
+
"2fa": boolean;
|
|
605
|
+
created_at: string;
|
|
606
|
+
updated_at: Nullable<string>;
|
|
607
|
+
relationships?: {
|
|
608
|
+
servers: GenericListResponse<GenericResponse<ApplicationServer>>;
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
type ApplicationUserApiKey = {
|
|
612
|
+
id: number;
|
|
613
|
+
user_id: number;
|
|
614
|
+
key_type: 1;
|
|
615
|
+
identifier: string;
|
|
616
|
+
memo: string;
|
|
617
|
+
allowed_ips: Array<string>;
|
|
618
|
+
permissions: [];
|
|
619
|
+
last_used_at: Nullable<string>;
|
|
620
|
+
expires_at: Nullable<string>;
|
|
621
|
+
created_at: string;
|
|
622
|
+
updated_at: string;
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
declare class Users {
|
|
626
|
+
private readonly r;
|
|
627
|
+
constructor(requester: AxiosInstance);
|
|
628
|
+
list: (opts: ListType, page?: number) => Promise<ApplicationUser[]>;
|
|
629
|
+
info: (id: number, { include }: {
|
|
630
|
+
include?: ("servers")[];
|
|
631
|
+
}) => Promise<ApplicationUser>;
|
|
632
|
+
infoByExternal: (external_id: string, { include }: {
|
|
633
|
+
include?: ("servers")[];
|
|
634
|
+
}) => Promise<ApplicationUser>;
|
|
635
|
+
create: (user: z.infer<typeof CreateSchema>) => Promise<ApplicationUser>;
|
|
636
|
+
update: (id: number, user: z.infer<typeof CreateSchema>) => Promise<ApplicationUser>;
|
|
637
|
+
delete: (id: number) => Promise<void>;
|
|
638
|
+
addRoles: (id: number, roles: number[]) => Promise<void>;
|
|
639
|
+
removeRoles: (id: number, roles: number[]) => Promise<void>;
|
|
640
|
+
apiKeys: {
|
|
641
|
+
list: (id: number) => Promise<ApplicationUserApiKey[]>;
|
|
642
|
+
create: (id: number, description: string, allowed_ips?: string[]) => Promise<ApplicationUserApiKey & {
|
|
643
|
+
secret_token: string;
|
|
644
|
+
}>;
|
|
645
|
+
delete: (id: number, identifier: string) => Promise<void>;
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
type ListType = {
|
|
649
|
+
include?: ("servers")[];
|
|
650
|
+
filters?: ListFilters;
|
|
651
|
+
sort?: ListSort;
|
|
652
|
+
};
|
|
653
|
+
type ListFilters = {
|
|
654
|
+
[key in "email" | "uuid" | "username" | "external_id"]: string;
|
|
655
|
+
};
|
|
656
|
+
type ListSort = ExactlyOneKey<"id" | "uuid", "asc" | "desc">;
|
|
657
|
+
declare const CreateSchema: z.ZodObject<{
|
|
658
|
+
email: z.ZodEmail;
|
|
659
|
+
external_id: z.ZodOptional<z.ZodString>;
|
|
660
|
+
username: z.ZodString;
|
|
661
|
+
password: z.ZodOptional<z.ZodString>;
|
|
662
|
+
language: z.ZodEnum<{
|
|
663
|
+
id: "id";
|
|
664
|
+
af: "af";
|
|
665
|
+
ak: "ak";
|
|
666
|
+
am: "am";
|
|
667
|
+
ar: "ar";
|
|
668
|
+
as: "as";
|
|
669
|
+
az: "az";
|
|
670
|
+
be: "be";
|
|
671
|
+
bg: "bg";
|
|
672
|
+
bm: "bm";
|
|
673
|
+
bn: "bn";
|
|
674
|
+
bo: "bo";
|
|
675
|
+
br: "br";
|
|
676
|
+
bs: "bs";
|
|
677
|
+
ca: "ca";
|
|
678
|
+
ce: "ce";
|
|
679
|
+
cs: "cs";
|
|
680
|
+
cv: "cv";
|
|
681
|
+
cy: "cy";
|
|
682
|
+
da: "da";
|
|
683
|
+
de: "de";
|
|
684
|
+
dz: "dz";
|
|
685
|
+
ee: "ee";
|
|
686
|
+
el: "el";
|
|
687
|
+
en: "en";
|
|
688
|
+
eo: "eo";
|
|
689
|
+
es: "es";
|
|
690
|
+
et: "et";
|
|
691
|
+
eu: "eu";
|
|
692
|
+
fa: "fa";
|
|
693
|
+
ff: "ff";
|
|
694
|
+
fi: "fi";
|
|
695
|
+
fo: "fo";
|
|
696
|
+
fr: "fr";
|
|
697
|
+
fy: "fy";
|
|
698
|
+
ga: "ga";
|
|
699
|
+
gd: "gd";
|
|
700
|
+
gl: "gl";
|
|
701
|
+
gu: "gu";
|
|
702
|
+
gv: "gv";
|
|
703
|
+
ha: "ha";
|
|
704
|
+
he: "he";
|
|
705
|
+
hi: "hi";
|
|
706
|
+
hr: "hr";
|
|
707
|
+
hu: "hu";
|
|
708
|
+
hy: "hy";
|
|
709
|
+
ia: "ia";
|
|
710
|
+
ig: "ig";
|
|
711
|
+
ii: "ii";
|
|
712
|
+
is: "is";
|
|
713
|
+
it: "it";
|
|
714
|
+
ja: "ja";
|
|
715
|
+
jv: "jv";
|
|
716
|
+
ka: "ka";
|
|
717
|
+
ki: "ki";
|
|
718
|
+
kk: "kk";
|
|
719
|
+
kl: "kl";
|
|
720
|
+
km: "km";
|
|
721
|
+
kn: "kn";
|
|
722
|
+
ko: "ko";
|
|
723
|
+
ks: "ks";
|
|
724
|
+
ku: "ku";
|
|
725
|
+
kw: "kw";
|
|
726
|
+
ky: "ky";
|
|
727
|
+
lb: "lb";
|
|
728
|
+
lg: "lg";
|
|
729
|
+
ln: "ln";
|
|
730
|
+
lo: "lo";
|
|
731
|
+
lt: "lt";
|
|
732
|
+
lu: "lu";
|
|
733
|
+
lv: "lv";
|
|
734
|
+
mg: "mg";
|
|
735
|
+
mi: "mi";
|
|
736
|
+
mk: "mk";
|
|
737
|
+
ml: "ml";
|
|
738
|
+
mn: "mn";
|
|
739
|
+
mr: "mr";
|
|
740
|
+
ms: "ms";
|
|
741
|
+
mt: "mt";
|
|
742
|
+
my: "my";
|
|
743
|
+
nb: "nb";
|
|
744
|
+
nd: "nd";
|
|
745
|
+
ne: "ne";
|
|
746
|
+
nl: "nl";
|
|
747
|
+
nn: "nn";
|
|
748
|
+
no: "no";
|
|
749
|
+
om: "om";
|
|
750
|
+
or: "or";
|
|
751
|
+
os: "os";
|
|
752
|
+
pa: "pa";
|
|
753
|
+
pl: "pl";
|
|
754
|
+
ps: "ps";
|
|
755
|
+
pt: "pt";
|
|
756
|
+
qu: "qu";
|
|
757
|
+
rm: "rm";
|
|
758
|
+
rn: "rn";
|
|
759
|
+
ro: "ro";
|
|
760
|
+
ru: "ru";
|
|
761
|
+
rw: "rw";
|
|
762
|
+
sa: "sa";
|
|
763
|
+
sc: "sc";
|
|
764
|
+
sd: "sd";
|
|
765
|
+
se: "se";
|
|
766
|
+
sg: "sg";
|
|
767
|
+
si: "si";
|
|
768
|
+
sk: "sk";
|
|
769
|
+
sl: "sl";
|
|
770
|
+
sn: "sn";
|
|
771
|
+
so: "so";
|
|
772
|
+
sq: "sq";
|
|
773
|
+
sr: "sr";
|
|
774
|
+
su: "su";
|
|
775
|
+
sv: "sv";
|
|
776
|
+
sw: "sw";
|
|
777
|
+
ta: "ta";
|
|
778
|
+
te: "te";
|
|
779
|
+
tg: "tg";
|
|
780
|
+
th: "th";
|
|
781
|
+
ti: "ti";
|
|
782
|
+
tk: "tk";
|
|
783
|
+
to: "to";
|
|
784
|
+
tr: "tr";
|
|
785
|
+
tt: "tt";
|
|
786
|
+
ug: "ug";
|
|
787
|
+
uk: "uk";
|
|
788
|
+
ur: "ur";
|
|
789
|
+
uz: "uz";
|
|
790
|
+
vi: "vi";
|
|
791
|
+
wo: "wo";
|
|
792
|
+
xh: "xh";
|
|
793
|
+
yi: "yi";
|
|
794
|
+
yo: "yo";
|
|
795
|
+
zh: "zh";
|
|
796
|
+
zu: "zu";
|
|
797
|
+
}>;
|
|
798
|
+
timezone: z.ZodEnum<{
|
|
799
|
+
"Africa/Abidjan": "Africa/Abidjan";
|
|
800
|
+
"Africa/Accra": "Africa/Accra";
|
|
801
|
+
"Africa/Addis_Ababa": "Africa/Addis_Ababa";
|
|
802
|
+
"Africa/Algiers": "Africa/Algiers";
|
|
803
|
+
"Africa/Asmara": "Africa/Asmara";
|
|
804
|
+
"Africa/Bamako": "Africa/Bamako";
|
|
805
|
+
"Africa/Bangui": "Africa/Bangui";
|
|
806
|
+
"Africa/Banjul": "Africa/Banjul";
|
|
807
|
+
"Africa/Bissau": "Africa/Bissau";
|
|
808
|
+
"Africa/Blantyre": "Africa/Blantyre";
|
|
809
|
+
"Africa/Brazzaville": "Africa/Brazzaville";
|
|
810
|
+
"Africa/Bujumbura": "Africa/Bujumbura";
|
|
811
|
+
"Africa/Cairo": "Africa/Cairo";
|
|
812
|
+
"Africa/Casablanca": "Africa/Casablanca";
|
|
813
|
+
"Africa/Ceuta": "Africa/Ceuta";
|
|
814
|
+
"Africa/Conakry": "Africa/Conakry";
|
|
815
|
+
"Africa/Dakar": "Africa/Dakar";
|
|
816
|
+
"Africa/Dar_es_Salaam": "Africa/Dar_es_Salaam";
|
|
817
|
+
"Africa/Djibouti": "Africa/Djibouti";
|
|
818
|
+
"Africa/Douala": "Africa/Douala";
|
|
819
|
+
"Africa/El_Aaiun": "Africa/El_Aaiun";
|
|
820
|
+
"Africa/Freetown": "Africa/Freetown";
|
|
821
|
+
"Africa/Gaborone": "Africa/Gaborone";
|
|
822
|
+
"Africa/Harare": "Africa/Harare";
|
|
823
|
+
"Africa/Johannesburg": "Africa/Johannesburg";
|
|
824
|
+
"Africa/Juba": "Africa/Juba";
|
|
825
|
+
"Africa/Kampala": "Africa/Kampala";
|
|
826
|
+
"Africa/Khartoum": "Africa/Khartoum";
|
|
827
|
+
"Africa/Kigali": "Africa/Kigali";
|
|
828
|
+
"Africa/Kinshasa": "Africa/Kinshasa";
|
|
829
|
+
"Africa/Lagos": "Africa/Lagos";
|
|
830
|
+
"Africa/Libreville": "Africa/Libreville";
|
|
831
|
+
"Africa/Lome": "Africa/Lome";
|
|
832
|
+
"Africa/Luanda": "Africa/Luanda";
|
|
833
|
+
"Africa/Lubumbashi": "Africa/Lubumbashi";
|
|
834
|
+
"Africa/Lusaka": "Africa/Lusaka";
|
|
835
|
+
"Africa/Malabo": "Africa/Malabo";
|
|
836
|
+
"Africa/Maputo": "Africa/Maputo";
|
|
837
|
+
"Africa/Maseru": "Africa/Maseru";
|
|
838
|
+
"Africa/Mbabane": "Africa/Mbabane";
|
|
839
|
+
"Africa/Mogadishu": "Africa/Mogadishu";
|
|
840
|
+
"Africa/Monrovia": "Africa/Monrovia";
|
|
841
|
+
"Africa/Nairobi": "Africa/Nairobi";
|
|
842
|
+
"Africa/Ndjamena": "Africa/Ndjamena";
|
|
843
|
+
"Africa/Niamey": "Africa/Niamey";
|
|
844
|
+
"Africa/Nouakchott": "Africa/Nouakchott";
|
|
845
|
+
"Africa/Ouagadougou": "Africa/Ouagadougou";
|
|
846
|
+
"Africa/Porto-Novo": "Africa/Porto-Novo";
|
|
847
|
+
"Africa/Sao_Tome": "Africa/Sao_Tome";
|
|
848
|
+
"Africa/Tripoli": "Africa/Tripoli";
|
|
849
|
+
"Africa/Tunis": "Africa/Tunis";
|
|
850
|
+
"Africa/Windhoek": "Africa/Windhoek";
|
|
851
|
+
"America/Adak": "America/Adak";
|
|
852
|
+
"America/Anchorage": "America/Anchorage";
|
|
853
|
+
"America/Anguilla": "America/Anguilla";
|
|
854
|
+
"America/Antigua": "America/Antigua";
|
|
855
|
+
"America/Araguaina": "America/Araguaina";
|
|
856
|
+
"America/Argentina/Buenos_Aires": "America/Argentina/Buenos_Aires";
|
|
857
|
+
"America/Argentina/Catamarca": "America/Argentina/Catamarca";
|
|
858
|
+
"America/Argentina/Cordoba": "America/Argentina/Cordoba";
|
|
859
|
+
"America/Argentina/Jujuy": "America/Argentina/Jujuy";
|
|
860
|
+
"America/Argentina/La_Rioja": "America/Argentina/La_Rioja";
|
|
861
|
+
"America/Argentina/Mendoza": "America/Argentina/Mendoza";
|
|
862
|
+
"America/Argentina/Rio_Gallegos": "America/Argentina/Rio_Gallegos";
|
|
863
|
+
"America/Argentina/Salta": "America/Argentina/Salta";
|
|
864
|
+
"America/Argentina/San_Juan": "America/Argentina/San_Juan";
|
|
865
|
+
"America/Argentina/San_Luis": "America/Argentina/San_Luis";
|
|
866
|
+
"America/Argentina/Tucuman": "America/Argentina/Tucuman";
|
|
867
|
+
"America/Argentina/Ushuaia": "America/Argentina/Ushuaia";
|
|
868
|
+
"America/Aruba": "America/Aruba";
|
|
869
|
+
"America/Asuncion": "America/Asuncion";
|
|
870
|
+
"America/Atikokan": "America/Atikokan";
|
|
871
|
+
"America/Bahia": "America/Bahia";
|
|
872
|
+
"America/Bahia_Banderas": "America/Bahia_Banderas";
|
|
873
|
+
"America/Barbados": "America/Barbados";
|
|
874
|
+
"America/Belem": "America/Belem";
|
|
875
|
+
"America/Belize": "America/Belize";
|
|
876
|
+
"America/Blanc-Sablon": "America/Blanc-Sablon";
|
|
877
|
+
"America/Boa_Vista": "America/Boa_Vista";
|
|
878
|
+
"America/Bogota": "America/Bogota";
|
|
879
|
+
"America/Boise": "America/Boise";
|
|
880
|
+
"America/Cambridge_Bay": "America/Cambridge_Bay";
|
|
881
|
+
"America/Campo_Grande": "America/Campo_Grande";
|
|
882
|
+
"America/Cancun": "America/Cancun";
|
|
883
|
+
"America/Caracas": "America/Caracas";
|
|
884
|
+
"America/Cayenne": "America/Cayenne";
|
|
885
|
+
"America/Cayman": "America/Cayman";
|
|
886
|
+
"America/Chicago": "America/Chicago";
|
|
887
|
+
"America/Chihuahua": "America/Chihuahua";
|
|
888
|
+
"America/Ciudad_Juarez": "America/Ciudad_Juarez";
|
|
889
|
+
"America/Costa_Rica": "America/Costa_Rica";
|
|
890
|
+
"America/Coyhaique": "America/Coyhaique";
|
|
891
|
+
"America/Creston": "America/Creston";
|
|
892
|
+
"America/Cuiaba": "America/Cuiaba";
|
|
893
|
+
"America/Curacao": "America/Curacao";
|
|
894
|
+
"America/Danmarkshavn": "America/Danmarkshavn";
|
|
895
|
+
"America/Dawson": "America/Dawson";
|
|
896
|
+
"America/Dawson_Creek": "America/Dawson_Creek";
|
|
897
|
+
"America/Denver": "America/Denver";
|
|
898
|
+
"America/Detroit": "America/Detroit";
|
|
899
|
+
"America/Dominica": "America/Dominica";
|
|
900
|
+
"America/Edmonton": "America/Edmonton";
|
|
901
|
+
"America/Eirunepe": "America/Eirunepe";
|
|
902
|
+
"America/El_Salvador": "America/El_Salvador";
|
|
903
|
+
"America/Fort_Nelson": "America/Fort_Nelson";
|
|
904
|
+
"America/Fortaleza": "America/Fortaleza";
|
|
905
|
+
"America/Glace_Bay": "America/Glace_Bay";
|
|
906
|
+
"America/Goose_Bay": "America/Goose_Bay";
|
|
907
|
+
"America/Grand_Turk": "America/Grand_Turk";
|
|
908
|
+
"America/Grenada": "America/Grenada";
|
|
909
|
+
"America/Guadeloupe": "America/Guadeloupe";
|
|
910
|
+
"America/Guatemala": "America/Guatemala";
|
|
911
|
+
"America/Guayaquil": "America/Guayaquil";
|
|
912
|
+
"America/Guyana": "America/Guyana";
|
|
913
|
+
"America/Halifax": "America/Halifax";
|
|
914
|
+
"America/Havana": "America/Havana";
|
|
915
|
+
"America/Hermosillo": "America/Hermosillo";
|
|
916
|
+
"America/Indiana/Indianapolis": "America/Indiana/Indianapolis";
|
|
917
|
+
"America/Indiana/Knox": "America/Indiana/Knox";
|
|
918
|
+
"America/Indiana/Marengo": "America/Indiana/Marengo";
|
|
919
|
+
"America/Indiana/Petersburg": "America/Indiana/Petersburg";
|
|
920
|
+
"America/Indiana/Tell_City": "America/Indiana/Tell_City";
|
|
921
|
+
"America/Indiana/Vevay": "America/Indiana/Vevay";
|
|
922
|
+
"America/Indiana/Vincennes": "America/Indiana/Vincennes";
|
|
923
|
+
"America/Indiana/Winamac": "America/Indiana/Winamac";
|
|
924
|
+
"America/Inuvik": "America/Inuvik";
|
|
925
|
+
"America/Iqaluit": "America/Iqaluit";
|
|
926
|
+
"America/Jamaica": "America/Jamaica";
|
|
927
|
+
"America/Juneau": "America/Juneau";
|
|
928
|
+
"America/Kentucky/Louisville": "America/Kentucky/Louisville";
|
|
929
|
+
"America/Kentucky/Monticello": "America/Kentucky/Monticello";
|
|
930
|
+
"America/Kralendijk": "America/Kralendijk";
|
|
931
|
+
"America/La_Paz": "America/La_Paz";
|
|
932
|
+
"America/Lima": "America/Lima";
|
|
933
|
+
"America/Los_Angeles": "America/Los_Angeles";
|
|
934
|
+
"America/Lower_Princes": "America/Lower_Princes";
|
|
935
|
+
"America/Maceio": "America/Maceio";
|
|
936
|
+
"America/Managua": "America/Managua";
|
|
937
|
+
"America/Manaus": "America/Manaus";
|
|
938
|
+
"America/Marigot": "America/Marigot";
|
|
939
|
+
"America/Martinique": "America/Martinique";
|
|
940
|
+
"America/Matamoros": "America/Matamoros";
|
|
941
|
+
"America/Mazatlan": "America/Mazatlan";
|
|
942
|
+
"America/Menominee": "America/Menominee";
|
|
943
|
+
"America/Merida": "America/Merida";
|
|
944
|
+
"America/Metlakatla": "America/Metlakatla";
|
|
945
|
+
"America/Mexico_City": "America/Mexico_City";
|
|
946
|
+
"America/Miquelon": "America/Miquelon";
|
|
947
|
+
"America/Moncton": "America/Moncton";
|
|
948
|
+
"America/Monterrey": "America/Monterrey";
|
|
949
|
+
"America/Montevideo": "America/Montevideo";
|
|
950
|
+
"America/Montserrat": "America/Montserrat";
|
|
951
|
+
"America/Nassau": "America/Nassau";
|
|
952
|
+
"America/New_York": "America/New_York";
|
|
953
|
+
"America/Nome": "America/Nome";
|
|
954
|
+
"America/Noronha": "America/Noronha";
|
|
955
|
+
"America/North_Dakota/Beulah": "America/North_Dakota/Beulah";
|
|
956
|
+
"America/North_Dakota/Center": "America/North_Dakota/Center";
|
|
957
|
+
"America/North_Dakota/New_Salem": "America/North_Dakota/New_Salem";
|
|
958
|
+
"America/Nuuk": "America/Nuuk";
|
|
959
|
+
"America/Ojinaga": "America/Ojinaga";
|
|
960
|
+
"America/Panama": "America/Panama";
|
|
961
|
+
"America/Paramaribo": "America/Paramaribo";
|
|
962
|
+
"America/Phoenix": "America/Phoenix";
|
|
963
|
+
"America/Port-au-Prince": "America/Port-au-Prince";
|
|
964
|
+
"America/Port_of_Spain": "America/Port_of_Spain";
|
|
965
|
+
"America/Porto_Velho": "America/Porto_Velho";
|
|
966
|
+
"America/Puerto_Rico": "America/Puerto_Rico";
|
|
967
|
+
"America/Punta_Arenas": "America/Punta_Arenas";
|
|
968
|
+
"America/Rankin_Inlet": "America/Rankin_Inlet";
|
|
969
|
+
"America/Recife": "America/Recife";
|
|
970
|
+
"America/Regina": "America/Regina";
|
|
971
|
+
"America/Resolute": "America/Resolute";
|
|
972
|
+
"America/Rio_Branco": "America/Rio_Branco";
|
|
973
|
+
"America/Santarem": "America/Santarem";
|
|
974
|
+
"America/Santiago": "America/Santiago";
|
|
975
|
+
"America/Santo_Domingo": "America/Santo_Domingo";
|
|
976
|
+
"America/Sao_Paulo": "America/Sao_Paulo";
|
|
977
|
+
"America/Scoresbysund": "America/Scoresbysund";
|
|
978
|
+
"America/Sitka": "America/Sitka";
|
|
979
|
+
"America/St_Barthelemy": "America/St_Barthelemy";
|
|
980
|
+
"America/St_Johns": "America/St_Johns";
|
|
981
|
+
"America/St_Kitts": "America/St_Kitts";
|
|
982
|
+
"America/St_Lucia": "America/St_Lucia";
|
|
983
|
+
"America/St_Thomas": "America/St_Thomas";
|
|
984
|
+
"America/St_Vincent": "America/St_Vincent";
|
|
985
|
+
"America/Swift_Current": "America/Swift_Current";
|
|
986
|
+
"America/Tegucigalpa": "America/Tegucigalpa";
|
|
987
|
+
"America/Thule": "America/Thule";
|
|
988
|
+
"America/Tijuana": "America/Tijuana";
|
|
989
|
+
"America/Toronto": "America/Toronto";
|
|
990
|
+
"America/Tortola": "America/Tortola";
|
|
991
|
+
"America/Vancouver": "America/Vancouver";
|
|
992
|
+
"America/Whitehorse": "America/Whitehorse";
|
|
993
|
+
"America/Winnipeg": "America/Winnipeg";
|
|
994
|
+
"America/Yakutat": "America/Yakutat";
|
|
995
|
+
"Antarctica/Casey": "Antarctica/Casey";
|
|
996
|
+
"Antarctica/Davis": "Antarctica/Davis";
|
|
997
|
+
"Antarctica/DumontDUrville": "Antarctica/DumontDUrville";
|
|
998
|
+
"Antarctica/Macquarie": "Antarctica/Macquarie";
|
|
999
|
+
"Antarctica/Mawson": "Antarctica/Mawson";
|
|
1000
|
+
"Antarctica/McMurdo": "Antarctica/McMurdo";
|
|
1001
|
+
"Antarctica/Palmer": "Antarctica/Palmer";
|
|
1002
|
+
"Antarctica/Rothera": "Antarctica/Rothera";
|
|
1003
|
+
"Antarctica/Syowa": "Antarctica/Syowa";
|
|
1004
|
+
"Antarctica/Troll": "Antarctica/Troll";
|
|
1005
|
+
"Antarctica/Vostok": "Antarctica/Vostok";
|
|
1006
|
+
"Arctic/Longyearbyen": "Arctic/Longyearbyen";
|
|
1007
|
+
"Asia/Aden": "Asia/Aden";
|
|
1008
|
+
"Asia/Almaty": "Asia/Almaty";
|
|
1009
|
+
"Asia/Amman": "Asia/Amman";
|
|
1010
|
+
"Asia/Anadyr": "Asia/Anadyr";
|
|
1011
|
+
"Asia/Aqtau": "Asia/Aqtau";
|
|
1012
|
+
"Asia/Aqtobe": "Asia/Aqtobe";
|
|
1013
|
+
"Asia/Ashgabat": "Asia/Ashgabat";
|
|
1014
|
+
"Asia/Atyrau": "Asia/Atyrau";
|
|
1015
|
+
"Asia/Baghdad": "Asia/Baghdad";
|
|
1016
|
+
"Asia/Bahrain": "Asia/Bahrain";
|
|
1017
|
+
"Asia/Baku": "Asia/Baku";
|
|
1018
|
+
"Asia/Bangkok": "Asia/Bangkok";
|
|
1019
|
+
"Asia/Barnaul": "Asia/Barnaul";
|
|
1020
|
+
"Asia/Beirut": "Asia/Beirut";
|
|
1021
|
+
"Asia/Bishkek": "Asia/Bishkek";
|
|
1022
|
+
"Asia/Brunei": "Asia/Brunei";
|
|
1023
|
+
"Asia/Chita": "Asia/Chita";
|
|
1024
|
+
"Asia/Colombo": "Asia/Colombo";
|
|
1025
|
+
"Asia/Damascus": "Asia/Damascus";
|
|
1026
|
+
"Asia/Dhaka": "Asia/Dhaka";
|
|
1027
|
+
"Asia/Dili": "Asia/Dili";
|
|
1028
|
+
"Asia/Dubai": "Asia/Dubai";
|
|
1029
|
+
"Asia/Dushanbe": "Asia/Dushanbe";
|
|
1030
|
+
"Asia/Famagusta": "Asia/Famagusta";
|
|
1031
|
+
"Asia/Gaza": "Asia/Gaza";
|
|
1032
|
+
"Asia/Hebron": "Asia/Hebron";
|
|
1033
|
+
"Asia/Ho_Chi_Minh": "Asia/Ho_Chi_Minh";
|
|
1034
|
+
"Asia/Hong_Kong": "Asia/Hong_Kong";
|
|
1035
|
+
"Asia/Hovd": "Asia/Hovd";
|
|
1036
|
+
"Asia/Irkutsk": "Asia/Irkutsk";
|
|
1037
|
+
"Asia/Jakarta": "Asia/Jakarta";
|
|
1038
|
+
"Asia/Jayapura": "Asia/Jayapura";
|
|
1039
|
+
"Asia/Jerusalem": "Asia/Jerusalem";
|
|
1040
|
+
"Asia/Kabul": "Asia/Kabul";
|
|
1041
|
+
"Asia/Kamchatka": "Asia/Kamchatka";
|
|
1042
|
+
"Asia/Karachi": "Asia/Karachi";
|
|
1043
|
+
"Asia/Kathmandu": "Asia/Kathmandu";
|
|
1044
|
+
"Asia/Khandyga": "Asia/Khandyga";
|
|
1045
|
+
"Asia/Kolkata": "Asia/Kolkata";
|
|
1046
|
+
"Asia/Krasnoyarsk": "Asia/Krasnoyarsk";
|
|
1047
|
+
"Asia/Kuala_Lumpur": "Asia/Kuala_Lumpur";
|
|
1048
|
+
"Asia/Kuching": "Asia/Kuching";
|
|
1049
|
+
"Asia/Kuwait": "Asia/Kuwait";
|
|
1050
|
+
"Asia/Macau": "Asia/Macau";
|
|
1051
|
+
"Asia/Magadan": "Asia/Magadan";
|
|
1052
|
+
"Asia/Makassar": "Asia/Makassar";
|
|
1053
|
+
"Asia/Manila": "Asia/Manila";
|
|
1054
|
+
"Asia/Muscat": "Asia/Muscat";
|
|
1055
|
+
"Asia/Nicosia": "Asia/Nicosia";
|
|
1056
|
+
"Asia/Novokuznetsk": "Asia/Novokuznetsk";
|
|
1057
|
+
"Asia/Novosibirsk": "Asia/Novosibirsk";
|
|
1058
|
+
"Asia/Omsk": "Asia/Omsk";
|
|
1059
|
+
"Asia/Oral": "Asia/Oral";
|
|
1060
|
+
"Asia/Phnom_Penh": "Asia/Phnom_Penh";
|
|
1061
|
+
"Asia/Pontianak": "Asia/Pontianak";
|
|
1062
|
+
"Asia/Pyongyang": "Asia/Pyongyang";
|
|
1063
|
+
"Asia/Qatar": "Asia/Qatar";
|
|
1064
|
+
"Asia/Qostanay": "Asia/Qostanay";
|
|
1065
|
+
"Asia/Qyzylorda": "Asia/Qyzylorda";
|
|
1066
|
+
"Asia/Riyadh": "Asia/Riyadh";
|
|
1067
|
+
"Asia/Sakhalin": "Asia/Sakhalin";
|
|
1068
|
+
"Asia/Samarkand": "Asia/Samarkand";
|
|
1069
|
+
"Asia/Seoul": "Asia/Seoul";
|
|
1070
|
+
"Asia/Shanghai": "Asia/Shanghai";
|
|
1071
|
+
"Asia/Singapore": "Asia/Singapore";
|
|
1072
|
+
"Asia/Srednekolymsk": "Asia/Srednekolymsk";
|
|
1073
|
+
"Asia/Taipei": "Asia/Taipei";
|
|
1074
|
+
"Asia/Tashkent": "Asia/Tashkent";
|
|
1075
|
+
"Asia/Tbilisi": "Asia/Tbilisi";
|
|
1076
|
+
"Asia/Tehran": "Asia/Tehran";
|
|
1077
|
+
"Asia/Thimphu": "Asia/Thimphu";
|
|
1078
|
+
"Asia/Tokyo": "Asia/Tokyo";
|
|
1079
|
+
"Asia/Tomsk": "Asia/Tomsk";
|
|
1080
|
+
"Asia/Ulaanbaatar": "Asia/Ulaanbaatar";
|
|
1081
|
+
"Asia/Urumqi": "Asia/Urumqi";
|
|
1082
|
+
"Asia/Ust-Nera": "Asia/Ust-Nera";
|
|
1083
|
+
"Asia/Vientiane": "Asia/Vientiane";
|
|
1084
|
+
"Asia/Vladivostok": "Asia/Vladivostok";
|
|
1085
|
+
"Asia/Yakutsk": "Asia/Yakutsk";
|
|
1086
|
+
"Asia/Yangon": "Asia/Yangon";
|
|
1087
|
+
"Asia/Yekaterinburg": "Asia/Yekaterinburg";
|
|
1088
|
+
"Asia/Yerevan": "Asia/Yerevan";
|
|
1089
|
+
"Atlantic/Azores": "Atlantic/Azores";
|
|
1090
|
+
"Atlantic/Bermuda": "Atlantic/Bermuda";
|
|
1091
|
+
"Atlantic/Canary": "Atlantic/Canary";
|
|
1092
|
+
"Atlantic/Cape_Verde": "Atlantic/Cape_Verde";
|
|
1093
|
+
"Atlantic/Faroe": "Atlantic/Faroe";
|
|
1094
|
+
"Atlantic/Madeira": "Atlantic/Madeira";
|
|
1095
|
+
"Atlantic/Reykjavik": "Atlantic/Reykjavik";
|
|
1096
|
+
"Atlantic/South_Georgia": "Atlantic/South_Georgia";
|
|
1097
|
+
"Atlantic/St_Helena": "Atlantic/St_Helena";
|
|
1098
|
+
"Atlantic/Stanley": "Atlantic/Stanley";
|
|
1099
|
+
"Australia/Adelaide": "Australia/Adelaide";
|
|
1100
|
+
"Australia/Brisbane": "Australia/Brisbane";
|
|
1101
|
+
"Australia/Broken_Hill": "Australia/Broken_Hill";
|
|
1102
|
+
"Australia/Darwin": "Australia/Darwin";
|
|
1103
|
+
"Australia/Eucla": "Australia/Eucla";
|
|
1104
|
+
"Australia/Hobart": "Australia/Hobart";
|
|
1105
|
+
"Australia/Lindeman": "Australia/Lindeman";
|
|
1106
|
+
"Australia/Lord_Howe": "Australia/Lord_Howe";
|
|
1107
|
+
"Australia/Melbourne": "Australia/Melbourne";
|
|
1108
|
+
"Australia/Perth": "Australia/Perth";
|
|
1109
|
+
"Australia/Sydney": "Australia/Sydney";
|
|
1110
|
+
"Europe/Amsterdam": "Europe/Amsterdam";
|
|
1111
|
+
"Europe/Andorra": "Europe/Andorra";
|
|
1112
|
+
"Europe/Astrakhan": "Europe/Astrakhan";
|
|
1113
|
+
"Europe/Athens": "Europe/Athens";
|
|
1114
|
+
"Europe/Belgrade": "Europe/Belgrade";
|
|
1115
|
+
"Europe/Berlin": "Europe/Berlin";
|
|
1116
|
+
"Europe/Bratislava": "Europe/Bratislava";
|
|
1117
|
+
"Europe/Brussels": "Europe/Brussels";
|
|
1118
|
+
"Europe/Bucharest": "Europe/Bucharest";
|
|
1119
|
+
"Europe/Budapest": "Europe/Budapest";
|
|
1120
|
+
"Europe/Busingen": "Europe/Busingen";
|
|
1121
|
+
"Europe/Chisinau": "Europe/Chisinau";
|
|
1122
|
+
"Europe/Copenhagen": "Europe/Copenhagen";
|
|
1123
|
+
"Europe/Dublin": "Europe/Dublin";
|
|
1124
|
+
"Europe/Gibraltar": "Europe/Gibraltar";
|
|
1125
|
+
"Europe/Guernsey": "Europe/Guernsey";
|
|
1126
|
+
"Europe/Helsinki": "Europe/Helsinki";
|
|
1127
|
+
"Europe/Isle_of_Man": "Europe/Isle_of_Man";
|
|
1128
|
+
"Europe/Istanbul": "Europe/Istanbul";
|
|
1129
|
+
"Europe/Jersey": "Europe/Jersey";
|
|
1130
|
+
"Europe/Kaliningrad": "Europe/Kaliningrad";
|
|
1131
|
+
"Europe/Kirov": "Europe/Kirov";
|
|
1132
|
+
"Europe/Kyiv": "Europe/Kyiv";
|
|
1133
|
+
"Europe/Lisbon": "Europe/Lisbon";
|
|
1134
|
+
"Europe/Ljubljana": "Europe/Ljubljana";
|
|
1135
|
+
"Europe/London": "Europe/London";
|
|
1136
|
+
"Europe/Luxembourg": "Europe/Luxembourg";
|
|
1137
|
+
"Europe/Madrid": "Europe/Madrid";
|
|
1138
|
+
"Europe/Malta": "Europe/Malta";
|
|
1139
|
+
"Europe/Mariehamn": "Europe/Mariehamn";
|
|
1140
|
+
"Europe/Minsk": "Europe/Minsk";
|
|
1141
|
+
"Europe/Monaco": "Europe/Monaco";
|
|
1142
|
+
"Europe/Moscow": "Europe/Moscow";
|
|
1143
|
+
"Europe/Oslo": "Europe/Oslo";
|
|
1144
|
+
"Europe/Paris": "Europe/Paris";
|
|
1145
|
+
"Europe/Podgorica": "Europe/Podgorica";
|
|
1146
|
+
"Europe/Prague": "Europe/Prague";
|
|
1147
|
+
"Europe/Riga": "Europe/Riga";
|
|
1148
|
+
"Europe/Rome": "Europe/Rome";
|
|
1149
|
+
"Europe/Samara": "Europe/Samara";
|
|
1150
|
+
"Europe/San_Marino": "Europe/San_Marino";
|
|
1151
|
+
"Europe/Sarajevo": "Europe/Sarajevo";
|
|
1152
|
+
"Europe/Saratov": "Europe/Saratov";
|
|
1153
|
+
"Europe/Simferopol": "Europe/Simferopol";
|
|
1154
|
+
"Europe/Skopje": "Europe/Skopje";
|
|
1155
|
+
"Europe/Sofia": "Europe/Sofia";
|
|
1156
|
+
"Europe/Stockholm": "Europe/Stockholm";
|
|
1157
|
+
"Europe/Tallinn": "Europe/Tallinn";
|
|
1158
|
+
"Europe/Tirane": "Europe/Tirane";
|
|
1159
|
+
"Europe/Ulyanovsk": "Europe/Ulyanovsk";
|
|
1160
|
+
"Europe/Vaduz": "Europe/Vaduz";
|
|
1161
|
+
"Europe/Vatican": "Europe/Vatican";
|
|
1162
|
+
"Europe/Vienna": "Europe/Vienna";
|
|
1163
|
+
"Europe/Vilnius": "Europe/Vilnius";
|
|
1164
|
+
"Europe/Volgograd": "Europe/Volgograd";
|
|
1165
|
+
"Europe/Warsaw": "Europe/Warsaw";
|
|
1166
|
+
"Europe/Zagreb": "Europe/Zagreb";
|
|
1167
|
+
"Europe/Zurich": "Europe/Zurich";
|
|
1168
|
+
"Indian/Antananarivo": "Indian/Antananarivo";
|
|
1169
|
+
"Indian/Chagos": "Indian/Chagos";
|
|
1170
|
+
"Indian/Christmas": "Indian/Christmas";
|
|
1171
|
+
"Indian/Cocos": "Indian/Cocos";
|
|
1172
|
+
"Indian/Comoro": "Indian/Comoro";
|
|
1173
|
+
"Indian/Kerguelen": "Indian/Kerguelen";
|
|
1174
|
+
"Indian/Mahe": "Indian/Mahe";
|
|
1175
|
+
"Indian/Maldives": "Indian/Maldives";
|
|
1176
|
+
"Indian/Mauritius": "Indian/Mauritius";
|
|
1177
|
+
"Indian/Mayotte": "Indian/Mayotte";
|
|
1178
|
+
"Indian/Reunion": "Indian/Reunion";
|
|
1179
|
+
"Pacific/Apia": "Pacific/Apia";
|
|
1180
|
+
"Pacific/Auckland": "Pacific/Auckland";
|
|
1181
|
+
"Pacific/Bougainville": "Pacific/Bougainville";
|
|
1182
|
+
"Pacific/Chatham": "Pacific/Chatham";
|
|
1183
|
+
"Pacific/Chuuk": "Pacific/Chuuk";
|
|
1184
|
+
"Pacific/Easter": "Pacific/Easter";
|
|
1185
|
+
"Pacific/Efate": "Pacific/Efate";
|
|
1186
|
+
"Pacific/Fakaofo": "Pacific/Fakaofo";
|
|
1187
|
+
"Pacific/Fiji": "Pacific/Fiji";
|
|
1188
|
+
"Pacific/Funafuti": "Pacific/Funafuti";
|
|
1189
|
+
"Pacific/Galapagos": "Pacific/Galapagos";
|
|
1190
|
+
"Pacific/Gambier": "Pacific/Gambier";
|
|
1191
|
+
"Pacific/Guadalcanal": "Pacific/Guadalcanal";
|
|
1192
|
+
"Pacific/Guam": "Pacific/Guam";
|
|
1193
|
+
"Pacific/Honolulu": "Pacific/Honolulu";
|
|
1194
|
+
"Pacific/Kanton": "Pacific/Kanton";
|
|
1195
|
+
"Pacific/Kiritimati": "Pacific/Kiritimati";
|
|
1196
|
+
"Pacific/Kosrae": "Pacific/Kosrae";
|
|
1197
|
+
"Pacific/Kwajalein": "Pacific/Kwajalein";
|
|
1198
|
+
"Pacific/Majuro": "Pacific/Majuro";
|
|
1199
|
+
"Pacific/Marquesas": "Pacific/Marquesas";
|
|
1200
|
+
"Pacific/Midway": "Pacific/Midway";
|
|
1201
|
+
"Pacific/Nauru": "Pacific/Nauru";
|
|
1202
|
+
"Pacific/Niue": "Pacific/Niue";
|
|
1203
|
+
"Pacific/Norfolk": "Pacific/Norfolk";
|
|
1204
|
+
"Pacific/Noumea": "Pacific/Noumea";
|
|
1205
|
+
"Pacific/Pago_Pago": "Pacific/Pago_Pago";
|
|
1206
|
+
"Pacific/Palau": "Pacific/Palau";
|
|
1207
|
+
"Pacific/Pitcairn": "Pacific/Pitcairn";
|
|
1208
|
+
"Pacific/Pohnpei": "Pacific/Pohnpei";
|
|
1209
|
+
"Pacific/Port_Moresby": "Pacific/Port_Moresby";
|
|
1210
|
+
"Pacific/Rarotonga": "Pacific/Rarotonga";
|
|
1211
|
+
"Pacific/Saipan": "Pacific/Saipan";
|
|
1212
|
+
"Pacific/Tahiti": "Pacific/Tahiti";
|
|
1213
|
+
"Pacific/Tarawa": "Pacific/Tarawa";
|
|
1214
|
+
"Pacific/Tongatapu": "Pacific/Tongatapu";
|
|
1215
|
+
"Pacific/Wake": "Pacific/Wake";
|
|
1216
|
+
"Pacific/Wallis": "Pacific/Wallis";
|
|
1217
|
+
UTC: "UTC";
|
|
1218
|
+
}>;
|
|
1219
|
+
}, z.core.$strip>;
|
|
1220
|
+
|
|
1221
|
+
type Location = {
|
|
1222
|
+
id: number;
|
|
1223
|
+
short: string;
|
|
1224
|
+
long: string;
|
|
1225
|
+
created_at: string;
|
|
1226
|
+
updated_at: string | null;
|
|
1227
|
+
};
|
|
1228
|
+
|
|
1229
|
+
type Node$1 = {
|
|
1230
|
+
id: number;
|
|
1231
|
+
uuid: string;
|
|
1232
|
+
public: boolean;
|
|
1233
|
+
name: string;
|
|
1234
|
+
description: Nullable<string>;
|
|
1235
|
+
fqdn: string;
|
|
1236
|
+
scheme: "https" | "http";
|
|
1237
|
+
behind_proxy: boolean;
|
|
1238
|
+
maintenance_mode: boolean;
|
|
1239
|
+
memory: number;
|
|
1240
|
+
memory_overallocate: number;
|
|
1241
|
+
disk: number;
|
|
1242
|
+
disk_overallocate: number;
|
|
1243
|
+
cpu: number;
|
|
1244
|
+
cpu_overallocate: number;
|
|
1245
|
+
upload_size: number;
|
|
1246
|
+
daemon_listen: number;
|
|
1247
|
+
daemon_sftp: number;
|
|
1248
|
+
daemon_sftp_alias: Nullable<string>;
|
|
1249
|
+
daemon_base: string;
|
|
1250
|
+
daemon_connect: number;
|
|
1251
|
+
created_at: string;
|
|
1252
|
+
updated_at: Nullable<string>;
|
|
1253
|
+
tags: string[];
|
|
1254
|
+
allocated_resources: {
|
|
1255
|
+
memory: number;
|
|
1256
|
+
disk: number;
|
|
1257
|
+
cpu: number;
|
|
1258
|
+
};
|
|
1259
|
+
relationships?: {
|
|
1260
|
+
allocations?: GenericListResponse<GenericResponse<Allocation, "allocation">>;
|
|
1261
|
+
location?: GenericResponse<Location, "location">;
|
|
1262
|
+
servers?: GenericListResponse<GenericResponse<ApplicationServer, "server">>;
|
|
1263
|
+
};
|
|
1264
|
+
};
|
|
1265
|
+
type NodeConfiguration = {
|
|
1266
|
+
debug: boolean;
|
|
1267
|
+
uuid: string;
|
|
1268
|
+
token_id: string;
|
|
1269
|
+
token: string;
|
|
1270
|
+
api: {
|
|
1271
|
+
host: string;
|
|
1272
|
+
port: number;
|
|
1273
|
+
upload_limit: number;
|
|
1274
|
+
ssl: {
|
|
1275
|
+
enabled: boolean;
|
|
1276
|
+
cert: string;
|
|
1277
|
+
key: string;
|
|
1278
|
+
};
|
|
1279
|
+
};
|
|
1280
|
+
system: {
|
|
1281
|
+
data: string;
|
|
1282
|
+
sftp: {
|
|
1283
|
+
bind_port: number;
|
|
1284
|
+
};
|
|
1285
|
+
};
|
|
1286
|
+
allowed_mounts: string[];
|
|
1287
|
+
remote: string;
|
|
1288
|
+
};
|
|
1289
|
+
|
|
1290
|
+
type Allocation = {
|
|
1291
|
+
id: number;
|
|
1292
|
+
ip: string;
|
|
1293
|
+
alias: Nullable<string>;
|
|
1294
|
+
port: number;
|
|
1295
|
+
notes: Nullable<string>;
|
|
1296
|
+
assigned: boolean;
|
|
1297
|
+
};
|
|
1298
|
+
type AllocationRel = Allocation & {
|
|
1299
|
+
relationships?: {
|
|
1300
|
+
node?: GenericResponse<Node$1, "node">;
|
|
1301
|
+
server?: GenericResponse<ApplicationServer, "server">;
|
|
1302
|
+
};
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1305
|
+
declare class NodesAllocations {
|
|
1306
|
+
private readonly r;
|
|
1307
|
+
private readonly id;
|
|
1308
|
+
constructor(requester: AxiosInstance, id: number);
|
|
1309
|
+
list: (include?: ("node" | "server")[]) => Promise<AllocationRel[]>;
|
|
1310
|
+
create: (ip: string, ports: string[], alias?: string) => Promise<void>;
|
|
1311
|
+
delete: (alloc_id: number) => Promise<void>;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
declare class Nodes {
|
|
1315
|
+
private readonly r;
|
|
1316
|
+
constructor(requester: AxiosInstance);
|
|
1317
|
+
list: (include?: ("allocations" | "location" | "servers")[], page?: number) => Promise<Node$1[]>;
|
|
1318
|
+
listDeployable: (filters: {
|
|
1319
|
+
disk: number;
|
|
1320
|
+
memory: number;
|
|
1321
|
+
cpu?: number;
|
|
1322
|
+
location_ids?: string[];
|
|
1323
|
+
tags?: string[];
|
|
1324
|
+
}, include?: ("allocations" | "location" | "servers")[], page?: number) => Promise<Node$1[]>;
|
|
1325
|
+
info: (id: number, include?: ("allocations" | "location" | "servers")[]) => Promise<Node$1>;
|
|
1326
|
+
create: (node: z.infer<typeof NodeCreateSchema>) => Promise<Node$1>;
|
|
1327
|
+
get_configuration: (id: number) => Promise<NodeConfiguration>;
|
|
1328
|
+
update: (id: number, node: z.infer<typeof NodeCreateSchema>) => Promise<Node$1>;
|
|
1329
|
+
delete: (id: number) => Promise<void>;
|
|
1330
|
+
allocations: (server_id: number) => NodesAllocations;
|
|
1331
|
+
}
|
|
1332
|
+
declare const NodeCreateSchema: z.ZodObject<{
|
|
1333
|
+
name: z.ZodString;
|
|
1334
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1335
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
1336
|
+
fqdn: z.ZodString;
|
|
1337
|
+
scheme: z.ZodEnum<{
|
|
1338
|
+
https: "https";
|
|
1339
|
+
http: "http";
|
|
1340
|
+
}>;
|
|
1341
|
+
behind_proxy: z.ZodOptional<z.ZodBoolean>;
|
|
1342
|
+
memory: z.ZodNumber;
|
|
1343
|
+
memory_overallocate: z.ZodNumber;
|
|
1344
|
+
disk: z.ZodNumber;
|
|
1345
|
+
disk_overallocate: z.ZodNumber;
|
|
1346
|
+
cpu: z.ZodNumber;
|
|
1347
|
+
cpu_overallocate: z.ZodNumber;
|
|
1348
|
+
daemon_base: z.ZodOptional<z.ZodString>;
|
|
1349
|
+
daemon_sftp: z.ZodNumber;
|
|
1350
|
+
daemon_sftp_alias: z.ZodOptional<z.ZodString>;
|
|
1351
|
+
daemon_listen: z.ZodNumber;
|
|
1352
|
+
daemon_connect: z.ZodNumber;
|
|
1353
|
+
maintenance_mode: z.ZodOptional<z.ZodBoolean>;
|
|
1354
|
+
upload_size: z.ZodNumber;
|
|
1355
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1356
|
+
}, z.core.$strip>;
|
|
1357
|
+
|
|
1358
|
+
declare class ServersDatabases {
|
|
1359
|
+
private readonly r;
|
|
1360
|
+
private readonly id;
|
|
1361
|
+
constructor(r: AxiosInstance, server_id: number);
|
|
1362
|
+
list: () => Promise<ServerDatabase[]>;
|
|
1363
|
+
create: (database: string, remote: string, host: string) => Promise<ServerDatabase>;
|
|
1364
|
+
info: (database_id: number) => Promise<ServerDatabase>;
|
|
1365
|
+
delete: (database_id: number) => Promise<void>;
|
|
1366
|
+
resetPassword: (database_id: number) => Promise<void>;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
declare class Servers {
|
|
1370
|
+
private readonly r;
|
|
1371
|
+
private readonly id;
|
|
1372
|
+
databases: ServersDatabases;
|
|
1373
|
+
constructor(r: AxiosInstance, server_id: number);
|
|
1374
|
+
info: (include?: ("egg" | "subusers")[]) => Promise<ApplicationServer>;
|
|
1375
|
+
delete: (force?: boolean) => Promise<void>;
|
|
1376
|
+
updateDetails: (opts: z.infer<typeof UpdateDetailsSchema>) => Promise<void>;
|
|
1377
|
+
updateBuild: (opts: z.infer<typeof UpdateBuildSchema>) => Promise<void>;
|
|
1378
|
+
updateStartup: (opts: z.infer<typeof UpdateStartupSchema>) => Promise<void>;
|
|
1379
|
+
suspend: () => Promise<void>;
|
|
1380
|
+
unsuspend: () => Promise<void>;
|
|
1381
|
+
reinstall: () => Promise<void>;
|
|
1382
|
+
transferStart: (node_id: number, allocation_id: number, allocation_additional?: string[]) => Promise<void>;
|
|
1383
|
+
transferCancel: () => Promise<void>;
|
|
1384
|
+
}
|
|
1385
|
+
declare const CreateServerSchema: z.ZodObject<{
|
|
1386
|
+
external_id: z.ZodOptional<z.ZodString>;
|
|
1387
|
+
name: z.ZodString;
|
|
1388
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1389
|
+
user: z.ZodNumber;
|
|
1390
|
+
egg: z.ZodNumber;
|
|
1391
|
+
docker_image: z.ZodOptional<z.ZodString>;
|
|
1392
|
+
startup: z.ZodOptional<z.ZodString>;
|
|
1393
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1394
|
+
skip_scripts: z.ZodOptional<z.ZodBoolean>;
|
|
1395
|
+
oom_killer: z.ZodOptional<z.ZodBoolean>;
|
|
1396
|
+
start_on_completion: z.ZodOptional<z.ZodBoolean>;
|
|
1397
|
+
docker_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1398
|
+
limits: z.ZodObject<{
|
|
1399
|
+
memory: z.ZodNumber;
|
|
1400
|
+
swap: z.ZodNumber;
|
|
1401
|
+
disk: z.ZodNumber;
|
|
1402
|
+
io: z.ZodNumber;
|
|
1403
|
+
threads: z.ZodOptional<z.ZodString>;
|
|
1404
|
+
cpu: z.ZodNumber;
|
|
1405
|
+
}, z.core.$strip>;
|
|
1406
|
+
feature_limits: z.ZodObject<{
|
|
1407
|
+
databases: z.ZodNumber;
|
|
1408
|
+
allocations: z.ZodNumber;
|
|
1409
|
+
backups: z.ZodNumber;
|
|
1410
|
+
}, z.core.$strip>;
|
|
1411
|
+
allocation: z.ZodOptional<z.ZodObject<{
|
|
1412
|
+
default: z.ZodString;
|
|
1413
|
+
additional: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1414
|
+
}, z.core.$strip>>;
|
|
1415
|
+
deploy: z.ZodOptional<z.ZodObject<{
|
|
1416
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1417
|
+
dedicated_ip: z.ZodOptional<z.ZodBoolean>;
|
|
1418
|
+
port_range: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1419
|
+
}, z.core.$strip>>;
|
|
1420
|
+
}, z.core.$strip>;
|
|
1421
|
+
declare const UpdateDetailsSchema: z.ZodObject<{
|
|
1422
|
+
user: z.ZodNumber;
|
|
1423
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1424
|
+
name: z.ZodString;
|
|
1425
|
+
external_id: z.ZodOptional<z.ZodString>;
|
|
1426
|
+
docker_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1427
|
+
}, z.core.$strip>;
|
|
1428
|
+
declare const UpdateBuildSchema: z.ZodObject<{
|
|
1429
|
+
oom_killer: z.ZodOptional<z.ZodBoolean>;
|
|
1430
|
+
limits: z.ZodObject<{
|
|
1431
|
+
memory: z.ZodNumber;
|
|
1432
|
+
swap: z.ZodNumber;
|
|
1433
|
+
disk: z.ZodNumber;
|
|
1434
|
+
io: z.ZodNumber;
|
|
1435
|
+
threads: z.ZodOptional<z.ZodString>;
|
|
1436
|
+
cpu: z.ZodNumber;
|
|
1437
|
+
}, z.core.$strip>;
|
|
1438
|
+
feature_limits: z.ZodObject<{
|
|
1439
|
+
databases: z.ZodNumber;
|
|
1440
|
+
allocations: z.ZodNumber;
|
|
1441
|
+
backups: z.ZodNumber;
|
|
1442
|
+
}, z.core.$strip>;
|
|
1443
|
+
allocation: z.ZodOptional<z.ZodNumber>;
|
|
1444
|
+
add_allocations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1445
|
+
remove_allocations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1446
|
+
}, z.core.$strip>;
|
|
1447
|
+
declare const UpdateStartupSchema: z.ZodObject<{
|
|
1448
|
+
egg: z.ZodNumber;
|
|
1449
|
+
startup: z.ZodOptional<z.ZodString>;
|
|
1450
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1451
|
+
skip_scripts: z.ZodOptional<z.ZodBoolean>;
|
|
1452
|
+
image: z.ZodOptional<z.ZodString>;
|
|
1453
|
+
}, z.core.$strip>;
|
|
1454
|
+
|
|
1455
|
+
type DatabaseHost = {
|
|
1456
|
+
id: number;
|
|
1457
|
+
name: string;
|
|
1458
|
+
host: string;
|
|
1459
|
+
port: number;
|
|
1460
|
+
username: string;
|
|
1461
|
+
created_at: string;
|
|
1462
|
+
updated_at: Nullable<string>;
|
|
1463
|
+
};
|
|
1464
|
+
|
|
1465
|
+
declare class DatabaseHosts {
|
|
1466
|
+
private readonly r;
|
|
1467
|
+
constructor(r: AxiosInstance);
|
|
1468
|
+
list: (page?: number) => Promise<DatabaseHost[]>;
|
|
1469
|
+
info: (id: string) => Promise<DatabaseHost>;
|
|
1470
|
+
create: (opts: z.infer<typeof CreateDBHostSchema>) => Promise<void>;
|
|
1471
|
+
update: (id: string, opts: z.infer<typeof CreateDBHostSchema>) => Promise<DatabaseHost>;
|
|
1472
|
+
delete: (id: string) => Promise<void>;
|
|
1473
|
+
}
|
|
1474
|
+
declare const CreateDBHostSchema: z.ZodObject<{
|
|
1475
|
+
name: z.ZodString;
|
|
1476
|
+
host: z.ZodString;
|
|
1477
|
+
port: z.ZodNumber;
|
|
1478
|
+
username: z.ZodString;
|
|
1479
|
+
password: z.ZodOptional<z.ZodString>;
|
|
1480
|
+
node_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1481
|
+
max_databases: z.ZodOptional<z.ZodNumber>;
|
|
1482
|
+
}, z.core.$strip>;
|
|
1483
|
+
|
|
1484
|
+
type Role = {
|
|
1485
|
+
id: number;
|
|
1486
|
+
name: string;
|
|
1487
|
+
created_at: string;
|
|
1488
|
+
updated_at: string;
|
|
1489
|
+
};
|
|
1490
|
+
|
|
1491
|
+
declare class Roles {
|
|
1492
|
+
private readonly r;
|
|
1493
|
+
constructor(r: AxiosInstance);
|
|
1494
|
+
list: (page?: number) => Promise<Role[]>;
|
|
1495
|
+
info: (id: number) => Promise<Role>;
|
|
1496
|
+
create: (opts: {
|
|
1497
|
+
name: string;
|
|
1498
|
+
}) => Promise<void>;
|
|
1499
|
+
update: (id: number, opts: {
|
|
1500
|
+
name: string;
|
|
1501
|
+
}) => Promise<void>;
|
|
1502
|
+
delete: (id: number) => Promise<void>;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
type Egg = {
|
|
1506
|
+
id: number;
|
|
1507
|
+
uuid: string;
|
|
1508
|
+
name: string;
|
|
1509
|
+
author: string;
|
|
1510
|
+
description: string;
|
|
1511
|
+
features: string[];
|
|
1512
|
+
tags: string[];
|
|
1513
|
+
docker_image: Nullable<string>;
|
|
1514
|
+
docker_images: Record<string, string>;
|
|
1515
|
+
config: {
|
|
1516
|
+
files: Record<string, FileConfig>;
|
|
1517
|
+
startup: Record<string, string>;
|
|
1518
|
+
stop: string;
|
|
1519
|
+
logs: object | [];
|
|
1520
|
+
file_denylist: string[];
|
|
1521
|
+
extends: Nullable<number>;
|
|
1522
|
+
};
|
|
1523
|
+
startup: string;
|
|
1524
|
+
startup_commands: Record<string, string>;
|
|
1525
|
+
script: {
|
|
1526
|
+
privileged: boolean;
|
|
1527
|
+
install: string;
|
|
1528
|
+
entry: string;
|
|
1529
|
+
container: string;
|
|
1530
|
+
extends: Nullable<number>;
|
|
1531
|
+
};
|
|
1532
|
+
created_at: string;
|
|
1533
|
+
updated_at: Nullable<string>;
|
|
1534
|
+
};
|
|
1535
|
+
type FileConfig = {
|
|
1536
|
+
parser: string;
|
|
1537
|
+
find: Record<string, string>;
|
|
1538
|
+
};
|
|
1539
|
+
type ApplicationEggVariable = Omit<EggVariable, "server_value" | "is_editable" | "rules"> & {
|
|
1540
|
+
rules: string[];
|
|
1541
|
+
sort: number;
|
|
1542
|
+
user_viewable: boolean;
|
|
1543
|
+
user_editable: boolean;
|
|
1544
|
+
};
|
|
1545
|
+
type ExportedEgg = {
|
|
1546
|
+
meta: {
|
|
1547
|
+
version: "PLCN_v3";
|
|
1548
|
+
update_url: Nullable<string>;
|
|
1549
|
+
};
|
|
1550
|
+
exported_at: string;
|
|
1551
|
+
name: string;
|
|
1552
|
+
author: string;
|
|
1553
|
+
description: string;
|
|
1554
|
+
uuid: string;
|
|
1555
|
+
image: Nullable<string>;
|
|
1556
|
+
docker_images: Record<string, string>;
|
|
1557
|
+
features: string[];
|
|
1558
|
+
tags: string[];
|
|
1559
|
+
file_denylist: string[];
|
|
1560
|
+
startup_commands: Record<string, string>;
|
|
1561
|
+
config: Omit<Egg["config"], "extends" | "file_denylist">;
|
|
1562
|
+
scripts: {
|
|
1563
|
+
installation: {
|
|
1564
|
+
script: string;
|
|
1565
|
+
container: string;
|
|
1566
|
+
entrypoint: string;
|
|
1567
|
+
};
|
|
1568
|
+
};
|
|
1569
|
+
variables: ApplicationEggVariable[];
|
|
1570
|
+
};
|
|
1571
|
+
|
|
1572
|
+
declare class Eggs {
|
|
1573
|
+
private readonly r;
|
|
1574
|
+
constructor(r: AxiosInstance);
|
|
1575
|
+
list: () => Promise<Egg[]>;
|
|
1576
|
+
info: (id: number) => Promise<Egg>;
|
|
1577
|
+
export: (id: number, format: "json" | "yaml") => Promise<string>;
|
|
1578
|
+
infoExportable: (id: number) => Promise<ExportedEgg>;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
type Mount = {
|
|
1582
|
+
id: number;
|
|
1583
|
+
uuid: string;
|
|
1584
|
+
name: string;
|
|
1585
|
+
description: Nullable<string>;
|
|
1586
|
+
source: string;
|
|
1587
|
+
target: string;
|
|
1588
|
+
read_only: boolean;
|
|
1589
|
+
user_mountable: boolean;
|
|
1590
|
+
};
|
|
1591
|
+
|
|
1592
|
+
declare class Mounts {
|
|
1593
|
+
private readonly r;
|
|
1594
|
+
constructor(r: AxiosInstance);
|
|
1595
|
+
list: () => Promise<Mount[]>;
|
|
1596
|
+
info: (id: number) => Promise<Mount>;
|
|
1597
|
+
create: (opts: z.infer<typeof CreateMountSchema>) => Promise<Mount>;
|
|
1598
|
+
update: (id: number, opts: z.infer<typeof CreateMountSchema>) => Promise<Mount>;
|
|
1599
|
+
delete: (id: number) => Promise<void>;
|
|
1600
|
+
listAssignedEggs: (id: number) => Promise<Egg[]>;
|
|
1601
|
+
assignEggs: (id: number, eggs: number[]) => Promise<void>;
|
|
1602
|
+
unassignEgg: (id: number, egg_id: number) => Promise<void>;
|
|
1603
|
+
listAssignedNodes: (id: number) => Promise<Node[]>;
|
|
1604
|
+
assignNodes: (id: number, nodes: number[]) => Promise<void>;
|
|
1605
|
+
unassignNode: (id: number, node_id: number) => Promise<void>;
|
|
1606
|
+
listAssignedServers: (id: number) => Promise<ApplicationServer[]>;
|
|
1607
|
+
assignServers: (id: number, servers: number[]) => Promise<void>;
|
|
1608
|
+
unassignServer: (id: number, server_id: number) => Promise<void>;
|
|
1609
|
+
}
|
|
1610
|
+
declare const CreateMountSchema: z.ZodObject<{
|
|
1611
|
+
name: z.ZodString;
|
|
1612
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1613
|
+
source: z.ZodString;
|
|
1614
|
+
target: z.ZodString;
|
|
1615
|
+
read_only: z.ZodOptional<z.ZodBoolean>;
|
|
1616
|
+
}, z.core.$strip>;
|
|
1617
|
+
|
|
1618
|
+
declare class Client {
|
|
1619
|
+
private readonly r;
|
|
1620
|
+
users: Users;
|
|
1621
|
+
nodes: Nodes;
|
|
1622
|
+
databaseHosts: DatabaseHosts;
|
|
1623
|
+
roles: Roles;
|
|
1624
|
+
eggs: Eggs;
|
|
1625
|
+
mounts: Mounts;
|
|
1626
|
+
constructor(requester: AxiosInstance);
|
|
1627
|
+
get $r(): AxiosInstance;
|
|
1628
|
+
listServers: (search?: string, page?: number) => Promise<ApplicationServer[]>;
|
|
1629
|
+
createServer: (opts: z.infer<typeof CreateServerSchema>) => Promise<ApplicationServer>;
|
|
1630
|
+
getServerByExternalId: (external_id: string, include?: ("egg" | "subusers")[]) => Promise<ApplicationServer>;
|
|
1631
|
+
servers: (server_id: number) => Servers;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
declare class PelicanAPIClient extends Client$1 {
|
|
1635
|
+
constructor(url: string, token: string, suffix?: string);
|
|
1636
|
+
}
|
|
1637
|
+
declare class PelicanAPIApplication extends Client {
|
|
1638
|
+
constructor(url: string, token: string, suffix?: string);
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
export { PelicanAPIApplication, PelicanAPIClient };
|