@athenaintel/sdk 4.3.2145 → 4.3.2147

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 (78) 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/semanticModel/client/Client.d.ts +2 -1
  14. package/dist/cjs/api/resources/semanticModel/client/Client.js +4 -1
  15. package/dist/cjs/api/resources/users/client/Client.d.ts +45 -1
  16. package/dist/cjs/api/resources/users/client/Client.js +218 -0
  17. package/dist/cjs/api/resources/users/client/index.d.ts +1 -1
  18. package/dist/cjs/api/resources/users/client/index.js +15 -0
  19. package/dist/cjs/api/resources/users/client/requests/AddSshKeyRequestIn.d.ts +13 -0
  20. package/dist/cjs/api/resources/users/client/requests/AddSshKeyRequestIn.js +3 -0
  21. package/dist/cjs/api/resources/users/client/requests/DeleteSshKeyUsersRequest.d.ts +9 -0
  22. package/dist/cjs/api/resources/users/client/requests/DeleteSshKeyUsersRequest.js +3 -0
  23. package/dist/cjs/api/resources/users/client/requests/index.d.ts +2 -0
  24. package/dist/cjs/api/resources/users/client/requests/index.js +2 -0
  25. package/dist/cjs/api/types/ComputerLifecycleResponseOut.d.ts +11 -0
  26. package/dist/cjs/api/types/ComputerLifecycleResponseOut.js +3 -0
  27. package/dist/cjs/api/types/DeleteSshKeyResponseOut.d.ts +7 -0
  28. package/dist/cjs/api/types/DeleteSshKeyResponseOut.js +3 -0
  29. package/dist/cjs/api/types/SshAccessInfoOut.d.ts +13 -0
  30. package/dist/cjs/api/types/SshAccessInfoOut.js +3 -0
  31. package/dist/cjs/api/types/SshKeyListResponseOut.d.ts +8 -0
  32. package/dist/cjs/api/types/SshKeyListResponseOut.js +3 -0
  33. package/dist/cjs/api/types/SshKeyOut.d.ts +19 -0
  34. package/dist/cjs/api/types/SshKeyOut.js +3 -0
  35. package/dist/cjs/api/types/index.d.ts +5 -0
  36. package/dist/cjs/api/types/index.js +5 -0
  37. package/dist/cjs/version.d.ts +1 -1
  38. package/dist/cjs/version.js +1 -1
  39. package/dist/esm/BaseClient.mjs +2 -2
  40. package/dist/esm/api/resources/computer/client/Client.d.mts +56 -0
  41. package/dist/esm/api/resources/computer/client/Client.mjs +249 -0
  42. package/dist/esm/api/resources/computer/client/requests/GetSshAccessComputerRequest.d.mts +9 -0
  43. package/dist/esm/api/resources/computer/client/requests/GetSshAccessComputerRequest.mjs +2 -0
  44. package/dist/esm/api/resources/computer/client/requests/StartComputerComputerRequest.d.mts +9 -0
  45. package/dist/esm/api/resources/computer/client/requests/StartComputerComputerRequest.mjs +2 -0
  46. package/dist/esm/api/resources/computer/client/requests/StopComputerComputerRequest.d.mts +9 -0
  47. package/dist/esm/api/resources/computer/client/requests/StopComputerComputerRequest.mjs +2 -0
  48. package/dist/esm/api/resources/computer/client/requests/index.d.mts +3 -0
  49. package/dist/esm/api/resources/index.d.mts +1 -0
  50. package/dist/esm/api/resources/index.mjs +1 -0
  51. package/dist/esm/api/resources/semanticModel/client/Client.d.mts +2 -1
  52. package/dist/esm/api/resources/semanticModel/client/Client.mjs +4 -1
  53. package/dist/esm/api/resources/users/client/Client.d.mts +45 -1
  54. package/dist/esm/api/resources/users/client/Client.mjs +218 -0
  55. package/dist/esm/api/resources/users/client/index.d.mts +1 -1
  56. package/dist/esm/api/resources/users/client/index.mjs +1 -1
  57. package/dist/esm/api/resources/users/client/requests/AddSshKeyRequestIn.d.mts +13 -0
  58. package/dist/esm/api/resources/users/client/requests/AddSshKeyRequestIn.mjs +2 -0
  59. package/dist/esm/api/resources/users/client/requests/DeleteSshKeyUsersRequest.d.mts +9 -0
  60. package/dist/esm/api/resources/users/client/requests/DeleteSshKeyUsersRequest.mjs +2 -0
  61. package/dist/esm/api/resources/users/client/requests/index.d.mts +2 -0
  62. package/dist/esm/api/resources/users/client/requests/index.mjs +1 -0
  63. package/dist/esm/api/types/ComputerLifecycleResponseOut.d.mts +11 -0
  64. package/dist/esm/api/types/ComputerLifecycleResponseOut.mjs +2 -0
  65. package/dist/esm/api/types/DeleteSshKeyResponseOut.d.mts +7 -0
  66. package/dist/esm/api/types/DeleteSshKeyResponseOut.mjs +2 -0
  67. package/dist/esm/api/types/SshAccessInfoOut.d.mts +13 -0
  68. package/dist/esm/api/types/SshAccessInfoOut.mjs +2 -0
  69. package/dist/esm/api/types/SshKeyListResponseOut.d.mts +8 -0
  70. package/dist/esm/api/types/SshKeyListResponseOut.mjs +2 -0
  71. package/dist/esm/api/types/SshKeyOut.d.mts +19 -0
  72. package/dist/esm/api/types/SshKeyOut.mjs +2 -0
  73. package/dist/esm/api/types/index.d.mts +5 -0
  74. package/dist/esm/api/types/index.mjs +5 -0
  75. package/dist/esm/version.d.mts +1 -1
  76. package/dist/esm/version.mjs +1 -1
  77. package/package.json +1 -1
  78. package/reference.md +382 -1
