@athenaintel/sdk 4.3.2145 → 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 (74) 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/SshAccessInfoOut.d.ts +13 -0
  28. package/dist/cjs/api/types/SshAccessInfoOut.js +3 -0
  29. package/dist/cjs/api/types/SshKeyListResponseOut.d.ts +8 -0
  30. package/dist/cjs/api/types/SshKeyListResponseOut.js +3 -0
  31. package/dist/cjs/api/types/SshKeyOut.d.ts +19 -0
  32. package/dist/cjs/api/types/SshKeyOut.js +3 -0
  33. package/dist/cjs/api/types/index.d.ts +5 -0
  34. package/dist/cjs/api/types/index.js +5 -0
  35. package/dist/cjs/version.d.ts +1 -1
  36. package/dist/cjs/version.js +1 -1
  37. package/dist/esm/BaseClient.mjs +2 -2
  38. package/dist/esm/api/resources/computer/client/Client.d.mts +56 -0
  39. package/dist/esm/api/resources/computer/client/Client.mjs +249 -0
  40. package/dist/esm/api/resources/computer/client/requests/GetSshAccessComputerRequest.d.mts +9 -0
  41. package/dist/esm/api/resources/computer/client/requests/GetSshAccessComputerRequest.mjs +2 -0
  42. package/dist/esm/api/resources/computer/client/requests/StartComputerComputerRequest.d.mts +9 -0
  43. package/dist/esm/api/resources/computer/client/requests/StartComputerComputerRequest.mjs +2 -0
  44. package/dist/esm/api/resources/computer/client/requests/StopComputerComputerRequest.d.mts +9 -0
  45. package/dist/esm/api/resources/computer/client/requests/StopComputerComputerRequest.mjs +2 -0
  46. package/dist/esm/api/resources/computer/client/requests/index.d.mts +3 -0
  47. package/dist/esm/api/resources/index.d.mts +1 -0
  48. package/dist/esm/api/resources/index.mjs +1 -0
  49. package/dist/esm/api/resources/users/client/Client.d.mts +45 -1
  50. package/dist/esm/api/resources/users/client/Client.mjs +218 -0
  51. package/dist/esm/api/resources/users/client/index.d.mts +1 -1
  52. package/dist/esm/api/resources/users/client/index.mjs +1 -1
  53. package/dist/esm/api/resources/users/client/requests/AddSshKeyRequestIn.d.mts +13 -0
  54. package/dist/esm/api/resources/users/client/requests/AddSshKeyRequestIn.mjs +2 -0
  55. package/dist/esm/api/resources/users/client/requests/DeleteSshKeyUsersRequest.d.mts +9 -0
  56. package/dist/esm/api/resources/users/client/requests/DeleteSshKeyUsersRequest.mjs +2 -0
  57. package/dist/esm/api/resources/users/client/requests/index.d.mts +2 -0
  58. package/dist/esm/api/resources/users/client/requests/index.mjs +1 -0
  59. package/dist/esm/api/types/ComputerLifecycleResponseOut.d.mts +11 -0
  60. package/dist/esm/api/types/ComputerLifecycleResponseOut.mjs +2 -0
  61. package/dist/esm/api/types/DeleteSshKeyResponseOut.d.mts +7 -0
  62. package/dist/esm/api/types/DeleteSshKeyResponseOut.mjs +2 -0
  63. package/dist/esm/api/types/SshAccessInfoOut.d.mts +13 -0
  64. package/dist/esm/api/types/SshAccessInfoOut.mjs +2 -0
  65. package/dist/esm/api/types/SshKeyListResponseOut.d.mts +8 -0
  66. package/dist/esm/api/types/SshKeyListResponseOut.mjs +2 -0
  67. package/dist/esm/api/types/SshKeyOut.d.mts +19 -0
  68. package/dist/esm/api/types/SshKeyOut.mjs +2 -0
  69. package/dist/esm/api/types/index.d.mts +5 -0
  70. package/dist/esm/api/types/index.mjs +5 -0
  71. package/dist/esm/version.d.mts +1 -1
  72. package/dist/esm/version.mjs +1 -1
  73. package/package.json +1 -1
  74. package/reference.md +381 -0
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@athenaintel/sdk",
46
- "X-Fern-SDK-Version": "4.3.2145",
47
- "User-Agent": "@athenaintel/sdk/4.3.2145",
46
+ "X-Fern-SDK-Version": "4.3.2146",
47
+ "User-Agent": "@athenaintel/sdk/4.3.2146",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, 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
  }
