@athenaintel/sdk 4.3.2213 → 4.3.2215

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 (34) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/errors/GoneError.d.ts +5 -0
  3. package/dist/cjs/api/errors/GoneError.js +50 -0
  4. package/dist/cjs/api/errors/index.d.ts +1 -0
  5. package/dist/cjs/api/errors/index.js +1 -0
  6. package/dist/cjs/api/resources/assets/client/Client.d.ts +2 -1
  7. package/dist/cjs/api/resources/assets/client/Client.js +4 -1
  8. package/dist/cjs/api/resources/assets/client/requests/CreateAssetRequestIn.d.ts +12 -0
  9. package/dist/cjs/api/resources/users/client/Client.d.ts +10 -0
  10. package/dist/cjs/api/resources/users/client/Client.js +64 -0
  11. package/dist/cjs/api/types/MeEmailPreferencesResponseOut.d.ts +13 -0
  12. package/dist/cjs/api/types/MeEmailPreferencesResponseOut.js +3 -0
  13. package/dist/cjs/api/types/index.d.ts +1 -0
  14. package/dist/cjs/api/types/index.js +1 -0
  15. package/dist/cjs/version.d.ts +1 -1
  16. package/dist/cjs/version.js +1 -1
  17. package/dist/esm/BaseClient.mjs +2 -2
  18. package/dist/esm/api/errors/GoneError.d.mts +5 -0
  19. package/dist/esm/api/errors/GoneError.mjs +13 -0
  20. package/dist/esm/api/errors/index.d.mts +1 -0
  21. package/dist/esm/api/errors/index.mjs +1 -0
  22. package/dist/esm/api/resources/assets/client/Client.d.mts +2 -1
  23. package/dist/esm/api/resources/assets/client/Client.mjs +4 -1
  24. package/dist/esm/api/resources/assets/client/requests/CreateAssetRequestIn.d.mts +12 -0
  25. package/dist/esm/api/resources/users/client/Client.d.mts +10 -0
  26. package/dist/esm/api/resources/users/client/Client.mjs +64 -0
  27. package/dist/esm/api/types/MeEmailPreferencesResponseOut.d.mts +13 -0
  28. package/dist/esm/api/types/MeEmailPreferencesResponseOut.mjs +2 -0
  29. package/dist/esm/api/types/index.d.mts +1 -0
  30. package/dist/esm/api/types/index.mjs +1 -0
  31. package/dist/esm/version.d.mts +1 -1
  32. package/dist/esm/version.mjs +1 -1
  33. package/package.json +1 -1
  34. package/reference.md +56 -1
@@ -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.2213",
47
- "User-Agent": "@athenaintel/sdk/4.3.2213",
46
+ "X-Fern-SDK-Version": "4.3.2215",
47
+ "User-Agent": "@athenaintel/sdk/4.3.2215",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  "X-Athena-Session-Credential": options === null || options === void 0 ? void 0 : options.sessionCredential,
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ export declare class GoneError extends errors.AthenaIntelligenceError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.GoneError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class GoneError extends errors.AthenaIntelligenceError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "GoneError",
43
+ statusCode: 410,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, GoneError.prototype);
48
+ }
49
+ }
50
+ exports.GoneError = GoneError;
@@ -3,6 +3,7 @@ export * from "./BadRequestError.js";
3
3
  export * from "./ConflictError.js";
4
4
  export * from "./ContentTooLargeError.js";
5
5
  export * from "./ForbiddenError.js";
6
+ export * from "./GoneError.js";
6
7
  export * from "./InternalServerError.js";
7
8
  export * from "./NotFoundError.js";
8
9
  export * from "./NotImplementedError.js";
@@ -19,6 +19,7 @@ __exportStar(require("./BadRequestError.js"), exports);
19
19
  __exportStar(require("./ConflictError.js"), exports);
20
20
  __exportStar(require("./ContentTooLargeError.js"), exports);
21
21
  __exportStar(require("./ForbiddenError.js"), exports);
22
+ __exportStar(require("./GoneError.js"), exports);
22
23
  __exportStar(require("./InternalServerError.js"), exports);
