@athenaintel/sdk 4.3.2144 → 4.3.2146

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 (76) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/computer/client/Client.d.ts +56 -0
  3. package/dist/cjs/api/resources/computer/client/Client.js +249 -0
  4. package/dist/cjs/api/resources/computer/client/requests/GetSshAccessComputerRequest.d.ts +9 -0
  5. package/dist/cjs/api/resources/computer/client/requests/GetSshAccessComputerRequest.js +3 -0
  6. package/dist/cjs/api/resources/computer/client/requests/StartComputerComputerRequest.d.ts +9 -0
  7. package/dist/cjs/api/resources/computer/client/requests/StartComputerComputerRequest.js +3 -0
  8. package/dist/cjs/api/resources/computer/client/requests/StopComputerComputerRequest.d.ts +9 -0
  9. package/dist/cjs/api/resources/computer/client/requests/StopComputerComputerRequest.js +3 -0
  10. package/dist/cjs/api/resources/computer/client/requests/index.d.ts +3 -0
  11. package/dist/cjs/api/resources/index.d.ts +1 -0
  12. package/dist/cjs/api/resources/index.js +1 -0
  13. package/dist/cjs/api/resources/users/client/Client.d.ts +45 -1
  14. package/dist/cjs/api/resources/users/client/Client.js +218 -0
  15. package/dist/cjs/api/resources/users/client/index.d.ts +1 -1
  16. package/dist/cjs/api/resources/users/client/index.js +15 -0
  17. package/dist/cjs/api/resources/users/client/requests/AddSshKeyRequestIn.d.ts +13 -0
  18. package/dist/cjs/api/resources/users/client/requests/AddSshKeyRequestIn.js +3 -0
  19. package/dist/cjs/api/resources/users/client/requests/DeleteSshKeyUsersRequest.d.ts +9 -0
  20. package/dist/cjs/api/resources/users/client/requests/DeleteSshKeyUsersRequest.js +3 -0
  21. package/dist/cjs/api/resources/users/client/requests/index.d.ts +2 -0
  22. package/dist/cjs/api/resources/users/client/requests/index.js +2 -0
  23. package/dist/cjs/api/types/ComputerLifecycleResponseOut.d.ts +11 -0
  24. package/dist/cjs/api/types/ComputerLifecycleResponseOut.js +3 -0
  25. package/dist/cjs/api/types/DeleteSshKeyResponseOut.d.ts +7 -0
  26. package/dist/cjs/api/types/DeleteSshKeyResponseOut.js +3 -0
  27. package/dist/cjs/api/types/SessionOut.d.ts +2 -0
  28. package/dist/cjs/api/types/SshAccessInfoOut.d.ts +13 -0
  29. package/dist/cjs/api/types/SshAccessInfoOut.js +3 -0
  30. package/dist/cjs/api/types/SshKeyListResponseOut.d.ts +8 -0
  31. package/dist/cjs/api/types/SshKeyListResponseOut.js +3 -0
  32. package/dist/cjs/api/types/SshKeyOut.d.ts +19 -0
  33. package/dist/cjs/api/types/SshKeyOut.js +3 -0
  34. package/dist/cjs/api/types/index.d.ts +5 -0
  35. package/dist/cjs/api/types/index.js +5 -0
  36. package/dist/cjs/version.d.ts +1 -1
  37. package/dist/cjs/version.js +1 -1
  38. package/dist/esm/BaseClient.mjs +2 -2
  39. package/dist/esm/api/resources/computer/client/Client.d.mts +56 -0
  40. package/dist/esm/api/resources/computer/client/Client.mjs +249 -0
  41. package/dist/esm/api/resources/computer/client/requests/GetSshAccessComputerRequest.d.mts +9 -0
  42. package/dist/esm/api/resources/computer/client/requests/GetSshAccessComputerRequest.mjs +2 -0
  43. package/dist/esm/api/resources/computer/client/requests/StartComputerComputerRequest.d.mts +9 -0
  44. package/dist/esm/api/resources/computer/client/requests/StartComputerComputerRequest.mjs +2 -0
  45. package/dist/esm/api/resources/computer/client/requests/StopComputerComputerRequest.d.mts +9 -0
  46. package/dist/esm/api/resources/computer/client/requests/StopComputerComputerRequest.mjs +2 -0
  47. package/dist/esm/api/resources/computer/client/requests/index.d.mts +3 -0
  48. package/dist/esm/api/resources/index.d.mts +1 -0
  49. package/dist/esm/api/resources/index.mjs +1 -0
  50. package/dist/esm/api/resources/users/client/Client.d.mts +45 -1
  51. package/dist/esm/api/resources/users/client/Client.mjs +218 -0
  52. package/dist/esm/api/resources/users/client/index.d.mts +1 -1
  53. package/dist/esm/api/resources/users/client/index.mjs +1 -1
  54. package/dist/esm/api/resources/users/client/requests/AddSshKeyRequestIn.d.mts +13 -0
  55. package/dist/esm/api/resources/users/client/requests/AddSshKeyRequestIn.mjs +2 -0
  56. package/dist/esm/api/resources/users/client/requests/DeleteSshKeyUsersRequest.d.mts +9 -0
  57. package/dist/esm/api/resources/users/client/requests/DeleteSshKeyUsersRequest.mjs +2 -0
  58. package/dist/esm/api/resources/users/client/requests/index.d.mts +2 -0
  59. package/dist/esm/api/resources/users/client/requests/index.mjs +1 -0
  60. package/dist/esm/api/types/ComputerLifecycleResponseOut.d.mts +11 -0
  61. package/dist/esm/api/types/ComputerLifecycleResponseOut.mjs +2 -0
  62. package/dist/esm/api/types/DeleteSshKeyResponseOut.d.mts +7 -0
  63. package/dist/esm/api/types/DeleteSshKeyResponseOut.mjs +2 -0
  64. package/dist/esm/api/types/SessionOut.d.mts +2 -0
  65. package/dist/esm/api/types/SshAccessInfoOut.d.mts +13 -0
  66. package/dist/esm/api/types/SshAccessInfoOut.mjs +2 -0
  67. package/dist/esm/api/types/SshKeyListResponseOut.d.mts +8 -0
  68. package/dist/esm/api/types/SshKeyListResponseOut.mjs +2 -0
  69. package/dist/esm/api/types/SshKeyOut.d.mts +19 -0
  70. package/dist/esm/api/types/SshKeyOut.mjs +2 -0
  71. package/dist/esm/api/types/index.d.mts +5 -0
  72. package/dist/esm/api/types/index.mjs +5 -0
  73. package/dist/esm/version.d.mts +1 -1
  74. package/dist/esm/version.mjs +1 -1
  75. package/package.json +1 -1
  76. package/reference.md +381 -0
