@athenaintel/sdk 4.3.2111 → 4.3.2113

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 (68) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/assets/client/Client.d.ts +65 -0
  3. package/dist/cjs/api/resources/assets/client/Client.js +274 -0
  4. package/dist/cjs/api/resources/assets/client/requests/AssetActivityDeltaBatchRequestIn.d.ts +19 -0
  5. package/dist/cjs/api/resources/assets/client/requests/AssetActivityDeltaBatchRequestIn.js +3 -0
  6. package/dist/cjs/api/resources/assets/client/requests/GetActivityDeltaAssetsRequest.d.ts +15 -0
  7. package/dist/cjs/api/resources/assets/client/requests/GetActivityDeltaAssetsRequest.js +3 -0
  8. package/dist/cjs/api/resources/assets/client/requests/ListActivityAssetsRequest.d.ts +13 -0
  9. package/dist/cjs/api/resources/assets/client/requests/ListActivityAssetsRequest.js +3 -0
  10. package/dist/cjs/api/resources/assets/client/requests/index.d.ts +3 -0
  11. package/dist/cjs/api/resources/databases/client/Client.d.ts +1 -1
  12. package/dist/cjs/api/resources/tools/client/Client.d.ts +2 -1
  13. package/dist/cjs/api/resources/tools/client/Client.js +7 -1
  14. package/dist/cjs/api/resources/tools/client/requests/BodySaveAssetApiV0ToolsFileSavePost.d.ts +2 -0
  15. package/dist/cjs/api/types/ActivityClockRangeIn.d.ts +9 -0
  16. package/dist/cjs/api/types/ActivityClockRangeIn.js +3 -0
  17. package/dist/cjs/api/types/ActivityDeltaOut.d.ts +11 -0
  18. package/dist/cjs/api/types/ActivityDeltaOut.js +3 -0
  19. package/dist/cjs/api/types/ActivityItemOut.d.ts +19 -0
  20. package/dist/cjs/api/types/ActivityItemOut.js +3 -0
  21. package/dist/cjs/api/types/AssetActivityDeltaResponseOut.d.ts +11 -0
  22. package/dist/cjs/api/types/AssetActivityDeltaResponseOut.js +3 -0
  23. package/dist/cjs/api/types/AssetActivityResponseOut.d.ts +14 -0
  24. package/dist/cjs/api/types/AssetActivityResponseOut.js +3 -0
  25. package/dist/cjs/api/types/{AgoraWebApiPublicV0ModelsDatabaseDataDatabaseStatusResponse.d.ts → DatabaseStatusResponse.d.ts} +3 -3
  26. package/dist/cjs/api/types/DatabaseStatusResponse.js +15 -0
  27. package/dist/cjs/api/types/GeneralAgentConfig.d.ts +1 -1
  28. package/dist/cjs/api/types/SessionOut.d.ts +7 -1
  29. package/dist/cjs/api/types/index.d.ts +6 -1
  30. package/dist/cjs/api/types/index.js +6 -1
  31. package/dist/cjs/version.d.ts +1 -1
  32. package/dist/cjs/version.js +1 -1
  33. package/dist/esm/BaseClient.mjs +2 -2
  34. package/dist/esm/api/resources/assets/client/Client.d.mts +65 -0
  35. package/dist/esm/api/resources/assets/client/Client.mjs +274 -0
  36. package/dist/esm/api/resources/assets/client/requests/AssetActivityDeltaBatchRequestIn.d.mts +19 -0
  37. package/dist/esm/api/resources/assets/client/requests/AssetActivityDeltaBatchRequestIn.mjs +2 -0
  38. package/dist/esm/api/resources/assets/client/requests/GetActivityDeltaAssetsRequest.d.mts +15 -0
  39. package/dist/esm/api/resources/assets/client/requests/GetActivityDeltaAssetsRequest.mjs +2 -0
  40. package/dist/esm/api/resources/assets/client/requests/ListActivityAssetsRequest.d.mts +13 -0
  41. package/dist/esm/api/resources/assets/client/requests/ListActivityAssetsRequest.mjs +2 -0
  42. package/dist/esm/api/resources/assets/client/requests/index.d.mts +3 -0
  43. package/dist/esm/api/resources/databases/client/Client.d.mts +1 -1
  44. package/dist/esm/api/resources/tools/client/Client.d.mts +2 -1
  45. package/dist/esm/api/resources/tools/client/Client.mjs +7 -1
  46. package/dist/esm/api/resources/tools/client/requests/BodySaveAssetApiV0ToolsFileSavePost.d.mts +2 -0
  47. package/dist/esm/api/types/ActivityClockRangeIn.d.mts +9 -0
  48. package/dist/esm/api/types/ActivityClockRangeIn.mjs +2 -0
  49. package/dist/esm/api/types/ActivityDeltaOut.d.mts +11 -0
  50. package/dist/esm/api/types/ActivityDeltaOut.mjs +2 -0
  51. package/dist/esm/api/types/ActivityItemOut.d.mts +19 -0
  52. package/dist/esm/api/types/ActivityItemOut.mjs +2 -0
  53. package/dist/esm/api/types/AssetActivityDeltaResponseOut.d.mts +11 -0
  54. package/dist/esm/api/types/AssetActivityDeltaResponseOut.mjs +2 -0
  55. package/dist/esm/api/types/AssetActivityResponseOut.d.mts +14 -0
  56. package/dist/esm/api/types/AssetActivityResponseOut.mjs +2 -0
  57. package/dist/esm/api/types/{AgoraWebApiPublicV0ModelsDatabaseDataDatabaseStatusResponse.d.mts → DatabaseStatusResponse.d.mts} +3 -3
  58. package/dist/esm/api/types/DatabaseStatusResponse.mjs +12 -0
  59. package/dist/esm/api/types/GeneralAgentConfig.d.mts +1 -1
  60. package/dist/esm/api/types/SessionOut.d.mts +7 -1
  61. package/dist/esm/api/types/index.d.mts +6 -1
  62. package/dist/esm/api/types/index.mjs +6 -1
  63. package/dist/esm/version.d.mts +1 -1
  64. package/dist/esm/version.mjs +1 -1
  65. package/package.json +1 -1
  66. package/reference.md +206 -2
  67. package/dist/cjs/api/types/AgoraWebApiPublicV0ModelsDatabaseDataDatabaseStatusResponse.js +0 -15
  68. package/dist/esm/api/types/AgoraWebApiPublicV0ModelsDatabaseDataDatabaseStatusResponse.mjs +0 -12
