pterodactyl-api-client 3.4.0 → 3.4.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.
Files changed (200) hide show
  1. package/README.md +13 -13
  2. package/dist/application/application.client.d.ts +12 -12
  3. package/dist/application/application.client.js +11 -11
  4. package/dist/application/index.d.ts +2 -2
  5. package/dist/application/index.js +2 -2
  6. package/dist/application/location/index.d.ts +3 -3
  7. package/dist/application/location/index.js +3 -3
  8. package/dist/application/location/location.client.d.ts +2 -2
  9. package/dist/application/location/location.client.js +5 -5
  10. package/dist/application/location/location.schemas.d.ts +1 -1
  11. package/dist/application/location/location.schemas.js +4 -4
  12. package/dist/application/location/location.types.d.ts +2 -2
  13. package/dist/application/locations/index.d.ts +3 -3
  14. package/dist/application/locations/index.js +3 -3
  15. package/dist/application/locations/locations.client.d.ts +3 -3
  16. package/dist/application/locations/locations.client.js +5 -5
  17. package/dist/application/locations/locations.schemas.d.ts +1 -1
  18. package/dist/application/locations/locations.schemas.js +1 -1
  19. package/dist/application/locations/locations.types.d.ts +2 -2
  20. package/dist/application/nest/egg/egg.client.d.ts +1 -1
  21. package/dist/application/nest/egg/egg.client.js +2 -2
  22. package/dist/application/nest/egg/egg.types.d.ts +1 -1
  23. package/dist/application/nest/eggs/eggs.client.d.ts +1 -1
  24. package/dist/application/nest/eggs/eggs.client.d.ts.map +1 -1
  25. package/dist/application/nest/eggs/eggs.client.js +1 -1
  26. package/dist/application/nest/eggs/eggs.types.d.ts +2 -2
  27. package/dist/application/nest/index.d.ts +6 -6
  28. package/dist/application/nest/index.js +6 -6
  29. package/dist/application/nest/nest.client.d.ts +3 -3
  30. package/dist/application/nest/nest.client.js +4 -4
  31. package/dist/application/nest/nest.schemas.js +1 -1
  32. package/dist/application/nest/nest.types.d.ts +1 -1
  33. package/dist/application/nest/nest.types.d.ts.map +1 -1
  34. package/dist/application/nests/index.d.ts +2 -2
  35. package/dist/application/nests/index.js +2 -2
  36. package/dist/application/nests/nests.client.d.ts +1 -1
  37. package/dist/application/nests/nests.client.js +1 -1
  38. package/dist/application/nests/nests.types.d.ts +2 -2
  39. package/dist/application/node/allocation/allocation.client.d.ts +1 -1
  40. package/dist/application/node/allocation/allocation.client.js +2 -2
  41. package/dist/application/node/allocations/allocations.client.d.ts +3 -3
  42. package/dist/application/node/allocations/allocations.client.js +4 -4
  43. package/dist/application/node/allocations/allocations.types.d.ts +2 -2
  44. package/dist/application/node/index.d.ts +6 -6
  45. package/dist/application/node/index.js +6 -6
  46. package/dist/application/node/node.client.d.ts +5 -5
  47. package/dist/application/node/node.client.js +9 -9
  48. package/dist/application/node/node.schemas.d.ts +1 -1
  49. package/dist/application/node/node.schemas.js +2 -2
  50. package/dist/application/node/node.types.d.ts +1 -1
  51. package/dist/application/nodes/index.d.ts +3 -3
  52. package/dist/application/nodes/index.js +3 -3
  53. package/dist/application/nodes/nodes.client.d.ts +3 -3
  54. package/dist/application/nodes/nodes.client.js +5 -5
  55. package/dist/application/nodes/nodes.schemas.d.ts +1 -1
  56. package/dist/application/nodes/nodes.schemas.js +3 -3
  57. package/dist/application/nodes/nodes.types.d.ts +3 -3
  58. package/dist/application/nodes/nodes.types.d.ts.map +1 -1
  59. package/dist/application/server/database/database.client.d.ts +2 -2
  60. package/dist/application/server/database/database.client.js +4 -4
  61. package/dist/application/server/database/database.types.d.ts +3 -3
  62. package/dist/application/server/database/password/password.client.d.ts +1 -1
  63. package/dist/application/server/database/password/password.client.js +1 -1
  64. package/dist/application/server/databases/databases.client.d.ts +2 -2
  65. package/dist/application/server/databases/databases.client.js +4 -4
  66. package/dist/application/server/databases/databases.types.d.ts +4 -4
  67. package/dist/application/server/index.d.ts +8 -8
  68. package/dist/application/server/index.js +8 -8
  69. package/dist/application/server/server.client.d.ts +4 -4
  70. package/dist/application/server/server.client.js +13 -13
  71. package/dist/application/server/server.schemas.d.ts +1 -1
  72. package/dist/application/server/server.schemas.js +2 -2
  73. package/dist/application/server/server.types.d.ts +1 -1
  74. package/dist/application/servers/index.d.ts +3 -3
  75. package/dist/application/servers/index.js +3 -3
  76. package/dist/application/servers/servers.client.d.ts +3 -3
  77. package/dist/application/servers/servers.client.js +5 -5
  78. package/dist/application/servers/servers.schemas.d.ts +1 -1
  79. package/dist/application/servers/servers.schemas.js +2 -2
  80. package/dist/application/servers/servers.types.d.ts +4 -4
  81. package/dist/application/user/index.d.ts +3 -3
  82. package/dist/application/user/index.js +3 -3
  83. package/dist/application/user/user.client.d.ts +3 -3
  84. package/dist/application/user/user.client.js +6 -6
  85. package/dist/application/user/user.schemas.d.ts +1 -1
  86. package/dist/application/user/user.schemas.js +2 -2
  87. package/dist/application/users/index.d.ts +3 -3
  88. package/dist/application/users/index.js +3 -3
  89. package/dist/application/users/users.client.d.ts +3 -3
  90. package/dist/application/users/users.client.d.ts.map +1 -1
  91. package/dist/application/users/users.client.js +5 -5
  92. package/dist/application/users/users.schemas.d.ts +1 -1
  93. package/dist/application/users/users.schemas.js +1 -1
  94. package/dist/application/users/users.types.d.ts +5 -5
  95. package/dist/class/HttpClient.d.ts +2 -2
  96. package/dist/class/HttpClient.js +3 -3
  97. package/dist/class.d.ts +4 -4
  98. package/dist/class.js +6 -6
  99. package/dist/client/account/a2f/a2f.client.d.ts +3 -3
  100. package/dist/client/account/a2f/a2f.client.js +5 -5
  101. package/dist/client/account/a2f/a2f.types.d.ts +3 -3
  102. package/dist/client/account/account.client.d.ts +8 -8
  103. package/dist/client/account/account.client.js +8 -8
  104. package/dist/client/account/account.schemas.d.ts +1 -1
  105. package/dist/client/account/account.schemas.js +13 -13
  106. package/dist/client/account/account.types.d.ts +2 -2
  107. package/dist/client/account/activity/activity.client.d.ts +5 -5
  108. package/dist/client/account/activity/activity.client.d.ts.map +1 -1
  109. package/dist/client/account/activity/activity.client.js +3 -3
  110. package/dist/client/account/activity/activity.types.d.ts +8 -8
  111. package/dist/client/account/api-key/api-key.client.d.ts +2 -2
  112. package/dist/client/account/api-key/api-key.client.js +4 -4
  113. package/dist/client/account/api-key/api-key.types.d.ts +2 -2
  114. package/dist/client/account/email/email.client.d.ts +2 -2
  115. package/dist/client/account/email/email.client.js +2 -2
  116. package/dist/client/account/email/email.types.d.ts +1 -1
  117. package/dist/client/account/index.d.ts +15 -15
  118. package/dist/client/account/index.js +15 -15
  119. package/dist/client/account/password/password.client.d.ts +2 -2
  120. package/dist/client/account/password/password.client.js +2 -2
  121. package/dist/client/account/password/password.types.d.ts +1 -1
  122. package/dist/client/account/ssh-key/ssh-key.client.d.ts +2 -2
  123. package/dist/client/account/ssh-key/ssh-key.client.js +4 -4
  124. package/dist/client/account/ssh-key/ssh-key.types.d.ts +2 -2
  125. package/dist/client/client.class.d.ts +3 -3
  126. package/dist/client/client.class.js +6 -6
  127. package/dist/client/client.schema.d.ts +1 -1
  128. package/dist/client/client.schema.js +2 -2
  129. package/dist/client/index.d.ts +2 -2
  130. package/dist/client/index.js +2 -2
  131. package/dist/client/server/allocation/allocation.client.d.ts +3 -3
  132. package/dist/client/server/allocation/allocation.client.js +4 -4
  133. package/dist/client/server/allocation.types.d.ts +2 -2
  134. package/dist/client/server/allocations/allocations.client.d.ts +3 -3
  135. package/dist/client/server/allocations/allocations.client.js +3 -3
  136. package/dist/client/server/backup/backup.client.d.ts +3 -3
  137. package/dist/client/server/backup/backup.client.js +6 -6
  138. package/dist/client/server/backup/lock/lock.client.d.ts +1 -1
  139. package/dist/client/server/backup/lock/lock.client.js +1 -1
  140. package/dist/client/server/backup.types.d.ts +3 -3
  141. package/dist/client/server/backups/backups.client.d.ts +2 -2
  142. package/dist/client/server/backups/backups.client.js +3 -3
  143. package/dist/client/server/console/console.client.d.ts +3 -3
  144. package/dist/client/server/console/console.client.js +3 -3
  145. package/dist/client/server/console/console.types.d.ts +2 -2
  146. package/dist/client/server/console/console.types.js +1 -1
  147. package/dist/client/server/console/websocket/websocket.console.client.d.ts +3 -3
  148. package/dist/client/server/console/websocket/websocket.console.client.js +13 -13
  149. package/dist/client/server/console/websocket/websocket.console.types.d.ts +13 -13
  150. package/dist/client/server/database/database.client.d.ts +2 -2
  151. package/dist/client/server/database/database.client.js +3 -3
  152. package/dist/client/server/database/password/password.client.d.ts +1 -1
  153. package/dist/client/server/database/password/password.client.js +1 -1
  154. package/dist/client/server/database.types.d.ts +6 -6
  155. package/dist/client/server/databases/databases.client.d.ts +2 -2
  156. package/dist/client/server/databases/databases.client.js +3 -3
  157. package/dist/client/server/image/image.client.d.ts +2 -2
  158. package/dist/client/server/image/image.client.js +2 -2
  159. package/dist/client/server/image/image.types.d.ts +1 -1
  160. package/dist/client/server/index.d.ts +29 -29
  161. package/dist/client/server/index.js +29 -29
  162. package/dist/client/server/power/power.client.d.ts +1 -1
  163. package/dist/client/server/power/power.client.js +8 -8
  164. package/dist/client/server/power/power.types.d.ts +2 -2
  165. package/dist/client/server/ressource/ressource.client.d.ts +2 -2
  166. package/dist/client/server/ressource/ressource.client.js +1 -1
  167. package/dist/client/server/ressource/ressource.types.d.ts +2 -2
  168. package/dist/client/server/schedule/schedule.client.d.ts +4 -4
  169. package/dist/client/server/schedule/schedule.client.js +7 -7
  170. package/dist/client/server/schedule/schedule.types.d.ts +6 -6
  171. package/dist/client/server/schedule/schedule.types.d.ts.map +1 -1
  172. package/dist/client/server/schedule/task/task.client.d.ts +3 -3
  173. package/dist/client/server/schedule/task/task.client.js +3 -3
  174. package/dist/client/server/schedule/tasks/tasks.client.d.ts +3 -3
  175. package/dist/client/server/schedule/tasks/tasks.client.js +3 -3
  176. package/dist/client/server/schedule/tasks.types.d.ts +3 -3
  177. package/dist/client/server/schedule.types.d.ts +6 -6
  178. package/dist/client/server/schedules/schedules.client.d.ts +2 -2
  179. package/dist/client/server/schedules/schedules.client.js +3 -3
  180. package/dist/client/server/server.client.d.ts +18 -18
  181. package/dist/client/server/server.client.js +22 -22
  182. package/dist/client/server/server.schemas.d.ts +1 -1
  183. package/dist/client/server/server.schemas.js +83 -83
  184. package/dist/client/server/server.types.d.ts +73 -73
  185. package/dist/client/server/startup/startup.client.d.ts +3 -3
  186. package/dist/client/server/startup/startup.client.js +3 -3
  187. package/dist/client/server/startup/startup.types.d.ts +2 -2
  188. package/dist/client/server/subuser/subuser.client.d.ts +4 -4
  189. package/dist/client/server/subuser/subuser.client.js +4 -4
  190. package/dist/client/server/subuser.types.d.ts +4 -4
  191. package/dist/client/server/subusers/subusers.client.d.ts +4 -4
  192. package/dist/client/server/subusers/subusers.client.js +3 -3
  193. package/dist/index.d.ts +5 -5
  194. package/dist/index.js +5 -5
  195. package/dist/schemas.d.ts +1 -1
  196. package/dist/schemas.js +4 -4
  197. package/dist/types.d.ts +5 -5
  198. package/dist/utils/buildQueryParams.d.ts +1 -1
  199. package/dist/utils/buildQueryParams.js +3 -3
  200. package/package.json +5 -2
