@athenaintel/sdk 4.3.2214 → 4.3.2216

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.2214",
47
- "User-Agent": "@athenaintel/sdk/4.3.2214",
46
+ "X-Fern-SDK-Version": "4.3.2216",
47
+ "User-Agent": "@athenaintel/sdk/4.3.2216",
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,
@@ -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.2214";
1
+ export declare const SDK_VERSION = "4.3.2216";
@@ -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.2214";
4
+ exports.SDK_VERSION = "4.3.2216";
@@ -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.2214",
10
- "User-Agent": "@athenaintel/sdk/4.3.2214",
9
+ "X-Fern-SDK-Version": "4.3.2216",
10
+ "User-Agent": "@athenaintel/sdk/4.3.2216",
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,
@@ -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.2214";
1
+ export declare const SDK_VERSION = "4.3.2216";
@@ -1 +1 @@
1
- export const SDK_VERSION = "4.3.2214";
1
+ export const SDK_VERSION = "4.3.2216";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenaintel/sdk",
3
- "version": "4.3.2214",
3
+ "version": "4.3.2216",
4
4
  "private": false,
5
5
  "repository": "github:Athena-Intel/athena-typescript",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -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>