23
24
  __exportStar(require("./NotFoundError.js"), exports);
24
25
  __exportStar(require("./NotImplementedError.js"), exports);
@@ -48,13 +48,14 @@ export declare class AssetsClient {
48
48
  convertExcelToSheet(request: AthenaIntelligence.ConvertExcelToSheetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertExcelToSheetResponseOut>;
49
49
  private __convertExcelToSheet;
50
50
  /**
51
- * Create a new asset such as a spreadsheet, document, folder, database, computer, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. In capability enforce mode, computer creation requires computer.create and returns 403 when denied.
51
+ * Create a new asset such as a spreadsheet, document, folder, database, computer, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied.
52
52
  *
53
53
  * @param {AthenaIntelligence.CreateAssetRequestIn} request
54
54
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
55
55
  *
56
56
  * @throws {@link AthenaIntelligence.BadRequestError}
57
57
  * @throws {@link AthenaIntelligence.ForbiddenError}
58
+ * @throws {@link AthenaIntelligence.GoneError}
58
59
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
59
60
  * @throws {@link AthenaIntelligence.InternalServerError}
60
61
  * @throws {@link AthenaIntelligence.ServiceUnavailableError}
@@ -248,13 +248,14 @@ class AssetsClient {
248
248
  });
249
249
  }
250
250
  /**
251
- * Create a new asset such as a spreadsheet, document, folder, database, computer, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. In capability enforce mode, computer creation requires computer.create and returns 403 when denied.
251
+ * Create a new asset such as a spreadsheet, document, folder, database, computer, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied.
252
252
  *
253
253
  * @param {AthenaIntelligence.CreateAssetRequestIn} request
254
254
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
255
255
  *
256
256
  * @throws {@link AthenaIntelligence.BadRequestError}
257
257
  * @throws {@link AthenaIntelligence.ForbiddenError}
258
+ * @throws {@link AthenaIntelligence.GoneError}
258
259
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
259
260
  * @throws {@link AthenaIntelligence.InternalServerError}
260
261
  * @throws {@link AthenaIntelligence.ServiceUnavailableError}
@@ -302,6 +303,8 @@ class AssetsClient {
302
303
  throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
303
304
  case 403:
304
305
  throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
306
+ case 410:
307
+ throw new AthenaIntelligence.GoneError(_response.error.body, _response.rawResponse);
305
308
  case 422:
306
309
  throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
307
310
  case 500:
@@ -10,8 +10,20 @@ import type * as AthenaIntelligence from "../../../../index.js";
10
10
  export interface CreateAssetRequestIn {
11
11
  /** Type of asset to create. Supported types: 'spreadsheet' (or 'sheet'), 'document' (or 'doc'), 'folder', 'database' (or 'db'), 'computer' */
12
12
  asset_type: AthenaIntelligence.CreatableAssetType;
13
+ /** Computer only. vCPU count. Defaults to the template's default. Must be a size the environment's computer resource policy offers; sizes other than the template default require an admin. */
14
+ cpu?: number | null;
15
+ /** Computer only. Disk size in GiB. Defaults to the template's default. Same policy and admin rules as cpu. */
16
+ disk?: number | null;
17
+ /** Computer only. Environment variables to set on the computer. Must include every key the template or environment requires. Also accepted as 'envVars'. */
18
+ env_vars?: Record<string, string | null> | null;
19
+ /** Computer only. Memory in GiB. Defaults to the template's default. Same policy and admin rules as cpu. */
20
+ memory?: number | null;
13
21
  /** ID of the parent folder to create the asset in */
14
22
  parent_folder_id?: string | null;
23
+ /** Computer only. Runtime provider for the computer (e.g. 'talos_v2'). Defaults to the environment's configured computer provider. */
24
+ provider?: string | null;
25
+ /** Computer only. Template key to create the computer from, as picked in the Athena UI's computer creation dialog (e.g. 'default'), or an 'environment:<asset_id>' reference to a saved environment. Defaults to the default template. Also accepted as 'snapshot'. */
26
+ template?: string | null;
15
27
  /** Title for the new asset */
16
28
  title?: string | null;
17
29
  /** ID of the workspace to create the asset in. If not provided, the asset is created in the user's current workspace. The user must be a member of the specified workspace. */
@@ -21,6 +21,16 @@ export declare class UsersClient {
21
21
  */
22
22
  me(requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.UserInfoOut>;
23
23
  private __me;
24
+ /**
25
+ * The caller's email preferences for agent-sent mail in their current workspace: the domains and specific addresses they have approved as recipients, plus their custom drafting instruction. Built for computer-asset apps that compose or send email on the user's behalf, so they apply the same recipient policy the chat email tools enforce — a recipient is approved when its full address is in `approved_emails` or its domain is in `approved_domains` (both compared case-insensitively). Read-only: the policy is edited from Settings → Email & Meetings (`manage_url`).
26
+ *
27
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @example
30
+ * await client.users.meEmailPreferences()
31
+ */
32
+ meEmailPreferences(requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.MeEmailPreferencesResponseOut>;
33
+ private __meEmailPreferences;
24
34
  /**
25
35
  * Counts of the caller's connected Microsoft 365 sources (mail, files, sites, chats) plus live SharePoint provisioning progress. Built for computer-asset apps to render a 'setting up your sources' state right after a viewer's first sign-in, while the background fan-outs are still filling in SharePoint and Teams.
26
36
  *
@@ -115,6 +115,70 @@ class UsersClient {
115
115
  }
116
116
  });
117
117
  }
118
+ /**
119
+ * The caller's email preferences for agent-sent mail in their current workspace: the domains and specific addresses they have approved as recipients, plus their custom drafting instruction. Built for computer-asset apps that compose or send email on the user's behalf, so they apply the same recipient policy the chat email tools enforce — a recipient is approved when its full address is in `approved_emails` or its domain is in `approved_domains` (both compared case-insensitively). Read-only: the policy is edited from Settings → Email & Meetings (`manage_url`).
120
+ *
121
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
122
+ *
123
+ * @example
124
+ * await client.users.meEmailPreferences()
125
+ */
126
+ meEmailPreferences(requestOptions) {
127
+ return core.HttpResponsePromise.fromPromise(this.__meEmailPreferences(requestOptions));
128
+ }
129
+ __meEmailPreferences(requestOptions) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
132
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
133
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
134
+ "X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
135
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
136
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
137
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/me/email-preferences"),
138
+ method: "GET",
139
+ headers: _headers,
140
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
141
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
142
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
143
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
144
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
145
+ logging: this._options.logging,
146
+ });
147
+ if (_response.ok) {
148
+ return {
149
+ data: _response.body,
150
+ rawResponse: _response.rawResponse,
151
+ };
152
+ }
153
+ if (_response.error.reason === "status-code") {
154
+ throw new errors.AthenaIntelligenceError({
155
+ statusCode: _response.error.statusCode,
156
+ body: _response.error.body,
157
+ rawResponse: _response.rawResponse,
158
+ });
159
+ }
160
+ switch (_response.error.reason) {
161
+ case "non-json":
162
+ throw new errors.AthenaIntelligenceError({
163
+ statusCode: _response.error.statusCode,
164
+ body: _response.error.rawBody,
165
+ rawResponse: _response.rawResponse,
166
+ });
167
+ case "body-is-null":
168
+ throw new errors.AthenaIntelligenceError({
169
+ statusCode: _response.error.statusCode,
170
+ rawResponse: _response.rawResponse,
171
+ });
172
+ case "timeout":
173
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/me/email-preferences.");
174
+ case "unknown":
175
+ throw new errors.AthenaIntelligenceError({
176
+ message: _response.error.errorMessage,
177
+ rawResponse: _response.rawResponse,
178
+ });
179
+ }
180
+ });
181
+ }
118
182
  /**
119
183
  * Counts of the caller's connected Microsoft 365 sources (mail, files, sites, chats) plus live SharePoint provisioning progress. Built for computer-asset apps to render a 'setting up your sources' state right after a viewer's first sign-in, while the background fan-outs are still filling in SharePoint and Teams.
120
184
  *
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The caller's approved-recipient policy for agent-sent email.
3
+ */
4
+ export interface MeEmailPreferencesResponseOut {
5
+ /** Domains the agent may email anyone at, as bare lowercase domains (`acme.com`). Match a recipient's domain against this list. */
6
+ approved_domains: string[];
7
+ /** Specific addresses the agent may email, lowercase (`user@acme.com`). Match the whole recipient address against this list. */
8
+ approved_emails: string[];
9
+ /** Free-text guidance the user wants followed whenever an agent drafts email on their behalf; null when none is set. */
10
+ custom_instruction?: string | null;
11
+ /** Where the user edits this policy (Settings → Email & Meetings). Send the user here when a recipient is not approved; the policy cannot be changed through this API. */
12
+ manage_url: string;
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 });
@@ -83,6 +83,7 @@ export * from "./InitializationRecipeStage.js";
83
83
  export * from "./InitializationState.js";