@@ -1,8 +1,8 @@
1
- import z from "zod";
2
- import { nodeId } from "./node.schemas.js";
3
- import { createNodeSchema } from "../nodes/nodes.schemas.js";
4
- import AllocationsClient from "./allocations/allocations.client.js";
5
- import AllocationClient from "./allocation/allocation.client.js";
1
+ import z from 'zod';
2
+ import { nodeId } from './node.schemas.js';
3
+ import { createNodeSchema } from '../nodes/nodes.schemas.js';
4
+ import AllocationsClient from './allocations/allocations.client.js';
5
+ import AllocationClient from './allocation/allocation.client.js';
6
6
  export default class NodeClient {
7
7
  httpClient;
8
8
  allocations;
@@ -16,7 +16,7 @@ export default class NodeClient {
16
16
  return new AllocationClient(this.httpClient, this.id, id);
17
17
  }
18
18
  async info() {
19
- const res = await this.httpClient.request("GET", `/application/nodes/${this.id}`);
19
+ const res = await this.httpClient.request('GET', `/application/nodes/${this.id}`);
20
20
  return {
21
21
  ...res,
22
22
  attributes: {
@@ -27,7 +27,7 @@ export default class NodeClient {
27
27
  };
28
28
  }
29
29
  async edit(options) {
30
- const res = await this.httpClient.request("PATCH", `/application/nodes/${this.id}`, createNodeSchema.parse(options));
30
+ const res = await this.httpClient.request('PATCH', `/application/nodes/${this.id}`, createNodeSchema.parse(options));
31
31
  return {
32
32
  ...res,
33
33
  attributes: {
@@ -38,9 +38,9 @@ export default class NodeClient {
38
38
  };
39
39
  }
40
40
  configuration() {
41
- return this.httpClient.request("GET", `/application/nodes/${this.id}/configuration`);
41
+ return this.httpClient.request('GET', `/application/nodes/${this.id}/configuration`);
42
42
  }
43
43
  delete() {
44
- return this.httpClient.request("DELETE", `/application/nodes/${this.id}`);
44
+ return this.httpClient.request('DELETE', `/application/nodes/${this.id}`);
45
45
  }
46
46
  }
@@ -1,4 +1,4 @@
1
- import z from "zod";
1
+ import z from 'zod';
2
2
  export declare const nodeId: z.ZodInt;
3
3
  export declare const allocationId: z.ZodInt;
4
4
  export declare const listAllocationsFilterSchema: z.ZodObject<{
@@ -1,5 +1,5 @@
1
- import z from "zod";
2
- import { idSchema } from "../../schemas.js";
1
+ import z from 'zod';
2
+ import { idSchema } from '../../schemas.js';
3
3
  export const nodeId = idSchema;
4
4
  export const allocationId = idSchema;
5
5
  export const listAllocationsFilterSchema = z.object({
@@ -1,4 +1,4 @@
1
- import type { IP } from "../../types.js";
1
+ import type { IP } from '../../types.js';
2
2
  export interface NodeConfiguration {
3
3
  debug: boolean;
4
4
  uuid: string;
@@ -1,4 +1,4 @@
1
- export { default as Nodes } from "./nodes.client.js";
2
- export * from "./nodes.types.js";
3
- export * from "./nodes.schemas.js";
1
+ export { default as Nodes } from './nodes.client.js';
2
+ export * from './nodes.types.js';
3
+ export * from './nodes.schemas.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- export { default as Nodes } from "./nodes.client.js";
2
- export * from "./nodes.types.js";
3
- export * from "./nodes.schemas.js";
1
+ export { default as Nodes } from './nodes.client.js';
2
+ export * from './nodes.types.js';
3
+ export * from './nodes.schemas.js';
@@ -1,6 +1,6 @@
1
- import type HttpClient from "../../class/HttpClient.js";
2
- import type { CreateNodeArgs } from "./nodes.types.js";
3
- import type { BaseListArgs, Sort } from "../../types.js";
1
+ import type HttpClient from '../../class/HttpClient.js';
2
+ import type { CreateNodeArgs } from './nodes.types.js';
3
+ import type { BaseListArgs, Sort } from '../../types.js';
4
4
  export default class NodesClient {
5
5
  private httpClient;
6
6
  constructor(httpClient: HttpClient);
@@ -1,6 +1,6 @@
1
- import z from "zod";
2
- import { createNodeSchema, listNodesFilterSchema } from "./nodes.schemas.js";
3
- import buildQueryParams from "../../utils/buildQueryParams.js";
1
+ import z from 'zod';
2
+ import { createNodeSchema, listNodesFilterSchema } from './nodes.schemas.js';
3
+ import buildQueryParams from '../../utils/buildQueryParams.js';
4
4
  export default class NodesClient {
5
5
  httpClient;
6
6
  constructor(httpClient) {
@@ -9,7 +9,7 @@ export default class NodesClient {
9
9
  async list(options = {}) {
10
10
  const filter = listNodesFilterSchema.optional().parse(options.filter);
11
11
  const queries = buildQueryParams({ ...options, filter });
12
- const res = await this.httpClient.request("GET", `/application/nodes?${queries}`);
12
+ const res = await this.httpClient.request('GET', `/application/nodes?${queries}`);
13
13
  return {
14
14
  ...res,
15
15
  data: res.data.map((node) => ({
@@ -23,7 +23,7 @@ export default class NodesClient {
23
23
  };
24
24
  }
25
25
  async create(options) {
26
- const res = await this.httpClient.request("POST", "/application/nodes", createNodeSchema.parse(options));
26
+ const res = await this.httpClient.request('POST', '/application/nodes', createNodeSchema.parse(options));
27
27
  return {
28
28
  ...res,
29
29
  attributes: {
@@ -1,4 +1,4 @@
1
- import z from "zod";
1
+ import z from 'zod';
2
2
  export declare const createNodeSchema: z.ZodObject<{
3
3
  name: z.ZodString;
4
4
  description: z.ZodOptional<z.ZodString>;
@@ -1,11 +1,11 @@
1
- import z from "zod";
2
- import { descriptionSchema, idSchema, nameSchema } from "../../schemas.js";
1
+ import z from 'zod';
2
+ import { descriptionSchema, idSchema, nameSchema } from '../../schemas.js';
3
3
  export const createNodeSchema = z.object({
4
4
  name: nameSchema,
5
5
  description: descriptionSchema,
6
6
  location_id: idSchema,
7
7
  fqdn: z.string().min(1).max(191),
8
- scheme: z.literal(["https", "http"]),
8
+ scheme: z.literal(['https', 'http']),
9
9
  behind_proxy: z.boolean().optional(),
10
10
  public: z.boolean().optional(),
11
11
  daemon_base: z.string().optional(),
@@ -1,7 +1,7 @@
1
- import type { BaseArgs, ListwithPagination } from "../../types.js";
2
- export type Scheme = "https" | "http";
1
+ import type { BaseArgs, ListwithPagination } from '../../types.js';
2
+ export type Scheme = 'https' | 'http';
3
3
  export interface Node<T extends string | Date> {
4
- object: "node";
4
+ object: 'node';
5
5
  attributes: {
6
6
  id: number;
7
7
  uuid: string;
@@ -1 +1 @@
1
- {"version":3,"file":"nodes.types.d.ts","sourceRoot":"","sources":["../../../src/application/nodes/nodes.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAM,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEvE,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEtC,MAAM,WAAW,IAAI,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE;QACV,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,OAAO,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,OAAO,CAAC;QACtB,gBAAgB,EAAE,OAAO,CAAC;QAC1B,MAAM,EAAE,MAAM,CAAC;QACf,mBAAmB,EAAE,MAAM,CAAC;QAC5B,IAAI,EAAE,MAAM,CAAC;QACb,iBAAiB,EAAE,MAAM,CAAC;QAC1B,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,MAAM,CAAC;QACtB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,CAAC,CAAC;QACd,UAAU,EAA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AAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACxC"}
@@ -1,5 +1,5 @@
1
- import type HttpClient from "../../../class/HttpClient.js";
2
- import PasswordClient from "./password/password.client.js";
1
+ import type HttpClient from '../../../class/HttpClient.js';
2
+ import PasswordClient from './password/password.client.js';
3
3
  export default class DatabaseClient {
4
4
  private httpClient;
5
5
  readonly server: number;
@@ -1,5 +1,5 @@
1
- import { applicationServerDatabaseId } from "../server.schemas.js";
2
- import PasswordClient from "./password/password.client.js";
1
+ import { applicationServerDatabaseId } from '../server.schemas.js';
2
+ import PasswordClient from './password/password.client.js';
3
3
  export default class DatabaseClient {
4
4
  httpClient;
5
5
  server;
@@ -12,7 +12,7 @@ export default class DatabaseClient {
12
12
  this.password = new PasswordClient(httpClient, server, this.id);
13
13
  }
14
14
  async info() {
15
- const res = await this.httpClient.request("GET", `/application/servers/${this.server}/databases/${this.id}`);
15
+ const res = await this.httpClient.request('GET', `/application/servers/${this.server}/databases/${this.id}`);
16
16
  return {
17
17
  ...res,
18
18
  attributes: {
@@ -23,6 +23,6 @@ export default class DatabaseClient {
23
23
  };
24
24
  }
25
25
  delete() {
26
- return this.httpClient.request("DELETE", `/application/servers/${this.server}/databases/${this.id}`);
26
+ return this.httpClient.request('DELETE', `/application/servers/${this.server}/databases/${this.id}`);
27
27
  }
28
28
  }
@@ -1,10 +1,10 @@
1
- import type { ApplicationDatabaseAttributes } from "../databases/databases.types.js";
1
+ import type { ApplicationDatabaseAttributes } from '../databases/databases.types.js';
2
2
  export interface ApplicationDatabaseWithPassword {
3
- object: "server_database";
3
+ object: 'server_database';
4
4
  attributes: ApplicationDatabaseAttributes<string> & {
5
5
  relationships: {
6
6
  password: {
7
- object: "database_password";
7
+ object: 'database_password';
8
8
  attributes: {
9
9
  password: string;
10
10
  };
@@ -1,4 +1,4 @@
1
- import type HttpClient from "../../../../class/HttpClient.js";
1
+ import type HttpClient from '../../../../class/HttpClient.js';
2
2
  export default class PasswordClient {
3
3
  private httpClient;
4
4
  readonly server: number;
@@ -8,6 +8,6 @@ export default class PasswordClient {
8
8
  this.database = database;
9
9
  }
10
10
  reset() {
11
- return this.httpClient.request("POST", `/application/servers/${this.server}/databases/${this.database}/reset-password`);
11
+ return this.httpClient.request('POST', `/application/servers/${this.server}/databases/${this.database}/reset-password`);
12
12
  }
13
13
  }
@@ -1,5 +1,5 @@
1
- import type HttpClient from "../../../class/HttpClient.js";
2
- import type { CreateApplicationDatabase } from "./databases.types.js";
1
+ import type HttpClient from '../../../class/HttpClient.js';
2
+ import type { CreateApplicationDatabase } from './databases.types.js';
3
3
  export default class DatabasesClient {
4
4
  private httpClient;
5
5
  constructor(httpClient: HttpClient);
@@ -1,12 +1,12 @@
1
- import z from "zod";
2
- import { applicationServerId, createApplicationDatabaseSchema, } from "../server.schemas.js";
1
+ import z from 'zod';
2
+ import { applicationServerId, createApplicationDatabaseSchema, } from '../server.schemas.js';
3
3
  export default class DatabasesClient {
4
4
  httpClient;
5
5
  constructor(httpClient) {
6
6
  this.httpClient = httpClient;
7
7
  }
8
8
  async list(server) {
9
- const res = await this.httpClient.request("GET", `/application/servers/${applicationServerId.parse(server)}/databases`);
9
+ const res = await this.httpClient.request('GET', `/application/servers/${applicationServerId.parse(server)}/databases`);
10
10
  return {
11
11
  ...res,
12
12
  data: res.data.map((db) => ({
@@ -20,7 +20,7 @@ export default class DatabasesClient {
20
20
  };
21
21
  }
22
22
  async create(server, args) {
23
- const res = await this.httpClient.request("POST", `/application/servers/${applicationServerId.parse(server)}/databases`, createApplicationDatabaseSchema.parse(args));
23
+ const res = await this.httpClient.request('POST', `/application/servers/${applicationServerId.parse(server)}/databases`, createApplicationDatabaseSchema.parse(args));
24
24
  return {
25
25
  ...res,
26
26
  attributes: {
@@ -1,17 +1,17 @@
1
- import type { BaseArgs, IP, List } from "../../../types.js";
1
+ import type { BaseArgs, IP, List } from '../../../types.js';
2
2
  export interface ApplicationDatabaseAttributes<T extends string | Date> {
3
3
  id: number;
4
4
  server: number;
5
5
  host: number;
6
6
  database: string;
7
7
  username: string;
8
- remote: string | IP | "%";
8
+ remote: string | IP | '%';
9
9
  max_connections: number;
10
10
  created_at: T;
11
11
  updated_at: T;
12
12
  }
13
13
  export interface ApplicationDatabase<T extends string | Date> {
14
- object: "server_database";
14
+ object: 'server_database';
15
15
  attributes: ApplicationDatabaseAttributes<T>;
16
16
  }
17
17
  export interface ApplicationDatabaseList extends List {
@@ -19,7 +19,7 @@ export interface ApplicationDatabaseList extends List {
19
19
  }
20
20
  export interface CreateApplicationDatabase extends BaseArgs {
21
21
  database: string;
22
- remote: string | IP | "%";
22
+ remote: string | IP | '%';
23
23
  host: number;
24
24
  }
25
25
  export interface CreatedApplicationDatabase extends ApplicationDatabase<string> {
@@ -1,9 +1,9 @@
1
- export { default as Server } from "./server.client.js";
2
- export { default as DatabaseClient } from "./database/database.client.js";
3
- export { default as DatabasesClient } from "./databases/databases.client.js";
4
- export { default as PasswordClient } from "./database/password/password.client.js";
5
- export * from "./server.types.js";
6
- export * from "./databases/databases.types.js";
7
- export * from "./database/database.types.js";
8
- export * from "./server.schemas.js";
1
+ export { default as Server } from './server.client.js';
2
+ export { default as DatabaseClient } from './database/database.client.js';
3
+ export { default as DatabasesClient } from './databases/databases.client.js';
4
+ export { default as PasswordClient } from './database/password/password.client.js';
5
+ export * from './server.types.js';
6
+ export * from './databases/databases.types.js';
7
+ export * from './database/database.types.js';
8
+ export * from './server.schemas.js';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,8 @@
1
- export { default as Server } from "./server.client.js";
2
- export { default as DatabaseClient } from "./database/database.client.js";
3
- export { default as DatabasesClient } from "./databases/databases.client.js";
4
- export { default as PasswordClient } from "./database/password/password.client.js";
5
- export * from "./server.types.js";
6
- export * from "./databases/databases.types.js";
7
- export * from "./database/database.types.js";
8
- export * from "./server.schemas.js";
1
+ export { default as Server } from './server.client.js';
2
+ export { default as DatabaseClient } from './database/database.client.js';
3
+ export { default as DatabasesClient } from './databases/databases.client.js';
4
+ export { default as PasswordClient } from './database/password/password.client.js';
5
+ export * from './server.types.js';
6
+ export * from './databases/databases.types.js';
7
+ export * from './database/database.types.js';
8
+ export * from './server.schemas.js';
@@ -1,7 +1,7 @@
1
- import type HttpClient from "../../class/HttpClient.js";
2
- import DatabaseClient from "./database/database.client.js";
3
- import type { ApplicationServerId, EditApplicationServerArgs } from "./server.types.js";
4
- import DatabasesClient from "./databases/databases.client.js";
1
+ import type HttpClient from '../../class/HttpClient.js';
2
+ import DatabaseClient from './database/database.client.js';
3
+ import type { ApplicationServerId, EditApplicationServerArgs } from './server.types.js';
4
+ import DatabasesClient from './databases/databases.client.js';
5
5
  export default class ServerClient {
6
6
  private httpClient;
7
7
  databases: DatabasesClient;
@@ -1,7 +1,7 @@
1
- import z from "zod";
2
- import DatabaseClient from "./database/database.client.js";
3
- import { applicationServerIdSchema, editApplicationServerConfigurationSchema, editApplicationServerDetailsSchema, editApplicationServerStartupSchema, } from "./server.schemas.js";
4
- import DatabasesClient from "./databases/databases.client.js";
1
+ import z from 'zod';
2
+ import DatabaseClient from './database/database.client.js';
3
+ import { applicationServerIdSchema, editApplicationServerConfigurationSchema, editApplicationServerDetailsSchema, editApplicationServerStartupSchema, } from './server.schemas.js';
4
+ import DatabasesClient from './databases/databases.client.js';
5
5
  export default class ServerClient {
6
6
  httpClient;
7
7
  databases;
@@ -20,7 +20,7 @@ export default class ServerClient {
20
20
  return new DatabaseClient(this.httpClient, this.id, database);
21
21
  }
22
22
  async info() {
23
- const res = await this.httpClient.request("GET", `/application/servers/${this.id ?? `external/${this.external_id}`}`);
23
+ const res = await this.httpClient.request('GET', `/application/servers/${this.id ?? `external/${this.external_id}`}`);
24
24
  return {
25
25
  ...res,
26
26
  attributes: {
@@ -36,13 +36,13 @@ export default class ServerClient {
36
36
  const basePath = `/application/servers/${this.id}`;
37
37
  const requests = [];
38
38
  if (details)
39
- requests.push(this.httpClient.request("PATCH", `${basePath}/details`, editApplicationServerDetailsSchema.parse(details)));
39
+ requests.push(this.httpClient.request('PATCH', `${basePath}/details`, editApplicationServerDetailsSchema.parse(details)));
40
40
  if (configuration)
41
- requests.push(this.httpClient.request("PATCH", `${basePath}/build`, editApplicationServerConfigurationSchema.parse(configuration)));
41
+ requests.push(this.httpClient.request('PATCH', `${basePath}/build`, editApplicationServerConfigurationSchema.parse(configuration)));
42
42
  if (startup)
43
- requests.push(this.httpClient.request("PATCH", `${basePath}/startup`, editApplicationServerStartupSchema.parse(startup)));
43
+ requests.push(this.httpClient.request('PATCH', `${basePath}/startup`, editApplicationServerStartupSchema.parse(startup)));
44
44
  if (requests.length === 0)
45
- throw new Error("Aucunes modifications spécifiées !");
45
+ throw new Error('Aucunes modifications spécifiées !');
46
46
  const res = await Promise.all(requests);
47
47
  return {
48
48
  ...res[0],
@@ -56,21 +56,21 @@ export default class ServerClient {
56
56
  suspend() {
57
57
  if (!this.id)
58
58
  throw new Error("L'id du serveur est nécessaire !");
59
- return this.httpClient.request("POST", `/application/servers/${this.id}/suspend`);
59
+ return this.httpClient.request('POST', `/application/servers/${this.id}/suspend`);
60
60
  }
61
61
  unsuspend() {
62
62
  if (!this.id)
63
63
  throw new Error("L'id du serveur est nécessaire !");
64
- return this.httpClient.request("POST", `/application/servers/${this.id}/unsuspend`);
64
+ return this.httpClient.request('POST', `/application/servers/${this.id}/unsuspend`);
65
65
  }
66
66
  reinstall() {
67
67
  if (!this.id)
68
68
  throw new Error("L'id du serveur est nécessaire !");
69
- return this.httpClient.request("POST", `/application/servers/${this.id}/reinstall`);
69
+ return this.httpClient.request('POST', `/application/servers/${this.id}/reinstall`);
70
70
  }
71
71
  delete(force) {
72
72
  if (!this.id)
73
73
  throw new Error("L'id du serveur est nécessaire !");
74
- return this.httpClient.request("DELETE", `/application/servers/${this.id}${force ? "?force=true" : ""}`);
74
+ return this.httpClient.request('DELETE', `/application/servers/${this.id}${force ? '?force=true' : ''}`);
75
75
  }
76
76
  }
@@ -1,4 +1,4 @@
1
- import z from "zod";
1
+ import z from 'zod';
2
2
  export declare const applicationServerId: z.ZodInt;
3
3
  export declare const applicationServerExternalId: z.ZodString;
4
4
  export declare const applicationServerDatabaseId: z.ZodInt;
@@ -1,5 +1,5 @@
1
- import z from "zod";
2
- import { idSchema, nameSchema } from "../../schemas.js";
1
+ import z from 'zod';
2
+ import { idSchema, nameSchema } from '../../schemas.js';
3
3
  export const applicationServerId = idSchema;
4
4
  export const applicationServerExternalId = nameSchema;
5
5
  export const applicationServerDatabaseId = idSchema;
@@ -1,4 +1,4 @@
1
- import type { BaseArgs, EnvironmentVariable } from "../../types.js";
1
+ import type { BaseArgs, EnvironmentVariable } from '../../types.js';
2
2
  export interface ApplicationServerId {
3
3
  id?: number | undefined;
4
4
  external_id?: string | undefined;
@@ -1,4 +1,4 @@
1
- export { default as Servers } from "./servers.client.js";
2
- export * from "./servers.types.js";
3
- export * from "./servers.schemas.js";
1
+ export { default as Servers } from './servers.client.js';
2
+ export * from './servers.types.js';
3
+ export * from './servers.schemas.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- export { default as Servers } from "./servers.client.js";
2
- export * from "./servers.types.js";
3
- export * from "./servers.schemas.js";
1
+ export { default as Servers } from './servers.client.js';
2
+ export * from './servers.types.js';
3
+ export * from './servers.schemas.js';
@@ -1,6 +1,6 @@
1
- import type HttpClient from "../../class/HttpClient.js";
2
- import type { CreateServerArgs } from "./servers.types.js";
3
- import type { BaseListArgs, Sort } from "../../types.js";
1
+ import type HttpClient from '../../class/HttpClient.js';
2
+ import type { CreateServerArgs } from './servers.types.js';
3
+ import type { BaseListArgs, Sort } from '../../types.js';
4
4
  export default class ServersClient {
5
5
  private httpClient;
6
6
  constructor(httpClient: HttpClient);
@@ -1,6 +1,6 @@
1
- import z from "zod";
2
- import { createServerSchema, listServersFilterSchema, } from "./servers.schemas.js";
3
- import buildQueryParams from "../../utils/buildQueryParams.js";
1
+ import z from 'zod';
2
+ import { createServerSchema, listServersFilterSchema, } from './servers.schemas.js';
3
+ import buildQueryParams from '../../utils/buildQueryParams.js';
4
4
  export default class ServersClient {
5
5
  httpClient;
6
6
  constructor(httpClient) {
@@ -9,7 +9,7 @@ export default class ServersClient {
9
9
  async list(options = {}) {
10
10
  const filter = listServersFilterSchema.optional().parse(options.filter);
11
11
  const queries = buildQueryParams({ ...options, filter });
12
- const res = await this.httpClient.request("GET", `/application/servers?${queries}`);
12
+ const res = await this.httpClient.request('GET', `/application/servers?${queries}`);
13
13
  return {
14
14
  ...res,
15
15
  data: res.data.map((server) => ({
@@ -23,7 +23,7 @@ export default class ServersClient {
23
23
  };
24
24
  }
25
25
  async create(options) {
26
- const res = await this.httpClient.request("POST", `/application/servers`, createServerSchema.parse(options));
26
+ const res = await this.httpClient.request('POST', `/application/servers`, createServerSchema.parse(options));
27
27
  return {
28
28
  ...res,
29
29
  attributes: {
@@ -1,4 +1,4 @@
1
- import z from "zod";
1
+ import z from 'zod';
2
2
  export declare const createServerSchema: z.ZodObject<{
3
3
  external_id: z.ZodOptional<z.ZodString>;
4
4
  name: z.ZodString;
@@ -1,5 +1,5 @@
1
- import z from "zod";
2
- import { descriptionSchema, idSchema, nameSchema, uuidSchema, } from "../../schemas.js";
1
+ import z from 'zod';
2
+ import { descriptionSchema, idSchema, nameSchema, uuidSchema, } from '../../schemas.js';
3
3
  export const createServerSchema = z.object({
4
4
  external_id: nameSchema.optional(),
5
5
  name: nameSchema,
@@ -1,6 +1,6 @@
1
- import type { BaseArgs, EnvironmentVariable, ListwithPagination } from "../../types.js";
1
+ import type { BaseArgs, EnvironmentVariable, ListwithPagination } from '../../types.js';
2
2
  export interface BaseApplicationServer<T extends string | Date> {
3
- object: "server";
3
+ object: 'server';
4
4
  attributes: {
5
5
  id: number;
6
6
  external_id: null;
@@ -39,14 +39,14 @@ export interface BaseApplicationServer<T extends string | Date> {
39
39
  }
40
40
  export type ApplicationServer<T extends string | Date> = BaseApplicationServer<T> & ({
41
41
  attributes: {
42
- status: "suspended";
42
+ status: 'suspended';
43
43
  container: {
44
44
  installed: 0;
45
45
  };
46
46
  };
47
47
  } | {
48
48
  attributes: {
49
- status: "installing" | null;
49
+ status: 'installing' | null;
50
50
  container: {
51
51
  installed: 1;
52
52
  };
@@ -1,4 +1,4 @@
1
- export { default as User } from "./user.client.js";
2
- export * from "./user.types.js";
3
- export * from "./user.schemas.js";
1
+ export { default as User } from './user.client.js';
2
+ export * from './user.types.js';
3
+ export * from './user.schemas.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- export { default as User } from "./user.client.js";
2
- export * from "./user.types.js";
3
- export * from "./user.schemas.js";
1
+ export { default as User } from './user.client.js';
2
+ export * from './user.types.js';
3
+ export * from './user.schemas.js';
@@ -1,6 +1,6 @@
1
- import type HttpClient from "../../class/HttpClient.js";
2
- import type { CreateUserArgs, User, UserAttributes, UserWithServersAttributes } from "../users/users.types.js";
3
- import type { UserId } from "./user.types.js";
1
+ import type HttpClient from '../../class/HttpClient.js';
2
+ import type { CreateUserArgs, User, UserAttributes, UserWithServersAttributes } from '../users/users.types.js';
3
+ import type { UserId } from './user.types.js';
4
4
  export default class UserClient {
5
5
  private httpClient;
6
6
  readonly id: number | undefined;
@@ -1,6 +1,6 @@
1
- import z from "zod";
2
- import { userIdSchema } from "./user.schemas.js";
3
- import { createUserSchema } from "../users/users.schemas.js";
1
+ import z from 'zod';
2
+ import { userIdSchema } from './user.schemas.js';
3
+ import { createUserSchema } from '../users/users.schemas.js';
4
4
  export default class UserClient {
5
5
  httpClient;
6
6
  id;
@@ -12,7 +12,7 @@ export default class UserClient {
12
12
  this.external_id = external_id;
13
13
  }
14
14
  async info({ includeServers, } = {}) {
15
- const res = await this.httpClient.request("GET", `/application/users/${this.id ?? `external/${this.external_id}`}${includeServers ? "?include=servers" : ""}`);
15
+ const res = await this.httpClient.request('GET', `/application/users/${this.id ?? `external/${this.external_id}`}${includeServers ? '?include=servers' : ''}`);
16
16
  return {
17
17
  ...res,
18
18
  attributes: {
@@ -25,11 +25,11 @@ export default class UserClient {
25
25
  edit(args) {
26
26
  if (!this.id)
27
27
  throw new Error("L'id de l'utilisateur est requis !");
28
- return this.httpClient.request("PATCH", `/application/users/${this.id}`, createUserSchema.parse(args));
28
+ return this.httpClient.request('PATCH', `/application/users/${this.id}`, createUserSchema.parse(args));
29
29
  }
30
30
  delete() {
31
31
  if (!this.id)
32
32
  throw new Error("L'id de l'utilisateur est requis !");
33
- return this.httpClient.request("DELETE", `/application/users/${this.id}`);
33
+ return this.httpClient.request('DELETE', `/application/users/${this.id}`);
34
34
  }
35
35
  }
@@ -1,4 +1,4 @@
1
- import z from "zod";
1
+ import z from 'zod';
2
2
  export declare const userId: z.ZodInt;
3
3
  export declare const externalUserId: z.ZodString;
4
4
  export declare const userIdSchema: z.ZodObject<{