@pelican.ts/sdk 0.4.15 → 0.4.16-next.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/README.md +5 -4
- package/bun.lock +40 -0
- package/dist/api/index.d.mts +777 -786
- package/dist/api/index.d.ts +777 -786
- package/dist/api/index.js +1536 -1534
- package/dist/api/index.mjs +1536 -1534
- package/dist/index.d.mts +270 -188
- package/dist/index.d.ts +270 -188
- package/dist/index.js +1118 -1081
- package/dist/index.mjs +1118 -1081
- package/dist/types.d.ts +250 -259
- package/package.json +3 -1
package/dist/types.d.ts
CHANGED
|
@@ -2,6 +2,100 @@ import z from 'zod';
|
|
|
2
2
|
import { AxiosInstance } from 'axios';
|
|
3
3
|
import WebSocket from 'isomorphic-ws';
|
|
4
4
|
|
|
5
|
+
type ServerSignalOption = "start" | "stop" | "restart" | "kill";
|
|
6
|
+
|
|
7
|
+
type GenericResponse<T, N extends string = string, M = undefined> = {
|
|
8
|
+
object: N;
|
|
9
|
+
attributes: T;
|
|
10
|
+
meta?: M;
|
|
11
|
+
};
|
|
12
|
+
type PaginationMeta = {
|
|
13
|
+
total: number;
|
|
14
|
+
count: number;
|
|
15
|
+
per_page: number;
|
|
16
|
+
current_page: number;
|
|
17
|
+
total_pages: number;
|
|
18
|
+
links: unknown;
|
|
19
|
+
};
|
|
20
|
+
type GenericListResponse<T> = {
|
|
21
|
+
object: "list";
|
|
22
|
+
data: T[];
|
|
23
|
+
meta?: {
|
|
24
|
+
pagination: PaginationMeta;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
type ServerDatabase = {
|
|
29
|
+
id: string;
|
|
30
|
+
host: {
|
|
31
|
+
address: string;
|
|
32
|
+
port: number;
|
|
33
|
+
};
|
|
34
|
+
name: string;
|
|
35
|
+
username: string;
|
|
36
|
+
connections_from: string;
|
|
37
|
+
max_connections: number;
|
|
38
|
+
relationships?: {
|
|
39
|
+
password: GenericResponse<{
|
|
40
|
+
password: string;
|
|
41
|
+
}, "database_password">;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
type Nullable<T> = T | null;
|
|
46
|
+
|
|
47
|
+
type ServerLimits = {
|
|
48
|
+
memory: number;
|
|
49
|
+
swap: number;
|
|
50
|
+
disk: number;
|
|
51
|
+
io: number;
|
|
52
|
+
cpu: number;
|
|
53
|
+
threads: Nullable<number | string>;
|
|
54
|
+
oom_disabled: boolean;
|
|
55
|
+
oom_killer: boolean;
|
|
56
|
+
};
|
|
57
|
+
type FeatureLimits = {
|
|
58
|
+
databases: number;
|
|
59
|
+
allocations: number;
|
|
60
|
+
backups: number;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
type StartupParams = {
|
|
64
|
+
name: string;
|
|
65
|
+
description: string;
|
|
66
|
+
env_variables: string;
|
|
67
|
+
default_value: string;
|
|
68
|
+
server_value: string;
|
|
69
|
+
is_editable: boolean;
|
|
70
|
+
rules: string;
|
|
71
|
+
};
|
|
72
|
+
type StartupMeta = {
|
|
73
|
+
startup_command: string;
|
|
74
|
+
raw_startup_command: string;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
type ServerBackup = {
|
|
78
|
+
uuid: string;
|
|
79
|
+
is_successful: boolean;
|
|
80
|
+
is_locked: boolean;
|
|
81
|
+
name: string;
|
|
82
|
+
ignored_files: string[];
|
|
83
|
+
checksum: Nullable<string>;
|
|
84
|
+
bytes: number;
|
|
85
|
+
created_at: string;
|
|
86
|
+
completed_at: Nullable<string>;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
type EggVariable = {
|
|
90
|
+
name: string;
|
|
91
|
+
description: string;
|
|
92
|
+
env_variable: string;
|
|
93
|
+
default_value: string;
|
|
94
|
+
server_value: string;
|
|
95
|
+
is_editable: boolean;
|
|
96
|
+
rules: string;
|
|
97
|
+
};
|
|
98
|
+
|
|
5
99
|
type FileObject = {
|
|
6
100
|
name: string;
|
|
7
101
|
mode: string;
|
|
@@ -574,90 +668,6 @@ declare const timezonesSchema: z.ZodEnum<{
|
|
|
574
668
|
}>;
|
|
575
669
|
type TimezonesType = z.infer<typeof timezonesSchema>;
|
|
576
670
|
|
|
577
|
-
type GenericResponse<T, N extends string = string, M = undefined> = {
|
|
578
|
-
object: N;
|
|
579
|
-
attributes: T;
|
|
580
|
-
meta?: M;
|
|
581
|
-
};
|
|
582
|
-
type PaginationMeta = {
|
|
583
|
-
total: number;
|
|
584
|
-
count: number;
|
|
585
|
-
per_page: number;
|
|
586
|
-
current_page: number;
|
|
587
|
-
total_pages: number;
|
|
588
|
-
links: any;
|
|
589
|
-
};
|
|
590
|
-
type GenericListResponse<T> = {
|
|
591
|
-
object: "list";
|
|
592
|
-
data: T[];
|
|
593
|
-
meta?: {
|
|
594
|
-
pagination: PaginationMeta;
|
|
595
|
-
};
|
|
596
|
-
};
|
|
597
|
-
|
|
598
|
-
type ServerDatabase = {
|
|
599
|
-
id: string;
|
|
600
|
-
host: {
|
|
601
|
-
address: string;
|
|
602
|
-
port: number;
|
|
603
|
-
};
|
|
604
|
-
name: string;
|
|
605
|
-
username: string;
|
|
606
|
-
connections_from: string;
|
|
607
|
-
max_connections: number;
|
|
608
|
-
relationships?: {
|
|
609
|
-
password: GenericResponse<{
|
|
610
|
-
password: string;
|
|
611
|
-
}, "database_password">;
|
|
612
|
-
};
|
|
613
|
-
};
|
|
614
|
-
|
|
615
|
-
type Nullable<T> = T | null;
|
|
616
|
-
|
|
617
|
-
type ServerBackup = {
|
|
618
|
-
uuid: string;
|
|
619
|
-
is_successful: boolean;
|
|
620
|
-
is_locked: boolean;
|
|
621
|
-
name: string;
|
|
622
|
-
ignored_files: string[];
|
|
623
|
-
checksum: Nullable<string>;
|
|
624
|
-
bytes: number;
|
|
625
|
-
created_at: string;
|
|
626
|
-
completed_at: Nullable<string>;
|
|
627
|
-
};
|
|
628
|
-
|
|
629
|
-
type ServerSignalOption = "start" | "stop" | "restart" | "kill";
|
|
630
|
-
|
|
631
|
-
type ServerLimits = {
|
|
632
|
-
memory: number;
|
|
633
|
-
swap: number;
|
|
634
|
-
disk: number;
|
|
635
|
-
io: number;
|
|
636
|
-
cpu: number;
|
|
637
|
-
threads: Nullable<number | string>;
|
|
638
|
-
oom_disabled: boolean;
|
|
639
|
-
oom_killer: boolean;
|
|
640
|
-
};
|
|
641
|
-
type FeatureLimits = {
|
|
642
|
-
databases: number;
|
|
643
|
-
allocations: number;
|
|
644
|
-
backups: number;
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
type StartupParams = {
|
|
648
|
-
name: string;
|
|
649
|
-
description: string;
|
|
650
|
-
env_variables: string;
|
|
651
|
-
default_value: string;
|
|
652
|
-
server_value: string;
|
|
653
|
-
is_editable: boolean;
|
|
654
|
-
rules: string;
|
|
655
|
-
};
|
|
656
|
-
type StartupMeta = {
|
|
657
|
-
startup_command: string;
|
|
658
|
-
raw_startup_command: string;
|
|
659
|
-
};
|
|
660
|
-
|
|
661
671
|
type Schedule = {
|
|
662
672
|
id: number;
|
|
663
673
|
name: string;
|
|
@@ -690,35 +700,6 @@ type ScheduleTask = {
|
|
|
690
700
|
updated_at: Nullable<string>;
|
|
691
701
|
};
|
|
692
702
|
|
|
693
|
-
type EggVariable = {
|
|
694
|
-
name: string;
|
|
695
|
-
description: string;
|
|
696
|
-
env_variable: string;
|
|
697
|
-
default_value: string;
|
|
698
|
-
server_value: string;
|
|
699
|
-
is_editable: boolean;
|
|
700
|
-
rules: string;
|
|
701
|
-
};
|
|
702
|
-
|
|
703
|
-
type Mount = {
|
|
704
|
-
id: number;
|
|
705
|
-
uuid: string;
|
|
706
|
-
name: string;
|
|
707
|
-
description: Nullable<string>;
|
|
708
|
-
source: string;
|
|
709
|
-
target: string;
|
|
710
|
-
read_only: boolean;
|
|
711
|
-
user_mountable: boolean;
|
|
712
|
-
};
|
|
713
|
-
|
|
714
|
-
type Location = {
|
|
715
|
-
id: number;
|
|
716
|
-
short: string;
|
|
717
|
-
long: string;
|
|
718
|
-
created_at: string;
|
|
719
|
-
updated_at: string | null;
|
|
720
|
-
};
|
|
721
|
-
|
|
722
703
|
type Container = {
|
|
723
704
|
startup_command: string;
|
|
724
705
|
image: string;
|
|
@@ -750,6 +731,21 @@ type ApplicationServer = {
|
|
|
750
731
|
updated_at: Nullable<string>;
|
|
751
732
|
};
|
|
752
733
|
|
|
734
|
+
type Allocation = {
|
|
735
|
+
id: number;
|
|
736
|
+
ip: string;
|
|
737
|
+
alias: Nullable<string>;
|
|
738
|
+
port: number;
|
|
739
|
+
notes: Nullable<string>;
|
|
740
|
+
assigned: boolean;
|
|
741
|
+
};
|
|
742
|
+
type AllocationRel = Allocation & {
|
|
743
|
+
relationships?: {
|
|
744
|
+
node?: GenericResponse<Node, "node">;
|
|
745
|
+
server?: GenericResponse<ApplicationServer, "server">;
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
|
|
753
749
|
type Node = {
|
|
754
750
|
id: number;
|
|
755
751
|
uuid: string;
|
|
@@ -782,7 +778,6 @@ type Node = {
|
|
|
782
778
|
};
|
|
783
779
|
relationships?: {
|
|
784
780
|
allocations?: GenericListResponse<GenericResponse<Allocation, "allocation">>;
|
|
785
|
-
location?: GenericResponse<Location, "location">;
|
|
786
781
|
servers?: GenericListResponse<GenericResponse<ApplicationServer, "server">>;
|
|
787
782
|
};
|
|
788
783
|
};
|
|
@@ -811,49 +806,15 @@ type NodeConfiguration = {
|
|
|
811
806
|
remote: string;
|
|
812
807
|
};
|
|
813
808
|
|
|
814
|
-
type
|
|
815
|
-
id: number;
|
|
816
|
-
ip: string;
|
|
817
|
-
alias: Nullable<string>;
|
|
818
|
-
port: number;
|
|
819
|
-
notes: Nullable<string>;
|
|
820
|
-
assigned: boolean;
|
|
821
|
-
};
|
|
822
|
-
type AllocationRel = Allocation & {
|
|
823
|
-
relationships?: {
|
|
824
|
-
node?: GenericResponse<Node, "node">;
|
|
825
|
-
server?: GenericResponse<ApplicationServer, "server">;
|
|
826
|
-
};
|
|
827
|
-
};
|
|
828
|
-
|
|
829
|
-
type ApplicationUser = {
|
|
809
|
+
type Mount = {
|
|
830
810
|
id: number;
|
|
831
|
-
external_id: Nullable<string>;
|
|
832
811
|
uuid: string;
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
created_at: string;
|
|
840
|
-
updated_at: Nullable<string>;
|
|
841
|
-
relationships?: {
|
|
842
|
-
servers: GenericListResponse<GenericResponse<ApplicationServer>>;
|
|
843
|
-
};
|
|
844
|
-
};
|
|
845
|
-
type ApplicationUserApiKey = {
|
|
846
|
-
id: number;
|
|
847
|
-
user_id: number;
|
|
848
|
-
key_type: 1;
|
|
849
|
-
identifier: string;
|
|
850
|
-
memo: string;
|
|
851
|
-
allowed_ips: Array<string>;
|
|
852
|
-
permissions: [];
|
|
853
|
-
last_used_at: Nullable<string>;
|
|
854
|
-
expires_at: Nullable<string>;
|
|
855
|
-
created_at: string;
|
|
856
|
-
updated_at: string;
|
|
812
|
+
name: string;
|
|
813
|
+
description: Nullable<string>;
|
|
814
|
+
source: string;
|
|
815
|
+
target: string;
|
|
816
|
+
read_only: boolean;
|
|
817
|
+
user_mountable: boolean;
|
|
857
818
|
};
|
|
858
819
|
|
|
859
820
|
type DatabaseHost = {
|
|
@@ -866,6 +827,13 @@ type DatabaseHost = {
|
|
|
866
827
|
updated_at: Nullable<string>;
|
|
867
828
|
};
|
|
868
829
|
|
|
830
|
+
type Role = {
|
|
831
|
+
id: number;
|
|
832
|
+
name: string;
|
|
833
|
+
created_at: string;
|
|
834
|
+
updated_at: string;
|
|
835
|
+
};
|
|
836
|
+
|
|
869
837
|
type Egg = {
|
|
870
838
|
id: number;
|
|
871
839
|
uuid: string;
|
|
@@ -933,121 +901,34 @@ type ExportedEgg = {
|
|
|
933
901
|
variables: ApplicationEggVariable[];
|
|
934
902
|
};
|
|
935
903
|
|
|
936
|
-
type
|
|
904
|
+
type ApplicationUser = {
|
|
937
905
|
id: number;
|
|
938
|
-
|
|
939
|
-
created_at: string;
|
|
940
|
-
updated_at: string;
|
|
941
|
-
};
|
|
942
|
-
|
|
943
|
-
type ServerSubuser = {
|
|
906
|
+
external_id: Nullable<string>;
|
|
944
907
|
uuid: string;
|
|
945
908
|
username: string;
|
|
946
909
|
email: string;
|
|
947
910
|
language: string;
|
|
948
|
-
|
|
949
|
-
admin: false;
|
|
950
|
-
root_admin: false;
|
|
911
|
+
root_admin: string;
|
|
951
912
|
"2fa_enabled": boolean;
|
|
913
|
+
"2fa": boolean;
|
|
952
914
|
created_at: string;
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
type ServerAllocation = {
|
|
958
|
-
id: number;
|
|
959
|
-
ip: string;
|
|
960
|
-
ip_alias: Nullable<string>;
|
|
961
|
-
port: number;
|
|
962
|
-
notes: Nullable<string>;
|
|
963
|
-
is_default: boolean;
|
|
964
|
-
};
|
|
965
|
-
|
|
966
|
-
type Server = {
|
|
967
|
-
server_owner: boolean;
|
|
968
|
-
identifier: string;
|
|
969
|
-
internal_id?: number;
|
|
970
|
-
uuid: string;
|
|
971
|
-
name: string;
|
|
972
|
-
node: string;
|
|
973
|
-
is_node_under_maintenance: boolean;
|
|
974
|
-
sftp_details: {
|
|
975
|
-
ip: string;
|
|
976
|
-
alias: Nullable<string>;
|
|
977
|
-
port: number;
|
|
978
|
-
};
|
|
979
|
-
description: string;
|
|
980
|
-
limits: ServerLimits;
|
|
981
|
-
invocation: string;
|
|
982
|
-
docker_image: string;
|
|
983
|
-
egg_features: Nullable<string[]>;
|
|
984
|
-
feature_limits: FeatureLimits;
|
|
985
|
-
status: Nullable<unknown>;
|
|
986
|
-
is_suspended: boolean;
|
|
987
|
-
is_installing: boolean;
|
|
988
|
-
is_transferring: boolean;
|
|
989
|
-
relationships: {
|
|
990
|
-
allocations: GenericListResponse<GenericResponse<ServerAllocation, "allocation">>;
|
|
991
|
-
variables: GenericListResponse<GenericResponse<EggVariable, "egg_variable">>;
|
|
992
|
-
egg?: GenericResponse<{
|
|
993
|
-
uuid: string;
|
|
994
|
-
name: string;
|
|
995
|
-
}, "egg">;
|
|
996
|
-
subusers?: GenericListResponse<GenericResponse<ServerSubuser, "server_subuser">>;
|
|
915
|
+
updated_at: Nullable<string>;
|
|
916
|
+
relationships?: {
|
|
917
|
+
servers: GenericListResponse<GenericResponse<ApplicationServer>>;
|
|
997
918
|
};
|
|
998
919
|
};
|
|
999
|
-
type
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
};
|
|
1004
|
-
type ServerResources = {
|
|
1005
|
-
memory_bytes: number;
|
|
1006
|
-
cpu_absolute: number;
|
|
1007
|
-
disk_bytes: number;
|
|
1008
|
-
network_tx_bytes: number;
|
|
1009
|
-
network_rx_bytes: number;
|
|
1010
|
-
uptime: number;
|
|
1011
|
-
};
|
|
1012
|
-
type ServerActivityLog = {
|
|
1013
|
-
id: string;
|
|
1014
|
-
event: string;
|
|
1015
|
-
is_api: boolean;
|
|
1016
|
-
ip: string;
|
|
1017
|
-
description: Nullable<string>;
|
|
1018
|
-
properties: Record<string, string>;
|
|
1019
|
-
has_additional_metadata: boolean;
|
|
1020
|
-
timestamp: string;
|
|
1021
|
-
};
|
|
1022
|
-
|
|
1023
|
-
type User = {
|
|
1024
|
-
uuid: string;
|
|
1025
|
-
username: string;
|
|
1026
|
-
email: string;
|
|
1027
|
-
language: string;
|
|
1028
|
-
image: string;
|
|
1029
|
-
admin: boolean;
|
|
1030
|
-
root_admin: boolean;
|
|
1031
|
-
"2fa_enabled": boolean;
|
|
1032
|
-
created_at: string;
|
|
1033
|
-
updated_at: string;
|
|
1034
|
-
};
|
|
1035
|
-
type APIKey = {
|
|
920
|
+
type ApplicationUserApiKey = {
|
|
921
|
+
id: number;
|
|
922
|
+
user_id: number;
|
|
923
|
+
key_type: 1;
|
|
1036
924
|
identifier: string;
|
|
1037
|
-
|
|
1038
|
-
allowed_ips: string
|
|
925
|
+
memo: string;
|
|
926
|
+
allowed_ips: Array<string>;
|
|
927
|
+
permissions: [];
|
|
1039
928
|
last_used_at: Nullable<string>;
|
|
929
|
+
expires_at: Nullable<string>;
|
|
1040
930
|
created_at: string;
|
|
1041
|
-
|
|
1042
|
-
type SSHKey = {
|
|
1043
|
-
name: string;
|
|
1044
|
-
fingerprint: string;
|
|
1045
|
-
pubic_key: string;
|
|
1046
|
-
created_at: string;
|
|
1047
|
-
};
|
|
1048
|
-
type Permission = {
|
|
1049
|
-
description: string;
|
|
1050
|
-
keys: Record<string, string>;
|
|
931
|
+
updated_at: string;
|
|
1051
932
|
};
|
|
1052
933
|
|
|
1053
934
|
type SocketEventPayloadMap = {
|
|
@@ -1221,4 +1102,114 @@ type JwtErrorEvent = {
|
|
|
1221
1102
|
args: [string];
|
|
1222
1103
|
};
|
|
1223
1104
|
|
|
1224
|
-
|
|
1105
|
+
type ServerAllocation = {
|
|
1106
|
+
id: number;
|
|
1107
|
+
ip: string;
|
|
1108
|
+
ip_alias: Nullable<string>;
|
|
1109
|
+
port: number;
|
|
1110
|
+
notes: Nullable<string>;
|
|
1111
|
+
is_default: boolean;
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
type ServerSubuser = {
|
|
1115
|
+
uuid: string;
|
|
1116
|
+
username: string;
|
|
1117
|
+
email: string;
|
|
1118
|
+
language: string;
|
|
1119
|
+
image: string;
|
|
1120
|
+
admin: false;
|
|
1121
|
+
root_admin: false;
|
|
1122
|
+
"2fa_enabled": boolean;
|
|
1123
|
+
created_at: string;
|
|
1124
|
+
permissions: SubuserPermission[] | string[];
|
|
1125
|
+
};
|
|
1126
|
+
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";
|
|
1127
|
+
|
|
1128
|
+
type Server = {
|
|
1129
|
+
server_owner: boolean;
|
|
1130
|
+
identifier: string;
|
|
1131
|
+
internal_id?: number;
|
|
1132
|
+
uuid: string;
|
|
1133
|
+
name: string;
|
|
1134
|
+
node: string;
|
|
1135
|
+
is_node_under_maintenance: boolean;
|
|
1136
|
+
sftp_details: {
|
|
1137
|
+
ip: string;
|
|
1138
|
+
alias: Nullable<string>;
|
|
1139
|
+
port: number;
|
|
1140
|
+
};
|
|
1141
|
+
description: string;
|
|
1142
|
+
limits: ServerLimits;
|
|
1143
|
+
invocation: string;
|
|
1144
|
+
docker_image: string;
|
|
1145
|
+
egg_features: Nullable<string[]>;
|
|
1146
|
+
feature_limits: FeatureLimits;
|
|
1147
|
+
status: Nullable<unknown>;
|
|
1148
|
+
is_suspended: boolean;
|
|
1149
|
+
is_installing: boolean;
|
|
1150
|
+
is_transferring: boolean;
|
|
1151
|
+
relationships: {
|
|
1152
|
+
allocations: GenericListResponse<GenericResponse<ServerAllocation, "allocation">>;
|
|
1153
|
+
variables: GenericListResponse<GenericResponse<EggVariable, "egg_variable">>;
|
|
1154
|
+
egg?: GenericResponse<{
|
|
1155
|
+
uuid: string;
|
|
1156
|
+
name: string;
|
|
1157
|
+
}, "egg">;
|
|
1158
|
+
subusers?: GenericListResponse<GenericResponse<ServerSubuser, "server_subuser">>;
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
type ServerStats = {
|
|
1162
|
+
current_state: "installing" | "install_failed" | "reinstall_failed" | "suspended" | "restoring_backup" | "running" | "stopped" | "offline";
|
|
1163
|
+
is_suspended: boolean;
|
|
1164
|
+
resources: ServerResources;
|
|
1165
|
+
};
|
|
1166
|
+
type ServerResources = {
|
|
1167
|
+
memory_bytes: number;
|
|
1168
|
+
cpu_absolute: number;
|
|
1169
|
+
disk_bytes: number;
|
|
1170
|
+
network_tx_bytes: number;
|
|
1171
|
+
network_rx_bytes: number;
|
|
1172
|
+
uptime: number;
|
|
1173
|
+
};
|
|
1174
|
+
type ServerActivityLog = {
|
|
1175
|
+
id: string;
|
|
1176
|
+
event: string;
|
|
1177
|
+
is_api: boolean;
|
|
1178
|
+
ip: string;
|
|
1179
|
+
description: Nullable<string>;
|
|
1180
|
+
properties: Record<string, string>;
|
|
1181
|
+
has_additional_metadata: boolean;
|
|
1182
|
+
timestamp: string;
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
type User = {
|
|
1186
|
+
uuid: string;
|
|
1187
|
+
username: string;
|
|
1188
|
+
email: string;
|
|
1189
|
+
language: string;
|
|
1190
|
+
image: string;
|
|
1191
|
+
admin: boolean;
|
|
1192
|
+
root_admin: boolean;
|
|
1193
|
+
"2fa_enabled": boolean;
|
|
1194
|
+
created_at: string;
|
|
1195
|
+
updated_at: string;
|
|
1196
|
+
};
|
|
1197
|
+
type APIKey = {
|
|
1198
|
+
identifier: string;
|
|
1199
|
+
description: string;
|
|
1200
|
+
allowed_ips: string[];
|
|
1201
|
+
last_used_at: Nullable<string>;
|
|
1202
|
+
created_at: string;
|
|
1203
|
+
};
|
|
1204
|
+
type SSHKey = {
|
|
1205
|
+
name: string;
|
|
1206
|
+
fingerprint: string;
|
|
1207
|
+
pubic_key: string;
|
|
1208
|
+
created_at: string;
|
|
1209
|
+
};
|
|
1210
|
+
type Permission = {
|
|
1211
|
+
description: string;
|
|
1212
|
+
keys: Record<string, string>;
|
|
1213
|
+
};
|
|
1214
|
+
|
|
1215
|
+
export { type APIKey, type Allocation, type AllocationRel, type ApplicationEggVariable, type ApplicationServer, type ApplicationUser, type ApplicationUserApiKey, type AuthSuccessWsEvent, type BackupCompletedEvent, type BackupCompletedJson, type BackupRestoreCompletedEvent, type ConsoleLogWsEvent, type Container, type DaemonErrorEvent, type DaemonMessageEvent, type DatabaseHost, type Egg, type EggVariable, type ExportedEgg, type FeatureLimits, type FileObject, type InstallCompletedEvent, type InstallOutputEvent, type InstallStartedEvent, type JwtErrorEvent, type LanguagesType, type Mount, type Node, type NodeConfiguration, type Permission, type PowerState, type Role, SERVER_SIGNAL, SOCKET_EVENT, type SSHKey, type Schedule, type ScheduleTask, type Server, type ServerActivityLog, type ServerAllocation, type ServerBackup, type ServerDatabase, type ServerLimits, type ServerSignalOption, type ServerStats, type ServerStatus, type ServerSubuser, ServerWebsocket, type StartupMeta, type StartupParams, type StatsWsEvent, type StatsWsJson, type StatusWsEvent, type SubuserPermission, type TimezonesType, type TokenExpiredWsEvent, type TokenExpiringWsEvent, type TransferLogsEvent, type TransferStatusEvent, type User, type WebsocketEvent, languagesSchema, timezonesSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pelican.ts/sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.16-next.0",
|
|
4
4
|
"description": "Pelican panel SDK for TypeScript",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
"husky": "^9.1.7",
|
|
55
55
|
"tsc-alias": "^1.8.16",
|
|
56
56
|
"tsup": "^8.5.0",
|
|
57
|
+
"typedoc": "^0.28.15",
|
|
58
|
+
"typedoc-github-theme": "^0.3.1",
|
|
57
59
|
"typescript": "^5.9.3"
|
|
58
60
|
},
|
|
59
61
|
"dependencies": {
|