84
84
  export * from "./InputMessage.js";
85
85
  export * from "./InputMessageContentOneItem.js";
86
+ export * from "./MeEmailPreferencesResponseOut.js";
86
87
  export * from "./MeetingArtifactsOut.js";
87
88
  export * from "./MeetingOut.js";
88
89
  export * from "./MeetingParticipantOut.js";
@@ -99,6 +99,7 @@ __exportStar(require("./InitializationRecipeStage.js"), exports);
99
99
  __exportStar(require("./InitializationState.js"), exports);
100
100
  __exportStar(require("./InputMessage.js"), exports);
101
101
  __exportStar(require("./InputMessageContentOneItem.js"), exports);
102
+ __exportStar(require("./MeEmailPreferencesResponseOut.js"), exports);
102
103
  __exportStar(require("./MeetingArtifactsOut.js"), exports);
103
104
  __exportStar(require("./MeetingOut.js"), exports);
104
105
  __exportStar(require("./MeetingParticipantOut.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.2213";
1
+ export declare const SDK_VERSION = "4.3.2215";
@@ -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.2213";
4
+ exports.SDK_VERSION = "4.3.2215";
@@ -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.2213",
10
- "User-Agent": "@athenaintel/sdk/4.3.2213",
9
+ "X-Fern-SDK-Version": "4.3.2215",
10
+ "User-Agent": "@athenaintel/sdk/4.3.2215",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  "X-Athena-Session-Credential": options === null || options === void 0 ? void 0 : options.sessionCredential,
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../core/index.mjs";
2
+ import * as errors from "../../errors/index.mjs";
3
+ export declare class GoneError extends errors.AthenaIntelligenceError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../errors/index.mjs";
3
+ export class GoneError extends errors.AthenaIntelligenceError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "GoneError",
7
+ statusCode: 410,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, GoneError.prototype);
12
+ }
13
+ }
@@ -3,6 +3,7 @@ export * from "./BadRequestError.mjs";
3
3
  export * from "./ConflictError.mjs";
