@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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/computer/client/Client.d.ts +56 -0
- package/dist/cjs/api/resources/computer/client/Client.js +249 -0
- package/dist/cjs/api/resources/computer/client/requests/GetSshAccessComputerRequest.d.ts +9 -0
- package/dist/cjs/api/resources/computer/client/requests/GetSshAccessComputerRequest.js +3 -0
- package/dist/cjs/api/resources/computer/client/requests/StartComputerComputerRequest.d.ts +9 -0
- package/dist/cjs/api/resources/computer/client/requests/StartComputerComputerRequest.js +3 -0
- package/dist/cjs/api/resources/computer/client/requests/StopComputerComputerRequest.d.ts +9 -0
- package/dist/cjs/api/resources/computer/client/requests/StopComputerComputerRequest.js +3 -0
- package/dist/cjs/api/resources/computer/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.js +1 -0
- package/dist/cjs/api/resources/users/client/Client.d.ts +45 -1
- package/dist/cjs/api/resources/users/client/Client.js +218 -0
- package/dist/cjs/api/resources/users/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/users/client/index.js +15 -0
- package/dist/cjs/api/resources/users/client/requests/AddSshKeyRequestIn.d.ts +13 -0
- package/dist/cjs/api/resources/users/client/requests/AddSshKeyRequestIn.js +3 -0
- package/dist/cjs/api/resources/users/client/requests/DeleteSshKeyUsersRequest.d.ts +9 -0
- package/dist/cjs/api/resources/users/client/requests/DeleteSshKeyUsersRequest.js +3 -0
- package/dist/cjs/api/resources/users/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/users/client/requests/index.js +2 -0
- package/dist/cjs/api/types/ComputerLifecycleResponseOut.d.ts +11 -0
- package/dist/cjs/api/types/ComputerLifecycleResponseOut.js +3 -0
- package/dist/cjs/api/types/DeleteSshKeyResponseOut.d.ts +7 -0
- package/dist/cjs/api/types/DeleteSshKeyResponseOut.js +3 -0
- package/dist/cjs/api/types/SessionOut.d.ts +2 -0
- package/dist/cjs/api/types/SshAccessInfoOut.d.ts +13 -0
- package/dist/cjs/api/types/SshAccessInfoOut.js +3 -0
- package/dist/cjs/api/types/SshKeyListResponseOut.d.ts +8 -0
- package/dist/cjs/api/types/SshKeyListResponseOut.js +3 -0
- package/dist/cjs/api/types/SshKeyOut.d.ts +19 -0
- package/dist/cjs/api/types/SshKeyOut.js +3 -0
- package/dist/cjs/api/types/index.d.ts +5 -0
- package/dist/cjs/api/types/index.js +5 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/computer/client/Client.d.mts +56 -0
- package/dist/esm/api/resources/computer/client/Client.mjs +249 -0
- package/dist/esm/api/resources/computer/client/requests/GetSshAccessComputerRequest.d.mts +9 -0
- package/dist/esm/api/resources/computer/client/requests/GetSshAccessComputerRequest.mjs +2 -0
- package/dist/esm/api/resources/computer/client/requests/StartComputerComputerRequest.d.mts +9 -0
- package/dist/esm/api/resources/computer/client/requests/StartComputerComputerRequest.mjs +2 -0
- package/dist/esm/api/resources/computer/client/requests/StopComputerComputerRequest.d.mts +9 -0
- package/dist/esm/api/resources/computer/client/requests/StopComputerComputerRequest.mjs +2 -0
- package/dist/esm/api/resources/computer/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/index.mjs +1 -0
- package/dist/esm/api/resources/users/client/Client.d.mts +45 -1
- package/dist/esm/api/resources/users/client/Client.mjs +218 -0
- package/dist/esm/api/resources/users/client/index.d.mts +1 -1
- package/dist/esm/api/resources/users/client/index.mjs +1 -1
- package/dist/esm/api/resources/users/client/requests/AddSshKeyRequestIn.d.mts +13 -0
- package/dist/esm/api/resources/users/client/requests/AddSshKeyRequestIn.mjs +2 -0
- package/dist/esm/api/resources/users/client/requests/DeleteSshKeyUsersRequest.d.mts +9 -0
- package/dist/esm/api/resources/users/client/requests/DeleteSshKeyUsersRequest.mjs +2 -0
- package/dist/esm/api/resources/users/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/users/client/requests/index.mjs +1 -0
- package/dist/esm/api/types/ComputerLifecycleResponseOut.d.mts +11 -0
- package/dist/esm/api/types/ComputerLifecycleResponseOut.mjs +2 -0
- package/dist/esm/api/types/DeleteSshKeyResponseOut.d.mts +7 -0
- package/dist/esm/api/types/DeleteSshKeyResponseOut.mjs +2 -0
- package/dist/esm/api/types/SessionOut.d.mts +2 -0
- package/dist/esm/api/types/SshAccessInfoOut.d.mts +13 -0
- package/dist/esm/api/types/SshAccessInfoOut.mjs +2 -0
- package/dist/esm/api/types/SshKeyListResponseOut.d.mts +8 -0
- package/dist/esm/api/types/SshKeyListResponseOut.mjs +2 -0
- package/dist/esm/api/types/SshKeyOut.d.mts +19 -0
- package/dist/esm/api/types/SshKeyOut.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +5 -0
- package/dist/esm/api/types/index.mjs +5 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- 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,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
|
+
}
|
|
@@ -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,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
|
+
}
|
|
@@ -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);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.3.
|
|
1
|
+
export declare const SDK_VERSION = "4.3.2146";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -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.
|
|
10
|
-
"User-Agent": "@athenaintel/sdk/4.3.
|
|
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
|
}
|