@pelican.ts/sdk 0.3.3-next.6 → 0.3.4-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +34 -2
- package/dist/index.d.ts +34 -2
- package/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/dist/types.d.ts +34 -2
- package/package.json +1 -1
- package/src/api/application/eggs.ts +6 -1
- package/src/api/application/types/egg.ts +36 -1
- package/src/utils/types.ts +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -11,7 +11,6 @@ type ExactlyOneKey<K extends keyof any, V, KK extends keyof any = K> = {
|
|
|
11
11
|
[Q in keyof O]: O[Q];
|
|
12
12
|
} : never;
|
|
13
13
|
}[K];
|
|
14
|
-
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
15
14
|
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
16
15
|
type Nullable<T> = T | null;
|
|
17
16
|
|
|
@@ -1511,7 +1510,7 @@ type Egg = {
|
|
|
1511
1510
|
description: string;
|
|
1512
1511
|
features: string[];
|
|
1513
1512
|
tags: string[];
|
|
1514
|
-
docker_image: string
|
|
1513
|
+
docker_image: Nullable<string>;
|
|
1515
1514
|
docker_images: Record<string, string>;
|
|
1516
1515
|
config: {
|
|
1517
1516
|
files: Record<string, FileConfig>;
|
|
@@ -1537,6 +1536,38 @@ type FileConfig = {
|
|
|
1537
1536
|
parser: string;
|
|
1538
1537
|
find: Record<string, string>;
|
|
1539
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: number;
|
|
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
|
+
};
|
|
1540
1571
|
|
|
1541
1572
|
declare class Eggs {
|
|
1542
1573
|
private readonly r;
|
|
@@ -1544,6 +1575,7 @@ declare class Eggs {
|
|
|
1544
1575
|
list: () => Promise<Egg[]>;
|
|
1545
1576
|
info: (id: number) => Promise<Egg>;
|
|
1546
1577
|
export: (id: number, format: "json" | "yaml") => Promise<string>;
|
|
1578
|
+
infoExportable: (id: number) => Promise<ExportedEgg>;
|
|
1547
1579
|
}
|
|
1548
1580
|
|
|
1549
1581
|
type Mount = {
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ type ExactlyOneKey<K extends keyof any, V, KK extends keyof any = K> = {
|
|
|
11
11
|
[Q in keyof O]: O[Q];
|
|
12
12
|
} : never;
|
|
13
13
|
}[K];
|
|
14
|
-
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
15
14
|
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
16
15
|
type Nullable<T> = T | null;
|
|
17
16
|
|
|
@@ -1511,7 +1510,7 @@ type Egg = {
|
|
|
1511
1510
|
description: string;
|
|
1512
1511
|
features: string[];
|
|
1513
1512
|
tags: string[];
|
|
1514
|
-
docker_image: string
|
|
1513
|
+
docker_image: Nullable<string>;
|
|
1515
1514
|
docker_images: Record<string, string>;
|
|
1516
1515
|
config: {
|
|
1517
1516
|
files: Record<string, FileConfig>;
|
|
@@ -1537,6 +1536,38 @@ type FileConfig = {
|
|
|
1537
1536
|
parser: string;
|
|
1538
1537
|
find: Record<string, string>;
|
|
1539
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: number;
|
|
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
|
+
};
|
|
1540
1571
|
|
|
1541
1572
|
declare class Eggs {
|
|
1542
1573
|
private readonly r;
|
|
@@ -1544,6 +1575,7 @@ declare class Eggs {
|
|
|
1544
1575
|
list: () => Promise<Egg[]>;
|
|
1545
1576
|
info: (id: number) => Promise<Egg>;
|
|
1546
1577
|
export: (id: number, format: "json" | "yaml") => Promise<string>;
|
|
1578
|
+
infoExportable: (id: number) => Promise<ExportedEgg>;
|
|
1547
1579
|
}
|
|
1548
1580
|
|
|
1549
1581
|
type Mount = {
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -849,7 +849,7 @@ type Egg = {
|
|
|
849
849
|
description: string;
|
|
850
850
|
features: string[];
|
|
851
851
|
tags: string[];
|
|
852
|
-
docker_image: string
|
|
852
|
+
docker_image: Nullable<string>;
|
|
853
853
|
docker_images: Record<string, string>;
|
|
854
854
|
config: {
|
|
855
855
|
files: Record<string, FileConfig>;
|
|
@@ -875,6 +875,38 @@ type FileConfig = {
|
|
|
875
875
|
parser: string;
|
|
876
876
|
find: Record<string, string>;
|
|
877
877
|
};
|
|
878
|
+
type ApplicationEggVariable = Omit<EggVariable, "server_value" | "is_editable" | "rules"> & {
|
|
879
|
+
rules: string[];
|
|
880
|
+
sort: number;
|
|
881
|
+
user_viewable: boolean;
|
|
882
|
+
user_editable: boolean;
|
|
883
|
+
};
|
|
884
|
+
type ExportedEgg = {
|
|
885
|
+
meta: {
|
|
886
|
+
version: "PLCN_v3";
|
|
887
|
+
update_url: Nullable<string>;
|
|
888
|
+
};
|
|
889
|
+
exported_at: string;
|
|
890
|
+
name: number;
|
|
891
|
+
author: string;
|
|
892
|
+
description: string;
|
|
893
|
+
uuid: string;
|
|
894
|
+
image: Nullable<string>;
|
|
895
|
+
docker_images: Record<string, string>;
|
|
896
|
+
features: string[];
|
|
897
|
+
tags: string[];
|
|
898
|
+
file_denylist: string[];
|
|
899
|
+
startup_commands: Record<string, string>;
|
|
900
|
+
config: Omit<Egg["config"], "extends" | "file_denylist">;
|
|
901
|
+
scripts: {
|
|
902
|
+
installation: {
|
|
903
|
+
script: string;
|
|
904
|
+
container: string;
|
|
905
|
+
entrypoint: string;
|
|
906
|
+
};
|
|
907
|
+
};
|
|
908
|
+
variables: ApplicationEggVariable[];
|
|
909
|
+
};
|
|
878
910
|
|
|
879
911
|
type ApplicationUser = {
|
|
880
912
|
id: number;
|
|
@@ -1132,4 +1164,4 @@ type Permission = {
|
|
|
1132
1164
|
keys: Record<string, string>;
|
|
1133
1165
|
};
|
|
1134
1166
|
|
|
1135
|
-
export { type APIKey, type Allocation, type AllocationRel, 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 FeatureLimits, type FileObject, type InstallCompletedEvent, type InstallOutputEvent, type InstallStartedEvent, type JwtErrorEvent, type LanguagesType, type Location, 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, 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 };
|
|
1167
|
+
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 Location, 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, 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
|
import {AxiosInstance} from "axios";
|
|
2
2
|
import {GenericListResponse, GenericResponse} from "@/api/base/types";
|
|
3
|
-
import {Egg} from "@/api/application/types/egg";
|
|
3
|
+
import {Egg, ExportedEgg} from "@/api/application/types/egg";
|
|
4
4
|
|
|
5
5
|
// TODO: API is incomplete
|
|
6
6
|
|
|
@@ -28,4 +28,9 @@ export class Eggs {
|
|
|
28
28
|
})
|
|
29
29
|
return data
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
infoExportable = async (id: number): Promise<ExportedEgg> => {
|
|
33
|
+
const {data} = await this.r.get<ExportedEgg>(`/eggs/${id}/export`)
|
|
34
|
+
return data
|
|
35
|
+
}
|
|
31
36
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {Nullable} from "@/utils/types";
|
|
2
|
+
import {EggVariable} from "@/api/common/types";
|
|
2
3
|
|
|
3
4
|
export type Egg = {
|
|
4
5
|
id: number,
|
|
@@ -8,7 +9,7 @@ export type Egg = {
|
|
|
8
9
|
description: string,
|
|
9
10
|
features: string[],
|
|
10
11
|
tags: string[],
|
|
11
|
-
docker_image: string
|
|
12
|
+
docker_image: Nullable<string>,
|
|
12
13
|
docker_images: Record<string, string>,
|
|
13
14
|
config: {
|
|
14
15
|
files: Record<string, FileConfig>
|
|
@@ -34,4 +35,38 @@ export type Egg = {
|
|
|
34
35
|
type FileConfig = {
|
|
35
36
|
parser: string,
|
|
36
37
|
find: Record<string, string>
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type ApplicationEggVariable = Omit<EggVariable, "server_value" | "is_editable" | "rules"> & {
|
|
41
|
+
rules: string[],
|
|
42
|
+
sort: number,
|
|
43
|
+
user_viewable: boolean,
|
|
44
|
+
user_editable: boolean,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type ExportedEgg = {
|
|
48
|
+
meta: {
|
|
49
|
+
version: "PLCN_v3",
|
|
50
|
+
update_url: Nullable<string>
|
|
51
|
+
},
|
|
52
|
+
exported_at: string,
|
|
53
|
+
name: number,
|
|
54
|
+
author: string,
|
|
55
|
+
description: string,
|
|
56
|
+
uuid: string,
|
|
57
|
+
image: Nullable<string>
|
|
58
|
+
docker_images: Record<string, string>,
|
|
59
|
+
features: string[],
|
|
60
|
+
tags: string[],
|
|
61
|
+
file_denylist: string[],
|
|
62
|
+
startup_commands: Record<string, string>,
|
|
63
|
+
config: Omit<Egg["config"], "extends" | "file_denylist">
|
|
64
|
+
scripts: {
|
|
65
|
+
installation: {
|
|
66
|
+
script: string,
|
|
67
|
+
container: string,
|
|
68
|
+
entrypoint: string
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
variables: ApplicationEggVariable[]
|
|
37
72
|
}
|
package/src/utils/types.ts
CHANGED
|
@@ -5,7 +5,6 @@ export type ExactlyOneKey<K extends keyof any, V, KK extends keyof any = K> =
|
|
|
5
5
|
{ [Q in keyof O]: O[Q] } : never
|
|
6
6
|
}[K];
|
|
7
7
|
|
|
8
|
-
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
|
|
9
8
|
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>
|
|
10
9
|
|
|
11
10
|
|