@pelican.ts/sdk 0.2.1 → 0.2.3

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.
@@ -0,0 +1,661 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import WebSocket from 'isomorphic-ws';
3
+
4
+ type ExactlyOneKey<K extends keyof any, V, KK extends keyof any = K> = {
5
+ [P in K]: {
6
+ [Q in P]: V;
7
+ } & {
8
+ [Q in Exclude<KK, P>]?: never;
9
+ } extends infer O ? {
10
+ [Q in keyof O]: O[Q];
11
+ } : never;
12
+ }[K];
13
+ type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, 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$1 = {
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": number;
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$1>;
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 Container = {
143
+ startup_command: string;
144
+ image: string;
145
+ installed: number;
146
+ environment: {
147
+ [key: string]: string | number;
148
+ };
149
+ ports: number[];
150
+ volumes: string[];
151
+ network_mode: string;
152
+ };
153
+
154
+ type Server$1 = {
155
+ id: number;
156
+ external_id: string | null;
157
+ uuid: string;
158
+ identifier: string;
159
+ name: string;
160
+ description: string;
161
+ status: any | null;
162
+ suspended: boolean;
163
+ limits: ServerLimits;
164
+ feature_limits: FeatureLimits;
165
+ user: number;
166
+ node: number;
167
+ allocation: number;
168
+ nest: number;
169
+ egg: number;
170
+ container: Container;
171
+ created_at: string;
172
+ updated_at: string | null;
173
+ };
174
+
175
+ type Allocation = {
176
+ id: number;
177
+ ip: string;
178
+ ip_alias: Nullable<string>;
179
+ port: number;
180
+ notes: Nullable<string>;
181
+ is_default: boolean;
182
+ };
183
+
184
+ type Server = {
185
+ server_owner: boolean;
186
+ identifier: string;
187
+ internal_id?: number;
188
+ uuid: string;
189
+ name: string;
190
+ node: string;
191
+ is_node_under_maintenance: boolean;
192
+ sftp_details: {
193
+ ip: string;
194
+ alias: Nullable<string>;
195
+ port: number;
196
+ };
197
+ description: string;
198
+ limits: ServerLimits;
199
+ invocation: string;
200
+ docker_image: string;
201
+ egg_features: string[] | null;
202
+ feature_limits: FeatureLimits;
203
+ status: Nullable<unknown>;
204
+ is_suspended: boolean;
205
+ is_installing: boolean;
206
+ is_transferring: boolean;
207
+ relationships: {
208
+ allocations: GenericListResponse<GenericResponse<Allocation, "allocation">>;
209
+ variables: GenericListResponse<GenericResponse<EggVariable, "egg_variable">>;
210
+ egg?: GenericResponse<{
211
+ uuid: string;
212
+ name: string;
213
+ }, "egg">;
214
+ subusers: GenericListResponse<GenericResponse<ServerSubuser, "server_subuser">>;
215
+ };
216
+ };
217
+ type ServerStats = {
218
+ current_state: "installing" | "install_failed" | "reinstall_failed" | "suspended" | "restoring_backup" | "running" | "stopped" | "offline";
219
+ is_suspended: boolean;
220
+ resources: ServerResources;
221
+ };
222
+ type ServerResources = {
223
+ memory_bytes: number;
224
+ cpu_absolute: number;
225
+ disk_bytes: number;
226
+ network_tx_bytes: number;
227
+ network_rx_bytes: number;
228
+ uptime: number;
229
+ };
230
+ type ServerActivityLog = {
231
+ id: string;
232
+ event: string;
233
+ is_api: boolean;
234
+ ip: string;
235
+ description: Nullable<string>;
236
+ properties: Record<string, string>;
237
+ has_additional_metadata: boolean;
238
+ timestamp: string;
239
+ };
240
+
241
+ type Database = {
242
+ id: string;
243
+ host: {
244
+ address: string;
245
+ port: number;
246
+ };
247
+ name: string;
248
+ username: string;
249
+ connections_from: string;
250
+ max_connections: number;
251
+ relationships?: {
252
+ password: GenericResponse<{
253
+ password: string;
254
+ }, "database_password">;
255
+ };
256
+ };
257
+
258
+ declare class ServerDatabases {
259
+ private readonly r;
260
+ private readonly id;
261
+ constructor(requester: AxiosInstance, id: string);
262
+ list: (include?: ("password")[], page?: number) => Promise<Database[]>;
263
+ create: (database: string, remote: string) => Promise<Database>;
264
+ rotatePassword: (database_id: string) => Promise<Database>;
265
+ delete: (database_id: string) => Promise<void>;
266
+ }
267
+
268
+ type FileObject = {
269
+ name: string;
270
+ mode: string;
271
+ mode_bits: string;
272
+ size: number;
273
+ is_file: boolean;
274
+ is_symlink: boolean;
275
+ mimetype: string;
276
+ created_at: string;
277
+ modified_at: string;
278
+ };
279
+
280
+ declare class ServerFiles {
281
+ private readonly r;
282
+ private readonly id;
283
+ constructor(requester: AxiosInstance, id: string);
284
+ list: (path?: string) => Promise<FileObject[]>;
285
+ /**
286
+ * Return the contents of a file. To read binary file (non-editable) use {@link download} instead
287
+ */
288
+ contents: (path: string) => Promise<string>;
289
+ downloadGetUrl: (path: string) => Promise<string>;
290
+ download: (path: string) => Promise<ArrayBuffer>;
291
+ rename: (root: string | undefined, files: {
292
+ from: string;
293
+ to: string;
294
+ }[]) => Promise<void>;
295
+ copy: (location: string) => Promise<void>;
296
+ write: (path: string, content: string) => Promise<void>;
297
+ compress: (root: string | undefined, files: string[], archive_name?: string, extension?: "zip" | "tgz" | "tar.gz" | "txz" | "tar.xz" | "tbz2" | "tar.bz2") => Promise<void>;
298
+ decompress: (root: string | undefined, file: string) => Promise<void>;
299
+ delete: (root: string | undefined, files: string[]) => Promise<void>;
300
+ createFolder: (root: string | undefined, name: string) => Promise<void>;
301
+ chmod: (root: string | undefined, files: Array<{
302
+ file: string;
303
+ mode: number;
304
+ }>) => Promise<void>;
305
+ pullFromRemote: (url: string, directory?: string, filename?: string, // Unused
306
+ use_header?: boolean, // Unused
307
+ foreground?: boolean) => Promise<void>;
308
+ uploadGetUrl: () => Promise<string>;
309
+ upload: (file: File, root?: string) => Promise<void>;
310
+ }
311
+
312
+ type Schedule = {
313
+ id: number;
314
+ name: string;
315
+ cron: {
316
+ day_of_week: string;
317
+ day_of_month: string;
318
+ hour: string;
319
+ minute: string;
320
+ };
321
+ is_active: boolean;
322
+ is_processing: boolean;
323
+ only_when_online: boolean;
324
+ last_run_at: Nullable<string>;
325
+ next_run_at: string;
326
+ created_at: string;
327
+ updated_at: string;
328
+ relationships: {
329
+ tasks: GenericListResponse<GenericResponse<ScheduleTask, "schedule_task">>;
330
+ };
331
+ };
332
+ type ScheduleTask = {
333
+ id: number;
334
+ sequence_id: number;
335
+ action: "command" | "power" | "backup" | "delete_files";
336
+ payload: string;
337
+ time_offset: number;
338
+ is_queued: boolean;
339
+ continue_on_failure: boolean;
340
+ created_at: string;
341
+ updated_at: Nullable<string>;
342
+ };
343
+
344
+ declare class ServerSchedules {
345
+ private readonly r;
346
+ private readonly id;
347
+ constructor(requester: AxiosInstance, id: string);
348
+ list: () => Promise<Schedule[]>;
349
+ create: (params: ScheduleCreateParams) => Promise<Schedule>;
350
+ control: (sched_id: number) => ScheduleControl;
351
+ }
352
+ type ScheduleCreateParams = {
353
+ name: string;
354
+ is_active?: boolean;
355
+ only_when_online?: boolean;
356
+ minute: string;
357
+ hour: string;
358
+ day_of_week: string;
359
+ month: string;
360
+ day_of_month: string;
361
+ };
362
+ declare class ScheduleControl {
363
+ private r;
364
+ private readonly id;
365
+ private readonly sched_id;
366
+ constructor(requester: AxiosInstance, id: string, sched_id: number);
367
+ info: () => Promise<Schedule>;
368
+ update: (params: ScheduleCreateParams) => Promise<Schedule>;
369
+ delete: () => Promise<void>;
370
+ execute: () => Promise<void>;
371
+ tasks: {
372
+ create: (opts: PartialBy<Pick<ScheduleTask, "action" | "payload" | "time_offset" | "sequence_id" | "continue_on_failure">, "payload" | "sequence_id" | "continue_on_failure">) => Promise<ScheduleTask>;
373
+ 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>;
374
+ delete: (task_id: number) => Promise<void>;
375
+ };
376
+ }
377
+
378
+ declare class ServerAllocations {
379
+ private readonly r;
380
+ private readonly id;
381
+ constructor(requester: AxiosInstance, id: string);
382
+ list: () => Promise<Allocation[]>;
383
+ autoAssign: () => Promise<Allocation>;
384
+ setNotes: (alloc_id: number, notes: string) => Promise<Allocation>;
385
+ setPrimary: (alloc_id: number) => Promise<Allocation>;
386
+ unassign: (alloc_id: number) => Promise<void>;
387
+ }
388
+
389
+ declare class ServerUsers {
390
+ private readonly r;
391
+ private readonly id;
392
+ constructor(requester: AxiosInstance, id: string);
393
+ list: () => Promise<ServerSubuser[]>;
394
+ create: (email: string, permissions: SubuserPermission[] | string[]) => Promise<ServerSubuser>;
395
+ info: (user_id: number) => Promise<ServerSubuser>;
396
+ update: (user_id: number, permissions: SubuserPermission[] | string[]) => Promise<ServerSubuser>;
397
+ delete: (user_id: number) => Promise<void>;
398
+ }
399
+
400
+ type Backup = {
401
+ uuid: string;
402
+ is_successful: boolean;
403
+ is_locked: boolean;
404
+ name: string;
405
+ ignored_files: string[];
406
+ checksum: Nullable<string>;
407
+ bytes: number;
408
+ created_at: string;
409
+ completed_at: Nullable<string>;
410
+ };
411
+
412
+ declare class ServerBackups {
413
+ private readonly r;
414
+ private readonly id;
415
+ constructor(requester: AxiosInstance, id: string);
416
+ list: (page?: number) => Promise<Backup[]>;
417
+ create: (args: {
418
+ name?: string;
419
+ is_locked: boolean;
420
+ ignored_files: string[];
421
+ }) => Promise<Backup>;
422
+ info: (backup_uuid: string) => Promise<Backup>;
423
+ downloadGetUrl: (backup_uuid: string) => Promise<string>;
424
+ download: (backup_uuid: string) => Promise<ArrayBuffer>;
425
+ delete: (backup_uuid: string) => Promise<void>;
426
+ }
427
+
428
+ type StartupParams = {
429
+ name: string;
430
+ description: string;
431
+ env_variables: string;
432
+ default_value: string;
433
+ server_value: string;
434
+ is_editable: boolean;
435
+ rules: string;
436
+ };
437
+ type StartupMeta = {
438
+ startup_command: string;
439
+ raw_startup_command: string;
440
+ };
441
+
442
+ declare class ServerStartup {
443
+ private readonly r;
444
+ private readonly id;
445
+ constructor(requester: AxiosInstance, id: string);
446
+ list: () => Promise<CustomListResponse<StartupParams, StartupMeta>>;
447
+ set: (key: string, value: string) => Promise<StartupParams>;
448
+ }
449
+
450
+ declare class ServerSettings {
451
+ private readonly r;
452
+ private readonly id;
453
+ constructor(requester: AxiosInstance, id: string);
454
+ rename: (name: string) => Promise<void>;
455
+ updateDescription: (description: Nullable<string>) => Promise<void>;
456
+ reinstall: () => Promise<void>;
457
+ changeDockerImage: (image: string) => Promise<void>;
458
+ }
459
+
460
+ /**
461
+ * Source: https://github.com/pterodactyl/panel/blob/1.0-develop/resources/scripts/components/server/events.ts
462
+ */
463
+ declare enum SOCKET_EVENT {
464
+ AUTH_SUCCESS = "auth success",
465
+ DAEMON_MESSAGE = "daemon message",
466
+ DAEMON_ERROR = "daemon error",
467
+ INSTALL_OUTPUT = "install output",
468
+ INSTALL_STARTED = "install started",
469
+ INSTALL_COMPLETED = "install completed",
470
+ CONSOLE_OUTPUT = "console output",
471
+ STATUS = "status",
472
+ STATS = "stats",
473
+ TRANSFER_LOGS = "transfer logs",
474
+ TRANSFER_STATUS = "transfer status",
475
+ BACKUP_COMPLETED = "backup completed",
476
+ BACKUP_RESTORE_COMPLETED = "backup restore completed",
477
+ TOKEN_EXPIRING = "token expiring",
478
+ TOKEN_EXPIRED = "token expired",
479
+ JWT_ERROR = "jwt error"
480
+ }
481
+ type BackupCompletedJson = {
482
+ checksum: string;
483
+ checksum_type: 'sha1';
484
+ file_size: number;
485
+ is_successful: boolean;
486
+ uuid: string;
487
+ };
488
+ type PowerState = 'starting' | 'stopping' | 'running' | 'offline';
489
+ type StatsWsJson = {
490
+ memory_bytes: number;
491
+ memory_limit_bytes: number;
492
+ cpu_absolute: number;
493
+ network: {
494
+ rx_bytes: number;
495
+ tx_bytes: number;
496
+ };
497
+ state: PowerState;
498
+ uptime: number;
499
+ disk_bytes: number;
500
+ };
501
+
502
+ type ServerSignalOption = 'start' | 'stop' | 'restart' | 'kill';
503
+
504
+ type SocketEventPayloadMap = {
505
+ [SOCKET_EVENT.AUTH_SUCCESS]: undefined;
506
+ [SOCKET_EVENT.STATUS]: PowerState;
507
+ [SOCKET_EVENT.CONSOLE_OUTPUT]: string;
508
+ [SOCKET_EVENT.STATS]: StatsWsJson;
509
+ [SOCKET_EVENT.DAEMON_ERROR]: undefined;
510
+ [SOCKET_EVENT.DAEMON_MESSAGE]: string;
511
+ [SOCKET_EVENT.INSTALL_OUTPUT]: string;
512
+ [SOCKET_EVENT.INSTALL_STARTED]: undefined;
513
+ [SOCKET_EVENT.INSTALL_COMPLETED]: undefined;
514
+ [SOCKET_EVENT.TRANSFER_LOGS]: string;
515
+ [SOCKET_EVENT.TRANSFER_STATUS]: string;
516
+ [SOCKET_EVENT.BACKUP_COMPLETED]: BackupCompletedJson;
517
+ [SOCKET_EVENT.BACKUP_RESTORE_COMPLETED]: undefined;
518
+ [SOCKET_EVENT.TOKEN_EXPIRING]: undefined;
519
+ [SOCKET_EVENT.TOKEN_EXPIRED]: undefined;
520
+ [SOCKET_EVENT.JWT_ERROR]: string;
521
+ };
522
+ type Listener<E extends SOCKET_EVENT> = SocketEventPayloadMap[E] extends undefined ? () => void : (payload: SocketEventPayloadMap[E]) => void;
523
+ type CloseEventLike = Parameters<NonNullable<WebSocket["onclose"]>>[0];
524
+ type ErrorEventLike = Parameters<NonNullable<WebSocket["onerror"]>>[0];
525
+ declare class ServerWebsocket {
526
+ private readonly r;
527
+ private readonly serverId;
528
+ private socket?;
529
+ private currentToken?;
530
+ private readonly bus;
531
+ private debugLogging;
532
+ private stripColors;
533
+ private detachMessageListener?;
534
+ constructor(requester: AxiosInstance, id: string, stripColors?: boolean);
535
+ on<E extends SOCKET_EVENT>(event: E, listener: Listener<E>): () => void;
536
+ deregister<E extends SOCKET_EVENT>(event: E, listener: Listener<E>): void;
537
+ private emit;
538
+ connect(resumable?: boolean, debugLogging?: boolean): Promise<void>;
539
+ onSocketDisconnect(handler: (event: CloseEventLike) => void): void;
540
+ onSocketError(handler: (event: ErrorEventLike) => void): void;
541
+ makeResumable(disconnectsToo: boolean): void;
542
+ private attachMessageListener;
543
+ private handleIncomingMessage;
544
+ private parseMessage;
545
+ private normalisePayload;
546
+ private dispatchMessage;
547
+ private refreshCredentials;
548
+ private authenticate;
549
+ disconnect(): void;
550
+ requestStats(): void;
551
+ requestLogs(): void;
552
+ private send;
553
+ getStats(): Promise<StatsWsJson>;
554
+ getLogs(): Promise<string[]>;
555
+ sendPoweraction(action: ServerSignalOption): void;
556
+ sendCommand(cmd: string): void;
557
+ }
558
+
559
+ declare class ServerActivity {
560
+ private readonly r;
561
+ private readonly id;
562
+ constructor(r: AxiosInstance, id: string);
563
+ list: (page?: number, per_page?: number) => Promise<ServerActivityLog[]>;
564
+ }
565
+
566
+ declare class ServerClient {
567
+ private readonly r;
568
+ private readonly id;
569
+ activity: ServerActivity;
570
+ databases: ServerDatabases;
571
+ files: ServerFiles;
572
+ schedules: ServerSchedules;
573
+ allocations: ServerAllocations;
574
+ users: ServerUsers;
575
+ backups: ServerBackups;
576
+ startup: ServerStartup;
577
+ variables: ServerStartup;
578
+ settings: ServerSettings;
579
+ constructor(requester: AxiosInstance, id: string);
580
+ info: (include?: ("egg" | "subusers")[]) => Promise<Server>;
581
+ websocket: (stripColors?: boolean) => ServerWebsocket;
582
+ resources: () => Promise<ServerStats>;
583
+ command: (command: string) => Promise<void>;
584
+ power: (signal: "start" | "stop" | "restart" | "kill") => Promise<void>;
585
+ }
586
+
587
+ declare class Client$1 {
588
+ account: Account;
589
+ private readonly r;
590
+ constructor(requester: AxiosInstance);
591
+ listPermissions: () => Promise<Record<string, Permission>>;
592
+ listServers: (type?: "accessible" | "mine" | "admin" | "admin-all", page?: number, per_page?: number, include?: ("egg" | "subusers")[]) => Promise<Server[]>;
593
+ server: (uuid: string) => ServerClient;
594
+ }
595
+
596
+ type User = {
597
+ id: number;
598
+ external_id: string | null;
599
+ uuid: string;
600
+ username: string;
601
+ email: string;
602
+ first_name: string;
603
+ last_name: string;
604
+ language: string;
605
+ root_admin: string;
606
+ "2fa": boolean;
607
+ created_at: string;
608
+ updated_at: string;
609
+ relationships?: {
610
+ servers: GenericListResponse<GenericResponse<Server$1>>;
611
+ };
612
+ };
613
+
614
+ declare class Users {
615
+ private readonly r;
616
+ constructor(requester: AxiosInstance);
617
+ list: ({ ...opts }: ListType, page?: number) => Promise<User[]>;
618
+ info: (id: number, { include }: {
619
+ include?: ("servers")[];
620
+ }) => Promise<User>;
621
+ infoByExternal: (external_id: string, { include }: {
622
+ include?: ("servers")[];
623
+ }) => Promise<User>;
624
+ create: (user: CreateType) => Promise<User>;
625
+ update: (id: number, user: UpdateType) => Promise<User>;
626
+ delete: (id: number) => Promise<void>;
627
+ }
628
+ type ListType = {
629
+ include?: ("servers")[];
630
+ filters?: ListFilters;
631
+ sort?: ListSort;
632
+ };
633
+ type ListFilters = {
634
+ [key in "email" | "uuid" | "username" | "external_id"]: string;
635
+ };
636
+ type ListSort = ExactlyOneKey<"id" | "uuid", "asc" | "desc">;
637
+ type CreateType = {
638
+ email: string;
639
+ username: string;
640
+ first_name: string;
641
+ last_name: string;
642
+ };
643
+ type UpdateType = CreateType & {
644
+ language: string;
645
+ password: string;
646
+ };
647
+
648
+ declare class Client {
649
+ private readonly r;
650
+ users: Users;
651
+ constructor(requester: AxiosInstance);
652
+ }
653
+
654
+ declare class PelicanClient extends Client$1 {
655
+ constructor(url: string, token: string);
656
+ }
657
+ declare class PelicanApplication extends Client {
658
+ constructor(url: string, token: string);
659
+ }
660
+
661
+ export { PelicanApplication, PelicanClient };