@@ -49,6 +49,7 @@ const headers_js_1 = require("../../../../core/headers.js");
49
49
  const core = __importStar(require("../../../../core/index.js"));
50
50
  const environments = __importStar(require("../../../../environments.js"));
51
51
  const errors = __importStar(require("../../../../errors/index.js"));
52
+ const AthenaIntelligence = __importStar(require("../../../index.js"));
52
53
  class UsersClient {
53
54
  constructor(options = {}) {
54
55
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
@@ -174,5 +175,222 @@ class UsersClient {
174
175
  }
175
176
  });
176
177
  }
178
+ /**
179
+ * List the SSH public keys registered on the caller's Athena account. A registered key authenticates `ssh <computer_asset_id>@<gateway>` to every computer the caller can edit; keys are not tied to a workspace.
180
+ *
181
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
182
+ *
183
+ * @example
184
+ * await client.users.listSshKeys()
185
+ */
186
+ listSshKeys(requestOptions) {
187
+ return core.HttpResponsePromise.fromPromise(this.__listSshKeys(requestOptions));
188
+ }
189
+ __listSshKeys(requestOptions) {
190
+ return __awaiter(this, void 0, void 0, function* () {
191
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
192
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
193
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
194
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
195
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/me/ssh-keys"),
196
+ method: "GET",
197
+ headers: _headers,
198
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
199
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
200
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
201
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
202
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
203
+ logging: this._options.logging,
204
+ });
205
+ if (_response.ok) {
206
+ return {
207
+ data: _response.body,
208
+ rawResponse: _response.rawResponse,
209
+ };
210
+ }
211
+ if (_response.error.reason === "status-code") {
212
+ throw new errors.AthenaIntelligenceError({
213
+ statusCode: _response.error.statusCode,
214
+ body: _response.error.body,
215
+ rawResponse: _response.rawResponse,
216
+ });
217
+ }
218
+ switch (_response.error.reason) {
219
+ case "non-json":
220
+ throw new errors.AthenaIntelligenceError({
221
+ statusCode: _response.error.statusCode,
222
+ body: _response.error.rawBody,
223
+ rawResponse: _response.rawResponse,
224
+ });
225
+ case "body-is-null":
226
+ throw new errors.AthenaIntelligenceError({
227
+ statusCode: _response.error.statusCode,
228
+ rawResponse: _response.rawResponse,
229
+ });
230
+ case "timeout":
231
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/me/ssh-keys.");
232
+ case "unknown":
233
+ throw new errors.AthenaIntelligenceError({
234
+ message: _response.error.errorMessage,
235
+ rawResponse: _response.rawResponse,
236
+ });
237
+ }
238
+ });
239
+ }
240
+ /**
241
+ * Register an SSH public key (the contents of an OpenSSH `.pub` file) on the caller's account. Returns 400 for a malformed or unsupported key, 409 when the key is already registered or the caller has reached the per-account limit.
242
+ *
243
+ * @param {AthenaIntelligence.AddSshKeyRequestIn} request
244
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
245
+ *
246
+ * @throws {@link AthenaIntelligence.BadRequestError}
247
+ * @throws {@link AthenaIntelligence.ConflictError}
248
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
249
+ *
250
+ * @example
251
+ * await client.users.addSshKey({
252
+ * label: "laptop",
253
+ * public_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBZzuCu6wC9oVY2lVbVKdwpMElfCYiWTOIVQQBtq7HW9 me@laptop"
254
+ * })
255
+ */
256
+ addSshKey(request, requestOptions) {
257
+ return core.HttpResponsePromise.fromPromise(this.__addSshKey(request, requestOptions));
258
+ }
259
+ __addSshKey(request, requestOptions) {
260
+ return __awaiter(this, void 0, void 0, function* () {
261
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
262
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
263
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
264
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
265
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/me/ssh-keys"),
266
+ method: "POST",
267
+ headers: _headers,
268
+ contentType: "application/json",
269
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
270
+ requestType: "json",
271
+ body: request,
272
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
273
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
274
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
275
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
276
+ logging: this._options.logging,
277
+ });
278
+ if (_response.ok) {
279
+ return { data: _response.body, rawResponse: _response.rawResponse };
280
+ }
281
+ if (_response.error.reason === "status-code") {
282
+ switch (_response.error.statusCode) {
283
+ case 400:
284
+ throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
285
+ case 409:
286
+ throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
287
+ case 422:
288
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
289
+ default:
290
+ throw new errors.AthenaIntelligenceError({
291
+ statusCode: _response.error.statusCode,
292
+ body: _response.error.body,
293
+ rawResponse: _response.rawResponse,
294
+ });
295
+ }
296
+ }
297
+ switch (_response.error.reason) {
298
+ case "non-json":
299
+ throw new errors.AthenaIntelligenceError({
300
+ statusCode: _response.error.statusCode,
301
+ body: _response.error.rawBody,
302
+ rawResponse: _response.rawResponse,
303
+ });
304
+ case "body-is-null":
305
+ throw new errors.AthenaIntelligenceError({
306
+ statusCode: _response.error.statusCode,
307
+ rawResponse: _response.rawResponse,
308
+ });
309
+ case "timeout":
310
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/me/ssh-keys.");
311
+ case "unknown":
312
+ throw new errors.AthenaIntelligenceError({
313
+ message: _response.error.errorMessage,
314
+ rawResponse: _response.rawResponse,
315
+ });
316
+ }
317
+ });
318
+ }
319
+ /**
320
+ * Delete an SSH public key from the caller's account. SSH sessions authenticated with the key are closed by the gateway within a minute. Returns 404 for a key the caller does not own.
321
+ *
322
+ * @param {AthenaIntelligence.DeleteSshKeyUsersRequest} request
323
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
324
+ *
325
+ * @throws {@link AthenaIntelligence.NotFoundError}
326
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
327
+ *
328
+ * @example
329
+ * await client.users.deleteSshKey({
330
+ * key_id: "key_id"
331
+ * })
332
+ */
333
+ deleteSshKey(request, requestOptions) {
334
+ return core.HttpResponsePromise.fromPromise(this.__deleteSshKey(request, requestOptions));
335
+ }
336
+ __deleteSshKey(request, requestOptions) {
337
+ return __awaiter(this, void 0, void 0, function* () {
338
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
339
+ const { key_id: keyId } = request;
340
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
341
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
342
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
343
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/me/ssh-keys/${core.url.encodePathParam(keyId)}`),
344
+ method: "DELETE",
345
+ headers: _headers,
346
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
347
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
348
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
349
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
350
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
351
+ logging: this._options.logging,
352
+ });
353
+ if (_response.ok) {
354
+ return {
355
+ data: _response.body,
356
+ rawResponse: _response.rawResponse,
357
+ };
358
+ }
359
+ if (_response.error.reason === "status-code") {
360
+ switch (_response.error.statusCode) {
361
+ case 404:
362
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
363
+ case 422:
364
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
365
+ default:
366
+ throw new errors.AthenaIntelligenceError({
367
+ statusCode: _response.error.statusCode,
368
+ body: _response.error.body,
369
+ rawResponse: _response.rawResponse,
370
+ });
371
+ }
372
+ }
373
+ switch (_response.error.reason) {
374
+ case "non-json":
375
+ throw new errors.AthenaIntelligenceError({
376
+ statusCode: _response.error.statusCode,
377
+ body: _response.error.rawBody,
378
+ rawResponse: _response.rawResponse,
379
+ });
380
+ case "body-is-null":
381
+ throw new errors.AthenaIntelligenceError({
382
+ statusCode: _response.error.statusCode,
383
+ rawResponse: _response.rawResponse,
384
+ });
385
+ case "timeout":
386
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling DELETE /api/v0/me/ssh-keys/{key_id}.");
387
+ case "unknown":
388
+ throw new errors.AthenaIntelligenceError({
389
+ message: _response.error.errorMessage,
390
+ rawResponse: _response.rawResponse,
391
+ });
392
+ }
393
+ });
394
+ }
177
395
  }
178
396
  exports.UsersClient = UsersClient;
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests/index.js";
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * label: "laptop",
5
+ * public_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBZzuCu6wC9oVY2lVbVKdwpMElfCYiWTOIVQQBtq7HW9 me@laptop"
6
+ * }
7
+ */
8
+ export interface AddSshKeyRequestIn {
9
+ /** Optional display label; defaults to the key's comment, then its type. */
10
+ label?: string | null;
11
+ /** The contents of an OpenSSH ``.pub`` file: ``<type> <base64> [comment]``. Accepted types: ssh-ed25519, ecdsa-sha2-nistp256/384/521, ssh-rsa (2048 bits or more), and the FIDO ``sk-`` variants. */
12
+ public_key: string;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * key_id: "key_id"
5
+ * }
6
+ */
7
+ export interface DeleteSshKeyUsersRequest {
8
+ key_id: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export type { AddSshKeyRequestIn } from "./AddSshKeyRequestIn.js";
2
+ export type { DeleteSshKeyUsersRequest } from "./DeleteSshKeyUsersRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Result of starting or stopping a computer asset's runtime.
3
+ */
4
+ export interface ComputerLifecycleResponseOut {
5
+ /** The computer asset id. */
6
+ asset_id: string;
7
+ /** The computer's runtime provider (e.g. `talos_v2`). */
8
+ provider?: string | null;
9
+ /** Runtime state after the operation: `started`, `stopped`, a transitional state such as `restoring`, or `pending` when the transition was durably queued. */
10
+ state: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Result of deleting one of the caller's SSH keys.
3
+ */
4
+ export interface DeleteSshKeyResponseOut {
5
+ /** Whether the key was deleted. */
6
+ deleted: boolean;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -12,6 +12,8 @@ export interface SessionOut {
12
12
  aop_execution_succeeded?: boolean | null;
13
13
  /** Application identifier the session belongs to, when set */
14
14
  app_id?: string | null;
15
+ /** Asset ID of the collab agent the session was created with, when one was bound; null for stock-agent sessions */
16
+ collab_agent_id?: string | null;
15
17
  /** Timestamp when the session was created (ISO 8601) */
16
18
  created_at: string;
17
19
  /** Unique identifier of the user who created this session */
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Where a registered SSH key connects for this computer (identity mode).
3
+ */
4
+ export interface SshAccessInfoOut {
5
+ /** Ready-to-run `ssh [-p <port>] <asset_id>@<host>`. */
6
+ command: string;
7
+ /** SSH gateway hostname for this environment. */
8
+ host: string;
9
+ /** SSH gateway port. */
10
+ port: number;
11
+ /** The SSH username — the computer's asset id, which selects identity (registered-key) authentication at the gateway. */
12
+ username: string;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import type * as AthenaIntelligence from "../index.js";
2
+ /**
3
+ * The caller's registered SSH public keys.
4
+ */
5
+ export interface SshKeyListResponseOut {
6
+ /** Oldest first. */
7
+ keys: AthenaIntelligence.SshKeyOut[];
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ /**
2
+ * One registered SSH public key.
3
+ */
4
+ export interface SshKeyOut {
5
+ /** When the key was registered. */
6
+ created_at: string;
7
+ /** ``SHA256:…`` fingerprint, as printed by ``ssh-keygen -lf``. */
8
+ fingerprint: string;
9
+ /** Key id (``ussk_…``); use it to delete the key. */
10
+ id: string;
11
+ /** Key algorithm, e.g. ``ssh-ed25519``. */
12
+ key_type: string;
13
+ /** Display label (defaults to the key comment). */
14
+ label: string;
15
+ /** When the key last authorized an SSH connection, if ever. */
16
+ last_used_at?: string | null;
17
+ /** The key in ``<type> <base64>`` form (no comment). */
18
+ public_key: string;
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -29,6 +29,7 @@ export * from "./ChunkContentItem.js";
29
29
  export * from "./ChunkResult.js";
30
30
  export * from "./CollabAgentSendMessageResponseOut.js";
31
31
  export * from "./CollabTokenResponse.js";
32
+ export * from "./ComputerLifecycleResponseOut.js";
32
33
  export * from "./ConversationAssetInfo.js";
33
34
  export * from "./ConversationMessage.js";
34
35
  export * from "./ConversationResult.js";
@@ -50,6 +51,7 @@ export * from "./DataFrameRequestOut.js";
50
51
  export * from "./DataFrameUnknownFormatError.js";
51
52
  export * from "./DefaultVisibility.js";
52
53
  export * from "./DeleteDataRequest.js";
54
+ export * from "./DeleteSshKeyResponseOut.js";
53
55
  export * from "./DeployComputerResponseOut.js";
54
56
  export * from "./DimensionProperties.js";
55
57
  export * from "./DriveAgentResponse.js";
@@ -97,7 +99,10 @@ export * from "./ShareRecipientResultOut.js";
97
99
  export * from "./Sheet.js";
98
100
  export * from "./SheetOperationResponse.js";
99
101
  export * from "./SqlAgentResponse.js";
102
+ export * from "./SshAccessInfoOut.js";
100
103
  export * from "./SshAccessResponseOut.js";
104
+ export * from "./SshKeyListResponseOut.js";
105
+ export * from "./SshKeyOut.js";
101
106
  export * from "./StructuredDataExtractorResponse.js";
102
107
  export * from "./TableRowData.js";
103
108
  export * from "./TextContent.js";
@@ -45,6 +45,7 @@ __exportStar(require("./ChunkContentItem.js"), exports);
45
45
  __exportStar(require("./ChunkResult.js"), exports);
46
46
  __exportStar(require("./CollabAgentSendMessageResponseOut.js"), exports);
47
47
  __exportStar(require("./CollabTokenResponse.js"), exports);
48
+ __exportStar(require("./ComputerLifecycleResponseOut.js"), exports);
48
49
  __exportStar(require("./ConversationAssetInfo.js"), exports);
49
50
  __exportStar(require("./ConversationMessage.js"), exports);
50
51
  __exportStar(require("./ConversationResult.js"), exports);
@@ -66,6 +67,7 @@ __exportStar(require("./DataFrameRequestOut.js"), exports);
66
67
  __exportStar(require("./DataFrameUnknownFormatError.js"), exports);
67
68
  __exportStar(require("./DefaultVisibility.js"), exports);
68
69
  __exportStar(require("./DeleteDataRequest.js"), exports);
70
+ __exportStar(require("./DeleteSshKeyResponseOut.js"), exports);
69
71
  __exportStar(require("./DeployComputerResponseOut.js"), exports);
70
72
  __exportStar(require("./DimensionProperties.js"), exports);
71
73
  __exportStar(require("./DriveAgentResponse.js"), exports);
@@ -113,7 +115,10 @@ __exportStar(require("./ShareRecipientResultOut.js"), exports);
113
115
  __exportStar(require("./Sheet.js"), exports);
114
116
  __exportStar(require("./SheetOperationResponse.js"), exports);
115
117
  __exportStar(require("./SqlAgentResponse.js"), exports);
118
+ __exportStar(require("./SshAccessInfoOut.js"), exports);
116
119
  __exportStar(require("./SshAccessResponseOut.js"), exports);
120
+ __exportStar(require("./SshKeyListResponseOut.js"), exports);
121
+ __exportStar(require("./SshKeyOut.js"), exports);
117
122
  __exportStar(require("./StructuredDataExtractorResponse.js"), exports);
118
123
  __exportStar(require("./TableRowData.js"), exports);
119
124
  __exportStar(require("./TextContent.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.2144";
1
+ export declare const SDK_VERSION = "4.3.2146";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "4.3.2144";
4
+ exports.SDK_VERSION = "4.3.2146";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@athenaintel/sdk",
9
- "X-Fern-SDK-Version": "4.3.2144",
10
- "User-Agent": "@athenaintel/sdk/4.3.2144",
9
+ "X-Fern-SDK-Version": "4.3.2146",
10
+ "User-Agent": "@athenaintel/sdk/4.3.2146",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -31,6 +31,24 @@ export declare class ComputerClient {
31
31
  */
32
32
  deployComputer(request: AthenaIntelligence.DeployComputerRequestIn, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.DeployComputerResponseOut>;
33
33
  private __deployComputer;
34
+ /**
35
+ * Return the SSH gateway host, port, username, and ready-made command for connecting to a computer with a registered SSH public key (see `add_ssh_key`). The username is the computer's asset id; the gateway authorizes the connection against your current edit permission on the computer and starts it if it is stopped. Unlike `create_ssh_access`, this mints nothing and never wakes the computer. Returns 409 when the computer's provider does not support SSH.
36
+ *
37
+ * @param {AthenaIntelligence.GetSshAccessComputerRequest} request
38
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
39
+ *
40
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
41
+ * @throws {@link AthenaIntelligence.NotFoundError}
42
+ * @throws {@link AthenaIntelligence.ConflictError}
43
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
44
+ *
45
+ * @example
46
+ * await client.computer.getSshAccess({
47
+ * asset_id: "asset_id"
48
+ * })
49
+ */
50
+ getSshAccess(request: AthenaIntelligence.GetSshAccessComputerRequest, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.SshAccessInfoOut>;
51
+ private __getSshAccess;
34
52
  /**
35
53
  * Generate a time-limited SSH access token for a computer asset. Returns a full SSH command and token that can be used to connect to the computer's underlying VM and run commands. The computer must support SSH access and be in a running state.
36
54
  *
@@ -71,4 +89,42 @@ export declare class ComputerClient {
71
89
  */
72
90
  revokeSshAccess(request: AthenaIntelligence.RevokeSshAccessRequestIn, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.RevokeSshAccessResponseOut>;
73
91
  private __revokeSshAccess;
92
+ /**
93
+ * Start a stopped computer's runtime and wait for it to come up — the same operation as the Start button in Athena. Idempotent for a running computer. Returns 409 when the computer's provider does not support lifecycle operations.
94
+ *
95
+ * @param {AthenaIntelligence.StartComputerComputerRequest} request
96
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
97
+ *
98
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
99
+ * @throws {@link AthenaIntelligence.NotFoundError}
100
+ * @throws {@link AthenaIntelligence.ConflictError}
101
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
102
+ * @throws {@link AthenaIntelligence.BadGatewayError}
103
+ *
104
+ * @example
105
+ * await client.computer.startComputer({
106
+ * asset_id: "asset_id"
107
+ * })
108
+ */
109
+ startComputer(request: AthenaIntelligence.StartComputerComputerRequest, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ComputerLifecycleResponseOut>;
110
+ private __startComputer;
111
+ /**
112
+ * Stop (suspend) a running computer's runtime — the same operation as the Stop button in Athena. The computer's files persist and it can be started again with `start_computer`. Returns 409 when the provider does not support lifecycle operations or when the stop was refused because the workspace could not be saved (the computer is left running; retry).
113
+ *
114
+ * @param {AthenaIntelligence.StopComputerComputerRequest} request
115
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
116
+ *
117
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
118
+ * @throws {@link AthenaIntelligence.NotFoundError}
119
+ * @throws {@link AthenaIntelligence.ConflictError}
120
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
121
+ * @throws {@link AthenaIntelligence.BadGatewayError}
122
+ *
123
+ * @example
124
+ * await client.computer.stopComputer({
125
+ * asset_id: "asset_id"
126
+ * })
127
+ */
128
+ stopComputer(request: AthenaIntelligence.StopComputerComputerRequest, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ComputerLifecycleResponseOut>;
129
+ private __stopComputer;
74
130
  }