@@ -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.2111",
47
- "User-Agent": "@athenaintel/sdk/4.3.2111",
46
+ "X-Fern-SDK-Version": "4.3.2113",
47
+ "User-Agent": "@athenaintel/sdk/4.3.2113",
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);
@@ -150,6 +150,71 @@ export declare class AssetsClient {
150
150
  */
151
151
  rename(request: AthenaIntelligence.RenameAssetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.RenameAssetResponseOut>;
152
152
  private __rename;
153
+ /**
154
+ * Admin only. List the edit history of a collaborative asset, newest first: who edited it, when, and under which agent/session attribution. Works for every collaborative asset type. Each item's from_clock/to_clock identify the edit for the companion delta endpoint, which reports what actually changed.
155
+ *
156
+ * @param {AthenaIntelligence.ListActivityAssetsRequest} request
157
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
158
+ *
159
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
160
+ * @throws {@link AthenaIntelligence.ForbiddenError}
161
+ * @throws {@link AthenaIntelligence.NotFoundError}
162
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
163
+ *
164
+ * @example
165
+ * await client.assets.listActivity({
166
+ * asset_id: "asset_id"
167
+ * })
168
+ */
169
+ listActivity(request: AthenaIntelligence.ListActivityAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.AssetActivityResponseOut>;
170
+ private __listActivity;
171
+ /**
172
+ * Admin only. Report what changed between two Keryx clocks — for spreadsheets, the per-cell before/after values; for documents, the inserted and deleted text; for presentations, the affected slides. Take the clocks from the activity endpoint. Computed by the same differ the in-app Activity pane renders, so the payload matches what a user sees. Always inspect delta.coverage: caps and non-decodable bulk regions are reported there rather than silently omitted.
173
+ *
174
+ * @param {AthenaIntelligence.GetActivityDeltaAssetsRequest} request
175
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
176
+ *
177
+ * @throws {@link AthenaIntelligence.BadRequestError}
178
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
179
+ * @throws {@link AthenaIntelligence.ForbiddenError}
180
+ * @throws {@link AthenaIntelligence.NotFoundError}
181
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
182
+ *
183
+ * @example
184
+ * await client.assets.getActivityDelta({
185
+ * asset_id: "asset_id",
186
+ * from: 1,
187
+ * to: 1
188
+ * })
189
+ */
190
+ getActivityDelta(request: AthenaIntelligence.GetActivityDeltaAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.AssetActivityDeltaResponseOut>;
191
+ private __getActivityDelta;
192
+ /**
193
+ * Admin only. Batch form of the activity-delta endpoint: diff several clock ranges in one request. Prefer this when walking a whole log — one call computes every range in a single pass over the document instead of one request each (up to 25 per call). Results come back in request order, and a range that could not be read carries its own `error` instead of failing the batch. Same payload and `coverage` semantics as the single-range endpoint.
194
+ *
195
+ * @param {AthenaIntelligence.AssetActivityDeltaBatchRequestIn} request
196
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
197
+ *
198
+ * @throws {@link AthenaIntelligence.BadRequestError}
199
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
200
+ * @throws {@link AthenaIntelligence.ForbiddenError}
201
+ * @throws {@link AthenaIntelligence.NotFoundError}
202
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
203
+ *
204
+ * @example
205
+ * await client.assets.getActivityDeltas({
206
+ * asset_id: "asset_id",
207
+ * ranges: [{
208
+ * from: 1752694811020,
209
+ * to: 1752694813551
210
+ * }, {
211
+ * from: 1752691402184,
212
+ * to: 1752691409776
213
+ * }]
214
+ * })
215
+ */
216
+ getActivityDeltas(request: AthenaIntelligence.AssetActivityDeltaBatchRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.AssetActivityDeltaResponseOut>;
217
+ private __getActivityDeltas;
153
218
  /**
154
219
  * 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.
155
220
  *
@@ -672,6 +672,280 @@ class AssetsClient {
672
672
  }
673
673
  });
674
674
  }
675
+ /**
676
+ * Admin only. List the edit history of a collaborative asset, newest first: who edited it, when, and under which agent/session attribution. Works for every collaborative asset type. Each item's from_clock/to_clock identify the edit for the companion delta endpoint, which reports what actually changed.
677
+ *
678
+ * @param {AthenaIntelligence.ListActivityAssetsRequest} request
679
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
680
+ *
681
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
682
+ * @throws {@link AthenaIntelligence.ForbiddenError}
683
+ * @throws {@link AthenaIntelligence.NotFoundError}
684
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
685
+ *
686
+ * @example
687
+ * await client.assets.listActivity({
688
+ * asset_id: "asset_id"
689
+ * })
690
+ */
691
+ listActivity(request, requestOptions) {
692
+ return core.HttpResponsePromise.fromPromise(this.__listActivity(request, requestOptions));
693
+ }
694
+ __listActivity(request, requestOptions) {
695
+ return __awaiter(this, void 0, void 0, function* () {
696
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
697
+ const { asset_id: assetId, limit, to_clock: toClock } = request;
698
+ const _queryParams = {};
699
+ if (limit != null) {
700
+ _queryParams.limit = limit.toString();
701
+ }
702
+ if (toClock !== undefined) {
703
+ _queryParams.to_clock = (_a = toClock === null || toClock === void 0 ? void 0 : toClock.toString()) !== null && _a !== void 0 ? _a : null;
704
+ }
705
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
706
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
707
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
708
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/activity`),
709
+ method: "GET",
710
+ headers: _headers,
711
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
712
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
713
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
714
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
715
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
716
+ logging: this._options.logging,
717
+ });
718
+ if (_response.ok) {
719
+ return {
720
+ data: _response.body,
721
+ rawResponse: _response.rawResponse,
722
+ };
723
+ }
724
+ if (_response.error.reason === "status-code") {
725
+ switch (_response.error.statusCode) {
726
+ case 401:
727
+ throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
728
+ case 403:
729
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
730
+ case 404:
731
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
732
+ case 422:
733
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
734
+ default:
735
+ throw new errors.AthenaIntelligenceError({
736
+ statusCode: _response.error.statusCode,
737
+ body: _response.error.body,
738
+ rawResponse: _response.rawResponse,
739
+ });
740
+ }
741
+ }
742
+ switch (_response.error.reason) {
743
+ case "non-json":
744
+ throw new errors.AthenaIntelligenceError({
745
+ statusCode: _response.error.statusCode,
746
+ body: _response.error.rawBody,
747
+ rawResponse: _response.rawResponse,
748
+ });
749
+ case "body-is-null":
750
+ throw new errors.AthenaIntelligenceError({
751
+ statusCode: _response.error.statusCode,
752
+ rawResponse: _response.rawResponse,
753
+ });
754
+ case "timeout":
755
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/assets/{asset_id}/activity.");
756
+ case "unknown":
757
+ throw new errors.AthenaIntelligenceError({
758
+ message: _response.error.errorMessage,
759
+ rawResponse: _response.rawResponse,
760
+ });
761
+ }
762
+ });
763
+ }
764
+ /**
765
+ * Admin only. Report what changed between two Keryx clocks — for spreadsheets, the per-cell before/after values; for documents, the inserted and deleted text; for presentations, the affected slides. Take the clocks from the activity endpoint. Computed by the same differ the in-app Activity pane renders, so the payload matches what a user sees. Always inspect delta.coverage: caps and non-decodable bulk regions are reported there rather than silently omitted.
766
+ *
767
+ * @param {AthenaIntelligence.GetActivityDeltaAssetsRequest} request
768
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
769
+ *
770
+ * @throws {@link AthenaIntelligence.BadRequestError}
771
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
772
+ * @throws {@link AthenaIntelligence.ForbiddenError}
773
+ * @throws {@link AthenaIntelligence.NotFoundError}
774
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
775
+ *
776
+ * @example
777
+ * await client.assets.getActivityDelta({
778
+ * asset_id: "asset_id",
779
+ * from: 1,
780
+ * to: 1
781
+ * })
782
+ */
783
+ getActivityDelta(request, requestOptions) {
784
+ return core.HttpResponsePromise.fromPromise(this.__getActivityDelta(request, requestOptions));
785
+ }
786
+ __getActivityDelta(request, requestOptions) {
787
+ return __awaiter(this, void 0, void 0, function* () {
788
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
789
+ const { asset_id: assetId, from: from_, to } = request;
790
+ const _queryParams = {};
791
+ _queryParams.from = from_.toString();
792
+ _queryParams.to = to.toString();
793
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
794
+ 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);
795
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
796
+ 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(assetId)}/activity/delta`),
797
+ method: "GET",
798
+ headers: _headers,
799
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
800
+ 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,
801
+ 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,
802
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
803
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
804
+ logging: this._options.logging,
805
+ });
806
+ if (_response.ok) {
807
+ return {
808
+ data: _response.body,
809
+ rawResponse: _response.rawResponse,
810
+ };
811
+ }
812
+ if (_response.error.reason === "status-code") {
813
+ switch (_response.error.statusCode) {
814
+ case 400:
815
+ throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
816
+ case 401:
817
+ throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
818
+ case 403:
819
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
820
+ case 404:
821
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
822
+ case 422:
823
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
824
+ default:
825
+ throw new errors.AthenaIntelligenceError({
826
+ statusCode: _response.error.statusCode,
827
+ body: _response.error.body,
828
+ rawResponse: _response.rawResponse,
829
+ });
830
+ }
831
+ }
832
+ switch (_response.error.reason) {
833
+ case "non-json":
834
+ throw new errors.AthenaIntelligenceError({
835
+ statusCode: _response.error.statusCode,
836
+ body: _response.error.rawBody,
837
+ rawResponse: _response.rawResponse,
838
+ });
839
+ case "body-is-null":
840
+ throw new errors.AthenaIntelligenceError({
841
+ statusCode: _response.error.statusCode,
842
+ rawResponse: _response.rawResponse,
843
+ });
844
+ case "timeout":
845
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/assets/{asset_id}/activity/delta.");
846
+ case "unknown":
847
+ throw new errors.AthenaIntelligenceError({
848
+ message: _response.error.errorMessage,
849
+ rawResponse: _response.rawResponse,
850
+ });
851
+ }
852
+ });
853
+ }
854
+ /**
855
+ * Admin only. Batch form of the activity-delta endpoint: diff several clock ranges in one request. Prefer this when walking a whole log — one call computes every range in a single pass over the document instead of one request each (up to 25 per call). Results come back in request order, and a range that could not be read carries its own `error` instead of failing the batch. Same payload and `coverage` semantics as the single-range endpoint.
856
+ *
857
+ * @param {AthenaIntelligence.AssetActivityDeltaBatchRequestIn} request
858
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
859
+ *
860
+ * @throws {@link AthenaIntelligence.BadRequestError}
861
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
862
+ * @throws {@link AthenaIntelligence.ForbiddenError}
863
+ * @throws {@link AthenaIntelligence.NotFoundError}
864
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
865
+ *
866
+ * @example
867
+ * await client.assets.getActivityDeltas({
868
+ * asset_id: "asset_id",
869
+ * ranges: [{
870
+ * from: 1752694811020,
871
+ * to: 1752694813551
872
+ * }, {
873
+ * from: 1752691402184,
874
+ * to: 1752691409776
875
+ * }]
876
+ * })
877
+ */
878
+ getActivityDeltas(request, requestOptions) {
879
+ return core.HttpResponsePromise.fromPromise(this.__getActivityDeltas(request, requestOptions));
880
+ }
881
+ __getActivityDeltas(request, requestOptions) {
882
+ return __awaiter(this, void 0, void 0, function* () {
883
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
884
+ const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
885
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
886
+ 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);
887
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
888
+ 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(assetId)}/activity/deltas`),
889
+ method: "POST",
890
+ headers: _headers,
891
+ contentType: "application/json",
892
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
893
+ requestType: "json",
894
+ body: _body,
895
+ 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,
896
+ 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,
897
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
898
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
899
+ logging: this._options.logging,
900
+ });
901
+ if (_response.ok) {
902
+ return {
903
+ data: _response.body,
904
+ rawResponse: _response.rawResponse,
905
+ };
906
+ }
907
+ if (_response.error.reason === "status-code") {
908
+ switch (_response.error.statusCode) {
909
+ case 400:
910
+ throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
911
+ case 401:
912
+ throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
913
+ case 403:
914
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
915
+ case 404:
916
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
917
+ case 422:
918
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
919
+ default:
920
+ throw new errors.AthenaIntelligenceError({
921
+ statusCode: _response.error.statusCode,
922
+ body: _response.error.body,
923
+ rawResponse: _response.rawResponse,
924
+ });
925
+ }
926
+ }
927
+ switch (_response.error.reason) {
928
+ case "non-json":
929
+ throw new errors.AthenaIntelligenceError({
930
+ statusCode: _response.error.statusCode,
931
+ body: _response.error.rawBody,
932
+ rawResponse: _response.rawResponse,
933
+ });
934
+ case "body-is-null":
935
+ throw new errors.AthenaIntelligenceError({
936
+ statusCode: _response.error.statusCode,
937
+ rawResponse: _response.rawResponse,
938
+ });
939
+ case "timeout":
940
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/assets/{asset_id}/activity/deltas.");
941
+ case "unknown":
942
+ throw new errors.AthenaIntelligenceError({
943
+ message: _response.error.errorMessage,
944
+ rawResponse: _response.rawResponse,
945
+ });
946
+ }
947
+ });
948
+ }
675
949
  /**
676
950
  * 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.
677
951
  *
@@ -0,0 +1,19 @@
1
+ import type * as AthenaIntelligence from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * asset_id: "asset_id",
6
+ * ranges: [{
7
+ * from: 1752694811020,
8
+ * to: 1752694813551
9
+ * }, {
10
+ * from: 1752691402184,
11
+ * to: 1752691409776
12
+ * }]
13
+ * }
14
+ */
15
+ export interface AssetActivityDeltaBatchRequestIn {
16
+ asset_id: string;
17
+ /** Activity clock ranges to diff, at most 25 per call. Results are returned in request order. */
18
+ ranges: AthenaIntelligence.ActivityClockRangeIn[];
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * asset_id: "asset_id",
5
+ * from: 1,
6
+ * to: 1
7
+ * }
8
+ */
9
+ export interface GetActivityDeltaAssetsRequest {
10
+ asset_id: string;
11
+ /** Start clock, from an activity item's from_clock. */
12
+ from: number;
13
+ /** End clock, from the same activity item's to_clock. */
14
+ to: number;
15
+ }
@@ -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,13 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * asset_id: "asset_id"
5
+ * }
6
+ */
7
+ export interface ListActivityAssetsRequest {
8
+ asset_id: string;
9
+ /** Maximum items to return. */
10
+ limit?: number;
11
+ /** Return only items at or before this clock. Pass the previous response's next_page_to_clock to page backwards through history. */
12
+ to_clock?: number | null;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +1,13 @@
1
1
  export type { ArchiveAssetsRequest } from "./ArchiveAssetsRequest.js";
2
+ export type { AssetActivityDeltaBatchRequestIn } from "./AssetActivityDeltaBatchRequestIn.js";
2
3
  export type { ConvertExcelToSheetRequestIn } from "./ConvertExcelToSheetRequestIn.js";
3
4
  export type { CreateAssetRequestIn } from "./CreateAssetRequestIn.js";
4
5
  export type { CreateProjectRequestIn } from "./CreateProjectRequestIn.js";
5
6
  export type { DownloadAssetsRequest } from "./DownloadAssetsRequest.js";
6
7
  export type { DuplicateAssetRequestIn } from "./DuplicateAssetRequestIn.js";
8
+ export type { GetActivityDeltaAssetsRequest } from "./GetActivityDeltaAssetsRequest.js";
7
9
  export type { GetAssetsRequest } from "./GetAssetsRequest.js";
10
+ export type { ListActivityAssetsRequest } from "./ListActivityAssetsRequest.js";
8
11
  export type { ListAssetsRequest } from "./ListAssetsRequest.js";
9
12
  export type { MoveAssetRequestIn } from "./MoveAssetRequestIn.js";
10
13
  export type { RenameAssetRequestIn } from "./RenameAssetRequestIn.js";
@@ -35,7 +35,7 @@ export declare class DatabasesClient {
35
35
  * asset_id: "asset_id"
36
36
  * })
37
37
  */
38
- getStatus(request: AthenaIntelligence.GetStatusDatabasesRequest, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.AgoraWebApiPublicV0ModelsDatabaseDataDatabaseStatusResponse>;
38
+ getStatus(request: AthenaIntelligence.GetStatusDatabasesRequest, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.DatabaseStatusResponse>;
39
39
  private __getStatus;
40
40
  /**
41
41
  * Get a list of all tables in the database with optional row counts.
@@ -147,12 +147,13 @@ export declare class ToolsClient {
147
147
  rawData(request: AthenaIntelligence.RawDataToolsRequest, requestOptions?: ToolsClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
148
148
  private __rawData;
149
149
  /**
150
- * Save a file as an asset in the user's workspace.
150
+ * Save a file as an asset in the target workspace.
151
151
  *
152
152
  * @param {AthenaIntelligence.BodySaveAssetApiV0ToolsFileSavePost} request
153
153
  * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
154
154
  *
155
155
  * @throws {@link AthenaIntelligence.BadRequestError}
156
+ * @throws {@link AthenaIntelligence.ForbiddenError}
156
157
  * @throws {@link AthenaIntelligence.ContentTooLargeError}
157
158
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
158
159
  *
@@ -730,12 +730,13 @@ class ToolsClient {
730
730
  });
731
731
  }
732
732
  /**
733
- * Save a file as an asset in the user's workspace.
733
+ * Save a file as an asset in the target workspace.
734
734
  *
735
735
  * @param {AthenaIntelligence.BodySaveAssetApiV0ToolsFileSavePost} request
736
736
  * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
737
737
  *
738
738
  * @throws {@link AthenaIntelligence.BadRequestError}
739
+ * @throws {@link AthenaIntelligence.ForbiddenError}
739
740
  * @throws {@link AthenaIntelligence.ContentTooLargeError}
740
741
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
741
742
  *
@@ -755,6 +756,9 @@ class ToolsClient {
755
756
  if (request.parent_folder_id !== undefined) {
756
757
  _queryParams.parent_folder_id = request.parent_folder_id;
757
758
  }
759
+ if (request.workspace_id !== undefined) {
760
+ _queryParams.workspace_id = request.workspace_id;
761
+ }
758
762
  const _request = yield core.newFormData();
759
763
  yield _request.appendFile("file", request.file);
760
764
  const _maybeEncodedRequest = yield _request.getRequest();
@@ -784,6 +788,8 @@ class ToolsClient {
784
788
  switch (_response.error.statusCode) {
785
789
  case 400:
786
790
  throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
791
+ case 403:
792
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
787
793
  case 413:
788
794
  throw new AthenaIntelligence.ContentTooLargeError(_response.error.body, _response.rawResponse);
789
795
  case 422:
@@ -8,5 +8,7 @@ import type * as core from "../../../../../core/index.js";
8
8
  export interface BodySaveAssetApiV0ToolsFileSavePost {
9
9
  /** Identifier of the folder into which the asset should be saved */
10
10
  parent_folder_id?: string | null;
11
+ /** Identifier of the workspace to save the asset into. Defaults to the caller's current workspace. The caller must be a member of the specified workspace. */
12
+ workspace_id?: string | null;
11
13
  file: core.file.Uploadable;
12
14
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * One activity item's clock range, from the activity endpoint.
3
+ */
4
+ export interface ActivityClockRangeIn {
5
+ /** Start clock, from an activity item's from_clock. */
6
+ from: number;
7
+ /** End clock, from the same activity item's to_clock. */
8
+ to: number;
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,11 @@
1
+ /**
2
+ * The change one activity item made, or why it is unavailable.
3
+ */
4
+ export interface ActivityDeltaOut {
5
+ /** The change itself. Always carries kind, type, summary, totals, and coverage; typed detail (cell_changes, slide_changes, inserted_text, ...) varies by kind. Null when error is set. */
6
+ delta?: Record<string, unknown> | null;
7
+ /** Why this range could not be diffed. Null on success. */
8
+ error?: string | null;
9
+ from_clock: number;
10
+ to_clock: number;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ /**
2
+ * One entry in an asset's activity log.
3
+ */
4
+ export interface ActivityItemOut {
5
+ /** Who made the edit: 'user', 'agent', 'canvas-ai', 'rollback', or 'version-restore'. Matches the in-app Activity pane. */
6
+ actor_type: string;
7
+ /** Attribution metadata carried by the edit. Common keys: user_id, agent_id, session_id, user_message_tracking_id, ai_message_tracking_id, source. Join session_id against your trace store to link an edit to the run that produced it. */
8
+ attributions?: Record<string, string>;
9
+ /** Raw Keryx author id. 'backend-service' for agent writes; a user id for direct edits. Prefer actor_type for classification. */
10
+ by: string;
11
+ /** Keryx clock at the start of the edit, in epoch milliseconds. Use with to_clock to request this item's delta. */
12
+ from_clock: number;
13
+ /** from_clock as an ISO-8601 UTC timestamp; empty if not a timestamp. */
14
+ from_iso: string;
15
+ /** Keryx clock at the end of the edit, in epoch milliseconds. */
16
+ to_clock: number;
17
+ /** to_clock as an ISO-8601 UTC timestamp; empty if not a timestamp. */
18
+ to_iso: string;
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import type * as AthenaIntelligence from "../index.js";
2
+ /**
3
+ * Deltas for the requested clock ranges.
4
+ */
5
+ export interface AssetActivityDeltaResponseOut {
6
+ asset_id: string;
7
+ asset_type: string;
8
+ deltas: AthenaIntelligence.ActivityDeltaOut[];
9
+ /** Version of the delta payload shape. Detail fields are added additively within a version; a breaking change bumps it. */
10
+ schema_version: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import type * as AthenaIntelligence from "../index.js";
2
+ /**
3
+ * A page of an asset's activity log, newest edit first.
4
+ */
5
+ export interface AssetActivityResponseOut {
6
+ asset_id: string;
7
+ /** The asset's Athena type. */
8
+ asset_type: string;
9
+ items: AthenaIntelligence.ActivityItemOut[];
10
+ /** Pass as to_clock to fetch the next (older) page. Null when the log has been fully read. */
11
+ next_page_to_clock?: number | null;
12
+ /** Number of items in this page. */
13
+ returned: number;
14
+ }
@@ -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 });
@@ -4,7 +4,7 @@
4
4
  * Used to determine if a serverless database is running or suspended
5
5
  * (scale-to-zero). Poll this endpoint to know when a database is ready.
6
6
  */
7
- export interface AgoraWebApiPublicV0ModelsDatabaseDataDatabaseStatusResponse {
7
+ export interface DatabaseStatusResponse {
8
8
  /** The database asset ID */
9
9
  asset_id: string;
10
10
  /** Optional status message or error details */
@@ -12,9 +12,9 @@ export interface AgoraWebApiPublicV0ModelsDatabaseDataDatabaseStatusResponse {
12
12
  /** Database provider ('neon_cloud' or 'kronos') */
13
13
  provider: string;
14
14
  /** Standardized database status */
15
- status: AgoraWebApiPublicV0ModelsDatabaseDataDatabaseStatusResponse.Status;
15
+ status: DatabaseStatusResponse.Status;
16
16
  }
17
- export declare namespace AgoraWebApiPublicV0ModelsDatabaseDataDatabaseStatusResponse {
17
+ export declare namespace DatabaseStatusResponse {
18
18
  /** Standardized database status */
19
19
  const Status: {
20
20
  readonly Running: "running";