@pelican.ts/sdk 0.4.11 → 0.4.13
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/api/index.d.mts +3 -3
- package/dist/api/index.d.ts +3 -3
- package/dist/api/index.js +5 -4
- package/dist/api/index.mjs +5 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -5
- package/dist/index.mjs +6 -5
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/api/application/servers.ts +3 -4
- package/src/api/client/server_settings.ts +3 -1
- package/src/api/client/types/server_allocation.ts +1 -1
- package/src/humane/ServerAllocation.ts +1 -1
package/dist/api/index.d.mts
CHANGED
|
@@ -133,7 +133,7 @@ type FeatureLimits = {
|
|
|
133
133
|
type ServerAllocation = {
|
|
134
134
|
id: number;
|
|
135
135
|
ip: string;
|
|
136
|
-
|
|
136
|
+
ip_alias: Nullable<string>;
|
|
137
137
|
port: number;
|
|
138
138
|
notes: Nullable<string>;
|
|
139
139
|
is_default: boolean;
|
|
@@ -1373,7 +1373,7 @@ declare class Servers {
|
|
|
1373
1373
|
suspend: () => Promise<void>;
|
|
1374
1374
|
unsuspend: () => Promise<void>;
|
|
1375
1375
|
reinstall: () => Promise<void>;
|
|
1376
|
-
transferStart: (node_id: number, allocation_id: number, allocation_additional?:
|
|
1376
|
+
transferStart: (node_id: number, allocation_id: number, allocation_additional?: number[]) => Promise<void>;
|
|
1377
1377
|
transferCancel: () => Promise<void>;
|
|
1378
1378
|
}
|
|
1379
1379
|
declare const CreateServerSchema: z.ZodObject<{
|
|
@@ -1442,8 +1442,8 @@ declare const UpdateStartupSchema: z.ZodObject<{
|
|
|
1442
1442
|
egg: z.ZodNumber;
|
|
1443
1443
|
startup: z.ZodOptional<z.ZodString>;
|
|
1444
1444
|
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1445
|
-
skip_scripts: z.ZodOptional<z.ZodBoolean>;
|
|
1446
1445
|
image: z.ZodOptional<z.ZodString>;
|
|
1446
|
+
skip_scripts: z.ZodBoolean;
|
|
1447
1447
|
}, z.core.$strip>;
|
|
1448
1448
|
|
|
1449
1449
|
type DatabaseHost = {
|
package/dist/api/index.d.ts
CHANGED
|
@@ -133,7 +133,7 @@ type FeatureLimits = {
|
|
|
133
133
|
type ServerAllocation = {
|
|
134
134
|
id: number;
|
|
135
135
|
ip: string;
|
|
136
|
-
|
|
136
|
+
ip_alias: Nullable<string>;
|
|
137
137
|
port: number;
|
|
138
138
|
notes: Nullable<string>;
|
|
139
139
|
is_default: boolean;
|
|
@@ -1373,7 +1373,7 @@ declare class Servers {
|
|
|
1373
1373
|
suspend: () => Promise<void>;
|
|
1374
1374
|
unsuspend: () => Promise<void>;
|
|
1375
1375
|
reinstall: () => Promise<void>;
|
|
1376
|
-
transferStart: (node_id: number, allocation_id: number, allocation_additional?:
|
|
1376
|
+
transferStart: (node_id: number, allocation_id: number, allocation_additional?: number[]) => Promise<void>;
|
|
1377
1377
|
transferCancel: () => Promise<void>;
|
|
1378
1378
|
}
|
|
1379
1379
|
declare const CreateServerSchema: z.ZodObject<{
|
|
@@ -1442,8 +1442,8 @@ declare const UpdateStartupSchema: z.ZodObject<{
|
|
|
1442
1442
|
egg: z.ZodNumber;
|
|
1443
1443
|
startup: z.ZodOptional<z.ZodString>;
|
|
1444
1444
|
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1445
|
-
skip_scripts: z.ZodOptional<z.ZodBoolean>;
|
|
1446
1445
|
image: z.ZodOptional<z.ZodString>;
|
|
1446
|
+
skip_scripts: z.ZodBoolean;
|
|
1447
1447
|
}, z.core.$strip>;
|
|
1448
1448
|
|
|
1449
1449
|
type DatabaseHost = {
|
package/dist/api/index.js
CHANGED
|
@@ -443,7 +443,9 @@ var ServerSettings = class {
|
|
|
443
443
|
await this.r.post(`/servers/${this.id}/settings/reinstall`);
|
|
444
444
|
};
|
|
445
445
|
changeDockerImage = async (image) => {
|
|
446
|
-
await this.r.put(`/servers/${this.id}/settings/docker-image`, {
|
|
446
|
+
await this.r.put(`/servers/${this.id}/settings/docker-image`, {
|
|
447
|
+
docker_image: image
|
|
448
|
+
});
|
|
447
449
|
};
|
|
448
450
|
};
|
|
449
451
|
|
|
@@ -1875,9 +1877,8 @@ var UpdateBuildSchema = CreateServerSchema.pick({
|
|
|
1875
1877
|
var UpdateStartupSchema = CreateServerSchema.pick({
|
|
1876
1878
|
startup: true,
|
|
1877
1879
|
environment: true,
|
|
1878
|
-
egg: true
|
|
1879
|
-
|
|
1880
|
-
}).extend({ image: import_zod11.default.string().optional() });
|
|
1880
|
+
egg: true
|
|
1881
|
+
}).extend({ image: import_zod11.default.string().optional(), skip_scripts: import_zod11.default.boolean() });
|
|
1881
1882
|
|
|
1882
1883
|
// src/api/application/database_hosts.ts
|
|
1883
1884
|
var import_zod12 = __toESM(require("zod"));
|
package/dist/api/index.mjs
CHANGED
|
@@ -406,7 +406,9 @@ var ServerSettings = class {
|
|
|
406
406
|
await this.r.post(`/servers/${this.id}/settings/reinstall`);
|
|
407
407
|
};
|
|
408
408
|
changeDockerImage = async (image) => {
|
|
409
|
-
await this.r.put(`/servers/${this.id}/settings/docker-image`, {
|
|
409
|
+
await this.r.put(`/servers/${this.id}/settings/docker-image`, {
|
|
410
|
+
docker_image: image
|
|
411
|
+
});
|
|
410
412
|
};
|
|
411
413
|
};
|
|
412
414
|
|
|
@@ -1838,9 +1840,8 @@ var UpdateBuildSchema = CreateServerSchema.pick({
|
|
|
1838
1840
|
var UpdateStartupSchema = CreateServerSchema.pick({
|
|
1839
1841
|
startup: true,
|
|
1840
1842
|
environment: true,
|
|
1841
|
-
egg: true
|
|
1842
|
-
|
|
1843
|
-
}).extend({ image: z11.string().optional() });
|
|
1843
|
+
egg: true
|
|
1844
|
+
}).extend({ image: z11.string().optional(), skip_scripts: z11.boolean() });
|
|
1844
1845
|
|
|
1845
1846
|
// src/api/application/database_hosts.ts
|
|
1846
1847
|
import z12 from "zod";
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -451,7 +451,9 @@ var ServerSettings = class {
|
|
|
451
451
|
await this.r.post(`/servers/${this.id}/settings/reinstall`);
|
|
452
452
|
};
|
|
453
453
|
changeDockerImage = async (image) => {
|
|
454
|
-
await this.r.put(`/servers/${this.id}/settings/docker-image`, {
|
|
454
|
+
await this.r.put(`/servers/${this.id}/settings/docker-image`, {
|
|
455
|
+
docker_image: image
|
|
456
|
+
});
|
|
455
457
|
};
|
|
456
458
|
};
|
|
457
459
|
|
|
@@ -1640,9 +1642,8 @@ var UpdateBuildSchema = CreateServerSchema.pick({
|
|
|
1640
1642
|
var UpdateStartupSchema = CreateServerSchema.pick({
|
|
1641
1643
|
startup: true,
|
|
1642
1644
|
environment: true,
|
|
1643
|
-
egg: true
|
|
1644
|
-
|
|
1645
|
-
}).extend({ image: import_zod11.default.string().optional() });
|
|
1645
|
+
egg: true
|
|
1646
|
+
}).extend({ image: import_zod11.default.string().optional(), skip_scripts: import_zod11.default.boolean() });
|
|
1646
1647
|
|
|
1647
1648
|
// src/api/application/database_hosts.ts
|
|
1648
1649
|
var import_zod12 = __toESM(require("zod"));
|
|
@@ -1779,7 +1780,7 @@ var ServerAllocation = class {
|
|
|
1779
1780
|
port;
|
|
1780
1781
|
constructor(client, alloc) {
|
|
1781
1782
|
this.client = client;
|
|
1782
|
-
this.alias = alloc.
|
|
1783
|
+
this.alias = alloc.ip_alias;
|
|
1783
1784
|
this.id = alloc.id;
|
|
1784
1785
|
this.ip = alloc.ip;
|
|
1785
1786
|
this.$isDefault = alloc.is_default;
|
package/dist/index.mjs
CHANGED
|
@@ -406,7 +406,9 @@ var ServerSettings = class {
|
|
|
406
406
|
await this.r.post(`/servers/${this.id}/settings/reinstall`);
|
|
407
407
|
};
|
|
408
408
|
changeDockerImage = async (image) => {
|
|
409
|
-
await this.r.put(`/servers/${this.id}/settings/docker-image`, {
|
|
409
|
+
await this.r.put(`/servers/${this.id}/settings/docker-image`, {
|
|
410
|
+
docker_image: image
|
|
411
|
+
});
|
|
410
412
|
};
|
|
411
413
|
};
|
|
412
414
|
|
|
@@ -1595,9 +1597,8 @@ var UpdateBuildSchema = CreateServerSchema.pick({
|
|
|
1595
1597
|
var UpdateStartupSchema = CreateServerSchema.pick({
|
|
1596
1598
|
startup: true,
|
|
1597
1599
|
environment: true,
|
|
1598
|
-
egg: true
|
|
1599
|
-
|
|
1600
|
-
}).extend({ image: z11.string().optional() });
|
|
1600
|
+
egg: true
|
|
1601
|
+
}).extend({ image: z11.string().optional(), skip_scripts: z11.boolean() });
|
|
1601
1602
|
|
|
1602
1603
|
// src/api/application/database_hosts.ts
|
|
1603
1604
|
import z12 from "zod";
|
|
@@ -1734,7 +1735,7 @@ var ServerAllocation = class {
|
|
|
1734
1735
|
port;
|
|
1735
1736
|
constructor(client, alloc) {
|
|
1736
1737
|
this.client = client;
|
|
1737
|
-
this.alias = alloc.
|
|
1738
|
+
this.alias = alloc.ip_alias;
|
|
1738
1739
|
this.id = alloc.id;
|
|
1739
1740
|
this.ip = alloc.ip;
|
|
1740
1741
|
this.$isDefault = alloc.is_default;
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -65,7 +65,7 @@ export class Servers {
|
|
|
65
65
|
transferStart = async (
|
|
66
66
|
node_id: number,
|
|
67
67
|
allocation_id: number,
|
|
68
|
-
allocation_additional?:
|
|
68
|
+
allocation_additional?: number[]
|
|
69
69
|
): Promise<void> => {
|
|
70
70
|
await this.r.post(`/servers/${this.id}/transfer`, {
|
|
71
71
|
node_id,
|
|
@@ -141,6 +141,5 @@ const UpdateBuildSchema = CreateServerSchema.pick({
|
|
|
141
141
|
const UpdateStartupSchema = CreateServerSchema.pick({
|
|
142
142
|
startup: true,
|
|
143
143
|
environment: true,
|
|
144
|
-
egg: true
|
|
145
|
-
|
|
146
|
-
}).extend({image: z.string().optional()})
|
|
144
|
+
egg: true
|
|
145
|
+
}).extend({image: z.string().optional(), skip_scripts: z.boolean()})
|
|
@@ -29,6 +29,8 @@ export class ServerSettings {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
changeDockerImage = async (image: string): Promise<void> => {
|
|
32
|
-
await this.r.put(`/servers/${this.id}/settings/docker-image`, {
|
|
32
|
+
await this.r.put(`/servers/${this.id}/settings/docker-image`, {
|
|
33
|
+
docker_image: image
|
|
34
|
+
})
|
|
33
35
|
}
|
|
34
36
|
}
|
|
@@ -19,7 +19,7 @@ export class ServerAllocation {
|
|
|
19
19
|
|
|
20
20
|
constructor(client: ServerClient, alloc: ServerAllocationT) {
|
|
21
21
|
this.client = client
|
|
22
|
-
this.alias = alloc.
|
|
22
|
+
this.alias = alloc.ip_alias
|
|
23
23
|
this.id = alloc.id
|
|
24
24
|
this.ip = alloc.ip
|
|
25
25
|
this.$isDefault = alloc.is_default
|