@meowpanel/api 0.3.0 → 0.5.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.
Files changed (201) hide show
  1. package/esm/mod.d.ts +37 -16
  2. package/esm/mod.d.ts.map +1 -1
  3. package/esm/mod.js +25 -7
  4. package/esm/src/client.d.ts +48 -11
  5. package/esm/src/client.d.ts.map +1 -1
  6. package/esm/src/client.js +53 -12
  7. package/esm/src/http.d.ts +2 -2
  8. package/esm/src/http.d.ts.map +1 -1
  9. package/esm/src/http.js +5 -2
  10. package/esm/src/namespace.d.ts +1 -1
  11. package/esm/src/namespace.js +1 -1
  12. package/esm/src/resources/account.d.ts +50 -19
  13. package/esm/src/resources/account.d.ts.map +1 -1
  14. package/esm/src/resources/account.js +51 -13
  15. package/esm/src/resources/api-keys.d.ts +16 -24
  16. package/esm/src/resources/api-keys.d.ts.map +1 -1
  17. package/esm/src/resources/api-keys.js +16 -20
  18. package/esm/src/resources/auth.d.ts +70 -4
  19. package/esm/src/resources/auth.d.ts.map +1 -1
  20. package/esm/src/resources/auth.js +47 -4
  21. package/esm/src/resources/eggs.d.ts +261 -22
  22. package/esm/src/resources/eggs.d.ts.map +1 -1
  23. package/esm/src/resources/eggs.js +261 -25
  24. package/esm/src/resources/features.d.ts +35 -0
  25. package/esm/src/resources/features.d.ts.map +1 -0
  26. package/esm/src/resources/features.js +21 -0
  27. package/esm/src/resources/hosts.d.ts +151 -21
  28. package/esm/src/resources/hosts.d.ts.map +1 -1
  29. package/esm/src/resources/hosts.js +143 -10
  30. package/esm/src/resources/logs.d.ts +39 -0
  31. package/esm/src/resources/logs.d.ts.map +1 -0
  32. package/esm/src/resources/logs.js +38 -0
  33. package/esm/src/resources/nodes.d.ts +108 -33
  34. package/esm/src/resources/nodes.d.ts.map +1 -1
  35. package/esm/src/resources/nodes.js +116 -24
  36. package/esm/src/resources/permissions.d.ts +45 -0
  37. package/esm/src/resources/permissions.d.ts.map +1 -0
  38. package/esm/src/resources/permissions.js +26 -0
  39. package/esm/src/resources/request-logs.d.ts +91 -0
  40. package/esm/src/resources/request-logs.d.ts.map +1 -0
  41. package/esm/src/resources/request-logs.js +70 -0
  42. package/esm/src/resources/roles.d.ts +128 -0
  43. package/esm/src/resources/roles.d.ts.map +1 -0
  44. package/esm/src/resources/roles.js +142 -0
  45. package/esm/src/resources/server-groups.d.ts +141 -7
  46. package/esm/src/resources/server-groups.d.ts.map +1 -1
  47. package/esm/src/resources/server-groups.js +157 -8
  48. package/esm/src/resources/servers/activity.d.ts +50 -8
  49. package/esm/src/resources/servers/activity.d.ts.map +1 -1
  50. package/esm/src/resources/servers/activity.js +54 -13
  51. package/esm/src/resources/servers/allocations.d.ts +3 -3
  52. package/esm/src/resources/servers/allocations.d.ts.map +1 -1
  53. package/esm/src/resources/servers/allocations.js +7 -7
  54. package/esm/src/resources/servers/backups.d.ts +46 -0
  55. package/esm/src/resources/servers/backups.d.ts.map +1 -0
  56. package/esm/src/resources/servers/backups.js +43 -0
  57. package/esm/src/resources/servers/connection.d.ts +33 -13
  58. package/esm/src/resources/servers/connection.d.ts.map +1 -1
  59. package/esm/src/resources/servers/connection.js +32 -11
  60. package/esm/src/resources/servers/features.d.ts +81 -0
  61. package/esm/src/resources/servers/features.d.ts.map +1 -0
  62. package/esm/src/resources/servers/features.js +60 -0
  63. package/esm/src/resources/servers/files.d.ts +41 -53
  64. package/esm/src/resources/servers/files.d.ts.map +1 -1
  65. package/esm/src/resources/servers/files.js +74 -116
  66. package/esm/src/resources/servers/index.d.ts +46 -27
  67. package/esm/src/resources/servers/index.d.ts.map +1 -1
  68. package/esm/src/resources/servers/index.js +26 -12
  69. package/esm/src/resources/servers/jobs.d.ts +88 -0
  70. package/esm/src/resources/servers/jobs.d.ts.map +1 -0
  71. package/esm/src/resources/servers/jobs.js +115 -0
  72. package/esm/src/resources/servers/node-client.d.ts +33 -0
  73. package/esm/src/resources/servers/node-client.d.ts.map +1 -0
  74. package/esm/src/resources/servers/node-client.js +61 -0
  75. package/esm/src/resources/servers/profiles.d.ts +83 -18
  76. package/esm/src/resources/servers/profiles.d.ts.map +1 -1
  77. package/esm/src/resources/servers/profiles.js +78 -11
  78. package/esm/src/resources/servers/server.d.ts +13 -28
  79. package/esm/src/resources/servers/server.d.ts.map +1 -1
  80. package/esm/src/resources/servers/server.js +21 -37
  81. package/esm/src/resources/servers/sftp.d.ts +12 -19
  82. package/esm/src/resources/servers/sftp.d.ts.map +1 -1
  83. package/esm/src/resources/servers/sftp.js +10 -14
  84. package/esm/src/resources/servers/sub-users.d.ts +99 -0
  85. package/esm/src/resources/servers/sub-users.d.ts.map +1 -0
  86. package/esm/src/resources/servers/sub-users.js +94 -0
  87. package/esm/src/resources/servers/types.d.ts +30 -28
  88. package/esm/src/resources/servers/types.d.ts.map +1 -1
  89. package/esm/src/resources/systems.d.ts +124 -0
  90. package/esm/src/resources/systems.d.ts.map +1 -0
  91. package/esm/src/resources/systems.js +139 -0
  92. package/esm/src/resources/users.d.ts +330 -0
  93. package/esm/src/resources/users.d.ts.map +1 -0
  94. package/esm/src/resources/users.js +280 -0
  95. package/esm/src/types.d.ts +18 -1
  96. package/esm/src/types.d.ts.map +1 -1
  97. package/esm/src/types.js +11 -0
  98. package/package.json +1 -1
  99. package/script/mod.d.ts +37 -16
  100. package/script/mod.d.ts.map +1 -1
  101. package/script/mod.js +50 -5
  102. package/script/src/client.d.ts +48 -11
  103. package/script/src/client.d.ts.map +1 -1
  104. package/script/src/client.js +53 -12
  105. package/script/src/http.d.ts +2 -2
  106. package/script/src/http.d.ts.map +1 -1
  107. package/script/src/http.js +5 -2
  108. package/script/src/namespace.d.ts +1 -1
  109. package/script/src/namespace.js +1 -1
  110. package/script/src/resources/account.d.ts +50 -19
  111. package/script/src/resources/account.d.ts.map +1 -1
  112. package/script/src/resources/account.js +50 -12
  113. package/script/src/resources/api-keys.d.ts +16 -24
  114. package/script/src/resources/api-keys.d.ts.map +1 -1
  115. package/script/src/resources/api-keys.js +15 -19
  116. package/script/src/resources/auth.d.ts +70 -4
  117. package/script/src/resources/auth.d.ts.map +1 -1
  118. package/script/src/resources/auth.js +47 -4
  119. package/script/src/resources/eggs.d.ts +261 -22
  120. package/script/src/resources/eggs.d.ts.map +1 -1
  121. package/script/src/resources/eggs.js +267 -26
  122. package/script/src/resources/features.d.ts +35 -0
  123. package/script/src/resources/features.d.ts.map +1 -0
  124. package/script/src/resources/features.js +25 -0
  125. package/script/src/resources/hosts.d.ts +151 -21
  126. package/script/src/resources/hosts.d.ts.map +1 -1
  127. package/script/src/resources/hosts.js +144 -10
  128. package/script/src/resources/logs.d.ts +39 -0
  129. package/script/src/resources/logs.d.ts.map +1 -0
  130. package/script/src/resources/logs.js +42 -0
  131. package/script/src/resources/nodes.d.ts +108 -33
  132. package/script/src/resources/nodes.d.ts.map +1 -1
  133. package/script/src/resources/nodes.js +117 -24
  134. package/script/src/resources/permissions.d.ts +45 -0
  135. package/script/src/resources/permissions.d.ts.map +1 -0
  136. package/script/src/resources/permissions.js +31 -0
  137. package/script/src/resources/request-logs.d.ts +91 -0
  138. package/script/src/resources/request-logs.d.ts.map +1 -0
  139. package/script/src/resources/request-logs.js +75 -0
  140. package/script/src/resources/roles.d.ts +128 -0
  141. package/script/src/resources/roles.d.ts.map +1 -0
  142. package/script/src/resources/roles.js +148 -0
  143. package/script/src/resources/server-groups.d.ts +141 -7
  144. package/script/src/resources/server-groups.d.ts.map +1 -1
  145. package/script/src/resources/server-groups.js +158 -8
  146. package/script/src/resources/servers/activity.d.ts +50 -8
  147. package/script/src/resources/servers/activity.d.ts.map +1 -1
  148. package/script/src/resources/servers/activity.js +54 -12
  149. package/script/src/resources/servers/allocations.d.ts +3 -3
  150. package/script/src/resources/servers/allocations.d.ts.map +1 -1
  151. package/script/src/resources/servers/allocations.js +7 -7
  152. package/script/src/resources/servers/backups.d.ts +46 -0
  153. package/script/src/resources/servers/backups.d.ts.map +1 -0
  154. package/script/src/resources/servers/backups.js +47 -0
  155. package/script/src/resources/servers/connection.d.ts +33 -13
  156. package/script/src/resources/servers/connection.d.ts.map +1 -1
  157. package/script/src/resources/servers/connection.js +32 -11
  158. package/script/src/resources/servers/features.d.ts +81 -0
  159. package/script/src/resources/servers/features.d.ts.map +1 -0
  160. package/script/src/resources/servers/features.js +64 -0
  161. package/script/src/resources/servers/files.d.ts +41 -53
  162. package/script/src/resources/servers/files.d.ts.map +1 -1
  163. package/script/src/resources/servers/files.js +74 -116
  164. package/script/src/resources/servers/index.d.ts +46 -27
  165. package/script/src/resources/servers/index.d.ts.map +1 -1
  166. package/script/src/resources/servers/index.js +26 -12
  167. package/script/src/resources/servers/jobs.d.ts +88 -0
  168. package/script/src/resources/servers/jobs.d.ts.map +1 -0
  169. package/script/src/resources/servers/jobs.js +120 -0
  170. package/script/src/resources/servers/node-client.d.ts +33 -0
  171. package/script/src/resources/servers/node-client.d.ts.map +1 -0
  172. package/script/src/resources/servers/node-client.js +65 -0
  173. package/script/src/resources/servers/profiles.d.ts +83 -18
  174. package/script/src/resources/servers/profiles.d.ts.map +1 -1
  175. package/script/src/resources/servers/profiles.js +77 -10
  176. package/script/src/resources/servers/server.d.ts +13 -28
  177. package/script/src/resources/servers/server.d.ts.map +1 -1
  178. package/script/src/resources/servers/server.js +21 -37
  179. package/script/src/resources/servers/sftp.d.ts +12 -19
  180. package/script/src/resources/servers/sftp.d.ts.map +1 -1
  181. package/script/src/resources/servers/sftp.js +10 -14
  182. package/script/src/resources/servers/sub-users.d.ts +99 -0
  183. package/script/src/resources/servers/sub-users.d.ts.map +1 -0
  184. package/script/src/resources/servers/sub-users.js +99 -0
  185. package/script/src/resources/servers/types.d.ts +30 -28
  186. package/script/src/resources/servers/types.d.ts.map +1 -1
  187. package/script/src/resources/systems.d.ts +124 -0
  188. package/script/src/resources/systems.d.ts.map +1 -0
  189. package/script/src/resources/systems.js +145 -0
  190. package/script/src/resources/users.d.ts +330 -0
  191. package/script/src/resources/users.d.ts.map +1 -0
  192. package/script/src/resources/users.js +287 -0
  193. package/script/src/types.d.ts +18 -1
  194. package/script/src/types.d.ts.map +1 -1
  195. package/script/src/types.js +12 -0
  196. package/esm/src/resources/members.d.ts +0 -138
  197. package/esm/src/resources/members.d.ts.map +0 -1
  198. package/esm/src/resources/members.js +0 -122
  199. package/script/src/resources/members.d.ts +0 -138
  200. package/script/src/resources/members.d.ts.map +0 -1
  201. package/script/src/resources/members.js +0 -127
