agentmail 0.1.18 → 0.2.1
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/README.md +20 -0
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/attachments/types/Attachment.d.ts +1 -1
- package/dist/cjs/api/resources/attachments/types/AttachmentResponse.d.ts +13 -0
- package/dist/cjs/api/resources/attachments/types/AttachmentResponse.js +3 -0
- package/dist/cjs/api/resources/attachments/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/attachments/types/index.js +1 -0
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +9 -1
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +18 -2
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +9 -1
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +18 -2
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +9 -1
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +18 -2
- package/dist/cjs/api/resources/threads/client/Client.d.ts +8 -1
- package/dist/cjs/api/resources/threads/client/Client.js +17 -2
- package/dist/cjs/serialization/resources/attachments/types/Attachment.d.ts +1 -1
- package/dist/cjs/serialization/resources/attachments/types/Attachment.js +1 -1
- package/dist/cjs/serialization/resources/attachments/types/AttachmentResponse.d.ts +22 -0
- package/dist/cjs/serialization/resources/attachments/types/AttachmentResponse.js +54 -0
- package/dist/cjs/serialization/resources/attachments/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/attachments/types/index.js +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/attachments/types/Attachment.d.mts +1 -1
- package/dist/esm/api/resources/attachments/types/AttachmentResponse.d.mts +13 -0
- package/dist/esm/api/resources/attachments/types/AttachmentResponse.mjs +2 -0
- package/dist/esm/api/resources/attachments/types/index.d.mts +1 -0
- package/dist/esm/api/resources/attachments/types/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +9 -1
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +18 -2
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +9 -1
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +18 -2
- package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +9 -1
- package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +18 -2
- package/dist/esm/api/resources/threads/client/Client.d.mts +8 -1
- package/dist/esm/api/resources/threads/client/Client.mjs +17 -2
- package/dist/esm/serialization/resources/attachments/types/Attachment.d.mts +1 -1
- package/dist/esm/serialization/resources/attachments/types/Attachment.mjs +1 -1
- package/dist/esm/serialization/resources/attachments/types/AttachmentResponse.d.mts +22 -0
- package/dist/esm/serialization/resources/attachments/types/AttachmentResponse.mjs +18 -0
- package/dist/esm/serialization/resources/attachments/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/attachments/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +2250 -310
- package/dist/llms.txt +3 -0
- package/package.json +1 -1
- package/reference.md +4 -4
|
@@ -196,7 +196,15 @@ export class ThreadsClient {
|
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
|
+
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
200
|
+
* @param {AgentMail.ThreadId} thread_id
|
|
201
|
+
* @param {AgentMail.AttachmentId} attachment_id
|
|
202
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
203
|
+
*
|
|
199
204
|
* @throws {@link AgentMail.NotFoundError}
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* await client.inboxes.threads.getAttachment("inbox_id", "thread_id", "attachment_id")
|
|
200
208
|
*/
|
|
201
209
|
getAttachment(inbox_id, thread_id, attachment_id, requestOptions) {
|
|
202
210
|
return core.HttpResponsePromise.fromPromise(this.__getAttachment(inbox_id, thread_id, attachment_id, requestOptions));
|
|
@@ -211,7 +219,6 @@ export class ThreadsClient {
|
|
|
211
219
|
method: "GET",
|
|
212
220
|
headers: _headers,
|
|
213
221
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
214
|
-
responseType: "binary-response",
|
|
215
222
|
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,
|
|
216
223
|
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,
|
|
217
224
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -219,7 +226,16 @@ export class ThreadsClient {
|
|
|
219
226
|
logging: this._options.logging,
|
|
220
227
|
});
|
|
221
228
|
if (_response.ok) {
|
|
222
|
-
return {
|
|
229
|
+
return {
|
|
230
|
+
data: serializers.AttachmentResponse.parseOrThrow(_response.body, {
|
|
231
|
+
unrecognizedObjectKeys: "passthrough",
|
|
232
|
+
allowUnrecognizedUnionMembers: true,
|
|
233
|
+
allowUnrecognizedEnumValues: true,
|
|
234
|
+
skipValidation: true,
|
|
235
|
+
breadcrumbsPrefix: ["response"],
|
|
236
|
+
}),
|
|
237
|
+
rawResponse: _response.rawResponse,
|
|
238
|
+
};
|
|
223
239
|
}
|
|
224
240
|
if (_response.error.reason === "status-code") {
|
|
225
241
|
switch (_response.error.statusCode) {
|
|
@@ -36,8 +36,16 @@ export declare class ThreadsClient {
|
|
|
36
36
|
get(pod_id: AgentMail.pods.PodId, thread_id: AgentMail.ThreadId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Thread>;
|
|
37
37
|
private __get;
|
|
38
38
|
/**
|
|
39
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
40
|
+
* @param {AgentMail.ThreadId} thread_id
|
|
41
|
+
* @param {AgentMail.AttachmentId} attachment_id
|
|
42
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
|
+
*
|
|
39
44
|
* @throws {@link AgentMail.NotFoundError}
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* await client.pods.threads.getAttachment("pod_id", "thread_id", "attachment_id")
|
|
40
48
|
*/
|
|
41
|
-
getAttachment(pod_id: AgentMail.pods.PodId, thread_id: AgentMail.ThreadId, attachment_id: AgentMail.AttachmentId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<
|
|
49
|
+
getAttachment(pod_id: AgentMail.pods.PodId, thread_id: AgentMail.ThreadId, attachment_id: AgentMail.AttachmentId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.AttachmentResponse>;
|
|
42
50
|
private __getAttachment;
|
|
43
51
|
}
|
|
@@ -196,7 +196,15 @@ export class ThreadsClient {
|
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
200
|
+
* @param {AgentMail.ThreadId} thread_id
|
|
201
|
+
* @param {AgentMail.AttachmentId} attachment_id
|
|
202
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
203
|
+
*
|
|
199
204
|
* @throws {@link AgentMail.NotFoundError}
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* await client.pods.threads.getAttachment("pod_id", "thread_id", "attachment_id")
|
|
200
208
|
*/
|
|
201
209
|
getAttachment(pod_id, thread_id, attachment_id, requestOptions) {
|
|
202
210
|
return core.HttpResponsePromise.fromPromise(this.__getAttachment(pod_id, thread_id, attachment_id, requestOptions));
|
|
@@ -211,7 +219,6 @@ export class ThreadsClient {
|
|
|
211
219
|
method: "GET",
|
|
212
220
|
headers: _headers,
|
|
213
221
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
214
|
-
responseType: "binary-response",
|
|
215
222
|
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,
|
|
216
223
|
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,
|
|
217
224
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -219,7 +226,16 @@ export class ThreadsClient {
|
|
|
219
226
|
logging: this._options.logging,
|
|
220
227
|
});
|
|
221
228
|
if (_response.ok) {
|
|
222
|
-
return {
|
|
229
|
+
return {
|
|
230
|
+
data: serializers.AttachmentResponse.parseOrThrow(_response.body, {
|
|
231
|
+
unrecognizedObjectKeys: "passthrough",
|
|
232
|
+
allowUnrecognizedUnionMembers: true,
|
|
233
|
+
allowUnrecognizedEnumValues: true,
|
|
234
|
+
skipValidation: true,
|
|
235
|
+
breadcrumbsPrefix: ["response"],
|
|
236
|
+
}),
|
|
237
|
+
rawResponse: _response.rawResponse,
|
|
238
|
+
};
|
|
223
239
|
}
|
|
224
240
|
if (_response.error.reason === "status-code") {
|
|
225
241
|
switch (_response.error.statusCode) {
|
|
@@ -34,8 +34,15 @@ export declare class ThreadsClient {
|
|
|
34
34
|
get(thread_id: AgentMail.ThreadId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Thread>;
|
|
35
35
|
private __get;
|
|
36
36
|
/**
|
|
37
|
+
* @param {AgentMail.ThreadId} thread_id
|
|
38
|
+
* @param {AgentMail.AttachmentId} attachment_id
|
|
39
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
|
+
*
|
|
37
41
|
* @throws {@link AgentMail.NotFoundError}
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await client.threads.getAttachment("thread_id", "attachment_id")
|
|
38
45
|
*/
|
|
39
|
-
getAttachment(thread_id: AgentMail.ThreadId, attachment_id: AgentMail.AttachmentId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<
|
|
46
|
+
getAttachment(thread_id: AgentMail.ThreadId, attachment_id: AgentMail.AttachmentId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.AttachmentResponse>;
|
|
40
47
|
private __getAttachment;
|
|
41
48
|
}
|
|
@@ -194,7 +194,14 @@ export class ThreadsClient {
|
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
/**
|
|
197
|
+
* @param {AgentMail.ThreadId} thread_id
|
|
198
|
+
* @param {AgentMail.AttachmentId} attachment_id
|
|
199
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
200
|
+
*
|
|
197
201
|
* @throws {@link AgentMail.NotFoundError}
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* await client.threads.getAttachment("thread_id", "attachment_id")
|
|
198
205
|
*/
|
|
199
206
|
getAttachment(thread_id, attachment_id, requestOptions) {
|
|
200
207
|
return core.HttpResponsePromise.fromPromise(this.__getAttachment(thread_id, attachment_id, requestOptions));
|
|
@@ -209,7 +216,6 @@ export class ThreadsClient {
|
|
|
209
216
|
method: "GET",
|
|
210
217
|
headers: _headers,
|
|
211
218
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
212
|
-
responseType: "binary-response",
|
|
213
219
|
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,
|
|
214
220
|
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,
|
|
215
221
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -217,7 +223,16 @@ export class ThreadsClient {
|
|
|
217
223
|
logging: this._options.logging,
|
|
218
224
|
});
|
|
219
225
|
if (_response.ok) {
|
|
220
|
-
return {
|
|
226
|
+
return {
|
|
227
|
+
data: serializers.AttachmentResponse.parseOrThrow(_response.body, {
|
|
228
|
+
unrecognizedObjectKeys: "passthrough",
|
|
229
|
+
allowUnrecognizedUnionMembers: true,
|
|
230
|
+
allowUnrecognizedEnumValues: true,
|
|
231
|
+
skipValidation: true,
|
|
232
|
+
breadcrumbsPrefix: ["response"],
|
|
233
|
+
}),
|
|
234
|
+
rawResponse: _response.rawResponse,
|
|
235
|
+
};
|
|
221
236
|
}
|
|
222
237
|
if (_response.error.reason === "status-code") {
|
|
223
238
|
switch (_response.error.statusCode) {
|
|
@@ -14,7 +14,7 @@ export declare namespace Attachment {
|
|
|
14
14
|
filename?: AttachmentFilename.Raw | null;
|
|
15
15
|
size: AttachmentSize.Raw;
|
|
16
16
|
content_type?: AttachmentContentType.Raw | null;
|
|
17
|
-
content_disposition
|
|
17
|
+
content_disposition?: AttachmentContentDisposition.Raw | null;
|
|
18
18
|
content_id?: AttachmentContentId.Raw | null;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -11,6 +11,6 @@ export const Attachment = core.serialization.object({
|
|
|
11
11
|
filename: AttachmentFilename.optional(),
|
|
12
12
|
size: AttachmentSize,
|
|
13
13
|
contentType: core.serialization.property("content_type", AttachmentContentType.optional()),
|
|
14
|
-
contentDisposition: core.serialization.property("content_disposition", AttachmentContentDisposition),
|
|
14
|
+
contentDisposition: core.serialization.property("content_disposition", AttachmentContentDisposition.optional()),
|
|
15
15
|
contentId: core.serialization.property("content_id", AttachmentContentId.optional()),
|
|
16
16
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../../../index.mjs";
|
|
4
|
+
import { AttachmentContentDisposition } from "./AttachmentContentDisposition.mjs";
|
|
5
|
+
import { AttachmentContentId } from "./AttachmentContentId.mjs";
|
|
6
|
+
import { AttachmentContentType } from "./AttachmentContentType.mjs";
|
|
7
|
+
import { AttachmentFilename } from "./AttachmentFilename.mjs";
|
|
8
|
+
import { AttachmentId } from "./AttachmentId.mjs";
|
|
9
|
+
import { AttachmentSize } from "./AttachmentSize.mjs";
|
|
10
|
+
export declare const AttachmentResponse: core.serialization.ObjectSchema<serializers.AttachmentResponse.Raw, AgentMail.AttachmentResponse>;
|
|
11
|
+
export declare namespace AttachmentResponse {
|
|
12
|
+
interface Raw {
|
|
13
|
+
attachment_id: AttachmentId.Raw;
|
|
14
|
+
filename?: AttachmentFilename.Raw | null;
|
|
15
|
+
size: AttachmentSize.Raw;
|
|
16
|
+
content_type?: AttachmentContentType.Raw | null;
|
|
17
|
+
content_disposition?: AttachmentContentDisposition.Raw | null;
|
|
18
|
+
content_id?: AttachmentContentId.Raw | null;
|
|
19
|
+
download_url: string;
|
|
20
|
+
expires_at: string;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import { AttachmentContentDisposition } from "./AttachmentContentDisposition.mjs";
|
|
4
|
+
import { AttachmentContentId } from "./AttachmentContentId.mjs";
|
|
5
|
+
import { AttachmentContentType } from "./AttachmentContentType.mjs";
|
|
6
|
+
import { AttachmentFilename } from "./AttachmentFilename.mjs";
|
|
7
|
+
import { AttachmentId } from "./AttachmentId.mjs";
|
|
8
|
+
import { AttachmentSize } from "./AttachmentSize.mjs";
|
|
9
|
+
export const AttachmentResponse = core.serialization.object({
|
|
10
|
+
attachmentId: core.serialization.property("attachment_id", AttachmentId),
|
|
11
|
+
filename: AttachmentFilename.optional(),
|
|
12
|
+
size: AttachmentSize,
|
|
13
|
+
contentType: core.serialization.property("content_type", AttachmentContentType.optional()),
|
|
14
|
+
contentDisposition: core.serialization.property("content_disposition", AttachmentContentDisposition.optional()),
|
|
15
|
+
contentId: core.serialization.property("content_id", AttachmentContentId.optional()),
|
|
16
|
+
downloadUrl: core.serialization.property("download_url", core.serialization.string()),
|
|
17
|
+
expiresAt: core.serialization.property("expires_at", core.serialization.date()),
|
|
18
|
+
});
|
|
@@ -5,5 +5,6 @@ export * from "./AttachmentContentId.mjs";
|
|
|
5
5
|
export * from "./AttachmentContentType.mjs";
|
|
6
6
|
export * from "./AttachmentFilename.mjs";
|
|
7
7
|
export * from "./AttachmentId.mjs";
|
|
8
|
+
export * from "./AttachmentResponse.mjs";
|
|
8
9
|
export * from "./AttachmentSize.mjs";
|
|
9
10
|
export * from "./SendAttachment.mjs";
|
|
@@ -5,5 +5,6 @@ export * from "./AttachmentContentId.mjs";
|
|
|
5
5
|
export * from "./AttachmentContentType.mjs";
|
|
6
6
|
export * from "./AttachmentFilename.mjs";
|
|
7
7
|
export * from "./AttachmentId.mjs";
|
|
8
|
+
export * from "./AttachmentResponse.mjs";
|
|
8
9
|
export * from "./AttachmentSize.mjs";
|
|
9
10
|
export * from "./SendAttachment.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1
|
|
1
|
+
export declare const SDK_VERSION = "0.2.1";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.1
|
|
1
|
+
export const SDK_VERSION = "0.2.1";
|