@pelican.ts/sdk 0.3.3-next.0 → 0.3.3-next.2

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 CHANGED
@@ -360,9 +360,9 @@ declare class ServerUsers {
360
360
  constructor(requester: AxiosInstance, id: string);
361
361
  list: () => Promise<ServerSubuser[]>;
362
362
  create: (email: string, permissions: SubuserPermission[] | string[]) => Promise<ServerSubuser>;
363
- info: (user_id: number) => Promise<ServerSubuser>;
364
- update: (user_id: number, permissions: SubuserPermission[] | string[]) => Promise<ServerSubuser>;
365
- delete: (user_id: number) => Promise<void>;
363
+ info: (user_uuid: string) => Promise<ServerSubuser>;
364
+ update: (user_uuid: string, permissions: SubuserPermission[] | string[]) => Promise<ServerSubuser>;
365
+ delete: (user_uuid: string) => Promise<void>;
366
366
  }
367
367
 
368
368
  type ServerBackup = {
@@ -579,6 +579,7 @@ type ApplicationServer = {
579
579
  name: string;
580
580
  description: string;
581
581
  status: Nullable<unknown>;
582
+ docker_labels: Record<string, string>;
582
583
  suspended: boolean;
583
584
  limits: ServerLimits;
584
585
  feature_limits: FeatureLimits;
@@ -1369,10 +1370,11 @@ declare const CreateServerSchema: z.ZodObject<{
1369
1370
  egg: z.ZodNumber;
1370
1371
  docker_image: z.ZodOptional<z.ZodString>;
1371
1372
  startup: z.ZodOptional<z.ZodString>;
1372
- environment: z.ZodArray<z.ZodString>;
1373
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
1373
1374
  skip_scripts: z.ZodOptional<z.ZodBoolean>;
1374
1375
  oom_killer: z.ZodOptional<z.ZodBoolean>;
1375
1376
  start_on_completion: z.ZodOptional<z.ZodBoolean>;
1377
+ docker_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1376
1378
  limits: z.ZodObject<{
1377
1379
  memory: z.ZodNumber;
1378
1380
  swap: z.ZodNumber;
@@ -1401,6 +1403,7 @@ declare const UpdateDetailsSchema: z.ZodObject<{
1401
1403
  description: z.ZodOptional<z.ZodString>;
1402
1404
  name: z.ZodString;
1403
1405
  external_id: z.ZodOptional<z.ZodString>;
1406
+ docker_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1404
1407
  }, z.core.$strip>;
1405
1408
  declare const UpdateBuildSchema: z.ZodObject<{
1406
1409
  oom_killer: z.ZodOptional<z.ZodBoolean>;
@@ -1424,7 +1427,7 @@ declare const UpdateBuildSchema: z.ZodObject<{
1424
1427
  declare const UpdateStartupSchema: z.ZodObject<{
1425
1428
  egg: z.ZodNumber;
1426
1429
  startup: z.ZodOptional<z.ZodString>;
1427
- environment: z.ZodArray<z.ZodString>;
1430
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
1428
1431
  skip_scripts: z.ZodOptional<z.ZodBoolean>;
1429
1432
  image: z.ZodOptional<z.ZodString>;
1430
1433
  }, z.core.$strip>;
package/dist/index.d.ts CHANGED
@@ -360,9 +360,9 @@ declare class ServerUsers {
360
360
  constructor(requester: AxiosInstance, id: string);
361
361
  list: () => Promise<ServerSubuser[]>;
362
362
  create: (email: string, permissions: SubuserPermission[] | string[]) => Promise<ServerSubuser>;
363
- info: (user_id: number) => Promise<ServerSubuser>;
364
- update: (user_id: number, permissions: SubuserPermission[] | string[]) => Promise<ServerSubuser>;
365
- delete: (user_id: number) => Promise<void>;
363
+ info: (user_uuid: string) => Promise<ServerSubuser>;
364
+ update: (user_uuid: string, permissions: SubuserPermission[] | string[]) => Promise<ServerSubuser>;
365
+ delete: (user_uuid: string) => Promise<void>;
366
366
  }
367
367
 
368
368
  type ServerBackup = {
@@ -579,6 +579,7 @@ type ApplicationServer = {
579
579
  name: string;
580
580
  description: string;
581
581
  status: Nullable<unknown>;
582
+ docker_labels: Record<string, string>;
582
583
  suspended: boolean;
583
584
  limits: ServerLimits;
584
585
  feature_limits: FeatureLimits;
@@ -1369,10 +1370,11 @@ declare const CreateServerSchema: z.ZodObject<{
1369
1370
  egg: z.ZodNumber;
1370
1371
  docker_image: z.ZodOptional<z.ZodString>;
1371
1372
  startup: z.ZodOptional<z.ZodString>;
1372
- environment: z.ZodArray<z.ZodString>;
1373
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
1373
1374
  skip_scripts: z.ZodOptional<z.ZodBoolean>;
1374
1375
  oom_killer: z.ZodOptional<z.ZodBoolean>;
1375
1376
  start_on_completion: z.ZodOptional<z.ZodBoolean>;
1377
+ docker_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1376
1378
  limits: z.ZodObject<{
1377
1379
  memory: z.ZodNumber;
1378
1380
  swap: z.ZodNumber;
@@ -1401,6 +1403,7 @@ declare const UpdateDetailsSchema: z.ZodObject<{
1401
1403
  description: z.ZodOptional<z.ZodString>;
1402
1404
  name: z.ZodString;
1403
1405
  external_id: z.ZodOptional<z.ZodString>;
1406
+ docker_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1404
1407
  }, z.core.$strip>;
1405
1408
  declare const UpdateBuildSchema: z.ZodObject<{
1406
1409
  oom_killer: z.ZodOptional<z.ZodBoolean>;
@@ -1424,7 +1427,7 @@ declare const UpdateBuildSchema: z.ZodObject<{
1424
1427
  declare const UpdateStartupSchema: z.ZodObject<{
1425
1428
  egg: z.ZodNumber;
1426
1429
  startup: z.ZodOptional<z.ZodString>;
1427
- environment: z.ZodArray<z.ZodString>;
1430
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
1428
1431
  skip_scripts: z.ZodOptional<z.ZodBoolean>;
1429
1432
  image: z.ZodOptional<z.ZodString>;
1430
1433
  }, z.core.$strip>;
package/dist/index.js CHANGED
@@ -309,16 +309,16 @@ var ServerUsers = class {
309
309
  const { data } = await this.r.post(`/servers/${this.id}/users`, { email, permissions });
310
310
  return data.attributes;
311
311
  };
312
- info = async (user_id) => {
313
- const { data } = await this.r.get(`/servers/${this.id}/users/${user_id}`);
312
+ info = async (user_uuid) => {
313
+ const { data } = await this.r.get(`/servers/${this.id}/users/${user_uuid}`);
314
314
  return data.attributes;
315
315
  };
316
- update = async (user_id, permissions) => {
317
- const { data } = await this.r.put(`/servers/${this.id}/users/${user_id}`, { permissions });
316
+ update = async (user_uuid, permissions) => {
317
+ const { data } = await this.r.put(`/servers/${this.id}/users/${user_uuid}`, { permissions });
318
318
  return data.attributes;
319
319
  };
320
- delete = async (user_id) => {
321
- await this.r.delete(`/servers/${this.id}/users/${user_id}`);
320
+ delete = async (user_uuid) => {
321
+ await this.r.delete(`/servers/${this.id}/users/${user_uuid}`);
322
322
  };
323
323
  };
324
324
 
@@ -1759,10 +1759,11 @@ var CreateServerSchema = import_zod11.default.object({
1759
1759
  egg: import_zod11.default.number(),
1760
1760
  docker_image: import_zod11.default.string().optional(),
1761
1761
  startup: import_zod11.default.string().optional(),
1762
- environment: import_zod11.default.array(import_zod11.default.string()),
1762
+ environment: import_zod11.default.record(import_zod11.default.string(), import_zod11.default.string()),
1763
1763
  skip_scripts: import_zod11.default.boolean().optional(),
1764
1764
  oom_killer: import_zod11.default.boolean().optional(),
1765
1765
  start_on_completion: import_zod11.default.boolean().optional(),
1766
+ docker_labels: import_zod11.default.record(import_zod11.default.string(), import_zod11.default.string()).optional(),
1766
1767
  limits: import_zod11.default.object({
1767
1768
  memory: import_zod11.default.number().min(0),
1768
1769
  swap: import_zod11.default.number().min(-1),
@@ -1790,7 +1791,8 @@ var UpdateDetailsSchema = CreateServerSchema.pick({
1790
1791
  external_id: true,
1791
1792
  name: true,
1792
1793
  user: true,
1793
- description: true
1794
+ description: true,
1795
+ docker_labels: true
1794
1796
  });
1795
1797
  var UpdateBuildSchema = CreateServerSchema.pick({
1796
1798
  oom_killer: true,
package/dist/index.mjs CHANGED
@@ -272,16 +272,16 @@ var ServerUsers = class {
272
272
  const { data } = await this.r.post(`/servers/${this.id}/users`, { email, permissions });
273
273
  return data.attributes;
274
274
  };
275
- info = async (user_id) => {
276
- const { data } = await this.r.get(`/servers/${this.id}/users/${user_id}`);
275
+ info = async (user_uuid) => {
276
+ const { data } = await this.r.get(`/servers/${this.id}/users/${user_uuid}`);
277
277
  return data.attributes;
278
278
  };
279
- update = async (user_id, permissions) => {
280
- const { data } = await this.r.put(`/servers/${this.id}/users/${user_id}`, { permissions });
279
+ update = async (user_uuid, permissions) => {
280
+ const { data } = await this.r.put(`/servers/${this.id}/users/${user_uuid}`, { permissions });
281
281
  return data.attributes;
282
282
  };
283
- delete = async (user_id) => {
284
- await this.r.delete(`/servers/${this.id}/users/${user_id}`);
283
+ delete = async (user_uuid) => {
284
+ await this.r.delete(`/servers/${this.id}/users/${user_uuid}`);
285
285
  };
286
286
  };
287
287
 
@@ -1722,10 +1722,11 @@ var CreateServerSchema = z11.object({
1722
1722
  egg: z11.number(),
1723
1723
  docker_image: z11.string().optional(),
1724
1724
  startup: z11.string().optional(),
1725
- environment: z11.array(z11.string()),
1725
+ environment: z11.record(z11.string(), z11.string()),
1726
1726
  skip_scripts: z11.boolean().optional(),
1727
1727
  oom_killer: z11.boolean().optional(),
1728
1728
  start_on_completion: z11.boolean().optional(),
1729
+ docker_labels: z11.record(z11.string(), z11.string()).optional(),
1729
1730
  limits: z11.object({
1730
1731
  memory: z11.number().min(0),
1731
1732
  swap: z11.number().min(-1),
@@ -1753,7 +1754,8 @@ var UpdateDetailsSchema = CreateServerSchema.pick({
1753
1754
  external_id: true,
1754
1755
  name: true,
1755
1756
  user: true,
1756
- description: true
1757
+ description: true,
1758
+ docker_labels: true
1757
1759
  });
1758
1760
  var UpdateBuildSchema = CreateServerSchema.pick({
1759
1761
  oom_killer: true,
package/dist/types.d.ts CHANGED
@@ -716,6 +716,7 @@ type ApplicationServer = {
716
716
  name: string;
717
717
  description: string;
718
718
  status: Nullable<unknown>;
719
+ docker_labels: Record<string, string>;
719
720
  suspended: boolean;
720
721
  limits: ServerLimits;
721
722
  feature_limits: FeatureLimits;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pelican.ts/sdk",
3
- "version": "0.3.3-next.0",
3
+ "version": "0.3.3-next.2",
4
4
  "description": "Pelican panel SDK for TypeScript",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -21,7 +21,8 @@
21
21
  "build": "rm -rf ./dist && npm run build:code && npm run build:types",
22
22
  "pub": "npm publish --access=public",
23
23
  "pub:next": "npm publish --access=public --tag=next",
24
- "generate-types": "bun run scripts/create-types.ts"
24
+ "generate-types": "bun run scripts/create-types.ts",
25
+ "pipeline": "bun run generate-types && bun run build && bun run pub:next"
25
26
  },
26
27
  "keywords": [
27
28
  "pterodactyl",
@@ -80,10 +80,11 @@ export const CreateServerSchema = z.object({
80
80
  egg: z.number(),
81
81
  docker_image: z.string().optional(),
82
82
  startup: z.string().optional(),
83
- environment: z.array(z.string()),
83
+ environment: z.record(z.string(), z.string()),
84
84
  skip_scripts: z.boolean().optional(),
85
85
  oom_killer: z.boolean().optional(),
86
86
  start_on_completion: z.boolean().optional(),
87
+ docker_labels: z.record(z.string(), z.string()).optional(),
87
88
  limits: z.object({
88
89
  memory: z.number().min(0),
89
90
  swap: z.number().min(-1),
@@ -112,7 +113,8 @@ const UpdateDetailsSchema = CreateServerSchema.pick({
112
113
  external_id: true,
113
114
  name: true,
114
115
  user: true,
115
- description: true
116
+ description: true,
117
+ docker_labels: true
116
118
  })
117
119
 
118
120
  const UpdateBuildSchema = CreateServerSchema.pick({
@@ -11,6 +11,7 @@ export type ApplicationServer = {
11
11
  name: string,
12
12
  description: string,
13
13
  status: Nullable<unknown>,
14
+ docker_labels: Record<string, string>,
14
15
  suspended: boolean,
15
16
  limits: ServerLimits,
16
17
  feature_limits: FeatureLimits,
@@ -25,22 +25,22 @@ export class ServerUsers {
25
25
  return data.attributes
26
26
  }
27
27
 
28
- info = async (user_id: number): Promise<ServerSubuser> => {
28
+ info = async (user_uuid: string): Promise<ServerSubuser> => {
29
29
  const {data} = await this.r.get<
30
30
  GenericResponse<ServerSubuser, "user">
31
- >(`/servers/${this.id}/users/${user_id}`)
31
+ >(`/servers/${this.id}/users/${user_uuid}`)
32
32
  return data.attributes
33
33
  }
34
34
 
35
- update = async (user_id: number, permissions: SubuserPermission[] | string[]): Promise<ServerSubuser> => {
35
+ update = async (user_uuid: string, permissions: SubuserPermission[] | string[]): Promise<ServerSubuser> => {
36
36
  const {data} = await this.r.put<
37
37
  GenericResponse<ServerSubuser, "user">
38
- >(`/servers/${this.id}/users/${user_id}`, {permissions})
38
+ >(`/servers/${this.id}/users/${user_uuid}`, {permissions})
39
39
  return data.attributes
40
40
  }
41
41
 
42
- delete = async (user_id: number): Promise<void> => {
43
- await this.r.delete(`/servers/${this.id}/users/${user_id}`)
42
+ delete = async (user_uuid: string): Promise<void> => {
43
+ await this.r.delete(`/servers/${this.id}/users/${user_uuid}`)
44
44
  }
45
45
 
46
46
  }