pterodactyl-api-client 2.8.0 → 2.9.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.
@@ -1 +1 @@
1
- {"version":3,"file":"database.client.d.ts","sourceRoot":"","sources":["../../../../src/application/server/database/database.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EAGV,yBAAyB,EAE1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO,OAAO,cAAc;IAGrB,OAAO,CAAC,UAAU;IAFvB,QAAQ,EAAE,cAAc,CAAC;gBAEZ,UAAU,EAAE,UAAU;IAIpC,IAAI,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;IAkBnB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;IAerC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB;;;;;;;;;;;;;;;;;IAe5D,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAMxC"}
1
+ {"version":3,"file":"database.client.d.ts","sourceRoot":"","sources":["../../../../src/application/server/database/database.client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAC;AAE3D,OAAO,KAAK,EAGV,yBAAyB,EAE1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO,OAAO,cAAc;IAGrB,OAAO,CAAC,UAAU;IAFvB,QAAQ,EAAE,cAAc,CAAC;gBAEZ,UAAU,EAAE,UAAU;IAIpC,IAAI,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;IAkBnB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;IAerC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB;;;;;;;;;;;;;;;;;IAmB5D,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAMxC"}
@@ -1,3 +1,5 @@
1
+ import z from "zod";
2
+ import { applicationServerDatabaseId, applicationServerId, createApplicationDatabaseSchema } from "../server.schemas.js";
1
3
  import PasswordClient from "./password/password.client.js";
2
4
  export default class DatabaseClient {
3
5
  httpClient;
@@ -7,7 +9,7 @@ export default class DatabaseClient {
7
9
  this.password = new PasswordClient(httpClient);
8
10
  }
9
11
  async list(server) {
10
- const res = await this.httpClient.request("GET", `/application/servers/${server}/databases`);
12
+ const res = await this.httpClient.request("GET", `/application/servers/${applicationServerId.parse(server)}/databases`);
11
13
  return {
12
14
  ...res,
13
15
  data: res.data.map((db) => ({
@@ -21,7 +23,7 @@ export default class DatabaseClient {
21
23
  };
22
24
  }
23
25
  async info(server, database) {
24
- const res = await this.httpClient.request("GET", `/application/servers/${server}/databases/${database}`);
26
+ const res = await this.httpClient.request("GET", `/application/servers/${applicationServerId.parse(server)}/databases/${applicationServerDatabaseId.parse(database)}`);
25
27
  return {
26
28
  ...res,
27
29
  attributes: {
@@ -32,7 +34,7 @@ export default class DatabaseClient {
32
34
  };
33
35
  }
34
36
  async create(server, args) {
35
- const res = await this.httpClient.request("POST", `/application/servers/${server}/databases`, args);
37
+ const res = await this.httpClient.request("POST", `/application/servers/${applicationServerId.parse(server)}/databases`, createApplicationDatabaseSchema.parse(args));
36
38
  return {
37
39
  ...res,
38
40
  attributes: {
@@ -43,6 +45,6 @@ export default class DatabaseClient {
43
45
  };
44
46
  }
45
47
  delete(server, database) {
46
- return this.httpClient.request("DELETE", `/application/servers/${server}/databases/${database}`);
48
+ return this.httpClient.request("DELETE", `/application/servers/${applicationServerId.parse(server)}/databases/${applicationServerDatabaseId.parse(database)}`);
47
49
  }
48
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"password.client.d.ts","sourceRoot":"","sources":["../../../../../src/application/server/database/password/password.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAE9D,MAAM,CAAC,OAAO,OAAO,cAAc;IACrB,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAMvC"}
1
+ {"version":3,"file":"password.client.d.ts","sourceRoot":"","sources":["../../../../../src/application/server/database/password/password.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAM9D,MAAM,CAAC,OAAO,OAAO,cAAc;IACrB,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAMvC"}
@@ -1,9 +1,10 @@
1
+ import { applicationServerDatabaseId, applicationServerId, } from "../../server.schemas.js";
1
2
  export default class PasswordClient {
2
3
  httpClient;
3
4
  constructor(httpClient) {
4
5
  this.httpClient = httpClient;
5
6
  }
6
7
  reset(server, database) {
7
- return this.httpClient.request("POST", `/application/servers/${server}/databases/${database}/reset-password`);
8
+ return this.httpClient.request("POST", `/application/servers/${applicationServerId.parse(server)}/databases/${applicationServerDatabaseId.parse(database)}/reset-password`);
8
9
  }
9
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"server.client.d.ts","sourceRoot":"","sources":["../../../src/application/server/server.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,EACV,UAAU,EACV,4BAA4B,EAC7B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAEV,gBAAgB,EAChB,yBAAyB,EAI1B,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,OA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EAAE,cAAc,CAAC;gBAEZ,UAAU,EAAE,UAAU;IAIpC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAeJ,IAAI,CAAC,EACT,EAAE,EACF,WAAW,GACZ,EAAE;QACD,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACxB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkCK,MAAM,CAAC,OAAO,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAehC,IAAI,CACR,MAAM,EAAE,MAAM,EACd,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,EAAE,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuDhE,OAAO,CAAC,EAAE,EAAE,MAAM;IAMlB,SAAS,CAAC,EAAE,EAAE,MAAM;IASpB,SAAS,CAAC,EAAE,EAAE,MAAM;IASpB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS;CAQ/C"}
@@ -1,4 +1,6 @@
1
+ import z from "zod";
1
2
  import DatabaseClient from "./database/database.client.js";
3
+ import { applicationServerExternalId, applicationServerId, createApplicationDatabaseSchema, createServerSchema, editApplicationServerConfigurationSchema, editApplicationServerDetailsSchema, editApplicationServerStartupSchema, } from "./server.schemas.js";
2
4
  export default class ServerClient {
3
5
  httpClient;
4
6
  database;
@@ -19,7 +21,7 @@ export default class ServerClient {
19
21
  }
20
22
  async info({ id, external_id, }) {
21
23
  if (id) {
22
- const res = await this.httpClient.request("GET", `/application/servers/${id}`);
24
+ const res = await this.httpClient.request("GET", `/application/servers/${applicationServerId.parse(id)}`);
23
25
  return {
24
26
  ...res,
25
27
  attributes: {
@@ -30,7 +32,7 @@ export default class ServerClient {
30
32
  };
31
33
  }
32
34
  else if (external_id) {
33
- const res = await this.httpClient.request("GET", `/application/servers/external/${external_id}`);
35
+ const res = await this.httpClient.request("GET", `/application/servers/external/${applicationServerExternalId.parse(external_id)}`);
34
36
  return {
35
37
  ...res,
36
38
  attributes: {
@@ -41,10 +43,10 @@ export default class ServerClient {
41
43
  };
42
44
  }
43
45
  else
44
- throw new Error("Vous devez spécifier au moins un des 2 paramètres de recherche d'un utilisateur !");
46
+ throw new Error("Vous devez spécifier au moins un des 2 paramètres de recherche d'un serveur !");
45
47
  }
46
48
  async create(options) {
47
- const res = await this.httpClient.request("POST", `/application/servers`, options);
49
+ const res = await this.httpClient.request("POST", `/application/servers`, createServerSchema.parse(options));
48
50
  return {
49
51
  ...res,
50
52
  attributes: {
@@ -55,14 +57,14 @@ export default class ServerClient {
55
57
  };
56
58
  }
57
59
  async edit(server, { details, configuration, startup }) {
58
- const basePath = `/application/servers/${server}`;
60
+ const basePath = `/application/servers/${applicationServerId.parse(server)}`;
59
61
  const requests = [];
60
62
  if (details)
61
- requests.push(this.httpClient.request("PATCH", `${basePath}/details`, details));
63
+ requests.push(this.httpClient.request("PATCH", `${basePath}/details`, editApplicationServerDetailsSchema.parse(details)));
62
64
  if (configuration)
63
- requests.push(this.httpClient.request("PATCH", `${basePath}/build`, configuration));
65
+ requests.push(this.httpClient.request("PATCH", `${basePath}/build`, editApplicationServerConfigurationSchema.parse(configuration)));
64
66
  if (startup)
65
- requests.push(this.httpClient.request("PATCH", `${basePath}/startup`, startup));
67
+ requests.push(this.httpClient.request("PATCH", `${basePath}/startup`, editApplicationServerStartupSchema.parse(startup)));
66
68
  if (requests.length === 0)
67
69
  throw new Error("Aucunes modifications spécifiées !");
68
70
  const res = await Promise.all(requests);
@@ -76,15 +78,15 @@ export default class ServerClient {
76
78
  };
77
79
  }
78
80
  suspend(id) {
79
- return this.httpClient.request("POST", `/application/servers/${id}/suspend`);
81
+ return this.httpClient.request("POST", `/application/servers/${applicationServerId.parse(id)}/suspend`);
80
82
  }
81
83
  unsuspend(id) {
82
- return this.httpClient.request("POST", `/application/servers/${id}/unsuspend`);
84
+ return this.httpClient.request("POST", `/application/servers/${applicationServerId.parse(id)}/unsuspend`);
83
85
  }
84
86
  reinstall(id) {
85
- return this.httpClient.request("POST", `/application/servers/${id}/reinstall`);
87
+ return this.httpClient.request("POST", `/application/servers/${applicationServerId.parse(id)}/reinstall`);
86
88
  }
87
89
  delete(id, force) {
88
- return this.httpClient.request("DELETE", `/application/servers/${id}${force ? "?force=true" : ""}`);
90
+ return this.httpClient.request("DELETE", `/application/servers/${applicationServerId.parse(id)}${force ? "?force=true" : ""}`);
89
91
  }
90
92
  }
@@ -0,0 +1,72 @@
1
+ import z from "zod";
2
+ export declare const applicationServerId: z.ZodNumber;
3
+ export declare const applicationServerExternalId: z.ZodString;
4
+ export declare const applicationServerDatabaseId: z.ZodNumber;
5
+ export declare const createServerSchema: z.ZodObject<{
6
+ external_id: z.ZodOptional<z.ZodString>;
7
+ name: z.ZodString;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ user: z.ZodNumber;
10
+ egg: z.ZodNumber;
11
+ docker_image: z.ZodString;
12
+ startup: z.ZodString;
13
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
14
+ skip_scripts: z.ZodOptional<z.ZodBoolean>;
15
+ oom_disabled: z.ZodOptional<z.ZodBoolean>;
16
+ limits: z.ZodObject<{
17
+ memory: z.ZodNumber;
18
+ swap: z.ZodNumber;
19
+ disk: z.ZodNumber;
20
+ io: z.ZodNumber;
21
+ threads: z.ZodOptional<z.ZodString>;
22
+ cpu: z.ZodNumber;
23
+ }, z.z.core.$strip>;
24
+ feature_limits: z.ZodObject<{
25
+ databases: z.ZodNumber;
26
+ backups: z.ZodNumber;
27
+ allocations: z.ZodOptional<z.ZodNumber>;
28
+ }, z.z.core.$strip>;
29
+ allocation: z.ZodObject<{
30
+ default: z.ZodNumber;
31
+ additional: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
32
+ }, z.z.core.$strip>;
33
+ start_on_completion: z.ZodOptional<z.ZodBoolean>;
34
+ }, z.z.core.$strip>;
35
+ export declare const editApplicationServerDetailsSchema: z.ZodObject<{
36
+ name: z.ZodString;
37
+ user: z.ZodNumber;
38
+ external_id: z.ZodOptional<z.ZodString>;
39
+ description: z.ZodOptional<z.ZodString>;
40
+ }, z.z.core.$strip>;
41
+ export declare const editApplicationServerConfigurationSchema: z.ZodObject<{
42
+ allocation: z.ZodNumber;
43
+ oom_disabled: z.ZodOptional<z.ZodBoolean>;
44
+ limits: z.ZodObject<{
45
+ memory: z.ZodOptional<z.ZodNumber>;
46
+ swap: z.ZodOptional<z.ZodNumber>;
47
+ disk: z.ZodOptional<z.ZodNumber>;
48
+ io: z.ZodOptional<z.ZodNumber>;
49
+ threads: z.ZodOptional<z.ZodString>;
50
+ cpu: z.ZodOptional<z.ZodNumber>;
51
+ }, z.z.core.$strip>;
52
+ feature_limits: z.ZodOptional<z.ZodObject<{
53
+ databases: z.ZodNumber;
54
+ backups: z.ZodNumber;
55
+ allocations: z.ZodOptional<z.ZodNumber>;
56
+ }, z.z.core.$strip>>;
57
+ add_allocations: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
58
+ remove_allocations: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
59
+ }, z.z.core.$strip>;
60
+ export declare const editApplicationServerStartupSchema: z.ZodObject<{
61
+ startup: z.ZodString;
62
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
63
+ egg: z.ZodNumber;
64
+ image: z.ZodString;
65
+ skip_scripts: z.ZodBoolean;
66
+ }, z.z.core.$strip>;
67
+ export declare const createApplicationDatabaseSchema: z.ZodObject<{
68
+ database: z.ZodString;
69
+ remote: z.ZodString;
70
+ host: z.ZodNumber;
71
+ }, z.z.core.$strip>;
72
+ //# sourceMappingURL=server.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.schemas.d.ts","sourceRoot":"","sources":["../../../src/application/server/server.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,2BAA2B,aAA6B,CAAC;AACtE,eAAO,MAAM,2BAA2B,aAAa,CAAC;AAEtD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAmC7B,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;mBAK7C,CAAC;AAEH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;mBAuBnD,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;mBAS7C,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;mBAI1C,CAAC"}
@@ -0,0 +1,85 @@
1
+ import z from "zod";
2
+ export const applicationServerId = z.number();
3
+ export const applicationServerExternalId = z.string().min(1).max(191);
4
+ export const applicationServerDatabaseId = z.number();
5
+ export const createServerSchema = z.object({
6
+ external_id: applicationServerExternalId.optional(),
7
+ name: z.string().min(1).max(191),
8
+ description: z.string().optional(),
9
+ user: z.number(),
10
+ egg: z.number(),
11
+ docker_image: z
12
+ .string()
13
+ .max(191)
14
+ .regex(/^~?[\w\.\/\-:@ ]*$/),
15
+ startup: z.string(),
16
+ environment: z.record(z.string().uppercase(), z.string()),
17
+ skip_scripts: z.boolean().optional(),
18
+ oom_disabled: z.boolean().optional(),
19
+ limits: z.object({
20
+ memory: z.number().min(0),
21
+ swap: z.number().min(-1),
22
+ disk: z.number().min(0),
23
+ io: z.number().min(10).max(1000),
24
+ threads: z
25
+ .string()
26
+ .regex(/^[0-9-,]+$/)
27
+ .optional(),
28
+ cpu: z.number().min(0),
29
+ }),
30
+ feature_limits: z.object({
31
+ databases: z.number().min(0),
32
+ backups: z.number().min(0),
33
+ allocations: z.number().min(0).optional(),
34
+ }),
35
+ allocation: z.object({
36
+ default: z.number(),
37
+ additional: z.array(z.number()).optional(),
38
+ }),
39
+ start_on_completion: z.boolean().optional(),
40
+ });
41
+ export const editApplicationServerDetailsSchema = z.object({
42
+ name: z.string().min(1).max(191),
43
+ user: z.number(),
44
+ external_id: applicationServerExternalId.optional(),
45
+ description: z.string().optional(),
46
+ });
47
+ export const editApplicationServerConfigurationSchema = z.object({
48
+ allocation: z.number(),
49
+ oom_disabled: z.boolean().optional(),
50
+ limits: z.object({
51
+ memory: z.number().min(0).optional(),
52
+ swap: z.number().min(-1).optional(),
53
+ disk: z.number().min(0).optional(),
54
+ io: z.number().min(10).max(1000).optional(),
55
+ threads: z
56
+ .string()
57
+ .regex(/^[0-9-,]+$/)
58
+ .optional(),
59
+ cpu: z.number().min(0).optional(),
60
+ }),
61
+ feature_limits: z
62
+ .object({
63
+ databases: z.number().min(0),
64
+ backups: z.number().min(0),
65
+ allocations: z.number().min(0).optional(),
66
+ })
67
+ .optional(),
68
+ add_allocations: z.number().array().optional(),
69
+ remove_allocations: z.number().array().optional(),
70
+ });
71
+ export const editApplicationServerStartupSchema = z.object({
72
+ startup: z.string(),
73
+ environment: z.record(z.string().uppercase(), z.string()),
74
+ egg: z.number(),
75
+ image: z
76
+ .string()
77
+ .max(191)
78
+ .regex(/^~?[\w\.\/\-:@ ]*$/),
79
+ skip_scripts: z.boolean(),
80
+ });
81
+ export const createApplicationDatabaseSchema = z.object({
82
+ database: z.string().min(1).max(48),
83
+ remote: z.string().regex(/^[0-9%.]{1,15}$/),
84
+ host: z.number(),
85
+ });
@@ -4,31 +4,33 @@ export interface ApplicationServerList extends ListwithPagination {
4
4
  data: UserServerAttributesWithDate<string>[];
5
5
  }
6
6
  export interface CreateServerArgs extends BaseArgs {
7
+ external_id?: string | undefined;
7
8
  name: string;
9
+ description?: string | undefined;
8
10
  user: number;
9
11
  egg: number;
12
+ docker_image?: string | undefined;
13
+ startup?: string | undefined;
14
+ environment?: Record<EnvironmentVariable, string> | undefined;
15
+ skip_scripts?: boolean | undefined;
10
16
  limits: {
11
17
  memory: number;
12
18
  swap: number;
13
19
  disk: number;
14
- cpu: number;
15
20
  io: number;
16
21
  threads?: string | undefined;
17
- oom_disabled?: boolean | undefined;
22
+ cpu: number;
18
23
  };
19
24
  feature_limits: {
20
25
  databases: number;
21
- allocations: number;
22
26
  backups: number;
27
+ allocations?: number | undefined;
23
28
  };
24
29
  allocation: {
25
- [key: string]: number | number[];
26
30
  default: number;
27
- additional?: number[];
31
+ additional?: number[] | undefined;
28
32
  };
29
- docker_image?: string | undefined;
30
- startup?: string | undefined;
31
- environment?: Record<EnvironmentVariable, string> | undefined;
33
+ start_on_completion?: boolean | undefined;
32
34
  }
33
35
  export interface EditApplicationServerDetailsArgs extends BaseArgs {
34
36
  name: string;
@@ -38,12 +40,15 @@ export interface EditApplicationServerDetailsArgs extends BaseArgs {
38
40
  }
39
41
  export interface EditApplicationServerConfigurationArgs extends BaseArgs {
40
42
  allocation: number;
41
- memory: number;
42
- swap: number;
43
- disk: number;
44
- io: number;
45
- cpu: number;
46
- threads?: string | undefined;
43
+ oom_disabled?: boolean | undefined;
44
+ limits: {
45
+ memory?: number | undefined;
46
+ swap?: number | undefined;
47
+ disk?: number | undefined;
48
+ io?: number | undefined;
49
+ threads?: string | undefined;
50
+ cpu?: number | undefined;
51
+ };
47
52
  feature_limits: {
48
53
  databases: number;
49
54
  backups: number;
@@ -51,7 +56,6 @@ export interface EditApplicationServerConfigurationArgs extends BaseArgs {
51
56
  };
52
57
  add_allocations?: number[] | undefined;
53
58
  remove_allocations?: number[] | undefined;
54
- oom_disabled?: boolean | undefined;
55
59
  }
56
60
  export interface EditApplicationServerStartupArgs extends BaseArgs {
57
61
  startup: string;
@@ -1 +1 @@
1
- {"version":3,"file":"server.types.d.ts","sourceRoot":"","sources":["../../../src/application/server/server.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,KAAK,EACV,QAAQ,EACR,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,gBAAgB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,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,cAAc,EAAE;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAClC,CAAC;IACF,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACvC,kBAAkB,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC1C,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACpC;AAED,MAAM,WAAW,gCAAiC,SAAQ,QAAQ;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,yBAA0B,SAAQ,QAAQ;IACzD,OAAO,CAAC,EAAE,gCAAgC,GAAG,SAAS,CAAC;IACvD,aAAa,CAAC,EAAE,sCAAsC,GAAG,SAAS,CAAC;IACnE,OAAO,CAAC,EAAE,gCAAgC,GAAG,SAAS,CAAC;CACxD"}
1
+ {"version":3,"file":"server.types.d.ts","sourceRoot":"","sources":["../../../src/application/server/server.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,KAAK,EACV,QAAQ,EACR,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,IAAI,EAAE,4BAA4B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et entièrement typé pour l’API Pterodactyl.\nCouvre l’ensemble des endpoints client et application avec une architecture modulaire, orientée classes, conçue pour Node.js et les environnements TypeScript stricts.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",