@@ -118,6 +118,85 @@ export class ComputerClient {
118
118
  }
119
119
  });
120
120
  }
121
+ /**
122
+ * 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.
123
+ *
124
+ * @param {AthenaIntelligence.GetSshAccessComputerRequest} request
125
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
126
+ *
127
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
128
+ * @throws {@link AthenaIntelligence.NotFoundError}
129
+ * @throws {@link AthenaIntelligence.ConflictError}
130
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
131
+ *
132
+ * @example
133
+ * await client.computer.getSshAccess({
134
+ * asset_id: "asset_id"
135
+ * })
136
+ */
137
+ getSshAccess(request, requestOptions) {
138
+ return core.HttpResponsePromise.fromPromise(this.__getSshAccess(request, requestOptions));
139
+ }
140
+ __getSshAccess(request, requestOptions) {
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
143
+ const { asset_id: assetId } = request;
144
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
145
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
146
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
147
+ 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`),
148
+ method: "GET",
149
+ headers: _headers,
150
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
151
+ 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,
152
+ 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,
153
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
154
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
155
+ logging: this._options.logging,
156
+ });
157
+ if (_response.ok) {
158
+ return { data: _response.body, rawResponse: _response.rawResponse };
159
+ }
160
+ if (_response.error.reason === "status-code") {
161
+ switch (_response.error.statusCode) {
162
+ case 401:
163
+ throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
164
+ case 404:
165
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
166
+ case 409:
167
+ throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
168
+ case 422:
169
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
170
+ default:
171
+ throw new errors.AthenaIntelligenceError({
172
+ statusCode: _response.error.statusCode,
173
+ body: _response.error.body,
174
+ rawResponse: _response.rawResponse,
175
+ });
176
+ }
177
+ }
178
+ switch (_response.error.reason) {
179
+ case "non-json":
180
+ throw new errors.AthenaIntelligenceError({
181
+ statusCode: _response.error.statusCode,
182
+ body: _response.error.rawBody,
183
+ rawResponse: _response.rawResponse,
184
+ });
185
+ case "body-is-null":
186
+ throw new errors.AthenaIntelligenceError({
187
+ statusCode: _response.error.statusCode,
188
+ rawResponse: _response.rawResponse,
189
+ });
190
+ case "timeout":
191
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/computer/{asset_id}/ssh-access.");
192
+ case "unknown":
193
+ throw new errors.AthenaIntelligenceError({
194
+ message: _response.error.errorMessage,
195
+ rawResponse: _response.rawResponse,
196
+ });
197
+ }
198
+ });
199
+ }
121
200
  /**
122
201
  * 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.
123
202
  *
@@ -296,4 +375,174 @@ export class ComputerClient {
296
375
  }
297
376
  });
298
377
  }
378
+ /**
379
+ * 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.
380
+ *
381
+ * @param {AthenaIntelligence.StartComputerComputerRequest} request
382
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
383
+ *
384
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
385
+ * @throws {@link AthenaIntelligence.NotFoundError}
386
+ * @throws {@link AthenaIntelligence.ConflictError}
387
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
388
+ * @throws {@link AthenaIntelligence.BadGatewayError}
389
+ *
390
+ * @example
391
+ * await client.computer.startComputer({
392
+ * asset_id: "asset_id"
393
+ * })
394
+ */
395
+ startComputer(request, requestOptions) {
396
+ return core.HttpResponsePromise.fromPromise(this.__startComputer(request, requestOptions));
397
+ }
398
+ __startComputer(request, requestOptions) {
399
+ return __awaiter(this, void 0, void 0, function* () {
400
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
401
+ const { asset_id: assetId } = request;
402
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
403
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
404
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
405
+ 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`),
406
+ method: "POST",
407
+ headers: _headers,
408
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
409
+ 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,
410
+ 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,
411
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
412
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
413
+ logging: this._options.logging,
414
+ });
415
+ if (_response.ok) {
416
+ return {
417
+ data: _response.body,
418
+ rawResponse: _response.rawResponse,
419
+ };
420
+ }
421
+ if (_response.error.reason === "status-code") {
422
+ switch (_response.error.statusCode) {
423
+ case 401:
424
+ throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
425
+ case 404:
426
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
427
+ case 409:
428
+ throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
429
+ case 422:
430
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
431
+ case 502:
432
+ throw new AthenaIntelligence.BadGatewayError(_response.error.body, _response.rawResponse);
433
+ default:
434
+ throw new errors.AthenaIntelligenceError({
435
+ statusCode: _response.error.statusCode,
436
+ body: _response.error.body,
437
+ rawResponse: _response.rawResponse,
438
+ });
439
+ }
440
+ }
441
+ switch (_response.error.reason) {
442
+ case "non-json":
443
+ throw new errors.AthenaIntelligenceError({
444
+ statusCode: _response.error.statusCode,
445
+ body: _response.error.rawBody,
446
+ rawResponse: _response.rawResponse,
447
+ });
448
+ case "body-is-null":
449
+ throw new errors.AthenaIntelligenceError({
450
+ statusCode: _response.error.statusCode,
451
+ rawResponse: _response.rawResponse,
452
+ });
453
+ case "timeout":
454
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/computer/{asset_id}/start.");
455
+ case "unknown":
456
+ throw new errors.AthenaIntelligenceError({
457
+ message: _response.error.errorMessage,
458
+ rawResponse: _response.rawResponse,
459
+ });
460
+ }
461
+ });
462
+ }
463
+ /**
464
+ * 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).
465
+ *
466
+ * @param {AthenaIntelligence.StopComputerComputerRequest} request
467
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
468
+ *
469
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
470
+ * @throws {@link AthenaIntelligence.NotFoundError}
471
+ * @throws {@link AthenaIntelligence.ConflictError}
472
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
473
+ * @throws {@link AthenaIntelligence.BadGatewayError}
474
+ *
475
+ * @example
476
+ * await client.computer.stopComputer({
477
+ * asset_id: "asset_id"
478
+ * })
479
+ */
480
+ stopComputer(request, requestOptions) {
481
+ return core.HttpResponsePromise.fromPromise(this.__stopComputer(request, requestOptions));
482
+ }
483
+ __stopComputer(request, requestOptions) {
484
+ return __awaiter(this, void 0, void 0, function* () {
485
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
486
+ const { asset_id: assetId } = request;
487
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
488
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
489
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
490
+ 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`),
491
+ method: "POST",
492
+ headers: _headers,
493
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
494
+ 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,
495
+ 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,
496
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
497
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
498
+ logging: this._options.logging,
499
+ });
500
+ if (_response.ok) {
501
+ return {
502
+ data: _response.body,
503
+ rawResponse: _response.rawResponse,
504
+ };
505
+ }
506
+ if (_response.error.reason === "status-code") {
507
+ switch (_response.error.statusCode) {
508
+ case 401:
509
+ throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
510
+ case 404:
511
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
512
+ case 409:
513
+ throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
514
+ case 422:
515
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
516
+ case 502:
517
+ throw new AthenaIntelligence.BadGatewayError(_response.error.body, _response.rawResponse);
518
+ default:
519
+ throw new errors.AthenaIntelligenceError({
520
+ statusCode: _response.error.statusCode,
521
+ body: _response.error.body,
522
+ rawResponse: _response.rawResponse,
523
+ });
524
+ }
525
+ }
526
+ switch (_response.error.reason) {
527
+ case "non-json":
528
+ throw new errors.AthenaIntelligenceError({
529
+ statusCode: _response.error.statusCode,
530
+ body: _response.error.rawBody,
531
+ rawResponse: _response.rawResponse,
532
+ });
533
+ case "body-is-null":
534
+ throw new errors.AthenaIntelligenceError({
535
+ statusCode: _response.error.statusCode,
536
+ rawResponse: _response.rawResponse,
537
+ });
538
+ case "timeout":
539
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/computer/{asset_id}/stop.");
540
+ case "unknown":
541
+ throw new errors.AthenaIntelligenceError({
542
+ message: _response.error.errorMessage,
543
+ rawResponse: _response.rawResponse,
544
+ });
545
+ }
546
+ });
547
+ }
299
548
  }
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,3 +1,6 @@
1
1
  export type { CreateSshAccessRequestIn } from "./CreateSshAccessRequestIn.mjs";
2
2
  export type { DeployComputerRequestIn } from "./DeployComputerRequestIn.mjs";
3
+ export type { GetSshAccessComputerRequest } from "./GetSshAccessComputerRequest.mjs";
3
4
  export type { RevokeSshAccessRequestIn } from "./RevokeSshAccessRequestIn.mjs";
5
+ export type { StartComputerComputerRequest } from "./StartComputerComputerRequest.mjs";
6
+ export type { StopComputerComputerRequest } from "./StopComputerComputerRequest.mjs";
@@ -25,6 +25,7 @@ export * as threads from "./threads/index.mjs";
25
25
  export * from "./tools/client/requests/index.mjs";
26
26
  export * as tools from "./tools/index.mjs";
27
27
  export * from "./tools/types/index.mjs";
28
+ export * from "./users/client/requests/index.mjs";
28
29
  export * as users from "./users/index.mjs";
29
30
  export * from "./workspaces/client/requests/index.mjs";
30
31
  export * as workspaces from "./workspaces/index.mjs";
@@ -25,6 +25,7 @@ export * as threads from "./threads/index.mjs";
25
25
  export * from "./tools/client/requests/index.mjs";
26
26
  export * as tools from "./tools/index.mjs";
27
27
  export * from "./tools/types/index.mjs";
28
+ export * from "./users/client/requests/index.mjs";
28
29
  export * as users from "./users/index.mjs";
29
30
  export * from "./workspaces/client/requests/index.mjs";
30
31
  export * as workspaces from "./workspaces/index.mjs";
@@ -12,7 +12,7 @@ export declare class SemanticModelClient {
12
12
  protected readonly _options: NormalizedClientOptionsWithAuth<SemanticModelClient.Options>;
13
13
  constructor(options?: SemanticModelClient.Options);
14
14
  /**
15
- * Generate a short-lived JWT token for direct access to the semantic model's Cube REST API. Use this token to query /cubejs-api/v1/load and /cubejs-api/v1/meta directly. Token expires after 1 hour. The token carries only the model ID and schema hash — database credentials are NOT included and are resolved server-side by Cube via callback.
15
+ * Generate a short-lived JWT token for direct access to the semantic model's Cube REST API. Use this token to query /cubejs-api/v1/load and /cubejs-api/v1/meta directly. Token expires after 1 hour. The token carries only the model ID and schema hash — database credentials are NOT included and are resolved server-side by Cube via callback. Dataset-backed models must use the authenticated query endpoint instead so source Dataset permissions are checked per query.
16
16
  *
17
17
  * @param {AthenaIntelligence.GenerateTokenSemanticModelRequest} request
18
18
  * @param {SemanticModelClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -54,6 +54,7 @@ export declare class SemanticModelClient {
54
54
  * @param {SemanticModelClient.RequestOptions} requestOptions - Request-specific configuration.
55
55
  *
56
56
  * @throws {@link AthenaIntelligence.UnauthorizedError}
57
+ * @throws {@link AthenaIntelligence.ForbiddenError}
57
58
  * @throws {@link AthenaIntelligence.NotFoundError}
58
59
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
59
60
  * @throws {@link AthenaIntelligence.BadGatewayError}
@@ -30,7 +30,7 @@ export class SemanticModelClient {
30
30
  this._options = normalizeClientOptionsWithAuth(options);
31
31
  }
32
32
  /**
33
- * Generate a short-lived JWT token for direct access to the semantic model's Cube REST API. Use this token to query /cubejs-api/v1/load and /cubejs-api/v1/meta directly. Token expires after 1 hour. The token carries only the model ID and schema hash — database credentials are NOT included and are resolved server-side by Cube via callback.
33
+ * Generate a short-lived JWT token for direct access to the semantic model's Cube REST API. Use this token to query /cubejs-api/v1/load and /cubejs-api/v1/meta directly. Token expires after 1 hour. The token carries only the model ID and schema hash — database credentials are NOT included and are resolved server-side by Cube via callback. Dataset-backed models must use the authenticated query endpoint instead so source Dataset permissions are checked per query.
34
34
  *
35
35
  * @param {AthenaIntelligence.GenerateTokenSemanticModelRequest} request
36
36
  * @param {SemanticModelClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -200,6 +200,7 @@ export class SemanticModelClient {
200
200
  * @param {SemanticModelClient.RequestOptions} requestOptions - Request-specific configuration.
201
201
  *
202
202
  * @throws {@link AthenaIntelligence.UnauthorizedError}
203
+ * @throws {@link AthenaIntelligence.ForbiddenError}
203
204
  * @throws {@link AthenaIntelligence.NotFoundError}
204
205
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
205
206
  * @throws {@link AthenaIntelligence.BadGatewayError}
@@ -243,6 +244,8 @@ export class SemanticModelClient {
243
244
  switch (_response.error.statusCode) {
244
245
  case 401:
245
246
  throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
247
+ case 403:
248
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
246
249
  case 404:
247
250
  throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
248
251
  case 422:
@@ -1,7 +1,7 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
- import type * as AthenaIntelligence from "../../../index.mjs";
4
+ import * as AthenaIntelligence from "../../../index.mjs";
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
  }