agentmail 0.0.57 → 0.0.64
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/Client.d.ts +2 -2
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/domains/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/domains/client/Client.js +4 -4
- package/dist/cjs/api/resources/drafts/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/drafts/client/Client.js +2 -2
- package/dist/cjs/api/resources/drafts/types/CreateDraftRequest.d.ts +1 -0
- package/dist/cjs/api/resources/drafts/types/Draft.d.ts +1 -2
- package/dist/cjs/api/resources/drafts/types/DraftInReplyTo.d.ts +7 -0
- package/dist/cjs/api/resources/drafts/types/DraftInReplyTo.js +5 -0
- package/dist/cjs/api/resources/drafts/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/drafts/types/index.js +1 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +13 -2
- package/dist/cjs/api/resources/inboxes/client/Client.js +66 -3
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +3 -2
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +6 -5
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +7 -7
- package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.js +1 -1
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +14 -2
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +67 -3
- package/dist/cjs/api/resources/messages/types/Message.d.ts +5 -8
- package/dist/cjs/api/resources/messages/types/MessageCreatedAt.d.ts +7 -0
- package/dist/cjs/api/resources/messages/types/MessageCreatedAt.js +5 -0
- package/dist/cjs/api/resources/messages/types/MessageInReplyTo.d.ts +7 -0
- package/dist/cjs/api/resources/messages/types/MessageInReplyTo.js +5 -0
- package/dist/cjs/api/resources/messages/types/MessageItem.d.ts +5 -0
- package/dist/cjs/api/resources/messages/types/MessageReferences.d.ts +7 -0
- package/dist/cjs/api/resources/messages/types/MessageReferences.js +5 -0
- package/dist/cjs/api/resources/messages/types/MessageReplyTo.d.ts +7 -0
- package/dist/cjs/api/resources/messages/types/MessageReplyTo.js +5 -0
- package/dist/cjs/api/resources/messages/types/MessageSize.d.ts +7 -0
- package/dist/cjs/api/resources/messages/types/MessageSize.js +5 -0
- package/dist/cjs/api/resources/messages/types/MessageUpdatedAt.d.ts +7 -0
- package/dist/cjs/api/resources/messages/types/MessageUpdatedAt.js +5 -0
- package/dist/cjs/api/resources/messages/types/index.d.ts +6 -0
- package/dist/cjs/api/resources/messages/types/index.js +6 -0
- package/dist/cjs/api/resources/metrics/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/metrics/client/Client.js +1 -1
- package/dist/cjs/api/resources/threads/client/Client.d.ts +13 -2
- package/dist/cjs/api/resources/threads/client/Client.js +66 -3
- package/dist/cjs/api/resources/threads/types/Thread.d.ts +6 -4
- package/dist/cjs/api/resources/threads/types/ThreadCreatedAt.d.ts +7 -0
- package/dist/cjs/api/resources/threads/types/ThreadCreatedAt.js +5 -0
- package/dist/cjs/api/resources/threads/types/ThreadItem.d.ts +6 -0
- package/dist/cjs/api/resources/threads/types/ThreadLastMessageId.d.ts +7 -0
- package/dist/cjs/api/resources/threads/types/ThreadLastMessageId.js +5 -0
- package/dist/cjs/api/resources/threads/types/ThreadReceivedTimestamp.d.ts +7 -0
- package/dist/cjs/api/resources/threads/types/ThreadReceivedTimestamp.js +5 -0
- package/dist/cjs/api/resources/threads/types/ThreadSentTimestamp.d.ts +7 -0
- package/dist/cjs/api/resources/threads/types/ThreadSentTimestamp.js +5 -0
- package/dist/cjs/api/resources/threads/types/ThreadSize.d.ts +7 -0
- package/dist/cjs/api/resources/threads/types/ThreadSize.js +5 -0
- package/dist/cjs/api/resources/threads/types/ThreadTimestamp.d.ts +1 -1
- package/dist/cjs/api/resources/threads/types/ThreadUpdatedAt.d.ts +7 -0
- package/dist/cjs/api/resources/threads/types/ThreadUpdatedAt.js +5 -0
- package/dist/cjs/api/resources/threads/types/index.d.ts +6 -0
- package/dist/cjs/api/resources/threads/types/index.js +6 -0
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/webhooks/client/Client.js +4 -4
- package/dist/cjs/api/resources/websockets/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/websockets/client/Client.js +2 -1
- package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/cjs/core/fetcher/requestWithRetries.js +44 -8
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/core/websocket/ws.d.ts +1 -1
- package/dist/cjs/serialization/resources/drafts/types/CreateDraftRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/drafts/types/CreateDraftRequest.js +2 -0
- package/dist/cjs/serialization/resources/drafts/types/Draft.d.ts +2 -1
- package/dist/cjs/serialization/resources/drafts/types/Draft.js +2 -1
- package/dist/cjs/serialization/resources/drafts/types/DraftInReplyTo.d.ts +10 -0
- package/dist/cjs/serialization/resources/drafts/types/DraftInReplyTo.js +41 -0
- package/dist/cjs/serialization/resources/drafts/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/drafts/types/index.js +1 -0
- package/dist/cjs/serialization/resources/messages/types/Message.d.ts +10 -4
- package/dist/cjs/serialization/resources/messages/types/Message.js +10 -4
- package/dist/cjs/serialization/resources/messages/types/MessageCreatedAt.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageCreatedAt.js +41 -0
- package/dist/cjs/serialization/resources/messages/types/MessageInReplyTo.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageInReplyTo.js +41 -0
- package/dist/cjs/serialization/resources/messages/types/MessageItem.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageItem.js +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageReferences.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageReferences.js +41 -0
- package/dist/cjs/serialization/resources/messages/types/MessageReplyTo.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageReplyTo.js +41 -0
- package/dist/cjs/serialization/resources/messages/types/MessageSize.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageSize.js +41 -0
- package/dist/cjs/serialization/resources/messages/types/MessageUpdatedAt.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageUpdatedAt.js +41 -0
- package/dist/cjs/serialization/resources/messages/types/index.d.ts +6 -0
- package/dist/cjs/serialization/resources/messages/types/index.js +6 -0
- package/dist/cjs/serialization/resources/threads/types/Thread.d.ts +12 -2
- package/dist/cjs/serialization/resources/threads/types/Thread.js +12 -2
- package/dist/cjs/serialization/resources/threads/types/ThreadCreatedAt.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadCreatedAt.js +41 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadItem.d.ts +12 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadItem.js +12 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadLastMessageId.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadLastMessageId.js +41 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadReceivedTimestamp.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadReceivedTimestamp.js +41 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadSentTimestamp.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadSentTimestamp.js +41 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadSize.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadSize.js +41 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadUpdatedAt.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadUpdatedAt.js +41 -0
- package/dist/cjs/serialization/resources/threads/types/index.d.ts +6 -0
- package/dist/cjs/serialization/resources/threads/types/index.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +2 -2
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/domains/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/domains/client/Client.mjs +4 -4
- package/dist/esm/api/resources/drafts/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/drafts/client/Client.mjs +2 -2
- package/dist/esm/api/resources/drafts/types/CreateDraftRequest.d.mts +1 -0
- package/dist/esm/api/resources/drafts/types/Draft.d.mts +1 -2
- package/dist/esm/api/resources/drafts/types/DraftInReplyTo.d.mts +7 -0
- package/dist/esm/api/resources/drafts/types/DraftInReplyTo.mjs +4 -0
- package/dist/esm/api/resources/drafts/types/index.d.mts +1 -0
- package/dist/esm/api/resources/drafts/types/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +13 -2
- package/dist/esm/api/resources/inboxes/client/Client.mjs +66 -3
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +3 -2
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +6 -5
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +7 -7
- package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.mjs +1 -1
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +14 -2
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +67 -3
- package/dist/esm/api/resources/messages/types/Message.d.mts +5 -8
- package/dist/esm/api/resources/messages/types/MessageCreatedAt.d.mts +7 -0
- package/dist/esm/api/resources/messages/types/MessageCreatedAt.mjs +4 -0
- package/dist/esm/api/resources/messages/types/MessageInReplyTo.d.mts +7 -0
- package/dist/esm/api/resources/messages/types/MessageInReplyTo.mjs +4 -0
- package/dist/esm/api/resources/messages/types/MessageItem.d.mts +5 -0
- package/dist/esm/api/resources/messages/types/MessageReferences.d.mts +7 -0
- package/dist/esm/api/resources/messages/types/MessageReferences.mjs +4 -0
- package/dist/esm/api/resources/messages/types/MessageReplyTo.d.mts +7 -0
- package/dist/esm/api/resources/messages/types/MessageReplyTo.mjs +4 -0
- package/dist/esm/api/resources/messages/types/MessageSize.d.mts +7 -0
- package/dist/esm/api/resources/messages/types/MessageSize.mjs +4 -0
- package/dist/esm/api/resources/messages/types/MessageUpdatedAt.d.mts +7 -0
- package/dist/esm/api/resources/messages/types/MessageUpdatedAt.mjs +4 -0
- package/dist/esm/api/resources/messages/types/index.d.mts +6 -0
- package/dist/esm/api/resources/messages/types/index.mjs +6 -0
- package/dist/esm/api/resources/metrics/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/metrics/client/Client.mjs +1 -1
- package/dist/esm/api/resources/threads/client/Client.d.mts +13 -2
- package/dist/esm/api/resources/threads/client/Client.mjs +66 -3
- package/dist/esm/api/resources/threads/types/Thread.d.mts +6 -4
- package/dist/esm/api/resources/threads/types/ThreadCreatedAt.d.mts +7 -0
- package/dist/esm/api/resources/threads/types/ThreadCreatedAt.mjs +4 -0
- package/dist/esm/api/resources/threads/types/ThreadItem.d.mts +6 -0
- package/dist/esm/api/resources/threads/types/ThreadLastMessageId.d.mts +7 -0
- package/dist/esm/api/resources/threads/types/ThreadLastMessageId.mjs +4 -0
- package/dist/esm/api/resources/threads/types/ThreadReceivedTimestamp.d.mts +7 -0
- package/dist/esm/api/resources/threads/types/ThreadReceivedTimestamp.mjs +4 -0
- package/dist/esm/api/resources/threads/types/ThreadSentTimestamp.d.mts +7 -0
- package/dist/esm/api/resources/threads/types/ThreadSentTimestamp.mjs +4 -0
- package/dist/esm/api/resources/threads/types/ThreadSize.d.mts +7 -0
- package/dist/esm/api/resources/threads/types/ThreadSize.mjs +4 -0
- package/dist/esm/api/resources/threads/types/ThreadTimestamp.d.mts +1 -1
- package/dist/esm/api/resources/threads/types/ThreadUpdatedAt.d.mts +7 -0
- package/dist/esm/api/resources/threads/types/ThreadUpdatedAt.mjs +4 -0
- package/dist/esm/api/resources/threads/types/index.d.mts +6 -0
- package/dist/esm/api/resources/threads/types/index.mjs +6 -0
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/webhooks/client/Client.mjs +4 -4
- package/dist/esm/api/resources/websockets/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/websockets/client/Client.mjs +2 -1
- package/dist/esm/core/fetcher/Fetcher.d.mts +1 -1
- package/dist/esm/core/fetcher/requestWithRetries.mjs +44 -8
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/core/websocket/ws.d.mts +1 -1
- package/dist/esm/serialization/resources/drafts/types/CreateDraftRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/drafts/types/CreateDraftRequest.mjs +2 -0
- package/dist/esm/serialization/resources/drafts/types/Draft.d.mts +2 -1
- package/dist/esm/serialization/resources/drafts/types/Draft.mjs +2 -1
- package/dist/esm/serialization/resources/drafts/types/DraftInReplyTo.d.mts +10 -0
- package/dist/esm/serialization/resources/drafts/types/DraftInReplyTo.mjs +5 -0
- package/dist/esm/serialization/resources/drafts/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/drafts/types/index.mjs +1 -0
- package/dist/esm/serialization/resources/messages/types/Message.d.mts +10 -4
- package/dist/esm/serialization/resources/messages/types/Message.mjs +10 -4
- package/dist/esm/serialization/resources/messages/types/MessageCreatedAt.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageCreatedAt.mjs +5 -0
- package/dist/esm/serialization/resources/messages/types/MessageInReplyTo.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageInReplyTo.mjs +5 -0
- package/dist/esm/serialization/resources/messages/types/MessageItem.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageItem.mjs +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageReferences.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageReferences.mjs +5 -0
- package/dist/esm/serialization/resources/messages/types/MessageReplyTo.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageReplyTo.mjs +5 -0
- package/dist/esm/serialization/resources/messages/types/MessageSize.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageSize.mjs +5 -0
- package/dist/esm/serialization/resources/messages/types/MessageUpdatedAt.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageUpdatedAt.mjs +5 -0
- package/dist/esm/serialization/resources/messages/types/index.d.mts +6 -0
- package/dist/esm/serialization/resources/messages/types/index.mjs +6 -0
- package/dist/esm/serialization/resources/threads/types/Thread.d.mts +12 -2
- package/dist/esm/serialization/resources/threads/types/Thread.mjs +12 -2
- package/dist/esm/serialization/resources/threads/types/ThreadCreatedAt.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/ThreadCreatedAt.mjs +5 -0
- package/dist/esm/serialization/resources/threads/types/ThreadItem.d.mts +12 -0
- package/dist/esm/serialization/resources/threads/types/ThreadItem.mjs +12 -0
- package/dist/esm/serialization/resources/threads/types/ThreadLastMessageId.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/ThreadLastMessageId.mjs +5 -0
- package/dist/esm/serialization/resources/threads/types/ThreadReceivedTimestamp.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/ThreadReceivedTimestamp.mjs +5 -0
- package/dist/esm/serialization/resources/threads/types/ThreadSentTimestamp.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/ThreadSentTimestamp.mjs +5 -0
- package/dist/esm/serialization/resources/threads/types/ThreadSize.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/ThreadSize.mjs +5 -0
- package/dist/esm/serialization/resources/threads/types/ThreadUpdatedAt.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/ThreadUpdatedAt.mjs +5 -0
- package/dist/esm/serialization/resources/threads/types/index.d.mts +6 -0
- package/dist/esm/serialization/resources/threads/types/index.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +393 -0
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare namespace AgentMailClient {
|
|
|
17
17
|
baseUrl?: core.Supplier<string>;
|
|
18
18
|
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
19
19
|
/** Additional headers to include in requests. */
|
|
20
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
20
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
21
21
|
}
|
|
22
22
|
interface RequestOptions {
|
|
23
23
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -29,7 +29,7 @@ export declare namespace AgentMailClient {
|
|
|
29
29
|
/** Additional query string parameters to include in the request. */
|
|
30
30
|
queryParams?: Record<string, unknown>;
|
|
31
31
|
/** Additional headers to include in the request. */
|
|
32
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
32
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
export declare class AgentMailClient {
|
package/dist/cjs/Client.js
CHANGED
|
@@ -51,8 +51,8 @@ class AgentMailClient {
|
|
|
51
51
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
52
52
|
"X-Fern-Language": "JavaScript",
|
|
53
53
|
"X-Fern-SDK-Name": "agentmail",
|
|
54
|
-
"X-Fern-SDK-Version": "0.0.
|
|
55
|
-
"User-Agent": "agentmail/0.0.
|
|
54
|
+
"X-Fern-SDK-Version": "0.0.64",
|
|
55
|
+
"User-Agent": "agentmail/0.0.64",
|
|
56
56
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
57
57
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
58
58
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -11,7 +11,7 @@ export declare namespace Domains {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Domains {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Domains {
|
|
@@ -77,7 +77,7 @@ class Domains {
|
|
|
77
77
|
if (pageToken != null) {
|
|
78
78
|
_queryParams["page_token"] = pageToken;
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
81
81
|
const _response = yield core.fetcher({
|
|
82
82
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/domains"),
|
|
83
83
|
method: "GET",
|
|
@@ -138,7 +138,7 @@ class Domains {
|
|
|
138
138
|
__get(domain, requestOptions) {
|
|
139
139
|
return __awaiter(this, void 0, void 0, function* () {
|
|
140
140
|
var _a, _b, _c;
|
|
141
|
-
|
|
141
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
142
142
|
const _response = yield core.fetcher({
|
|
143
143
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/domains/${encodeURIComponent(serializers.DomainId.jsonOrThrow(domain, { omitUndefined: true }))}`),
|
|
144
144
|
method: "GET",
|
|
@@ -212,7 +212,7 @@ class Domains {
|
|
|
212
212
|
__create(request, requestOptions) {
|
|
213
213
|
return __awaiter(this, void 0, void 0, function* () {
|
|
214
214
|
var _a, _b, _c;
|
|
215
|
-
|
|
215
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
216
216
|
const _response = yield core.fetcher({
|
|
217
217
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/domains"),
|
|
218
218
|
method: "POST",
|
|
@@ -290,7 +290,7 @@ class Domains {
|
|
|
290
290
|
__delete(domain, requestOptions) {
|
|
291
291
|
return __awaiter(this, void 0, void 0, function* () {
|
|
292
292
|
var _a, _b, _c;
|
|
293
|
-
|
|
293
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
294
294
|
const _response = yield core.fetcher({
|
|
295
295
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/domains/${encodeURIComponent(serializers.DomainId.jsonOrThrow(domain, { omitUndefined: true }))}`),
|
|
296
296
|
method: "DELETE",
|
|
@@ -11,7 +11,7 @@ export declare namespace Drafts {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Drafts {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Drafts {
|
|
@@ -92,7 +92,7 @@ class Drafts {
|
|
|
92
92
|
if (ascending != null) {
|
|
93
93
|
_queryParams["ascending"] = ascending.toString();
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
96
96
|
const _response = yield core.fetcher({
|
|
97
97
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/drafts"),
|
|
98
98
|
method: "GET",
|
|
@@ -164,7 +164,7 @@ class Drafts {
|
|
|
164
164
|
__get(draftId, requestOptions) {
|
|
165
165
|
return __awaiter(this, void 0, void 0, function* () {
|
|
166
166
|
var _a, _b, _c;
|
|
167
|
-
|
|
167
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
168
168
|
const _response = yield core.fetcher({
|
|
169
169
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/drafts/${encodeURIComponent(serializers.DraftId.jsonOrThrow(draftId, { omitUndefined: true }))}`),
|
|
170
170
|
method: "GET",
|
|
@@ -16,8 +16,7 @@ export interface Draft {
|
|
|
16
16
|
text?: AgentMail.DraftText;
|
|
17
17
|
html?: AgentMail.DraftHtml;
|
|
18
18
|
attachments?: AgentMail.DraftAttachments;
|
|
19
|
-
|
|
20
|
-
inReplyTo?: string;
|
|
19
|
+
inReplyTo?: AgentMail.DraftInReplyTo;
|
|
21
20
|
/** IDs of previous messages in thread. */
|
|
22
21
|
references?: string[];
|
|
23
22
|
sendStatus?: AgentMail.DraftSendStatus;
|
|
@@ -9,6 +9,7 @@ export * from "./DraftPreview.js";
|
|
|
9
9
|
export * from "./DraftText.js";
|
|
10
10
|
export * from "./DraftHtml.js";
|
|
11
11
|
export * from "./DraftAttachments.js";
|
|
12
|
+
export * from "./DraftInReplyTo.js";
|
|
12
13
|
export * from "./DraftSendStatus.js";
|
|
13
14
|
export * from "./DraftSendAt.js";
|
|
14
15
|
export * from "./DraftUpdatedAt.js";
|
|
@@ -25,6 +25,7 @@ __exportStar(require("./DraftPreview.js"), exports);
|
|
|
25
25
|
__exportStar(require("./DraftText.js"), exports);
|
|
26
26
|
__exportStar(require("./DraftHtml.js"), exports);
|
|
27
27
|
__exportStar(require("./DraftAttachments.js"), exports);
|
|
28
|
+
__exportStar(require("./DraftInReplyTo.js"), exports);
|
|
28
29
|
__exportStar(require("./DraftSendStatus.js"), exports);
|
|
29
30
|
__exportStar(require("./DraftSendAt.js"), exports);
|
|
30
31
|
__exportStar(require("./DraftUpdatedAt.js"), exports);
|
|
@@ -15,7 +15,7 @@ export declare namespace Inboxes {
|
|
|
15
15
|
baseUrl?: core.Supplier<string>;
|
|
16
16
|
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
17
17
|
/** Additional headers to include in requests. */
|
|
18
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
18
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
19
19
|
}
|
|
20
20
|
interface RequestOptions {
|
|
21
21
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -27,7 +27,7 @@ export declare namespace Inboxes {
|
|
|
27
27
|
/** Additional query string parameters to include in the request. */
|
|
28
28
|
queryParams?: Record<string, unknown>;
|
|
29
29
|
/** Additional headers to include in the request. */
|
|
30
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
30
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
export declare class Inboxes {
|
|
@@ -77,5 +77,16 @@ export declare class Inboxes {
|
|
|
77
77
|
*/
|
|
78
78
|
create(request: AgentMail.inboxes.CreateInboxRequest, requestOptions?: Inboxes.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
|
|
79
79
|
private __create;
|
|
80
|
+
/**
|
|
81
|
+
* @param {AgentMail.inboxes.InboxId} inboxId
|
|
82
|
+
* @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* await client.inboxes.delete("inbox_id")
|
|
88
|
+
*/
|
|
89
|
+
delete(inboxId: AgentMail.inboxes.InboxId, requestOptions?: Inboxes.RequestOptions): core.HttpResponsePromise<void>;
|
|
90
|
+
private __delete;
|
|
80
91
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
81
92
|
}
|
|
@@ -97,7 +97,7 @@ class Inboxes {
|
|
|
97
97
|
if (pageToken != null) {
|
|
98
98
|
_queryParams["page_token"] = pageToken;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
101
101
|
const _response = yield core.fetcher({
|
|
102
102
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/inboxes"),
|
|
103
103
|
method: "GET",
|
|
@@ -158,7 +158,7 @@ class Inboxes {
|
|
|
158
158
|
__get(inboxId, requestOptions) {
|
|
159
159
|
return __awaiter(this, void 0, void 0, function* () {
|
|
160
160
|
var _a, _b, _c;
|
|
161
|
-
|
|
161
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
162
162
|
const _response = yield core.fetcher({
|
|
163
163
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}`),
|
|
164
164
|
method: "GET",
|
|
@@ -235,7 +235,7 @@ class Inboxes {
|
|
|
235
235
|
__create(request, requestOptions) {
|
|
236
236
|
return __awaiter(this, void 0, void 0, function* () {
|
|
237
237
|
var _a, _b, _c;
|
|
238
|
-
|
|
238
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
239
239
|
const _response = yield core.fetcher({
|
|
240
240
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/inboxes"),
|
|
241
241
|
method: "POST",
|
|
@@ -298,6 +298,69 @@ class Inboxes {
|
|
|
298
298
|
}
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* @param {AgentMail.inboxes.InboxId} inboxId
|
|
303
|
+
* @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
|
|
304
|
+
*
|
|
305
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* await client.inboxes.delete("inbox_id")
|
|
309
|
+
*/
|
|
310
|
+
delete(inboxId, requestOptions) {
|
|
311
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(inboxId, requestOptions));
|
|
312
|
+
}
|
|
313
|
+
__delete(inboxId, requestOptions) {
|
|
314
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
315
|
+
var _a, _b, _c;
|
|
316
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
317
|
+
const _response = yield core.fetcher({
|
|
318
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}`),
|
|
319
|
+
method: "DELETE",
|
|
320
|
+
headers: _headers,
|
|
321
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
322
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
323
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
324
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
325
|
+
});
|
|
326
|
+
if (_response.ok) {
|
|
327
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
328
|
+
}
|
|
329
|
+
if (_response.error.reason === "status-code") {
|
|
330
|
+
switch (_response.error.statusCode) {
|
|
331
|
+
case 404:
|
|
332
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
333
|
+
unrecognizedObjectKeys: "passthrough",
|
|
334
|
+
allowUnrecognizedUnionMembers: true,
|
|
335
|
+
allowUnrecognizedEnumValues: true,
|
|
336
|
+
skipValidation: true,
|
|
337
|
+
breadcrumbsPrefix: ["response"],
|
|
338
|
+
}), _response.rawResponse);
|
|
339
|
+
default:
|
|
340
|
+
throw new errors.AgentMailError({
|
|
341
|
+
statusCode: _response.error.statusCode,
|
|
342
|
+
body: _response.error.body,
|
|
343
|
+
rawResponse: _response.rawResponse,
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
switch (_response.error.reason) {
|
|
348
|
+
case "non-json":
|
|
349
|
+
throw new errors.AgentMailError({
|
|
350
|
+
statusCode: _response.error.statusCode,
|
|
351
|
+
body: _response.error.rawBody,
|
|
352
|
+
rawResponse: _response.rawResponse,
|
|
353
|
+
});
|
|
354
|
+
case "timeout":
|
|
355
|
+
throw new errors.AgentMailTimeoutError("Timeout exceeded when calling DELETE /v0/inboxes/{inbox_id}.");
|
|
356
|
+
case "unknown":
|
|
357
|
+
throw new errors.AgentMailError({
|
|
358
|
+
message: _response.error.errorMessage,
|
|
359
|
+
rawResponse: _response.rawResponse,
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
}
|
|
301
364
|
_getAuthorizationHeader() {
|
|
302
365
|
return __awaiter(this, void 0, void 0, function* () {
|
|
303
366
|
var _a;
|
|
@@ -11,7 +11,7 @@ export declare namespace Drafts {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Drafts {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Drafts {
|
|
@@ -70,6 +70,7 @@ export declare class Drafts {
|
|
|
70
70
|
* subject: undefined,
|
|
71
71
|
* text: undefined,
|
|
72
72
|
* html: undefined,
|
|
73
|
+
* inReplyTo: undefined,
|
|
73
74
|
* sendAt: undefined
|
|
74
75
|
* })
|
|
75
76
|
*/
|
|
@@ -93,7 +93,7 @@ class Drafts {
|
|
|
93
93
|
if (ascending != null) {
|
|
94
94
|
_queryParams["ascending"] = ascending.toString();
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
97
97
|
const _response = yield core.fetcher({
|
|
98
98
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/drafts`),
|
|
99
99
|
method: "GET",
|
|
@@ -166,7 +166,7 @@ class Drafts {
|
|
|
166
166
|
__get(inboxId, draftId, requestOptions) {
|
|
167
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
168
|
var _a, _b, _c;
|
|
169
|
-
|
|
169
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
170
170
|
const _response = yield core.fetcher({
|
|
171
171
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/drafts/${encodeURIComponent(serializers.DraftId.jsonOrThrow(draftId, { omitUndefined: true }))}`),
|
|
172
172
|
method: "GET",
|
|
@@ -240,6 +240,7 @@ class Drafts {
|
|
|
240
240
|
* subject: undefined,
|
|
241
241
|
* text: undefined,
|
|
242
242
|
* html: undefined,
|
|
243
|
+
* inReplyTo: undefined,
|
|
243
244
|
* sendAt: undefined
|
|
244
245
|
* })
|
|
245
246
|
*/
|
|
@@ -249,7 +250,7 @@ class Drafts {
|
|
|
249
250
|
__create(inboxId, request, requestOptions) {
|
|
250
251
|
return __awaiter(this, void 0, void 0, function* () {
|
|
251
252
|
var _a, _b, _c;
|
|
252
|
-
|
|
253
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
253
254
|
const _response = yield core.fetcher({
|
|
254
255
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/drafts`),
|
|
255
256
|
method: "POST",
|
|
@@ -334,7 +335,7 @@ class Drafts {
|
|
|
334
335
|
__send(inboxId, draftId, request, requestOptions) {
|
|
335
336
|
return __awaiter(this, void 0, void 0, function* () {
|
|
336
337
|
var _a, _b, _c;
|
|
337
|
-
|
|
338
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
338
339
|
const _response = yield core.fetcher({
|
|
339
340
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/drafts/${encodeURIComponent(serializers.DraftId.jsonOrThrow(draftId, { omitUndefined: true }))}/send`),
|
|
340
341
|
method: "POST",
|
|
@@ -429,7 +430,7 @@ class Drafts {
|
|
|
429
430
|
__delete(inboxId, draftId, requestOptions) {
|
|
430
431
|
return __awaiter(this, void 0, void 0, function* () {
|
|
431
432
|
var _a, _b, _c;
|
|
432
|
-
|
|
433
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
433
434
|
const _response = yield core.fetcher({
|
|
434
435
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/drafts/${encodeURIComponent(serializers.DraftId.jsonOrThrow(draftId, { omitUndefined: true }))}`),
|
|
435
436
|
method: "DELETE",
|
|
@@ -11,7 +11,7 @@ export declare namespace Messages {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Messages {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Messages {
|
|
@@ -93,7 +93,7 @@ class Messages {
|
|
|
93
93
|
if (ascending != null) {
|
|
94
94
|
_queryParams["ascending"] = ascending.toString();
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
97
97
|
const _response = yield core.fetcher({
|
|
98
98
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/messages`),
|
|
99
99
|
method: "GET",
|
|
@@ -166,7 +166,7 @@ class Messages {
|
|
|
166
166
|
__get(inboxId, messageId, requestOptions) {
|
|
167
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
168
|
var _a, _b, _c;
|
|
169
|
-
|
|
169
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
170
170
|
const _response = yield core.fetcher({
|
|
171
171
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId, { omitUndefined: true }))}`),
|
|
172
172
|
method: "GET",
|
|
@@ -232,7 +232,7 @@ class Messages {
|
|
|
232
232
|
__getAttachment(inboxId, messageId, attachmentId, requestOptions) {
|
|
233
233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
234
234
|
var _a, _b, _c;
|
|
235
|
-
|
|
235
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
236
236
|
const _response = yield core.fetcher({
|
|
237
237
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId, { omitUndefined: true }))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId, { omitUndefined: true }))}`),
|
|
238
238
|
method: "GET",
|
|
@@ -290,7 +290,7 @@ class Messages {
|
|
|
290
290
|
__getRaw(inboxId, messageId, requestOptions) {
|
|
291
291
|
return __awaiter(this, void 0, void 0, function* () {
|
|
292
292
|
var _a, _b, _c;
|
|
293
|
-
|
|
293
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
294
294
|
const _response = yield core.fetcher({
|
|
295
295
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId, { omitUndefined: true }))}/raw`),
|
|
296
296
|
method: "GET",
|
|
@@ -367,7 +367,7 @@ class Messages {
|
|
|
367
367
|
__send(inboxId, request, requestOptions) {
|
|
368
368
|
return __awaiter(this, void 0, void 0, function* () {
|
|
369
369
|
var _a, _b, _c;
|
|
370
|
-
|
|
370
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
371
371
|
const _response = yield core.fetcher({
|
|
372
372
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/messages/send`),
|
|
373
373
|
method: "POST",
|
|
@@ -474,7 +474,7 @@ class Messages {
|
|
|
474
474
|
__reply(inboxId, messageId, request, requestOptions) {
|
|
475
475
|
return __awaiter(this, void 0, void 0, function* () {
|
|
476
476
|
var _a, _b, _c;
|
|
477
|
-
|
|
477
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
478
478
|
const _response = yield core.fetcher({
|
|
479
479
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId, { omitUndefined: true }))}/reply`),
|
|
480
480
|
method: "POST",
|
|
@@ -574,7 +574,7 @@ class Messages {
|
|
|
574
574
|
__update(inboxId, messageId, request, requestOptions) {
|
|
575
575
|
return __awaiter(this, void 0, void 0, function* () {
|
|
576
576
|
var _a, _b, _c;
|
|
577
|
-
|
|
577
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
578
578
|
const _response = yield core.fetcher({
|
|
579
579
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId, { omitUndefined: true }))}`),
|
|
580
580
|
method: "PATCH",
|
|
@@ -11,7 +11,7 @@ export declare namespace Metrics {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Metrics {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Metrics {
|
|
@@ -87,7 +87,7 @@ class Metrics {
|
|
|
87
87
|
}
|
|
88
88
|
_queryParams["start_timestamp"] = startTimestamp.toISOString();
|
|
89
89
|
_queryParams["end_timestamp"] = endTimestamp.toISOString();
|
|
90
|
-
|
|
90
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
91
91
|
const _response = yield core.fetcher({
|
|
92
92
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/metrics`),
|
|
93
93
|
method: "GET",
|
|
@@ -11,7 +11,7 @@ export declare namespace Threads {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Threads {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Threads {
|
|
@@ -58,5 +58,17 @@ export declare class Threads {
|
|
|
58
58
|
*/
|
|
59
59
|
getAttachment(inboxId: AgentMail.inboxes.InboxId, threadId: AgentMail.ThreadId, attachmentId: AgentMail.AttachmentId, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
60
60
|
private __getAttachment;
|
|
61
|
+
/**
|
|
62
|
+
* @param {AgentMail.inboxes.InboxId} inboxId
|
|
63
|
+
* @param {AgentMail.ThreadId} threadId
|
|
64
|
+
* @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await client.inboxes.threads.delete("inbox_id", "thread_id")
|
|
70
|
+
*/
|
|
71
|
+
delete(inboxId: AgentMail.inboxes.InboxId, threadId: AgentMail.ThreadId, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise<void>;
|
|
72
|
+
private __delete;
|
|
61
73
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
62
74
|
}
|