4
4
  export * from "./ContentTooLargeError.mjs";
5
5
  export * from "./ForbiddenError.mjs";
6
+ export * from "./GoneError.mjs";
6
7
  export * from "./InternalServerError.mjs";
7
8
  export * from "./NotFoundError.mjs";
8
9
  export * from "./NotImplementedError.mjs";
@@ -3,6 +3,7 @@ export * from "./BadRequestError.mjs";
3
3
  export * from "./ConflictError.mjs";
4
4
  export * from "./ContentTooLargeError.mjs";
5
5
  export * from "./ForbiddenError.mjs";
6
+ export * from "./GoneError.mjs";
6
7
  export * from "./InternalServerError.mjs";
7
8
  export * from "./NotFoundError.mjs";
8
9
  export * from "./NotImplementedError.mjs";
@@ -48,13 +48,14 @@ export declare class AssetsClient {
48
48
  convertExcelToSheet(request: AthenaIntelligence.ConvertExcelToSheetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertExcelToSheetResponseOut>;
49
49
  private __convertExcelToSheet;
50
50
  /**
51
- * Create a new asset such as a spreadsheet, document, folder, database, computer, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. In capability enforce mode, computer creation requires computer.create and returns 403 when denied.
51
+ * Create a new asset such as a spreadsheet, document, folder, database, computer, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied.
52
52
  *
53
53
  * @param {AthenaIntelligence.CreateAssetRequestIn} request
54
54
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
55
55
  *
56
56
  * @throws {@link AthenaIntelligence.BadRequestError}
57
57
  * @throws {@link AthenaIntelligence.ForbiddenError}
58
+ * @throws {@link AthenaIntelligence.GoneError}
58
59
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
59
60
  * @throws {@link AthenaIntelligence.InternalServerError}
60
61
  * @throws {@link AthenaIntelligence.ServiceUnavailableError}
@@ -212,13 +212,14 @@ export class AssetsClient {
212
212
  });
213
213
  }
214
214
  /**
215
- * Create a new asset such as a spreadsheet, document, folder, database, computer, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. In capability enforce mode, computer creation requires computer.create and returns 403 when denied.
215
+ * Create a new asset such as a spreadsheet, document, folder, database, computer, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied.
216
216
  *
217
217
  * @param {AthenaIntelligence.CreateAssetRequestIn} request
218
218
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
219
219
  *
220
220
  * @throws {@link AthenaIntelligence.BadRequestError}
221
221
  * @throws {@link AthenaIntelligence.ForbiddenError}
222
+ * @throws {@link AthenaIntelligence.GoneError}
222
223
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
223
224
  * @throws {@link AthenaIntelligence.InternalServerError}
224
225
  * @throws {@link AthenaIntelligence.ServiceUnavailableError}
@@ -266,6 +267,8 @@ export class AssetsClient {
266
267
  throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
267
268
  case 403:
268
269
  throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
270
+ case 410:
271
+ throw new AthenaIntelligence.GoneError(_response.error.body, _response.rawResponse);
269
272
  case 422:
270
273
  throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
271
274
  case 500:
@@ -10,8 +10,20 @@ import type * as AthenaIntelligence from "../../../../index.mjs";
10
10
  export interface CreateAssetRequestIn {
11
11
  /** Type of asset to create. Supported types: 'spreadsheet' (or 'sheet'), 'document' (or 'doc'), 'folder', 'database' (or 'db'), 'computer' */
12
12
  asset_type: AthenaIntelligence.CreatableAssetType;
13
+ /** Computer only. vCPU count. Defaults to the template's default. Must be a size the environment's computer resource policy offers; sizes other than the template default require an admin. */
14
+ cpu?: number | null;
15
+ /** Computer only. Disk size in GiB. Defaults to the template's default. Same policy and admin rules as cpu. */
16
+ disk?: number | null;
17
+ /** Computer only. Environment variables to set on the computer. Must include every key the template or environment requires. Also accepted as 'envVars'. */
18
+ env_vars?: Record<string, string | null> | null;
19
+ /** Computer only. Memory in GiB. Defaults to the template's default. Same policy and admin rules as cpu. */
20
+ memory?: number | null;
13
21
  /** ID of the parent folder to create the asset in */
14
22
  parent_folder_id?: string | null;
23
+ /** Computer only. Runtime provider for the computer (e.g. 'talos_v2'). Defaults to the environment's configured computer provider. */
24
+ provider?: string | null;
25
+ /** Computer only. Template key to create the computer from, as picked in the Athena UI's computer creation dialog (e.g. 'default'), or an 'environment:<asset_id>' reference to a saved environment. Defaults to the default template. Also accepted as 'snapshot'. */
26
+ template?: string | null;
15
27
  /** Title for the new asset */
16
28
  title?: string | null;
17
29
  /** ID of the workspace to create the asset in. If not provided, the asset is created in the user's current workspace. The user must be a member of the specified workspace. */
@@ -21,6 +21,16 @@ export declare class UsersClient {
21
21
  */
22
22
  me(requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.UserInfoOut>;
23
23
  private __me;
24
+ /**
25
+ * The caller's email preferences for agent-sent mail in their current workspace: the domains and specific addresses they have approved as recipients, plus their custom drafting instruction. Built for computer-asset apps that compose or send email on the user's behalf, so they apply the same recipient policy the chat email tools enforce — a recipient is approved when its full address is in `approved_emails` or its domain is in `approved_domains` (both compared case-insensitively). Read-only: the policy is edited from Settings → Email & Meetings (`manage_url`).
26
+ *
27
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @example
30
+ * await client.users.meEmailPreferences()
31
+ */
32
+ meEmailPreferences(requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.MeEmailPreferencesResponseOut>;
33
+ private __meEmailPreferences;
24
34
  /**
25
35
  * Counts of the caller's connected Microsoft 365 sources (mail, files, sites, chats) plus live SharePoint provisioning progress. Built for computer-asset apps to render a 'setting up your sources' state right after a viewer's first sign-in, while the background fan-outs are still filling in SharePoint and Teams.
26
36
  *
@@ -79,6 +79,70 @@ export class UsersClient {
79
79
  }
80
80
  });
81
81
  }
82
+ /**
83
+ * The caller's email preferences for agent-sent mail in their current workspace: the domains and specific addresses they have approved as recipients, plus their custom drafting instruction. Built for computer-asset apps that compose or send email on the user's behalf, so they apply the same recipient policy the chat email tools enforce — a recipient is approved when its full address is in `approved_emails` or its domain is in `approved_domains` (both compared case-insensitively). Read-only: the policy is edited from Settings → Email & Meetings (`manage_url`).
84
+ *
85
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
86
+ *
87
+ * @example
88
+ * await client.users.meEmailPreferences()
89
+ */
90
+ meEmailPreferences(requestOptions) {
91
+ return core.HttpResponsePromise.fromPromise(this.__meEmailPreferences(requestOptions));
92
+ }
93
+ __meEmailPreferences(requestOptions) {
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
96
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
97
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
98
+ "X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
99
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
100
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
101
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/me/email-preferences"),
102
+ method: "GET",
103
+ headers: _headers,
104
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
105
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
106
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
107
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
108
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
109
+ logging: this._options.logging,
110
+ });
111
+ if (_response.ok) {
112
+ return {
113
+ data: _response.body,
114
+ rawResponse: _response.rawResponse,
115
+ };
116
+ }
117
+ if (_response.error.reason === "status-code") {
118
+ throw new errors.AthenaIntelligenceError({
119
+ statusCode: _response.error.statusCode,
120
+ body: _response.error.body,
121
+ rawResponse: _response.rawResponse,
122
+ });
123
+ }
124
+ switch (_response.error.reason) {
125
+ case "non-json":
126
+ throw new errors.AthenaIntelligenceError({
127
+ statusCode: _response.error.statusCode,
128
+ body: _response.error.rawBody,
129
+ rawResponse: _response.rawResponse,
130
+ });
131
+ case "body-is-null":
132
+ throw new errors.AthenaIntelligenceError({
133
+ statusCode: _response.error.statusCode,
134
+ rawResponse: _response.rawResponse,
135
+ });
136
+ case "timeout":
137
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/me/email-preferences.");
138
+ case "unknown":
139
+ throw new errors.AthenaIntelligenceError({
140
+ message: _response.error.errorMessage,
141
+ rawResponse: _response.rawResponse,
142
+ });
143
+ }
144
+ });
145
+ }
82
146
  /**
83
147
  * Counts of the caller's connected Microsoft 365 sources (mail, files, sites, chats) plus live SharePoint provisioning progress. Built for computer-asset apps to render a 'setting up your sources' state right after a viewer's first sign-in, while the background fan-outs are still filling in SharePoint and Teams.
84
148
  *
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The caller's approved-recipient policy for agent-sent email.
3
+ */
4
+ export interface MeEmailPreferencesResponseOut {
5
+ /** Domains the agent may email anyone at, as bare lowercase domains (`acme.com`). Match a recipient's domain against this list. */
6
+ approved_domains: string[];
7
+ /** Specific addresses the agent may email, lowercase (`user@acme.com`). Match the whole recipient address against this list. */
8
+ approved_emails: string[];
9
+ /** Free-text guidance the user wants followed whenever an agent drafts email on their behalf; null when none is set. */
10
+ custom_instruction?: string | null;
11
+ /** Where the user edits this policy (Settings → Email & Meetings). Send the user here when a recipient is not approved; the policy cannot be changed through this API. */
12
+ manage_url: string;
13
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -83,6 +83,7 @@ export * from "./InitializationRecipeStage.mjs";
83
83
  export * from "./InitializationState.mjs";
84
84
  export * from "./InputMessage.mjs";
85
85
  export * from "./InputMessageContentOneItem.mjs";
86
+ export * from "./MeEmailPreferencesResponseOut.mjs";
86
87
  export * from "./MeetingArtifactsOut.mjs";
87
88
  export * from "./MeetingOut.mjs";
88
89
  export * from "./MeetingParticipantOut.mjs";
@@ -83,6 +83,7 @@ export * from "./InitializationRecipeStage.mjs";
83
83
  export * from "./InitializationState.mjs";
84
84
  export * from "./InputMessage.mjs";
85
85
  export * from "./InputMessageContentOneItem.mjs";
86
+ export * from "./MeEmailPreferencesResponseOut.mjs";
86
87
  export * from "./MeetingArtifactsOut.mjs";
87
88
  export * from "./MeetingOut.mjs";
88
89
  export * from "./MeetingParticipantOut.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.2213";
1
+ export declare const SDK_VERSION = "4.3.2215";
@@ -1 +1 @@
1
- export const SDK_VERSION = "4.3.2213";
1
+ export const SDK_VERSION = "4.3.2215";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenaintel/sdk",
3
- "version": "4.3.2213",
3
+ "version": "4.3.2215",
4
4
  "private": false,
5
5
  "repository": "github:Athena-Intel/athena-typescript",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -647,7 +647,7 @@ await client.assets.convertExcelToSheet({
647
647
  <dl>
648
648
  <dd>
649
649
 
650
- Create a new asset such as a spreadsheet, document, folder, database, computer, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. In capability enforce mode, computer creation requires computer.create and returns 403 when denied.
650
+ Create a new asset such as a spreadsheet, document, folder, database, computer, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied.
651
651
  </dd>
652
652
  </dl>
653
653
  </dd>
@@ -2879,6 +2879,61 @@ await client.users.me();
2879
2879
  </dl>
2880
2880
 
2881
2881
 
2882
+ </dd>
2883
+ </dl>
2884
+ </details>
2885
+
2886
+ <details><summary><code>client.users.<a href="/src/api/resources/users/client/Client.ts">meEmailPreferences</a>() -> AthenaIntelligence.MeEmailPreferencesResponseOut</code></summary>
2887
+ <dl>
2888
+ <dd>
2889
+
2890
+ #### 📝 Description
2891
+
2892
+ <dl>
2893
+ <dd>
2894
+
2895
+ <dl>
2896
+ <dd>
2897
+
2898
+ The caller's email preferences for agent-sent mail in their current workspace: the domains and specific addresses they have approved as recipients, plus their custom drafting instruction. Built for computer-asset apps that compose or send email on the user's behalf, so they apply the same recipient policy the chat email tools enforce — a recipient is approved when its full address is in `approved_emails` or its domain is in `approved_domains` (both compared case-insensitively). Read-only: the policy is edited from Settings → Email & Meetings (`manage_url`).
2899
+ </dd>
2900
+ </dl>
2901
+ </dd>
2902
+ </dl>
2903
+
2904
+ #### 🔌 Usage
2905
+
2906
+ <dl>
2907
+ <dd>
2908
+
2909
+ <dl>
2910
+ <dd>
2911
+
2912
+ ```typescript
2913
+ await client.users.meEmailPreferences();
2914
+
2915
+ ```
2916
+ </dd>
2917
+ </dl>
2918
+ </dd>
2919
+ </dl>
2920
+
2921
+ #### ⚙️ Parameters
2922
+
2923
+ <dl>
2924
+ <dd>
2925
+
2926
+ <dl>
2927
+ <dd>
2928
+
2929
+ **requestOptions:** `UsersClient.RequestOptions`
2930
+
2931
+ </dd>
2932
+ </dl>
2933
+ </dd>
2934
+ </dl>
2935
+
2936
+
2882
2937
  </dd>
2883
2938
  </dl>
2884
2939
  </details>