@@ -1,7 +1,7 @@
1
1
  import type { HttpClient } from '../../http.js';
2
2
  import { ReactiveResource } from '../../reactive.js';
3
3
  import type { IncludeOptions, ListOptions, NanoID, Paginated, ResourceWith, SftpPermission } from '../../types.js';
4
- import { Member } from '../members.js';
4
+ import { User } from '../users.js';
5
5
  import type { SftpUserData } from './types.js';
6
6
  /**
7
7
  * Connection details for the SFTP server on a node.
@@ -19,8 +19,8 @@ export interface SftpConnection {
19
19
  *
20
20
  * Retrieved via {@link ServerSftpManager.list} or {@link ServerSftpManager.create}.
21
21
  *
22
- * > **Note:** The `password` field is automatically included in the creation response.
23
- * > On subsequent fetches it requires `include=password` to be populated.
22
+ * The plaintext password is returned only when the user is created or its password
23
+ * is reset. It is never retrievable afterward.
24
24
  */
25
25
  export declare class SftpUser extends ReactiveResource {
26
26
  /** The SFTP user's unique NanoID. */
@@ -29,11 +29,7 @@ export declare class SftpUser extends ReactiveResource {
29
29
  name: string;
30
30
  /** The SFTP login username (typically prefixed with the server ID). */
31
31
  username: string;
32
- /**
33
- * The plaintext password.
34
- *
35
- * Automatically included on creation. Requires `include=password` on subsequent fetches.
36
- */
32
+ /** The plaintext password. Present only in the creation response. */
37
33
  password: string | undefined;
38
34
  /**
39
35
  * A map of path glob patterns to the set of permissions granted for that path.
@@ -44,8 +40,8 @@ export declare class SftpUser extends ReactiveResource {
44
40
  paths: Record<string, SftpPermission[]>;
45
41
  /** NanoID of the member who owns this SFTP user. */
46
42
  ownerId: NanoID;
47
- /** The owner member. */
48
- owner: Member | null | undefined;
43
+ /** The owner. */
44
+ owner: User | null | undefined;
49
45
  /** When this SFTP user last logged in, or `null` if never. */
50
46
  lastLoginAt: Date | null;
51
47
  /** When this SFTP user was created. */
@@ -56,14 +52,11 @@ export declare class SftpUser extends ReactiveResource {
56
52
  constructor(data: SftpUserData);
57
53
  }
58
54
  /** Valid include keys for SFTP user endpoints. */
59
- export type SftpUserInclude = 'password' | 'owner';
55
+ export type SftpUserInclude = 'owner';
60
56
  /** Maps each {@link SftpUserInclude} key to the field(s) it guarantees on the {@link SftpUser} instance. */
61
57
  interface SftpUserIncludeMap {
62
- password: {
63
- password: string;
64
- };
65
58
  owner: {
66
- owner: Member;
59
+ owner: User;
67
60
  };
68
61
  }
69
62
  /** A {@link SftpUser} with specific include fields guaranteed to be populated. */
@@ -88,8 +81,8 @@ export interface SftpDetails {
88
81
  * console.log(`Connect to: ${details.connection.url}`);
89
82
  *
90
83
  * const user = await server.sftp.create('deploy', {
91
- * '/': ['sftp.content.list', 'sftp.content.read'],
92
- * '/logs': ['sftp.content.list', 'sftp.content.read', 'sftp.content.delete'],
84
+ * '/': ['server.file.list', 'server.file.read'],
85
+ * '/logs': ['server.file.list', 'server.file.read', 'server.file.delete'],
93
86
  * });
94
87
  * console.log(user.password); // Save this!
95
88
  * ```
@@ -119,8 +112,8 @@ export declare class ServerSftpManager {
119
112
  /**
120
113
  * Create a new SFTP user for this server.
121
114
  *
122
- * The returned {@link SftpUser} includes the `password` field automatically.
123
- * On subsequent fetches, request it explicitly with `include=password`.
115
+ * The returned {@link SftpUser} carries the one-time `password`. It is never
116
+ * retrievable afterward, so store it now.
124
117
  *
125
118
  * @param name Display name for the SFTP user.
126
119
  * @param paths A map of path glob patterns to an array of {@link SftpPermission} scopes.
@@ -1 +1 @@
1
- {"version":3,"file":"sftp.d.ts","sourceRoot":"","sources":["../../../../src/src/resources/servers/sftp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EA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AAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAatC;;;;;OAKG;IACU,GAAG,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,eAAe,EAAE,GAAG,EAAE,EAC/D,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,cAAc,CAAC,eAAe,EAAE,CAAC,CAAM,GAC3C,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAW3B;;;;;;;;;OASG;IACU,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,GACrC,OAAO,CAAC,QAAQ,CAAC;IAQpB;;;;;;;OAOG;IACU,MAAM,CAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;KACzC,GACC,OAAO,CAAC,QAAQ,CAAC;IAQpB;;;;OAIG;IACU,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD;;;;;;;OAOG;IACU,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAM3D"}
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ServerSftpManager = exports.SftpUser = void 0;
4
4
  const reactive_js_1 = require("../../reactive.js");
5
5
  const types_js_1 = require("../../types.js");
6
- const members_js_1 = require("../members.js");
6
+ const users_js_1 = require("../users.js");
7
7
  /**
8
8
  * An SFTP user credential scoped to a specific server with path-level permissions.
9
9
  *
10
10
  * Retrieved via {@link ServerSftpManager.list} or {@link ServerSftpManager.create}.
11
11
  *
12
- * > **Note:** The `password` field is automatically included in the creation response.
13
- * > On subsequent fetches it requires `include=password` to be populated.
12
+ * The plaintext password is returned only when the user is created or its password
13
+ * is reset. It is never retrievable afterward.
14
14
  */
15
15
  class SftpUser extends reactive_js_1.ReactiveResource {
16
16
  /** The SFTP user's unique NanoID. */
@@ -19,11 +19,7 @@ class SftpUser extends reactive_js_1.ReactiveResource {
19
19
  name;
20
20
  /** The SFTP login username (typically prefixed with the server ID). */
21
21
  username;
22
- /**
23
- * The plaintext password.
24
- *
25
- * Automatically included on creation. Requires `include=password` on subsequent fetches.
26
- */
22
+ /** The plaintext password. Present only in the creation response. */
27
23
  password;
28
24
  /**
29
25
  * A map of path glob patterns to the set of permissions granted for that path.
@@ -34,7 +30,7 @@ class SftpUser extends reactive_js_1.ReactiveResource {
34
30
  paths;
35
31
  /** NanoID of the member who owns this SFTP user. */
36
32
  ownerId;
37
- /** The owner member. */
33
+ /** The owner. */
38
34
  owner;
39
35
  /** When this SFTP user last logged in, or `null` if never. */
40
36
  lastLoginAt;
@@ -51,7 +47,7 @@ class SftpUser extends reactive_js_1.ReactiveResource {
51
47
  this.password = data.password;
52
48
  this.paths = data.paths;
53
49
  this.ownerId = (0, types_js_1.toNanoID)(data.owner_id);
54
- this.owner = data.owner ? new members_js_1.Member(data.owner) : data.owner;
50
+ this.owner = data.owner ? new users_js_1.User(data.owner) : data.owner;
55
51
  this.lastLoginAt = data.last_login_at ? new Date(data.last_login_at) : null;
56
52
  this.createdAt = new Date(data.created_at);
57
53
  this.updatedAt = new Date(data.updated_at);
@@ -69,8 +65,8 @@ exports.SftpUser = SftpUser;
69
65
  * console.log(`Connect to: ${details.connection.url}`);
70
66
  *
71
67
  * const user = await server.sftp.create('deploy', {
72
- * '/': ['sftp.content.list', 'sftp.content.read'],
73
- * '/logs': ['sftp.content.list', 'sftp.content.read', 'sftp.content.delete'],
68
+ * '/': ['server.file.list', 'server.file.read'],
69
+ * '/logs': ['server.file.list', 'server.file.read', 'server.file.delete'],
74
70
  * });
75
71
  * console.log(user.password); // Save this!
76
72
  * ```
@@ -123,8 +119,8 @@ class ServerSftpManager {
123
119
  /**
124
120
  * Create a new SFTP user for this server.
125
121
  *
126
- * The returned {@link SftpUser} includes the `password` field automatically.
127
- * On subsequent fetches, request it explicitly with `include=password`.
122
+ * The returned {@link SftpUser} carries the one-time `password`. It is never
123
+ * retrievable afterward, so store it now.
128
124
  *
129
125
  * @param name Display name for the SFTP user.
130
126
  * @param paths A map of path glob patterns to an array of {@link SftpPermission} scopes.
@@ -0,0 +1,99 @@
1
+ import type { HttpClient } from '../../http.js';
2
+ import type { ISODate, NanoID } from '../../types.js';
3
+ import { User, type UserData } from '../users.js';
4
+ /**
5
+ * How a sub-user is attached to the resource.
6
+ *
7
+ * - `owner`: the resource owner (implicit, read-only, no grants).
8
+ * - `direct`: granted at this resource's own scope.
9
+ * - `inherited`: granted at the parent group's scope.
10
+ */
11
+ export type ServerUserKind = 'owner' | 'direct' | 'inherited';
12
+ /** Raw API shape for a sub-user's scoped grant. @internal */
13
+ interface ServerUserGrantData {
14
+ name: string;
15
+ granted_at: ISODate;
16
+ expires_at: ISODate | null;
17
+ }
18
+ /** Raw API shape for a sub-user entry. @internal */
19
+ export interface ServerUserData {
20
+ user: UserData;
21
+ permissions: ServerUserGrantData[];
22
+ kind: ServerUserKind;
23
+ }
24
+ /** A permission granted to a sub-user at the resource scope. */
25
+ export interface ServerUserGrant {
26
+ /** The permission name, e.g. `"server.file.read"`. */
27
+ name: string;
28
+ /** When the grant was created. */
29
+ grantedAt: Date;
30
+ /** When the grant expires, or `null` if it never expires. */
31
+ expiresAt: Date | null;
32
+ }
33
+ /**
34
+ * A user granted access to a server (or server group), with their scoped grants.
35
+ *
36
+ * Retrieved via {@link ServerUserManager.list} or {@link ServerUserManager.get}.
37
+ */
38
+ export declare class ServerUser {
39
+ /** The underlying user. */
40
+ readonly user: User;
41
+ /** The permissions granted to this user at the resource scope. */
42
+ readonly permissions: ServerUserGrant[];
43
+ /** How this user is attached. See {@link ServerUserKind}. */
44
+ readonly kind: ServerUserKind;
45
+ /** @internal */
46
+ constructor(data: ServerUserData);
47
+ }
48
+ /** Parameters for adding a sub-user, by existing user id or by email (which may invite a new user). */
49
+ export type AddServerUserInput = {
50
+ userId: NanoID;
51
+ permissions: string[];
52
+ expiresAt?: Date | null;
53
+ } | {
54
+ email: string;
55
+ permissions: string[];
56
+ expiresAt?: Date | null;
57
+ };
58
+ /**
59
+ * Manages the sub-users of a server or server group.
60
+ *
61
+ * Access via `server.subUsers`.
62
+ *
63
+ * @example
64
+ * ```ts ignore
65
+ * await server.subUsers.add({ email: 'teammate@example.com', permissions: ['server.console.read'] });
66
+ * const subUsers = await server.subUsers.list();
67
+ * ```
68
+ */
69
+ export declare class ServerUserManager {
70
+ private readonly basePath;
71
+ private readonly http;
72
+ /** @internal */
73
+ constructor(basePath: string, http: HttpClient);
74
+ /** List the resource's sub-users. */
75
+ list(): Promise<ServerUser[]>;
76
+ /** Fetch a single sub-user by user ID. */
77
+ get(userId: NanoID): Promise<ServerUser>;
78
+ /**
79
+ * Add a sub-user, or add permissions to an existing one.
80
+ *
81
+ * Identify the user by `userId`, or by `email` (an unknown email invites a new user,
82
+ * which requires `user.manage` and a configured email transport). Existing grants are kept.
83
+ */
84
+ add(input: AddServerUserInput): Promise<ServerUser>;
85
+ /**
86
+ * Replace a sub-user's permission set. Grants not listed are revoked.
87
+ *
88
+ * @param userId The sub-user's NanoID.
89
+ * @param payload The exact permission set to grant, and an optional expiry.
90
+ */
91
+ update(userId: NanoID, payload: {
92
+ permissions: string[];
93
+ expiresAt?: Date | null;
94
+ }): Promise<ServerUser>;
95
+ /** Remove a sub-user, revoking all their grants at the resource scope. */
96
+ remove(userId: NanoID): Promise<void>;
97
+ }
98
+ export {};
99
+ //# sourceMappingURL=sub-users.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sub-users.d.ts","sourceRoot":"","sources":["../../../../src/src/resources/servers/sub-users.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CA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AO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAHtB,gBAAgB;gBAEE,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,UAAU;IAGlC,qCAAqC;IACxB,IAAI,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAK1C,0CAA0C;IAC7B,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAKrD;;;;;OAKG;IACU,GAAG,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC;IAWhE;;;;;OAKG;IACU,MAAM,CAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;QAAE,WAAW,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,GACzD,OAAO,CAAC,UAAU,CAAC;IAQtB,0EAA0E;IAC7D,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlD"}
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServerUserManager = exports.ServerUser = void 0;
4
+ const users_js_1 = require("../users.js");
5
+ /**
6
+ * A user granted access to a server (or server group), with their scoped grants.
7
+ *
8
+ * Retrieved via {@link ServerUserManager.list} or {@link ServerUserManager.get}.
9
+ */
10
+ class ServerUser {
11
+ /** The underlying user. */
12
+ user;
13
+ /** The permissions granted to this user at the resource scope. */
14
+ permissions;
15
+ /** How this user is attached. See {@link ServerUserKind}. */
16
+ kind;
17
+ /** @internal */
18
+ constructor(data) {
19
+ this.user = new users_js_1.User(data.user);
20
+ this.permissions = data.permissions.map((g) => ({
21
+ name: g.name,
22
+ grantedAt: new Date(g.granted_at),
23
+ expiresAt: g.expires_at ? new Date(g.expires_at) : null,
24
+ }));
25
+ this.kind = data.kind;
26
+ }
27
+ }
28
+ exports.ServerUser = ServerUser;
29
+ function expiresAtBody(expiresAt) {
30
+ if (expiresAt === undefined)
31
+ return undefined;
32
+ return expiresAt === null ? null : expiresAt.toISOString();
33
+ }
34
+ /**
35
+ * Manages the sub-users of a server or server group.
36
+ *
37
+ * Access via `server.subUsers`.
38
+ *
39
+ * @example
40
+ * ```ts ignore
41
+ * await server.subUsers.add({ email: 'teammate@example.com', permissions: ['server.console.read'] });
42
+ * const subUsers = await server.subUsers.list();
43
+ * ```
44
+ */
45
+ class ServerUserManager {
46
+ basePath;
47
+ http;
48
+ /** @internal */
49
+ constructor(basePath, http) {
50
+ this.basePath = basePath;
51
+ this.http = http;
52
+ }
53
+ /** List the resource's sub-users. */
54
+ async list() {
55
+ const data = await this.http.get(`${this.basePath}/users`);
56
+ return data.map((d) => new ServerUser(d));
57
+ }
58
+ /** Fetch a single sub-user by user ID. */
59
+ async get(userId) {
60
+ const data = await this.http.get(`${this.basePath}/users/${userId}`);
61
+ return new ServerUser(data);
62
+ }
63
+ /**
64
+ * Add a sub-user, or add permissions to an existing one.
65
+ *
66
+ * Identify the user by `userId`, or by `email` (an unknown email invites a new user,
67
+ * which requires `user.manage` and a configured email transport). Existing grants are kept.
68
+ */
69
+ async add(input) {
70
+ const body = {
71
+ permissions: input.permissions,
72
+ expires_at: expiresAtBody(input.expiresAt),
73
+ };
74
+ if ('userId' in input)
75
+ body['user_id'] = input.userId;
76
+ else
77
+ body['email'] = input.email;
78
+ const data = await this.http.post(`${this.basePath}/users`, body);
79
+ return new ServerUser(data);
80
+ }
81
+ /**
82
+ * Replace a sub-user's permission set. Grants not listed are revoked.
83
+ *
84
+ * @param userId The sub-user's NanoID.
85
+ * @param payload The exact permission set to grant, and an optional expiry.
86
+ */
87
+ async update(userId, payload) {
88
+ const data = await this.http.patch(`${this.basePath}/users/${userId}`, {
89
+ permissions: payload.permissions,
90
+ expires_at: expiresAtBody(payload.expiresAt),
91
+ });
92
+ return new ServerUser(data);
93
+ }
94
+ /** Remove a sub-user, revoking all their grants at the resource scope. */
95
+ async remove(userId) {
96
+ await this.http.delete(`${this.basePath}/users/${userId}`);
97
+ }
98
+ }
99
+ exports.ServerUserManager = ServerUserManager;
@@ -1,6 +1,6 @@
1
1
  import type { ISODate, NanoID, PowerState, ServerRestrictedState, SftpPermission } from '../../types.js';
2
2
  import type { EggData } from '../eggs.js';
3
- import type { MemberData } from '../members.js';
3
+ import type { UserData } from '../users.js';
4
4
  import type { ServerGroupData } from '../server-groups.js';
5
5
  /** A single egg environment variable and its value for a server. @internal */
6
6
  export interface StartupVariableData {
@@ -15,15 +15,15 @@ export interface StartupVariableData {
15
15
  export interface ServerStatusData {
16
16
  state: PowerState;
17
17
  utilization?: {
18
- memory_bytes: number;
19
- memory_limit_bytes: number;
18
+ ram_bytes: number;
19
+ ram_limit_bytes: number;
20
20
  cpu_absolute: number;
21
21
  network: {
22
22
  rx_bytes: number;
23
23
  tx_bytes: number;
24
24
  };
25
- uptime_ms: number;
26
- disk_bytes: number;
25
+ uptime: number;
26
+ storage_bytes: number;
27
27
  } | null;
28
28
  }
29
29
  /** Raw API shape for server build configuration. @internal */
@@ -46,7 +46,7 @@ export interface ServerBuildData {
46
46
  export interface ServerAllocationPortData {
47
47
  id: string;
48
48
  description?: string | null;
49
- port_id?: string;
49
+ meta_id?: string;
50
50
  meta?: {
51
51
  id: string;
52
52
  ip: string;
@@ -73,6 +73,21 @@ export interface ServerProfileData {
73
73
  name: string;
74
74
  description?: string | null;
75
75
  notes?: string | null;
76
+ /** Requires `server.egg.read`. */
77
+ egg_id?: string;
78
+ egg?: EggData;
79
+ egg_image_id?: string;
80
+ egg_image?: {
81
+ id: string;
82
+ image: string;
83
+ };
84
+ egg_image_override?: string | null;
85
+ skip_install_scripts?: boolean;
86
+ /** Requires `server.startup.read`. Populated with `?include=startup`. */
87
+ startup?: {
88
+ command: string;
89
+ variables: Record<string, StartupVariableData>;
90
+ } | null;
76
91
  folder?: string | null;
77
92
  is_active: boolean;
78
93
  created_at: ISODate;
@@ -80,7 +95,7 @@ export interface ServerProfileData {
80
95
  }
81
96
  /** Raw API shape for an activity log job log entry. @internal */
82
97
  export interface ActivityJobLogData {
83
- type: string;
98
+ event: string;
84
99
  metadata: Record<string, unknown>;
85
100
  created_at: ISODate;
86
101
  }
@@ -99,8 +114,14 @@ export interface ActivityLogData {
99
114
  event: string;
100
115
  server_id?: string | null;
101
116
  node_id?: string | null;
117
+ group_id?: string | null;
118
+ host_id?: string | null;
102
119
  issuer_id?: string | null;
103
- issuer?: MemberData | null;
120
+ issuer?: UserData | null;
121
+ /** The user an action was performed on, when applicable. */
122
+ subject_id?: string | null;
123
+ subject?: UserData | null;
124
+ /** Requires `application.activities.ip.read`. */
104
125
  ip?: string | null;
105
126
  metadata: Record<string, unknown>;
106
127
  job_id?: string | null;
@@ -116,7 +137,7 @@ export interface SftpUserData {
116
137
  password?: string;
117
138
  paths: Record<string, SftpPermission[]>;
118
139
  owner_id: string;
119
- owner?: MemberData | null;
140
+ owner?: UserData | null;
120
141
  last_login_at: ISODate | null;
121
142
  created_at: ISODate;
122
143
  updated_at: ISODate;
@@ -157,20 +178,8 @@ export interface ServerData {
157
178
  restricted_state: ServerRestrictedState;
158
179
  group_id: string;
159
180
  group?: ServerGroupData;
160
- egg_id: string;
161
- egg?: EggData;
162
- egg_image_id?: string;
163
- egg_image?: {
164
- id: string;
165
- image: string;
166
- };
167
- egg_image_override?: string | null;
168
181
  status?: ServerStatusData | null;
169
182
  build?: ServerBuildData | null;
170
- startup?: {
171
- command: string;
172
- variables: Record<string, StartupVariableData>;
173
- } | null;
174
183
  allocations?: ServerAllocationsData | null;
175
184
  profiles?: ServerProfileData[] | null;
176
185
  created_at: ISODate;
@@ -189,13 +198,6 @@ export interface UpdateServerPayload {
189
198
  ip: string;
190
199
  port: number;
191
200
  };
192
- /** Update startup command and/or environment variables. */
193
- startup?: {
194
- /** New startup command override, or `null` to reset to the egg default. */
195
- command?: string | null;
196
- /** Map of env variable keys to new values (or `null` to reset to default). */
197
- variables?: Record<string, string | null>;
198
- };
199
201
  }
200
202
  export type { ISODate, NanoID, PowerState, ServerRestrictedState, SftpPermission };
201
203
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/src/resources/servers/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACzG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,8EAA8E;AAC9E,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;CACd;AAED,2EAA2E;AAC3E,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,CAAC,EAAE;QACb,YAAY,EAAE,MAAM,CAAC;QACrB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE;YACR,QAAQ,EAAE,MAAM,CAAC;YACjB,QAAQ,EAAE,MAAM,CAAC;SACjB,CAAC;QACF,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;KACnB,GAAG,IAAI,CAAC;CACT;AAED,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,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C;IAC3C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,4CAA4C;IAC5C,iBAAiB,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACjD;AAED,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,qBAAqB,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,124 @@
1
+ import type { HttpClient } from '../http.js';
2
+ import { ResourceNamespace } from '../namespace.js';
3
+ import { ReactiveResource } from '../reactive.js';
4
+ import { type ISODate, type NanoID, type Paginated } from '../types.js';
5
+ import { ApiKey, type CreateApiKeyPayload } from './api-keys.js';
6
+ /** Raw API shape for a system. @internal */
7
+ export interface SystemData {
8
+ id: string;
9
+ name: string;
10
+ description: string | null;
11
+ permissions?: string[];
12
+ created_at: ISODate;
13
+ updated_at: ISODate;
14
+ }
15
+ /**
16
+ * A non-user identity (bootstrap or automation) that owns API keys.
17
+ *
18
+ * API keys owned by a system inherit the system's permissions.
19
+ *
20
+ * Retrieved via {@link SystemsNamespace.get} or {@link SystemsNamespace.list}.
21
+ */
22
+ export declare class System extends ReactiveResource {
23
+ /** The system's unique NanoID. */
24
+ readonly id: NanoID;
25
+ /** Display name. */
26
+ name: string;
27
+ /** Optional description. */
28
+ description: string | null;
29
+ /** The system's permission scopes. Requires `?include=permissions`. */
30
+ permissions: string[] | undefined;
31
+ /** When this system was created. */
32
+ createdAt: Date;
33
+ /** When this system was last updated. */
34
+ updatedAt: Date;
35
+ /** @internal */
36
+ constructor(data: SystemData);
37
+ /** Apply raw API data to this system instance, updating all mutable fields. */
38
+ applyData(data: SystemData): void;
39
+ }
40
+ /** Valid include keys for system endpoints. */
41
+ export type SystemInclude = 'permissions';
42
+ /** Fields accepted when creating a system. */
43
+ export interface CreateSystemPayload {
44
+ name: string;
45
+ description?: string;
46
+ }
47
+ /** Fields accepted when updating a system. All optional. */
48
+ export interface UpdateSystemPayload {
49
+ name?: string;
50
+ description?: string;
51
+ }
52
+ /** The one-time result of creating a system API key. */
53
+ export interface SystemApiKeyResult {
54
+ name: string;
55
+ description: string | null;
56
+ /** The one-time bearer token. Returned only here. */
57
+ token: string;
58
+ }
59
+ /** Typed events emitted by {@link SystemsNamespace}. */
60
+ export interface SystemEvents {
61
+ created: System;
62
+ updated: System;
63
+ deleted: NanoID;
64
+ }
65
+ /**
66
+ * Manages the API keys owned by a specific system.
67
+ *
68
+ * Access via `api.systems.keys(systemId)`.
69
+ */
70
+ export declare class SystemKeysManager {
71
+ private readonly systemId;
72
+ private readonly http;
73
+ /** @internal */
74
+ constructor(systemId: NanoID, http: HttpClient);
75
+ /** List the system's active API keys. */
76
+ list(): Promise<ApiKey[]>;
77
+ /**
78
+ * Create an API key owned by the system.
79
+ *
80
+ * The returned `token` is the only time the bearer token is available. Store it securely.
81
+ */
82
+ create(payload: CreateApiKeyPayload): Promise<SystemApiKeyResult>;
83
+ /** Revoke a system API key. */
84
+ revoke(keyId: NanoID): Promise<void>;
85
+ }
86
+ /**
87
+ * Namespace for system (non-user identity) management.
88
+ *
89
+ * Access via `api.systems`.
90
+ *
91
+ * @example
92
+ * ```ts ignore
93
+ * const system = await api.systems.create({ name: 'CI deploy' });
94
+ * const { token } = await api.systems.keys(system.id).create({ name: 'pipeline', permissions: ['server.read'] });
95
+ * ```
96
+ */
97
+ export declare class SystemsNamespace extends ResourceNamespace<System, SystemEvents> {
98
+ /** @internal */
99
+ constructor(http: HttpClient);
100
+ /**
101
+ * Fetch a paginated list of systems.
102
+ *
103
+ * @param opts Pagination, search, and include options.
104
+ */
105
+ list(opts?: {
106
+ page?: number;
107
+ perPage?: number;
108
+ search?: string;
109
+ include?: SystemInclude[];
110
+ }): Promise<Paginated<System>>;
111
+ /** Fetch a single system by ID. */
112
+ get(id: NanoID, opts?: {
113
+ include?: SystemInclude[];
114
+ }): Promise<System>;
115
+ /** Create a new system. */
116
+ create(payload: CreateSystemPayload): Promise<System>;
117
+ /** Update a system's name or description. */
118
+ update(id: NanoID, payload: UpdateSystemPayload): Promise<System>;
119
+ /** Delete a system. Fails if it still owns active API keys. */
120
+ delete(id: NanoID): Promise<void>;
121
+ /** Manage the API keys owned by a system. */
122
+ keys(systemId: NanoID): SystemKeysManager;
123
+ }
124
+ //# sourceMappingURL=systems.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systems.d.ts","sourceRoot":"","sources":["../../../src/src/resources/systems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,KAAK,OAAO,EAAgB,KAAK,MAAM,EAAE,KAAK,SAAS,EAAY,MAAM,aAAa,CAAC;AAChG,OAAO,EAAE,MAAM,EAAmB,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAElF,4CAA4C;AAC5C,MAAM,WAAW,UAAU;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;GAMG;AACH,qBAAa,MAAO,SAAQ,gBAAgB;IAC3C,kCAAkC;IAClC,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,oBAAoB;IACb,IAAI,EAAG,MAAM,CAAC;IACrB,4BAA4B;IACrB,WAAW,EAAG,MAAM,GAAG,IAAI,CAAC;IACnC,uEAAuE;IAChE,WAAW,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACzC,oCAAoC;I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