agentmail 0.0.18 → 0.0.19
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/api/resources/inboxes/client/Client.js +3 -3
- package/api/resources/messages/client/Client.d.ts +0 -2
- package/api/resources/messages/client/Client.js +5 -7
- package/api/resources/messages/types/Message.d.ts +3 -1
- package/api/resources/threads/client/Client.d.ts +0 -2
- package/api/resources/threads/client/Client.js +2 -4
- package/api/resources/threads/types/Thread.d.ts +4 -1
- package/api/types/OrganizationId.d.ts +7 -0
- package/api/types/OrganizationId.js +5 -0
- package/api/types/Received.d.ts +1 -1
- package/api/types/Sent.d.ts +1 -1
- package/api/types/index.d.ts +1 -0
- package/api/types/index.js +1 -0
- package/dist/api/resources/inboxes/client/Client.js +3 -3
- package/dist/api/resources/messages/client/Client.d.ts +0 -2
- package/dist/api/resources/messages/client/Client.js +5 -7
- package/dist/api/resources/messages/types/Message.d.ts +3 -1
- package/dist/api/resources/threads/client/Client.d.ts +0 -2
- package/dist/api/resources/threads/client/Client.js +2 -4
- package/dist/api/resources/threads/types/Thread.d.ts +4 -1
- package/dist/api/types/OrganizationId.d.ts +7 -0
- package/dist/api/types/OrganizationId.js +5 -0
- package/dist/api/types/Received.d.ts +1 -1
- package/dist/api/types/Sent.d.ts +1 -1
- package/dist/api/types/index.d.ts +1 -0
- package/dist/api/types/index.js +1 -0
- package/dist/serialization/resources/messages/types/Message.d.ts +2 -0
- package/dist/serialization/resources/messages/types/Message.js +2 -0
- package/dist/serialization/resources/threads/types/Thread.d.ts +2 -0
- package/dist/serialization/resources/threads/types/Thread.js +2 -0
- package/dist/serialization/types/OrganizationId.d.ts +10 -0
- package/dist/serialization/types/OrganizationId.js +41 -0
- package/dist/serialization/types/index.d.ts +1 -0
- package/dist/serialization/types/index.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +0 -30
- package/serialization/resources/messages/types/Message.d.ts +2 -0
- package/serialization/resources/messages/types/Message.js +2 -0
- package/serialization/resources/threads/types/Thread.d.ts +2 -0
- package/serialization/resources/threads/types/Thread.js +2 -0
- package/serialization/types/OrganizationId.d.ts +10 -0
- package/serialization/types/OrganizationId.js +41 -0
- package/serialization/types/index.d.ts +1 -0
- package/serialization/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -83,7 +83,7 @@ class Inboxes {
|
|
|
83
83
|
const _response = yield core.fetcher({
|
|
84
84
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/inboxes"),
|
|
85
85
|
method: "GET",
|
|
86
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
86
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
87
|
contentType: "application/json",
|
|
88
88
|
queryParameters: _queryParams,
|
|
89
89
|
requestType: "json",
|
|
@@ -135,7 +135,7 @@ class Inboxes {
|
|
|
135
135
|
const _response = yield core.fetcher({
|
|
136
136
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}`),
|
|
137
137
|
method: "GET",
|
|
138
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
138
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
139
139
|
contentType: "application/json",
|
|
140
140
|
requestType: "json",
|
|
141
141
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -204,7 +204,7 @@ class Inboxes {
|
|
|
204
204
|
const _response = yield core.fetcher({
|
|
205
205
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/inboxes"),
|
|
206
206
|
method: "POST",
|
|
207
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
207
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
208
208
|
contentType: "application/json",
|
|
209
209
|
requestType: "json",
|
|
210
210
|
body: serializers.CreateInboxRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -27,8 +27,6 @@ export declare class Messages {
|
|
|
27
27
|
protected readonly _options: Messages.Options;
|
|
28
28
|
constructor(_options?: Messages.Options);
|
|
29
29
|
/**
|
|
30
|
-
* List messages in inbox. If neither or both `received` and `sent` query parameters are set, all messages are returned.
|
|
31
|
-
*
|
|
32
30
|
* @param {AgentMail.InboxId} inboxId
|
|
33
31
|
* @param {AgentMail.ListMessagesRequest} request
|
|
34
32
|
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -60,8 +60,6 @@ class Messages {
|
|
|
60
60
|
this._options = _options;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* List messages in inbox. If neither or both `received` and `sent` query parameters are set, all messages are returned.
|
|
64
|
-
*
|
|
65
63
|
* @param {AgentMail.InboxId} inboxId
|
|
66
64
|
* @param {AgentMail.ListMessagesRequest} request
|
|
67
65
|
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -93,7 +91,7 @@ class Messages {
|
|
|
93
91
|
const _response = yield core.fetcher({
|
|
94
92
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/messages`),
|
|
95
93
|
method: "GET",
|
|
96
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
94
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
97
95
|
contentType: "application/json",
|
|
98
96
|
queryParameters: _queryParams,
|
|
99
97
|
requestType: "json",
|
|
@@ -156,7 +154,7 @@ class Messages {
|
|
|
156
154
|
const _response = yield core.fetcher({
|
|
157
155
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}`),
|
|
158
156
|
method: "GET",
|
|
159
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
157
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
160
158
|
contentType: "application/json",
|
|
161
159
|
requestType: "json",
|
|
162
160
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -211,7 +209,7 @@ class Messages {
|
|
|
211
209
|
const _response = yield core.fetcher({
|
|
212
210
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId))}`),
|
|
213
211
|
method: "GET",
|
|
214
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
212
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
215
213
|
contentType: "application/json",
|
|
216
214
|
requestType: "json",
|
|
217
215
|
responseType: "streaming",
|
|
@@ -277,7 +275,7 @@ class Messages {
|
|
|
277
275
|
const _response = yield core.fetcher({
|
|
278
276
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/messages/send`),
|
|
279
277
|
method: "POST",
|
|
280
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
278
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
281
279
|
contentType: "application/json",
|
|
282
280
|
requestType: "json",
|
|
283
281
|
body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -354,7 +352,7 @@ class Messages {
|
|
|
354
352
|
const _response = yield core.fetcher({
|
|
355
353
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}/reply`),
|
|
356
354
|
method: "POST",
|
|
357
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
355
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
358
356
|
contentType: "application/json",
|
|
359
357
|
requestType: "json",
|
|
360
358
|
body: serializers.ReplyToMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -28,7 +28,8 @@ import * as AgentMail from "../../../index";
|
|
|
28
28
|
* }],
|
|
29
29
|
* inReplyTo: "msg_122",
|
|
30
30
|
* references: ["msg_121", "msg_122"],
|
|
31
|
-
* inboxId: "yourinbox@agentmail.to"
|
|
31
|
+
* inboxId: "yourinbox@agentmail.to",
|
|
32
|
+
* organizationId: "org_123"
|
|
32
33
|
* }
|
|
33
34
|
*/
|
|
34
35
|
export interface Message {
|
|
@@ -50,4 +51,5 @@ export interface Message {
|
|
|
50
51
|
inReplyTo?: AgentMail.MessageInReplyTo;
|
|
51
52
|
references?: AgentMail.MessageReferences;
|
|
52
53
|
inboxId: AgentMail.InboxId;
|
|
54
|
+
organizationId: AgentMail.OrganizationId;
|
|
53
55
|
}
|
|
@@ -26,8 +26,6 @@ export declare class Threads {
|
|
|
26
26
|
protected readonly _options: Threads.Options;
|
|
27
27
|
constructor(_options?: Threads.Options);
|
|
28
28
|
/**
|
|
29
|
-
* List threads in inbox. If neither or both `received` and `sent` query parameters are set, all threads are returned.
|
|
30
|
-
*
|
|
31
29
|
* @param {AgentMail.InboxId} inboxId
|
|
32
30
|
* @param {AgentMail.ListThreadsRequest} request
|
|
33
31
|
* @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -60,8 +60,6 @@ class Threads {
|
|
|
60
60
|
this._options = _options;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* List threads in inbox. If neither or both `received` and `sent` query parameters are set, all threads are returned.
|
|
64
|
-
*
|
|
65
63
|
* @param {AgentMail.InboxId} inboxId
|
|
66
64
|
* @param {AgentMail.ListThreadsRequest} request
|
|
67
65
|
* @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -93,7 +91,7 @@ class Threads {
|
|
|
93
91
|
const _response = yield core.fetcher({
|
|
94
92
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/threads`),
|
|
95
93
|
method: "GET",
|
|
96
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
94
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
97
95
|
contentType: "application/json",
|
|
98
96
|
queryParameters: _queryParams,
|
|
99
97
|
requestType: "json",
|
|
@@ -156,7 +154,7 @@ class Threads {
|
|
|
156
154
|
const _response = yield core.fetcher({
|
|
157
155
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId))}`),
|
|
158
156
|
method: "GET",
|
|
159
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
157
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
160
158
|
contentType: "application/json",
|
|
161
159
|
requestType: "json",
|
|
162
160
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -5,6 +5,7 @@ import * as AgentMail from "../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
+
* organizationId: "org_123",
|
|
8
9
|
* inboxId: "yourinbox@agentmail.to",
|
|
9
10
|
* threadId: "thread_123",
|
|
10
11
|
* eventId: "event_123",
|
|
@@ -24,7 +25,8 @@ import * as AgentMail from "../../../index";
|
|
|
24
25
|
* from: "alice@example.com",
|
|
25
26
|
* to: ["bob@example.com"],
|
|
26
27
|
* text: "Let's review the timeline for the project.",
|
|
27
|
-
* inboxId: "yourinbox@agentmail.to"
|
|
28
|
+
* inboxId: "yourinbox@agentmail.to",
|
|
29
|
+
* organizationId: "org_123"
|
|
28
30
|
* }]
|
|
29
31
|
* }
|
|
30
32
|
*/
|
|
@@ -42,4 +44,5 @@ export interface Thread {
|
|
|
42
44
|
/** Messages in thread. Ordered by `sent_at` ascending. */
|
|
43
45
|
messages: AgentMail.Message[];
|
|
44
46
|
inboxId: AgentMail.InboxId;
|
|
47
|
+
organizationId: AgentMail.OrganizationId;
|
|
45
48
|
}
|
package/api/types/Received.d.ts
CHANGED
package/api/types/Sent.d.ts
CHANGED
package/api/types/index.d.ts
CHANGED
package/api/types/index.js
CHANGED
|
@@ -19,6 +19,7 @@ __exportStar(require("./Sent"), exports);
|
|
|
19
19
|
__exportStar(require("./Limit"), exports);
|
|
20
20
|
__exportStar(require("./Count"), exports);
|
|
21
21
|
__exportStar(require("./LastKey"), exports);
|
|
22
|
+
__exportStar(require("./OrganizationId"), exports);
|
|
22
23
|
__exportStar(require("./ErrorName"), exports);
|
|
23
24
|
__exportStar(require("./ErrorResponse"), exports);
|
|
24
25
|
__exportStar(require("./ValidationErrorResponse"), exports);
|
|
@@ -83,7 +83,7 @@ class Inboxes {
|
|
|
83
83
|
const _response = yield core.fetcher({
|
|
84
84
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/inboxes"),
|
|
85
85
|
method: "GET",
|
|
86
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
86
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
87
|
contentType: "application/json",
|
|
88
88
|
queryParameters: _queryParams,
|
|
89
89
|
requestType: "json",
|
|
@@ -135,7 +135,7 @@ class Inboxes {
|
|
|
135
135
|
const _response = yield core.fetcher({
|
|
136
136
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}`),
|
|
137
137
|
method: "GET",
|
|
138
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
138
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
139
139
|
contentType: "application/json",
|
|
140
140
|
requestType: "json",
|
|
141
141
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -204,7 +204,7 @@ class Inboxes {
|
|
|
204
204
|
const _response = yield core.fetcher({
|
|
205
205
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/inboxes"),
|
|
206
206
|
method: "POST",
|
|
207
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
207
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
208
208
|
contentType: "application/json",
|
|
209
209
|
requestType: "json",
|
|
210
210
|
body: serializers.CreateInboxRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -27,8 +27,6 @@ export declare class Messages {
|
|
|
27
27
|
protected readonly _options: Messages.Options;
|
|
28
28
|
constructor(_options?: Messages.Options);
|
|
29
29
|
/**
|
|
30
|
-
* List messages in inbox. If neither or both `received` and `sent` query parameters are set, all messages are returned.
|
|
31
|
-
*
|
|
32
30
|
* @param {AgentMail.InboxId} inboxId
|
|
33
31
|
* @param {AgentMail.ListMessagesRequest} request
|
|
34
32
|
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -60,8 +60,6 @@ class Messages {
|
|
|
60
60
|
this._options = _options;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* List messages in inbox. If neither or both `received` and `sent` query parameters are set, all messages are returned.
|
|
64
|
-
*
|
|
65
63
|
* @param {AgentMail.InboxId} inboxId
|
|
66
64
|
* @param {AgentMail.ListMessagesRequest} request
|
|
67
65
|
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -93,7 +91,7 @@ class Messages {
|
|
|
93
91
|
const _response = yield core.fetcher({
|
|
94
92
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/messages`),
|
|
95
93
|
method: "GET",
|
|
96
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
94
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
97
95
|
contentType: "application/json",
|
|
98
96
|
queryParameters: _queryParams,
|
|
99
97
|
requestType: "json",
|
|
@@ -156,7 +154,7 @@ class Messages {
|
|
|
156
154
|
const _response = yield core.fetcher({
|
|
157
155
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}`),
|
|
158
156
|
method: "GET",
|
|
159
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
157
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
160
158
|
contentType: "application/json",
|
|
161
159
|
requestType: "json",
|
|
162
160
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -211,7 +209,7 @@ class Messages {
|
|
|
211
209
|
const _response = yield core.fetcher({
|
|
212
210
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId))}`),
|
|
213
211
|
method: "GET",
|
|
214
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
212
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
215
213
|
contentType: "application/json",
|
|
216
214
|
requestType: "json",
|
|
217
215
|
responseType: "streaming",
|
|
@@ -277,7 +275,7 @@ class Messages {
|
|
|
277
275
|
const _response = yield core.fetcher({
|
|
278
276
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/messages/send`),
|
|
279
277
|
method: "POST",
|
|
280
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
278
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
281
279
|
contentType: "application/json",
|
|
282
280
|
requestType: "json",
|
|
283
281
|
body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -354,7 +352,7 @@ class Messages {
|
|
|
354
352
|
const _response = yield core.fetcher({
|
|
355
353
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}/reply`),
|
|
356
354
|
method: "POST",
|
|
357
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
355
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
358
356
|
contentType: "application/json",
|
|
359
357
|
requestType: "json",
|
|
360
358
|
body: serializers.ReplyToMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -28,7 +28,8 @@ import * as AgentMail from "../../../index";
|
|
|
28
28
|
* }],
|
|
29
29
|
* inReplyTo: "msg_122",
|
|
30
30
|
* references: ["msg_121", "msg_122"],
|
|
31
|
-
* inboxId: "yourinbox@agentmail.to"
|
|
31
|
+
* inboxId: "yourinbox@agentmail.to",
|
|
32
|
+
* organizationId: "org_123"
|
|
32
33
|
* }
|
|
33
34
|
*/
|
|
34
35
|
export interface Message {
|
|
@@ -50,4 +51,5 @@ export interface Message {
|
|
|
50
51
|
inReplyTo?: AgentMail.MessageInReplyTo;
|
|
51
52
|
references?: AgentMail.MessageReferences;
|
|
52
53
|
inboxId: AgentMail.InboxId;
|
|
54
|
+
organizationId: AgentMail.OrganizationId;
|
|
53
55
|
}
|
|
@@ -26,8 +26,6 @@ export declare class Threads {
|
|
|
26
26
|
protected readonly _options: Threads.Options;
|
|
27
27
|
constructor(_options?: Threads.Options);
|
|
28
28
|
/**
|
|
29
|
-
* List threads in inbox. If neither or both `received` and `sent` query parameters are set, all threads are returned.
|
|
30
|
-
*
|
|
31
29
|
* @param {AgentMail.InboxId} inboxId
|
|
32
30
|
* @param {AgentMail.ListThreadsRequest} request
|
|
33
31
|
* @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -60,8 +60,6 @@ class Threads {
|
|
|
60
60
|
this._options = _options;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* List threads in inbox. If neither or both `received` and `sent` query parameters are set, all threads are returned.
|
|
64
|
-
*
|
|
65
63
|
* @param {AgentMail.InboxId} inboxId
|
|
66
64
|
* @param {AgentMail.ListThreadsRequest} request
|
|
67
65
|
* @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -93,7 +91,7 @@ class Threads {
|
|
|
93
91
|
const _response = yield core.fetcher({
|
|
94
92
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/threads`),
|
|
95
93
|
method: "GET",
|
|
96
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
94
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
97
95
|
contentType: "application/json",
|
|
98
96
|
queryParameters: _queryParams,
|
|
99
97
|
requestType: "json",
|
|
@@ -156,7 +154,7 @@ class Threads {
|
|
|
156
154
|
const _response = yield core.fetcher({
|
|
157
155
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId))}`),
|
|
158
156
|
method: "GET",
|
|
159
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
157
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.19", "User-Agent": "agentmail/0.0.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
160
158
|
contentType: "application/json",
|
|
161
159
|
requestType: "json",
|
|
162
160
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -5,6 +5,7 @@ import * as AgentMail from "../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
+
* organizationId: "org_123",
|
|
8
9
|
* inboxId: "yourinbox@agentmail.to",
|
|
9
10
|
* threadId: "thread_123",
|
|
10
11
|
* eventId: "event_123",
|
|
@@ -24,7 +25,8 @@ import * as AgentMail from "../../../index";
|
|
|
24
25
|
* from: "alice@example.com",
|
|
25
26
|
* to: ["bob@example.com"],
|
|
26
27
|
* text: "Let's review the timeline for the project.",
|
|
27
|
-
* inboxId: "yourinbox@agentmail.to"
|
|
28
|
+
* inboxId: "yourinbox@agentmail.to",
|
|
29
|
+
* organizationId: "org_123"
|
|
28
30
|
* }]
|
|
29
31
|
* }
|
|
30
32
|
*/
|
|
@@ -42,4 +44,5 @@ export interface Thread {
|
|
|
42
44
|
/** Messages in thread. Ordered by `sent_at` ascending. */
|
|
43
45
|
messages: AgentMail.Message[];
|
|
44
46
|
inboxId: AgentMail.InboxId;
|
|
47
|
+
organizationId: AgentMail.OrganizationId;
|
|
45
48
|
}
|
package/dist/api/types/Sent.d.ts
CHANGED
package/dist/api/types/index.js
CHANGED
|
@@ -19,6 +19,7 @@ __exportStar(require("./Sent"), exports);
|
|
|
19
19
|
__exportStar(require("./Limit"), exports);
|
|
20
20
|
__exportStar(require("./Count"), exports);
|
|
21
21
|
__exportStar(require("./LastKey"), exports);
|
|
22
|
+
__exportStar(require("./OrganizationId"), exports);
|
|
22
23
|
__exportStar(require("./ErrorName"), exports);
|
|
23
24
|
__exportStar(require("./ErrorResponse"), exports);
|
|
24
25
|
__exportStar(require("./ValidationErrorResponse"), exports);
|
|
@@ -22,6 +22,7 @@ import { MessageAttachments } from "./MessageAttachments";
|
|
|
22
22
|
import { MessageInReplyTo } from "./MessageInReplyTo";
|
|
23
23
|
import { MessageReferences } from "./MessageReferences";
|
|
24
24
|
import { InboxId } from "../../inboxes/types/InboxId";
|
|
25
|
+
import { OrganizationId } from "../../../types/OrganizationId";
|
|
25
26
|
export declare const Message: core.serialization.ObjectSchema<serializers.Message.Raw, AgentMail.Message>;
|
|
26
27
|
export declare namespace Message {
|
|
27
28
|
interface Raw {
|
|
@@ -43,5 +44,6 @@ export declare namespace Message {
|
|
|
43
44
|
in_reply_to?: MessageInReplyTo.Raw;
|
|
44
45
|
references?: MessageReferences.Raw;
|
|
45
46
|
inbox_id: InboxId.Raw;
|
|
47
|
+
organization_id: OrganizationId.Raw;
|
|
46
48
|
}
|
|
47
49
|
}
|
|
@@ -56,6 +56,7 @@ const MessageAttachments_1 = require("./MessageAttachments");
|
|
|
56
56
|
const MessageInReplyTo_1 = require("./MessageInReplyTo");
|
|
57
57
|
const MessageReferences_1 = require("./MessageReferences");
|
|
58
58
|
const InboxId_1 = require("../../inboxes/types/InboxId");
|
|
59
|
+
const OrganizationId_1 = require("../../../types/OrganizationId");
|
|
59
60
|
exports.Message = core.serialization.object({
|
|
60
61
|
threadId: core.serialization.property("thread_id", ThreadId_1.ThreadId),
|
|
61
62
|
messageId: core.serialization.property("message_id", MessageId_1.MessageId),
|
|
@@ -75,4 +76,5 @@ exports.Message = core.serialization.object({
|
|
|
75
76
|
inReplyTo: core.serialization.property("in_reply_to", MessageInReplyTo_1.MessageInReplyTo),
|
|
76
77
|
references: MessageReferences_1.MessageReferences,
|
|
77
78
|
inboxId: core.serialization.property("inbox_id", InboxId_1.InboxId),
|
|
79
|
+
organizationId: core.serialization.property("organization_id", OrganizationId_1.OrganizationId),
|
|
78
80
|
});
|
|
@@ -16,6 +16,7 @@ import { ThreadPreview } from "./ThreadPreview";
|
|
|
16
16
|
import { ThreadAttachments } from "./ThreadAttachments";
|
|
17
17
|
import { Message } from "../../messages/types/Message";
|
|
18
18
|
import { InboxId } from "../../inboxes/types/InboxId";
|
|
19
|
+
import { OrganizationId } from "../../../types/OrganizationId";
|
|
19
20
|
export declare const Thread: core.serialization.ObjectSchema<serializers.Thread.Raw, AgentMail.Thread>;
|
|
20
21
|
export declare namespace Thread {
|
|
21
22
|
interface Raw {
|
|
@@ -31,5 +32,6 @@ export declare namespace Thread {
|
|
|
31
32
|
attachments?: ThreadAttachments.Raw | null;
|
|
32
33
|
messages: Message.Raw[];
|
|
33
34
|
inbox_id: InboxId.Raw;
|
|
35
|
+
organization_id: OrganizationId.Raw;
|
|
34
36
|
}
|
|
35
37
|
}
|
|
@@ -50,6 +50,7 @@ const ThreadPreview_1 = require("./ThreadPreview");
|
|
|
50
50
|
const ThreadAttachments_1 = require("./ThreadAttachments");
|
|
51
51
|
const Message_1 = require("../../messages/types/Message");
|
|
52
52
|
const InboxId_1 = require("../../inboxes/types/InboxId");
|
|
53
|
+
const OrganizationId_1 = require("../../../types/OrganizationId");
|
|
53
54
|
exports.Thread = core.serialization.object({
|
|
54
55
|
threadId: core.serialization.property("thread_id", ThreadId_1.ThreadId),
|
|
55
56
|
eventId: core.serialization.property("event_id", ThreadEventId_1.ThreadEventId),
|
|
@@ -63,4 +64,5 @@ exports.Thread = core.serialization.object({
|
|
|
63
64
|
attachments: ThreadAttachments_1.ThreadAttachments.optional(),
|
|
64
65
|
messages: core.serialization.list(Message_1.Message),
|
|
65
66
|
inboxId: core.serialization.property("inbox_id", InboxId_1.InboxId),
|
|
67
|
+
organizationId: core.serialization.property("organization_id", OrganizationId_1.OrganizationId),
|
|
66
68
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as AgentMail from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
export declare const OrganizationId: core.serialization.Schema<serializers.OrganizationId.Raw, AgentMail.OrganizationId>;
|
|
8
|
+
export declare namespace OrganizationId {
|
|
9
|
+
type Raw = string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.OrganizationId = void 0;
|
|
40
|
+
const core = __importStar(require("../../core"));
|
|
41
|
+
exports.OrganizationId = core.serialization.string();
|
|
@@ -19,6 +19,7 @@ __exportStar(require("./Sent"), exports);
|
|
|
19
19
|
__exportStar(require("./Limit"), exports);
|
|
20
20
|
__exportStar(require("./Count"), exports);
|
|
21
21
|
__exportStar(require("./LastKey"), exports);
|
|
22
|
+
__exportStar(require("./OrganizationId"), exports);
|
|
22
23
|
__exportStar(require("./ErrorName"), exports);
|
|
23
24
|
__exportStar(require("./ErrorResponse"), exports);
|
|
24
25
|
__exportStar(require("./ValidationErrorResponse"), exports);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.19";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -158,21 +158,6 @@ await client.inboxes.create({
|
|
|
158
158
|
<dl>
|
|
159
159
|
<dd>
|
|
160
160
|
|
|
161
|
-
#### 📝 Description
|
|
162
|
-
|
|
163
|
-
<dl>
|
|
164
|
-
<dd>
|
|
165
|
-
|
|
166
|
-
<dl>
|
|
167
|
-
<dd>
|
|
168
|
-
|
|
169
|
-
List messages in inbox. If neither or both `received` and `sent` query parameters are set, all messages are returned.
|
|
170
|
-
|
|
171
|
-
</dd>
|
|
172
|
-
</dl>
|
|
173
|
-
</dd>
|
|
174
|
-
</dl>
|
|
175
|
-
|
|
176
161
|
#### 🔌 Usage
|
|
177
162
|
|
|
178
163
|
<dl>
|
|
@@ -421,21 +406,6 @@ await client.messages.reply("yourinbox@agentmail.to", "msg_123", {
|
|
|
421
406
|
<dl>
|
|
422
407
|
<dd>
|
|
423
408
|
|
|
424
|
-
#### 📝 Description
|
|
425
|
-
|
|
426
|
-
<dl>
|
|
427
|
-
<dd>
|
|
428
|
-
|
|
429
|
-
<dl>
|
|
430
|
-
<dd>
|
|
431
|
-
|
|
432
|
-
List threads in inbox. If neither or both `received` and `sent` query parameters are set, all threads are returned.
|
|
433
|
-
|
|
434
|
-
</dd>
|
|
435
|
-
</dl>
|
|
436
|
-
</dd>
|
|
437
|
-
</dl>
|
|
438
|
-
|
|
439
409
|
#### 🔌 Usage
|
|
440
410
|
|
|
441
411
|
<dl>
|
|
@@ -22,6 +22,7 @@ import { MessageAttachments } from "./MessageAttachments";
|
|
|
22
22
|
import { MessageInReplyTo } from "./MessageInReplyTo";
|
|
23
23
|
import { MessageReferences } from "./MessageReferences";
|
|
24
24
|
import { InboxId } from "../../inboxes/types/InboxId";
|
|
25
|
+
import { OrganizationId } from "../../../types/OrganizationId";
|
|
25
26
|
export declare const Message: core.serialization.ObjectSchema<serializers.Message.Raw, AgentMail.Message>;
|
|
26
27
|
export declare namespace Message {
|
|
27
28
|
interface Raw {
|
|
@@ -43,5 +44,6 @@ export declare namespace Message {
|
|
|
43
44
|
in_reply_to?: MessageInReplyTo.Raw;
|
|
44
45
|
references?: MessageReferences.Raw;
|
|
45
46
|
inbox_id: InboxId.Raw;
|
|
47
|
+
organization_id: OrganizationId.Raw;
|
|
46
48
|
}
|
|
47
49
|
}
|
|
@@ -56,6 +56,7 @@ const MessageAttachments_1 = require("./MessageAttachments");
|
|
|
56
56
|
const MessageInReplyTo_1 = require("./MessageInReplyTo");
|
|
57
57
|
const MessageReferences_1 = require("./MessageReferences");
|
|
58
58
|
const InboxId_1 = require("../../inboxes/types/InboxId");
|
|
59
|
+
const OrganizationId_1 = require("../../../types/OrganizationId");
|
|
59
60
|
exports.Message = core.serialization.object({
|
|
60
61
|
threadId: core.serialization.property("thread_id", ThreadId_1.ThreadId),
|
|
61
62
|
messageId: core.serialization.property("message_id", MessageId_1.MessageId),
|
|
@@ -75,4 +76,5 @@ exports.Message = core.serialization.object({
|
|
|
75
76
|
inReplyTo: core.serialization.property("in_reply_to", MessageInReplyTo_1.MessageInReplyTo),
|
|
76
77
|
references: MessageReferences_1.MessageReferences,
|
|
77
78
|
inboxId: core.serialization.property("inbox_id", InboxId_1.InboxId),
|
|
79
|
+
organizationId: core.serialization.property("organization_id", OrganizationId_1.OrganizationId),
|
|
78
80
|
});
|
|
@@ -16,6 +16,7 @@ import { ThreadPreview } from "./ThreadPreview";
|
|
|
16
16
|
import { ThreadAttachments } from "./ThreadAttachments";
|
|
17
17
|
import { Message } from "../../messages/types/Message";
|
|
18
18
|
import { InboxId } from "../../inboxes/types/InboxId";
|
|
19
|
+
import { OrganizationId } from "../../../types/OrganizationId";
|
|
19
20
|
export declare const Thread: core.serialization.ObjectSchema<serializers.Thread.Raw, AgentMail.Thread>;
|
|
20
21
|
export declare namespace Thread {
|
|
21
22
|
interface Raw {
|
|
@@ -31,5 +32,6 @@ export declare namespace Thread {
|
|
|
31
32
|
attachments?: ThreadAttachments.Raw | null;
|
|
32
33
|
messages: Message.Raw[];
|
|
33
34
|
inbox_id: InboxId.Raw;
|
|
35
|
+
organization_id: OrganizationId.Raw;
|
|
34
36
|
}
|
|
35
37
|
}
|
|
@@ -50,6 +50,7 @@ const ThreadPreview_1 = require("./ThreadPreview");
|
|
|
50
50
|
const ThreadAttachments_1 = require("./ThreadAttachments");
|
|
51
51
|
const Message_1 = require("../../messages/types/Message");
|
|
52
52
|
const InboxId_1 = require("../../inboxes/types/InboxId");
|
|
53
|
+
const OrganizationId_1 = require("../../../types/OrganizationId");
|
|
53
54
|
exports.Thread = core.serialization.object({
|
|
54
55
|
threadId: core.serialization.property("thread_id", ThreadId_1.ThreadId),
|
|
55
56
|
eventId: core.serialization.property("event_id", ThreadEventId_1.ThreadEventId),
|
|
@@ -63,4 +64,5 @@ exports.Thread = core.serialization.object({
|
|
|
63
64
|
attachments: ThreadAttachments_1.ThreadAttachments.optional(),
|
|
64
65
|
messages: core.serialization.list(Message_1.Message),
|
|
65
66
|
inboxId: core.serialization.property("inbox_id", InboxId_1.InboxId),
|
|
67
|
+
organizationId: core.serialization.property("organization_id", OrganizationId_1.OrganizationId),
|
|
66
68
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as AgentMail from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
export declare const OrganizationId: core.serialization.Schema<serializers.OrganizationId.Raw, AgentMail.OrganizationId>;
|
|
8
|
+
export declare namespace OrganizationId {
|
|
9
|
+
type Raw = string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.OrganizationId = void 0;
|
|
40
|
+
const core = __importStar(require("../../core"));
|
|
41
|
+
exports.OrganizationId = core.serialization.string();
|
|
@@ -19,6 +19,7 @@ __exportStar(require("./Sent"), exports);
|
|
|
19
19
|
__exportStar(require("./Limit"), exports);
|
|
20
20
|
__exportStar(require("./Count"), exports);
|
|
21
21
|
__exportStar(require("./LastKey"), exports);
|
|
22
|
+
__exportStar(require("./OrganizationId"), exports);
|
|
22
23
|
__exportStar(require("./ErrorName"), exports);
|
|
23
24
|
__exportStar(require("./ErrorResponse"), exports);
|
|
24
25
|
__exportStar(require("./ValidationErrorResponse"), exports);
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.19";
|
package/version.js
CHANGED