@athenaintel/sdk 4.3.985 → 4.3.986

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.
@@ -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.985",
47
- "User-Agent": "@athenaintel/sdk/4.3.985",
46
+ "X-Fern-SDK-Version": "4.3.986",
47
+ "User-Agent": "@athenaintel/sdk/4.3.986",
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);
@@ -91,4 +91,19 @@ export declare class AssetsClient {
91
91
  */
92
92
  get(asset_id: string, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.PublicAssetOut>;
93
93
  private __get;
94
+ /**
95
+ * Archive an asset by its ID. The asset will be hidden from active listings (e.g. GET /assets with default filters) but can still be retrieved directly by ID. For folders, all children are also archived recursively. For meetings, associated sub-assets (recordings, transcripts) are archived as well. Only the creator of the asset can archive it.
96
+ *
97
+ * @param {string} asset_id
98
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
99
+ *
100
+ * @throws {@link AthenaIntelligence.ForbiddenError}
101
+ * @throws {@link AthenaIntelligence.NotFoundError}
102
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
103
+ *
104
+ * @example
105
+ * await client.assets.archive("asset_id")
106
+ */
107
+ archive(asset_id: string, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ArchiveAssetResponseOut>;
108
+ private __archive;
94
109
  }
@@ -391,5 +391,81 @@ class AssetsClient {
391
391
  }
392
392
  });
393
393
  }
