agentmail 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +4 -1
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +12 -5
- package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/DeleteThreadRequest.d.ts +8 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/DeleteThreadRequest.js +3 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/threads/client/Client.js +2 -1
- package/dist/cjs/api/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +4 -1
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +12 -5
- package/dist/esm/api/resources/inboxes/resources/threads/client/requests/DeleteThreadRequest.d.mts +8 -0
- package/dist/esm/api/resources/inboxes/resources/threads/client/requests/DeleteThreadRequest.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/threads/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/threads/client/Client.mjs +2 -1
- package/dist/esm/api/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +856 -32
- package/dist/llms.txt +3 -0
- package/package.json +1 -1
- package/reference.md +23 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -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": "agentmail",
|
|
46
|
-
"X-Fern-SDK-Version": "0.4.
|
|
47
|
-
"User-Agent": "agentmail/0.4.
|
|
46
|
+
"X-Fern-SDK-Version": "0.4.2",
|
|
47
|
+
"User-Agent": "agentmail/0.4.2",
|
|
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);
|
|
@@ -48,8 +48,11 @@ export declare class ThreadsClient {
|
|
|
48
48
|
getAttachment(inbox_id: AgentMail.inboxes.InboxId, thread_id: AgentMail.ThreadId, attachment_id: AgentMail.AttachmentId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.AttachmentResponse>;
|
|
49
49
|
private __getAttachment;
|
|
50
50
|
/**
|
|
51
|
+
* Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion.
|
|
52
|
+
*
|
|
51
53
|
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
52
54
|
* @param {AgentMail.ThreadId} thread_id
|
|
55
|
+
* @param {AgentMail.inboxes.DeleteThreadRequest} request
|
|
53
56
|
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
57
|
*
|
|
55
58
|
* @throws {@link AgentMail.NotFoundError}
|
|
@@ -57,6 +60,6 @@ export declare class ThreadsClient {
|
|
|
57
60
|
* @example
|
|
58
61
|
* await client.inboxes.threads.delete("inbox_id", "thread_id")
|
|
59
62
|
*/
|
|
60
|
-
delete(inbox_id: AgentMail.inboxes.InboxId, thread_id: AgentMail.ThreadId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
63
|
+
delete(inbox_id: AgentMail.inboxes.InboxId, thread_id: AgentMail.ThreadId, request?: AgentMail.inboxes.DeleteThreadRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
61
64
|
private __delete;
|
|
62
65
|
}
|
|
@@ -269,8 +269,11 @@ class ThreadsClient {
|
|
|
269
269
|
});
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
|
+
* Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion.
|
|
273
|
+
*
|
|
272
274
|
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
273
275
|
* @param {AgentMail.ThreadId} thread_id
|
|
276
|
+
* @param {AgentMail.inboxes.DeleteThreadRequest} request
|
|
274
277
|
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
275
278
|
*
|
|
276
279
|
* @throws {@link AgentMail.NotFoundError}
|
|
@@ -278,12 +281,16 @@ class ThreadsClient {
|
|
|
278
281
|
* @example
|
|
279
282
|
* await client.inboxes.threads.delete("inbox_id", "thread_id")
|
|
280
283
|
*/
|
|
281
|
-
delete(inbox_id, thread_id, requestOptions) {
|
|
282
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(inbox_id, thread_id, requestOptions));
|
|
284
|
+
delete(inbox_id, thread_id, request = {}, requestOptions) {
|
|
285
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(inbox_id, thread_id, request, requestOptions));
|
|
283
286
|
}
|
|
284
|
-
__delete(
|
|
285
|
-
return __awaiter(this,
|
|
287
|
+
__delete(inbox_id_1, thread_id_1) {
|
|
288
|
+
return __awaiter(this, arguments, void 0, function* (inbox_id, thread_id, request = {}, requestOptions) {
|
|
286
289
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
290
|
+
const { permanent } = request;
|
|
291
|
+
const _queryParams = {
|
|
292
|
+
permanent,
|
|
293
|
+
};
|
|
287
294
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
288
295
|
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);
|
|
289
296
|
const _response = yield core.fetcher({
|
|
@@ -291,7 +298,7 @@ class ThreadsClient {
|
|
|
291
298
|
.http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/threads/${core.url.encodePathParam(serializers.ThreadId.jsonOrThrow(thread_id, { omitUndefined: true }))}`),
|
|
292
299
|
method: "DELETE",
|
|
293
300
|
headers: _headers,
|
|
294
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
301
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
295
302
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
296
303
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
297
304
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -72,7 +72,7 @@ class ThreadsClient {
|
|
|
72
72
|
__list() {
|
|
73
73
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
74
74
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
75
|
-
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked } = request;
|
|
75
|
+
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeTrash } = request;
|
|
76
76
|
const _queryParams = {
|
|
77
77
|
limit,
|
|
78
78
|
page_token: pageToken,
|
|
@@ -91,6 +91,7 @@ class ThreadsClient {
|
|
|
91
91
|
ascending,
|
|
92
92
|
include_spam: includeSpam,
|
|
93
93
|
include_blocked: includeBlocked,
|
|
94
|
+
include_trash: includeTrash,
|
|
94
95
|
};
|
|
95
96
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
96
97
|
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);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.2";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "agentmail",
|
|
9
|
-
"X-Fern-SDK-Version": "0.4.
|
|
10
|
-
"User-Agent": "agentmail/0.4.
|
|
9
|
+
"X-Fern-SDK-Version": "0.4.2",
|
|
10
|
+
"User-Agent": "agentmail/0.4.2",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -48,8 +48,11 @@ export declare class ThreadsClient {
|
|
|
48
48
|
getAttachment(inbox_id: AgentMail.inboxes.InboxId, thread_id: AgentMail.ThreadId, attachment_id: AgentMail.AttachmentId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.AttachmentResponse>;
|
|
49
49
|
private __getAttachment;
|
|
50
50
|
/**
|
|
51
|
+
* Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion.
|
|
52
|
+
*
|
|
51
53
|
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
52
54
|
* @param {AgentMail.ThreadId} thread_id
|
|
55
|
+
* @param {AgentMail.inboxes.DeleteThreadRequest} request
|
|
53
56
|
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
57
|
*
|
|
55
58
|
* @throws {@link AgentMail.NotFoundError}
|
|
@@ -57,6 +60,6 @@ export declare class ThreadsClient {
|
|
|
57
60
|
* @example
|
|
58
61
|
* await client.inboxes.threads.delete("inbox_id", "thread_id")
|
|
59
62
|
*/
|
|
60
|
-
delete(inbox_id: AgentMail.inboxes.InboxId, thread_id: AgentMail.ThreadId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
63
|
+
delete(inbox_id: AgentMail.inboxes.InboxId, thread_id: AgentMail.ThreadId, request?: AgentMail.inboxes.DeleteThreadRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
61
64
|
private __delete;
|
|
62
65
|
}
|
|
@@ -233,8 +233,11 @@ export class ThreadsClient {
|
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
236
|
+
* Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion.
|
|
237
|
+
*
|
|
236
238
|
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
237
239
|
* @param {AgentMail.ThreadId} thread_id
|
|
240
|
+
* @param {AgentMail.inboxes.DeleteThreadRequest} request
|
|
238
241
|
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
239
242
|
*
|
|
240
243
|
* @throws {@link AgentMail.NotFoundError}
|
|
@@ -242,12 +245,16 @@ export class ThreadsClient {
|
|
|
242
245
|
* @example
|
|
243
246
|
* await client.inboxes.threads.delete("inbox_id", "thread_id")
|
|
244
247
|
*/
|
|
245
|
-
delete(inbox_id, thread_id, requestOptions) {
|
|
246
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(inbox_id, thread_id, requestOptions));
|
|
248
|
+
delete(inbox_id, thread_id, request = {}, requestOptions) {
|
|
249
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(inbox_id, thread_id, request, requestOptions));
|
|
247
250
|
}
|
|
248
|
-
__delete(
|
|
249
|
-
return __awaiter(this,
|
|
251
|
+
__delete(inbox_id_1, thread_id_1) {
|
|
252
|
+
return __awaiter(this, arguments, void 0, function* (inbox_id, thread_id, request = {}, requestOptions) {
|
|
250
253
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
254
|
+
const { permanent } = request;
|
|
255
|
+
const _queryParams = {
|
|
256
|
+
permanent,
|
|
257
|
+
};
|
|
251
258
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
252
259
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
253
260
|
const _response = yield core.fetcher({
|
|
@@ -255,7 +262,7 @@ export class ThreadsClient {
|
|
|
255
262
|
.http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/threads/${core.url.encodePathParam(serializers.ThreadId.jsonOrThrow(thread_id, { omitUndefined: true }))}`),
|
|
256
263
|
method: "DELETE",
|
|
257
264
|
headers: _headers,
|
|
258
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
265
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
259
266
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
260
267
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
261
268
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -36,7 +36,7 @@ export class ThreadsClient {
|
|
|
36
36
|
__list() {
|
|
37
37
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
38
38
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
39
|
-
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked } = request;
|
|
39
|
+
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeTrash } = request;
|
|
40
40
|
const _queryParams = {
|
|
41
41
|
limit,
|
|
42
42
|
page_token: pageToken,
|
|
@@ -55,6 +55,7 @@ export class ThreadsClient {
|
|
|
55
55
|
ascending,
|
|
56
56
|
include_spam: includeSpam,
|
|
57
57
|
include_blocked: includeBlocked,
|
|
58
|
+
include_trash: includeTrash,
|
|
58
59
|
};
|
|
59
60
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
60
61
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.2";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.4.
|
|
1
|
+
export const SDK_VERSION = "0.4.2";
|