@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.
@@ -133,7 +133,7 @@ type FeatureLimits = {
133
133
  type ServerAllocation = {
134
134
  id: number;
135
135
  ip: string;
136
- alias: Nullable<string>;
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?: string[]) => Promise<void>;
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 = {
@@ -133,7 +133,7 @@ type FeatureLimits = {
133
133
  type ServerAllocation = {
134
134
  id: number;
135
135
  ip: string;
136
- alias: Nullable<string>;
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?: string[]) => Promise<void>;
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`, { docker_image: 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
- skip_scripts: true
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"));
@@ -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`, { docker_image: 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
- skip_scripts: true
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
@@ -245,7 +245,7 @@ type StatsWsJson = {
245
245
  type ServerAllocation$1 = {
246
246
  id: number;
247
247
  ip: string;
248
- alias: Nullable<string>;
248
+ ip_alias: Nullable<string>;
249
249
  port: number;
250
250
  notes: Nullable<string>;
251
251
  is_default: boolean;
package/dist/index.d.ts CHANGED
@@ -245,7 +245,7 @@ type StatsWsJson = {
245
245
  type ServerAllocation$1 = {
246
246
  id: number;
247
247
  ip: string;
248
- alias: Nullable<string>;
248
+ ip_alias: Nullable<string>;
249
249
  port: number;
250
250
  notes: Nullable<string>;
251
251
  is_default: boolean;
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`, { docker_image: 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
- skip_scripts: true
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.alias;
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`, { docker_image: 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
- skip_scripts: true
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.alias;
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
@@ -1114,7 +1114,7 @@ type JwtErrorEvent = {
1114
1114
  type ServerAllocation = {
1115
1115
  id: number;
1116
1116
  ip: string;
1117
- alias: Nullable<string>;
1117
+ ip_alias: Nullable<string>;
1118
1118
  port: number;
1119
1119
  notes: Nullable<string>;
1120
1120
  is_default: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pelican.ts/sdk",
3
- "version": "0.4.11",
3
+ "version": "0.4.13",
4
4
  "description": "Pelican panel SDK for TypeScript",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -65,7 +65,7 @@ export class Servers {
65
65
  transferStart = async (
66
66
  node_id: number,
67
67
  allocation_id: number,
68
- allocation_additional?: string[]
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
- skip_scripts: true
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`, {docker_image: image})
32
+ await this.r.put(`/servers/${this.id}/settings/docker-image`, {
33
+ docker_image: image
34
+ })
33
35
  }
34
36
  }
@@ -3,7 +3,7 @@ import {Nullable} from "@/utils/types"
3
3
  export type ServerAllocation = {
4
4
  id: number
5
5
  ip: string
6
- alias: Nullable<string>
6
+ ip_alias: Nullable<string>
7
7
  port: number
8
8
  notes: Nullable<string>
9
9
  is_default: boolean
@@ -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.alias
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