394
+ /**
395
+ * Archive an asset by its ID. The asset will be hidden from active listings (e.g. GET /assets with default filters) but can still be retrieved directly by ID. For folders, all children are also archived recursively. For meetings, associated sub-assets (recordings, transcripts) are archived as well. Only the creator of the asset can archive it.
396
+ *
397
+ * @param {string} asset_id
398
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
399
+ *
400
+ * @throws {@link AthenaIntelligence.ForbiddenError}
401
+ * @throws {@link AthenaIntelligence.NotFoundError}
402
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
403
+ *
404
+ * @example
405
+ * await client.assets.archive("asset_id")
406
+ */
407
+ archive(asset_id, requestOptions) {
408
+ return core.HttpResponsePromise.fromPromise(this.__archive(asset_id, requestOptions));
409
+ }
410
+ __archive(asset_id, requestOptions) {
411
+ return __awaiter(this, void 0, void 0, function* () {
412
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
413
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
414
+ 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);
415
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
416
+ 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/assets/${core.url.encodePathParam(asset_id)}/archive`),
417
+ method: "POST",
418
+ headers: _headers,
419
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
420
+ 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,
421
+ 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,
422
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
423
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
424
+ logging: this._options.logging,
425
+ });
426
+ if (_response.ok) {
427
+ return {
428
+ data: _response.body,
429
+ rawResponse: _response.rawResponse,
430
+ };
431
+ }
432
+ if (_response.error.reason === "status-code") {
433
+ switch (_response.error.statusCode) {
434
+ case 403:
435
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
436
+ case 404:
437
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
438
+ case 422:
439
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
440
+ default:
441
+ throw new errors.AthenaIntelligenceError({
442
+ statusCode: _response.error.statusCode,
443
+ body: _response.error.body,
444
+ rawResponse: _response.rawResponse,
445
+ });
446
+ }
447
+ }
448
+ switch (_response.error.reason) {
449
+ case "non-json":
450
+ throw new errors.AthenaIntelligenceError({
451
+ statusCode: _response.error.statusCode,
452
+ body: _response.error.rawBody,
453
+ rawResponse: _response.rawResponse,
454
+ });
455
+ case "body-is-null":
456
+ throw new errors.AthenaIntelligenceError({
457
+ statusCode: _response.error.statusCode,
458
+ rawResponse: _response.rawResponse,
459
+ });
460
+ case "timeout":
461
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/assets/{asset_id}/archive.");
462
+ case "unknown":
463
+ throw new errors.AthenaIntelligenceError({
464
+ message: _response.error.errorMessage,
465
+ rawResponse: _response.rawResponse,
466
+ });
467
+ }
468
+ });
469
+ }
394
470
  }
395
471
  exports.AssetsClient = AssetsClient;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Response model for asset archival.
3
+ */
4
+ export interface ArchiveAssetResponseOut {
5
+ /** Whether the asset was successfully archived (always true on success) */
6
+ archived: boolean;
7
+ /** Unique identifier of the archived asset */
8
+ id: string;
9
+ /** Title of the archived asset */
10
+ title: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,7 @@
1
1
  export * from "./AopAsyncExecuteResponseOut.js";
2
2
  export * from "./AopExecuteRequestIn.js";
3
3
  export * from "./AopExecuteResponseOut.js";
4
+ export * from "./ArchiveAssetResponseOut.js";
4
5
  export * from "./AssetContentRequestOut.js";
5
6
  export * from "./AssetNode.js";
6
7
  export * from "./AssetScreenshotResponseOut.js";
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./AopAsyncExecuteResponseOut.js"), exports);
18
18
  __exportStar(require("./AopExecuteRequestIn.js"), exports);
19
19
  __exportStar(require("./AopExecuteResponseOut.js"), exports);
20
+ __exportStar(require("./ArchiveAssetResponseOut.js"), exports);
20
21
  __exportStar(require("./AssetContentRequestOut.js"), exports);
21
22
  __exportStar(require("./AssetNode.js"), exports);
22
23
  __exportStar(require("./AssetScreenshotResponseOut.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.985";
1
+ export declare const SDK_VERSION = "4.3.986";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "4.3.985";
4
+ exports.SDK_VERSION = "4.3.986";
@@ -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.985",
10
- "User-Agent": "@athenaintel/sdk/4.3.985",
9
+ "X-Fern-SDK-Version": "4.3.986",
10
+ "User-Agent": "@athenaintel/sdk/4.3.986",
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);
@@ -91,4 +91,19 @@ export declare class AssetsClient {
91
91
  */
92
92
  get(asset_id: string, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.PublicAssetOut>;
93
93
  private __get;
94
+ /**
95
+ * Archive an asset by its ID. The asset will be hidden from active listings (e.g. GET /assets with default filters) but can still be retrieved directly by ID. For folders, all children are also archived recursively. For meetings, associated sub-assets (recordings, transcripts) are archived as well. Only the creator of the asset can archive it.
96
+ *
97
+ * @param {string} asset_id
98
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
99
+ *
100
+ * @throws {@link AthenaIntelligence.ForbiddenError}
101
+ * @throws {@link AthenaIntelligence.NotFoundError}
102
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
103
+ *
104
+ * @example
105
+ * await client.assets.archive("asset_id")
106
+ */
107
+ archive(asset_id: string, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ArchiveAssetResponseOut>;
108
+ private __archive;
94
109
  }
@@ -355,4 +355,80 @@ export class AssetsClient {
355
355
  }
356
356
  });
357
357
  }
358
+ /**
359
+ * Archive an asset by its ID. The asset will be hidden from active listings (e.g. GET /assets with default filters) but can still be retrieved directly by ID. For folders, all children are also archived recursively. For meetings, associated sub-assets (recordings, transcripts) are archived as well. Only the creator of the asset can archive it.
360
+ *
361
+ * @param {string} asset_id
362
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
363
+ *
364
+ * @throws {@link AthenaIntelligence.ForbiddenError}
365
+ * @throws {@link AthenaIntelligence.NotFoundError}
366
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
367
+ *
368
+ * @example
369
+ * await client.assets.archive("asset_id")
370
+ */
371
+ archive(asset_id, requestOptions) {
372
+ return core.HttpResponsePromise.fromPromise(this.__archive(asset_id, requestOptions));
373
+ }
374
+ __archive(asset_id, requestOptions) {
375
+ return __awaiter(this, void 0, void 0, function* () {
376
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
377
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
378
+ 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);
379
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
380
+ 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/assets/${core.url.encodePathParam(asset_id)}/archive`),
381
+ method: "POST",
382
+ headers: _headers,
383
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
384
+ 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,
385
+ 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,
386
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
387
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
388
+ logging: this._options.logging,
389
+ });
390
+ if (_response.ok) {
391
+ return {
392
+ data: _response.body,
393
+ rawResponse: _response.rawResponse,
394
+ };
395
+ }
396
+ if (_response.error.reason === "status-code") {
397
+ switch (_response.error.statusCode) {
398
+ case 403:
399
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
400
+ case 404:
401
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
402
+ case 422:
403
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
404
+ default:
405
+ throw new errors.AthenaIntelligenceError({
406
+ statusCode: _response.error.statusCode,
407
+ body: _response.error.body,
408
+ rawResponse: _response.rawResponse,
409
+ });
410
+ }
411
+ }
412
+ switch (_response.error.reason) {
413
+ case "non-json":
414
+ throw new errors.AthenaIntelligenceError({
415
+ statusCode: _response.error.statusCode,
416
+ body: _response.error.rawBody,
417
+ rawResponse: _response.rawResponse,
418
+ });
419
+ case "body-is-null":
420
+ throw new errors.AthenaIntelligenceError({
421
+ statusCode: _response.error.statusCode,
422
+ rawResponse: _response.rawResponse,
423
+ });
424
+ case "timeout":
425
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/assets/{asset_id}/archive.");
426
+ case "unknown":
427
+ throw new errors.AthenaIntelligenceError({
428
+ message: _response.error.errorMessage,
429
+ rawResponse: _response.rawResponse,
430
+ });
431
+ }
432
+ });
433
+ }
358
434
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Response model for asset archival.
3
+ */
4
+ export interface ArchiveAssetResponseOut {
5
+ /** Whether the asset was successfully archived (always true on success) */
6
+ archived: boolean;
7
+ /** Unique identifier of the archived asset */
8
+ id: string;
9
+ /** Title of the archived asset */
10
+ title: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,6 +1,7 @@
1
1
  export * from "./AopAsyncExecuteResponseOut.mjs";
2
2
  export * from "./AopExecuteRequestIn.mjs";
3
3
  export * from "./AopExecuteResponseOut.mjs";
4
+ export * from "./ArchiveAssetResponseOut.mjs";
4
5
  export * from "./AssetContentRequestOut.mjs";
5
6
  export * from "./AssetNode.mjs";
6
7
  export * from "./AssetScreenshotResponseOut.mjs";
@@ -1,6 +1,7 @@
1
1
  export * from "./AopAsyncExecuteResponseOut.mjs";
2
2
  export * from "./AopExecuteRequestIn.mjs";
3
3
  export * from "./AopExecuteResponseOut.mjs";
4
+ export * from "./ArchiveAssetResponseOut.mjs";
4
5
  export * from "./AssetContentRequestOut.mjs";
5
6
  export * from "./AssetNode.mjs";
6
7
  export * from "./AssetScreenshotResponseOut.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.985";
1
+ export declare const SDK_VERSION = "4.3.986";
@@ -1 +1 @@
1
- export const SDK_VERSION = "4.3.985";
1
+ export const SDK_VERSION = "4.3.986";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenaintel/sdk",
3
- "version": "4.3.985",
3
+ "version": "4.3.986",
4
4
  "private": false,
5
5
  "repository": "github:Athena-Intel/athena-typescript",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -494,6 +494,69 @@ await client.assets.get("asset_id");
494
494
  </dl>
495
495
 
496
496
 
497
+ </dd>
498
+ </dl>
499
+ </details>
500
+
501
+ <details><summary><code>client.assets.<a href="/src/api/resources/assets/client/Client.ts">archive</a>(asset_id) -> AthenaIntelligence.ArchiveAssetResponseOut</code></summary>
502
+ <dl>
503
+ <dd>
504
+
505
+ #### 📝 Description
506
+
507
+ <dl>
508
+ <dd>
509
+
510
+ <dl>
511
+ <dd>
512
+
513
+ Archive an asset by its ID. The asset will be hidden from active listings (e.g. GET /assets with default filters) but can still be retrieved directly by ID. For folders, all children are also archived recursively. For meetings, associated sub-assets (recordings, transcripts) are archived as well. Only the creator of the asset can archive it.
514
+ </dd>
515
+ </dl>
516
+ </dd>
517
+ </dl>
518
+
519
+ #### 🔌 Usage
520
+
521
+ <dl>
522
+ <dd>
523
+
524
+ <dl>
525
+ <dd>
526
+
527
+ ```typescript
528
+ await client.assets.archive("asset_id");
529
+
530
+ ```
531
+ </dd>
532
+ </dl>
533
+ </dd>
534
+ </dl>
535
+
536
+ #### ⚙️ Parameters
537
+
538
+ <dl>
539
+ <dd>
540
+
541
+ <dl>
542
+ <dd>
543
+
544
+ **asset_id:** `string`
545
+
546
+ </dd>
547
+ </dl>
548
+
549
+ <dl>
550
+ <dd>
551
+
552
+ **requestOptions:** `AssetsClient.RequestOptions`
553
+
554
+ </dd>
555
+ </dl>
556
+ </dd>
557
+ </dl>
558
+
559
+
497
560
  </dd>
498
561
  </dl>
499
562
  </details>