@@ -154,6 +154,85 @@ class ComputerClient {
154
154
  }
155
155
  });
156
156
  }
157
+ /**
158
+ * 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.
159
+ *
160
+ * @param {AthenaIntelligence.GetSshAccessComputerRequest} request
161
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
162
+ *
163
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
164
+ * @throws {@link AthenaIntelligence.NotFoundError}
165
+ * @throws {@link AthenaIntelligence.ConflictError}
166
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
167
+ *
168
+ * @example
169
+ * await client.computer.getSshAccess({
170
+ * asset_id: "asset_id"
171
+ * })
172
+ */
173
+ getSshAccess(request, requestOptions) {
174
+ return core.HttpResponsePromise.fromPromise(this.__getSshAccess(request, requestOptions));
175
+ }
176
+ __getSshAccess(request, requestOptions) {
177
+ return __awaiter(this, void 0, void 0, function* () {
178
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
179
+ const { asset_id: assetId } = request;
180
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
181
+ 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);
182
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
183
+ 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/computer/${core.url.encodePathParam(assetId)}/ssh-access`),
184
+ method: "GET",
185
+ headers: _headers,
186
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
187
+ 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,
188
+ 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,
189
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
190
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
191
+ logging: this._options.logging,
192
+ });
193
+ if (_response.ok) {
194
+ return { data: _response.body, rawResponse: _response.rawResponse };
195
+ }
196
+ if (_response.error.reason === "status-code") {
197
+ switch (_response.error.statusCode) {
198
+ case 401:
199
+ throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
200
+ case 404:
201
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
202
+ case 409:
203
+ throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
204
+ case 422:
205
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
206
+ default:
207
+ throw new errors.AthenaIntelligenceError({
208
+ statusCode: _response.error.statusCode,
209
+ body: _response.error.body,
210
+ rawResponse: _response.rawResponse,
211
+ });
212
+ }
213
+ }
214
+ switch (_response.error.reason) {
215
+ case "non-json":
216
+ throw new errors.AthenaIntelligenceError({
217
+ statusCode: _response.error.statusCode,
218
+ body: _response.error.rawBody,
219
+ rawResponse: _response.rawResponse,
220
+ });
221
+ case "body-is-null":
222
+ throw new errors.AthenaIntelligenceError({
223
+ statusCode: _response.error.statusCode,
224
+ rawResponse: _response.rawResponse,
225
+ });
226
+ case "timeout":
227
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/computer/{asset_id}/ssh-access.");
228
+ case "unknown":
229
+ throw new errors.AthenaIntelligenceError({
230
+ message: _response.error.errorMessage,
231
+ rawResponse: _response.rawResponse,
232
+ });
233
+ }
234
+ });
235
+ }
157
236
  /**
158
237
  * 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.
159
238
  *
@@ -332,5 +411,175 @@ class ComputerClient {
332
411
  }
333
412
  });
334
413
  }
414
+ /**
415
+ * 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.
416
+ *
417
+ * @param {AthenaIntelligence.StartComputerComputerRequest} request
418
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
419
+ *
420
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
421
+ * @throws {@link AthenaIntelligence.NotFoundError}
422
+ * @throws {@link AthenaIntelligence.ConflictError}
423
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
424
+ * @throws {@link AthenaIntelligence.BadGatewayError}
425
+ *
426
+ * @example
427
+ * await client.computer.startComputer({
428
+ * asset_id: "asset_id"
429
+ * })
430
+ */
431
+ startComputer(request, requestOptions) {
432
+ return core.HttpResponsePromise.fromPromise(this.__startComputer(request, requestOptions));
433
+ }
434
+ __startComputer(request, requestOptions) {
435
+ return __awaiter(this, void 0, void 0, function* () {
436
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
437
+ const { asset_id: assetId } = request;
438
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
439
+ 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);
440
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
441
+ 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/computer/${core.url.encodePathParam(assetId)}/start`),
442
+ method: "POST",
443
+ headers: _headers,
444
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
445
+ 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,
446
+ 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,
447
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
448
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
449
+ logging: this._options.logging,
450
+ });
451
+ if (_response.ok) {
452
+ return {
453
+ data: _response.body,
454
+ rawResponse: _response.rawResponse,
455
+ };
456
+ }
457
+ if (_response.error.reason === "status-code") {
458
+ switch (_response.error.statusCode) {
459
+ case 401:
460
+ throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
461
+ case 404:
462
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
463
+ case 409:
464
+ throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
465
+ case 422:
466
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
467
+ case 502:
468
+ throw new AthenaIntelligence.BadGatewayError(_response.error.body, _response.rawResponse);
469
+ default:
470
+ throw new errors.AthenaIntelligenceError({
471
+ statusCode: _response.error.statusCode,
472
+ body: _response.error.body,
473
+ rawResponse: _response.rawResponse,
474
+ });
475
+ }
476
+ }
477
+ switch (_response.error.reason) {
478
+ case "non-json":
479
+ throw new errors.AthenaIntelligenceError({
480
+ statusCode: _response.error.statusCode,
481
+ body: _response.error.rawBody,
482
+ rawResponse: _response.rawResponse,
483
+ });
484
+ case "body-is-null":
485
+ throw new errors.AthenaIntelligenceError({
486
+ statusCode: _response.error.statusCode,
487
+ rawResponse: _response.rawResponse,
488
+ });
489
+ case "timeout":
490
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/computer/{asset_id}/start.");
491
+ case "unknown":
492
+ throw new errors.AthenaIntelligenceError({
493
+ message: _response.error.errorMessage,
494
+ rawResponse: _response.rawResponse,
495
+ });
496
+ }
497
+ });
498
+ }
499
+ /**
500
+ * 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).
501
+ *
502
+ * @param {AthenaIntelligence.StopComputerComputerRequest} request
503
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
504
+ *
505
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
506
+ * @throws {@link AthenaIntelligence.NotFoundError}
507
+ * @throws {@link AthenaIntelligence.ConflictError}
508
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
509
+ * @throws {@link AthenaIntelligence.BadGatewayError}
510
+ *
511
+ * @example
512
+ * await client.computer.stopComputer({
513
+ * asset_id: "asset_id"
514
+ * })
515
+ */
516
+ stopComputer(request, requestOptions) {
517
+ return core.HttpResponsePromise.fromPromise(this.__stopComputer(request, requestOptions));
518
+ }
519
+ __stopComputer(request, requestOptions) {
520
+ return __awaiter(this, void 0, void 0, function* () {
521
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
522
+ const { asset_id: assetId } = request;
523
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
524
+ 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);
525
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
526
+ 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/computer/${core.url.encodePathParam(assetId)}/stop`),
527
+ method: "POST",
528
+ headers: _headers,
529
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
530
+ 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,
531
+ 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,
532
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
533
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
534
+ logging: this._options.logging,
535
+ });
536
+ if (_response.ok) {
537
+ return {
538
+ data: _response.body,
539
+ rawResponse: _response.rawResponse,
540
+ };
541
+ }
542
+ if (_response.error.reason === "status-code") {
543
+ switch (_response.error.statusCode) {
544
+ case 401:
545
+ throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
546
+ case 404:
547
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
548
+ case 409:
549
+ throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
550
+ case 422:
551
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
552
+ case 502:
553
+ throw new AthenaIntelligence.BadGatewayError(_response.error.body, _response.rawResponse);
554
+ default:
555
+ throw new errors.AthenaIntelligenceError({
556
+ statusCode: _response.error.statusCode,
557
+ body: _response.error.body,
558
+ rawResponse: _response.rawResponse,
559
+ });
560
+ }
561
+ }
562
+ switch (_response.error.reason) {
563
+ case "non-json":
564
+ throw new errors.AthenaIntelligenceError({
565
+ statusCode: _response.error.statusCode,
566
+ body: _response.error.rawBody,
567
+ rawResponse: _response.rawResponse,
568
+ });
569
+ case "body-is-null":
570
+ throw new errors.AthenaIntelligenceError({
571
+ statusCode: _response.error.statusCode,
572
+ rawResponse: _response.rawResponse,
573
+ });
574
+ case "timeout":
575
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/computer/{asset_id}/stop.");
576
+ case "unknown":
577
+ throw new errors.AthenaIntelligenceError({
578
+ message: _response.error.errorMessage,
579
+ rawResponse: _response.rawResponse,
580
+ });
581
+ }
582
+ });
583
+ }
335
584
  }
336
585
  exports.ComputerClient = ComputerClient;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * asset_id: "asset_id"
5
+ * }
6
+ */
7
+ export interface GetSshAccessComputerRequest {
8
+ asset_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,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * asset_id: "asset_id"
5
+ * }
6
+ */
7
+ export interface StartComputerComputerRequest {
8
+ asset_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,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * asset_id: "asset_id"
5
+ * }
6
+ */
7
+ export interface StopComputerComputerRequest {
8
+ asset_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 });
@@ -1,3 +1,6 @@
1
1
  export type { CreateSshAccessRequestIn } from "./CreateSshAccessRequestIn.js";
2
2
  export type { DeployComputerRequestIn } from "./DeployComputerRequestIn.js";
3
+ export type { GetSshAccessComputerRequest } from "./GetSshAccessComputerRequest.js";
3
4
  export type { RevokeSshAccessRequestIn } from "./RevokeSshAccessRequestIn.js";
5
+ export type { StartComputerComputerRequest } from "./StartComputerComputerRequest.js";
6
+ export type { StopComputerComputerRequest } from "./StopComputerComputerRequest.js";
@@ -25,6 +25,7 @@ export * as threads from "./threads/index.js";
25
25
  export * from "./tools/client/requests/index.js";
26
26
  export * as tools from "./tools/index.js";
27
27
  export * from "./tools/types/index.js";
28
+ export * from "./users/client/requests/index.js";
28
29
  export * as users from "./users/index.js";
29
30
  export * from "./workspaces/client/requests/index.js";
30
31
  export * as workspaces from "./workspaces/index.js";
@@ -64,6 +64,7 @@ exports.threads = __importStar(require("./threads/index.js"));
64
64
  __exportStar(require("./tools/client/requests/index.js"), exports);
65
65
  exports.tools = __importStar(require("./tools/index.js"));
66
66
  __exportStar(require("./tools/types/index.js"), exports);
67
+ __exportStar(require("./users/client/requests/index.js"), exports);
67
68
  exports.users = __importStar(require("./users/index.js"));
68
69
  __exportStar(require("./workspaces/client/requests/index.js"), exports);
69
70
  exports.workspaces = __importStar(require("./workspaces/index.js"));
@@ -1,7 +1,7 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
- import type * as AthenaIntelligence from "../../../index.js";
4
+ import * as AthenaIntelligence from "../../../index.js";
5
5
  export declare namespace UsersClient {
6
6
  interface Options extends BaseClientOptions {
7
7
  }
@@ -31,4 +31,48 @@ export declare class UsersClient {
31
31
  */
32
32
  meSources(requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.MeSourcesResponseOut>;
33
33
  private __meSources;
34
+ /**
35
+ * 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.
36
+ *
37
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @example
40
+ * await client.users.listSshKeys()
41
+ */
42
+ listSshKeys(requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.SshKeyListResponseOut>;
43
+ private __listSshKeys;
44
+ /**
45
+ * 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.
46
+ *
47
+ * @param {AthenaIntelligence.AddSshKeyRequestIn} request
48
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
49
+ *
50
+ * @throws {@link AthenaIntelligence.BadRequestError}
51
+ * @throws {@link AthenaIntelligence.ConflictError}
52
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
53
+ *
54
+ * @example
55
+ * await client.users.addSshKey({
56
+ * label: "laptop",
57
+ * public_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBZzuCu6wC9oVY2lVbVKdwpMElfCYiWTOIVQQBtq7HW9 me@laptop"
58
+ * })
59
+ */
60
+ addSshKey(request: AthenaIntelligence.AddSshKeyRequestIn, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.SshKeyOut>;
61
+ private __addSshKey;
62
+ /**
63
+ * 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.
64
+ *
65
+ * @param {AthenaIntelligence.DeleteSshKeyUsersRequest} request
66
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
67
+ *
68
+ * @throws {@link AthenaIntelligence.NotFoundError}
69
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
70
+ *
71
+ * @example
72
+ * await client.users.deleteSshKey({
73
+ * key_id: "key_id"
74
+ * })
75
+ */
76
+ deleteSshKey(request: AthenaIntelligence.DeleteSshKeyUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.DeleteSshKeyResponseOut>;
77
+ private __deleteSshKey;
34
78
  }