agentmail 0.4.5 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/drafts/types/DraftItem.d.ts +1 -0
- package/dist/cjs/serialization/resources/drafts/types/DraftItem.d.ts +2 -0
- package/dist/cjs/serialization/resources/drafts/types/DraftItem.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrapper/mppx.d.ts +1 -0
- package/dist/cjs/wrapper/mppx.js +1 -1
- package/dist/cjs/wrapper/util.d.ts +1 -1
- package/dist/cjs/wrapper/util.js +3 -3
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/drafts/types/DraftItem.d.mts +1 -0
- package/dist/esm/serialization/resources/drafts/types/DraftItem.d.mts +2 -0
- package/dist/esm/serialization/resources/drafts/types/DraftItem.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/esm/wrapper/mppx.d.mts +1 -0
- package/dist/esm/wrapper/mppx.mjs +1 -1
- package/dist/esm/wrapper/util.d.mts +1 -1
- package/dist/esm/wrapper/util.mjs +3 -3
- package/dist/llms-full.txt +13517 -13515
- package/dist/llms.txt +42 -42
- package/package.json +1 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "agentmail",
|
|
46
|
-
"X-Fern-SDK-Version": "0.4.
|
|
47
|
-
"User-Agent": "agentmail/0.4.
|
|
46
|
+
"X-Fern-SDK-Version": "0.4.7",
|
|
47
|
+
"User-Agent": "agentmail/0.4.7",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -9,6 +9,7 @@ export interface DraftItem {
|
|
|
9
9
|
subject?: AgentMail.DraftSubject;
|
|
10
10
|
preview?: AgentMail.DraftPreview;
|
|
11
11
|
attachments?: AgentMail.DraftAttachments;
|
|
12
|
+
inReplyTo?: AgentMail.DraftInReplyTo;
|
|
12
13
|
sendStatus?: AgentMail.DraftSendStatus;
|
|
13
14
|
sendAt?: AgentMail.DraftSendAt;
|
|
14
15
|
updatedAt: AgentMail.DraftUpdatedAt;
|
|
@@ -6,6 +6,7 @@ import { DraftAttachments } from "./DraftAttachments.js";
|
|
|
6
6
|
import { DraftBcc } from "./DraftBcc.js";
|
|
7
7
|
import { DraftCc } from "./DraftCc.js";
|
|
8
8
|
import { DraftId } from "./DraftId.js";
|
|
9
|
+
import { DraftInReplyTo } from "./DraftInReplyTo.js";
|
|
9
10
|
import { DraftLabels } from "./DraftLabels.js";
|
|
10
11
|
import { DraftPreview } from "./DraftPreview.js";
|
|
11
12
|
import { DraftSendAt } from "./DraftSendAt.js";
|
|
@@ -25,6 +26,7 @@ export declare namespace DraftItem {
|
|
|
25
26
|
subject?: DraftSubject.Raw | null;
|
|
26
27
|
preview?: DraftPreview.Raw | null;
|
|
27
28
|
attachments?: DraftAttachments.Raw | null;
|
|
29
|
+
in_reply_to?: DraftInReplyTo.Raw | null;
|
|
28
30
|
send_status?: DraftSendStatus.Raw | null;
|
|
29
31
|
send_at?: DraftSendAt.Raw | null;
|
|
30
32
|
updated_at: DraftUpdatedAt.Raw;
|
|
@@ -41,6 +41,7 @@ const DraftAttachments_js_1 = require("./DraftAttachments.js");
|
|
|
41
41
|
const DraftBcc_js_1 = require("./DraftBcc.js");
|
|
42
42
|
const DraftCc_js_1 = require("./DraftCc.js");
|
|
43
43
|
const DraftId_js_1 = require("./DraftId.js");
|
|
44
|
+
const DraftInReplyTo_js_1 = require("./DraftInReplyTo.js");
|
|
44
45
|
const DraftLabels_js_1 = require("./DraftLabels.js");
|
|
45
46
|
const DraftPreview_js_1 = require("./DraftPreview.js");
|
|
46
47
|
const DraftSendAt_js_1 = require("./DraftSendAt.js");
|
|
@@ -58,6 +59,7 @@ exports.DraftItem = core.serialization.object({
|
|
|
58
59
|
subject: DraftSubject_js_1.DraftSubject.optional(),
|
|
59
60
|
preview: DraftPreview_js_1.DraftPreview.optional(),
|
|
60
61
|
attachments: DraftAttachments_js_1.DraftAttachments.optional(),
|
|
62
|
+
inReplyTo: core.serialization.property("in_reply_to", DraftInReplyTo_js_1.DraftInReplyTo.optional()),
|
|
61
63
|
sendStatus: core.serialization.property("send_status", DraftSendStatus_js_1.DraftSendStatus.optional()),
|
|
62
64
|
sendAt: core.serialization.property("send_at", DraftSendAt_js_1.DraftSendAt.optional()),
|
|
63
65
|
updatedAt: core.serialization.property("updated_at", DraftUpdatedAt_js_1.DraftUpdatedAt),
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.7";
|
package/dist/cjs/version.js
CHANGED
package/dist/cjs/wrapper/mppx.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.getPaymentCredentials = getPaymentCredentials;
|
|
|
13
13
|
const util_js_1 = require("./util.js");
|
|
14
14
|
function getPaymentCredentials(wsUrl, mppx) {
|
|
15
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
const response = yield (0, util_js_1.probe402)(wsUrl);
|
|
16
|
+
const response = yield (0, util_js_1.probe402)(wsUrl, mppx.rawFetch);
|
|
17
17
|
const credential = yield mppx.createCredential(response);
|
|
18
18
|
const signed = mppx.transport.setCredential(new Request((0, util_js_1.wsToHttp)(wsUrl)), credential);
|
|
19
19
|
const headers = {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function wsToHttp(wsUrl: string): string;
|
|
2
|
-
export declare function probe402(wsUrl: string): Promise<Response>;
|
|
2
|
+
export declare function probe402(wsUrl: string, fetchFn?: typeof fetch): Promise<Response>;
|
package/dist/cjs/wrapper/util.js
CHANGED
|
@@ -14,10 +14,10 @@ exports.probe402 = probe402;
|
|
|
14
14
|
function wsToHttp(wsUrl) {
|
|
15
15
|
return wsUrl.replace(/^wss:\/\//, "https://").replace(/^ws:\/\//, "http://");
|
|
16
16
|
}
|
|
17
|
-
function probe402(
|
|
18
|
-
return __awaiter(this,
|
|
17
|
+
function probe402(wsUrl_1) {
|
|
18
|
+
return __awaiter(this, arguments, void 0, function* (wsUrl, fetchFn = fetch) {
|
|
19
19
|
const httpUrl = wsToHttp(wsUrl);
|
|
20
|
-
const response = yield
|
|
20
|
+
const response = yield fetchFn(httpUrl);
|
|
21
21
|
if (response.status !== 402) {
|
|
22
22
|
throw new Error(`Expected 402 from ${httpUrl} but got ${response.status}`);
|
|
23
23
|
}
|
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "agentmail",
|
|
9
|
-
"X-Fern-SDK-Version": "0.4.
|
|
10
|
-
"User-Agent": "agentmail/0.4.
|
|
9
|
+
"X-Fern-SDK-Version": "0.4.7",
|
|
10
|
+
"User-Agent": "agentmail/0.4.7",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -9,6 +9,7 @@ export interface DraftItem {
|
|
|
9
9
|
subject?: AgentMail.DraftSubject;
|
|
10
10
|
preview?: AgentMail.DraftPreview;
|
|
11
11
|
attachments?: AgentMail.DraftAttachments;
|
|
12
|
+
inReplyTo?: AgentMail.DraftInReplyTo;
|
|
12
13
|
sendStatus?: AgentMail.DraftSendStatus;
|
|
13
14
|
sendAt?: AgentMail.DraftSendAt;
|
|
14
15
|
updatedAt: AgentMail.DraftUpdatedAt;
|
|
@@ -6,6 +6,7 @@ import { DraftAttachments } from "./DraftAttachments.mjs";
|
|
|
6
6
|
import { DraftBcc } from "./DraftBcc.mjs";
|
|
7
7
|
import { DraftCc } from "./DraftCc.mjs";
|
|
8
8
|
import { DraftId } from "./DraftId.mjs";
|
|
9
|
+
import { DraftInReplyTo } from "./DraftInReplyTo.mjs";
|
|
9
10
|
import { DraftLabels } from "./DraftLabels.mjs";
|
|
10
11
|
import { DraftPreview } from "./DraftPreview.mjs";
|
|
11
12
|
import { DraftSendAt } from "./DraftSendAt.mjs";
|
|
@@ -25,6 +26,7 @@ export declare namespace DraftItem {
|
|
|
25
26
|
subject?: DraftSubject.Raw | null;
|
|
26
27
|
preview?: DraftPreview.Raw | null;
|
|
27
28
|
attachments?: DraftAttachments.Raw | null;
|
|
29
|
+
in_reply_to?: DraftInReplyTo.Raw | null;
|
|
28
30
|
send_status?: DraftSendStatus.Raw | null;
|
|
29
31
|
send_at?: DraftSendAt.Raw | null;
|
|
30
32
|
updated_at: DraftUpdatedAt.Raw;
|
|
@@ -5,6 +5,7 @@ import { DraftAttachments } from "./DraftAttachments.mjs";
|
|
|
5
5
|
import { DraftBcc } from "./DraftBcc.mjs";
|
|
6
6
|
import { DraftCc } from "./DraftCc.mjs";
|
|
7
7
|
import { DraftId } from "./DraftId.mjs";
|
|
8
|
+
import { DraftInReplyTo } from "./DraftInReplyTo.mjs";
|
|
8
9
|
import { DraftLabels } from "./DraftLabels.mjs";
|
|
9
10
|
import { DraftPreview } from "./DraftPreview.mjs";
|
|
10
11
|
import { DraftSendAt } from "./DraftSendAt.mjs";
|
|
@@ -22,6 +23,7 @@ export const DraftItem = core.serialization.object({
|
|
|
22
23
|
subject: DraftSubject.optional(),
|
|
23
24
|
preview: DraftPreview.optional(),
|
|
24
25
|
attachments: DraftAttachments.optional(),
|
|
26
|
+
inReplyTo: core.serialization.property("in_reply_to", DraftInReplyTo.optional()),
|
|
25
27
|
sendStatus: core.serialization.property("send_status", DraftSendStatus.optional()),
|
|
26
28
|
sendAt: core.serialization.property("send_at", DraftSendAt.optional()),
|
|
27
29
|
updatedAt: core.serialization.property("updated_at", DraftUpdatedAt),
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.7";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.4.
|
|
1
|
+
export const SDK_VERSION = "0.4.7";
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { probe402, wsToHttp } from "./util.mjs";
|
|
11
11
|
export function getPaymentCredentials(wsUrl, mppx) {
|
|
12
12
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13
|
-
const response = yield probe402(wsUrl);
|
|
13
|
+
const response = yield probe402(wsUrl, mppx.rawFetch);
|
|
14
14
|
const credential = yield mppx.createCredential(response);
|
|
15
15
|
const signed = mppx.transport.setCredential(new Request(wsToHttp(wsUrl)), credential);
|
|
16
16
|
const headers = {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function wsToHttp(wsUrl: string): string;
|
|
2
|
-
export declare function probe402(wsUrl: string): Promise<Response>;
|
|
2
|
+
export declare function probe402(wsUrl: string, fetchFn?: typeof fetch): Promise<Response>;
|
|
@@ -10,10 +10,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
export function wsToHttp(wsUrl) {
|
|
11
11
|
return wsUrl.replace(/^wss:\/\//, "https://").replace(/^ws:\/\//, "http://");
|
|
12
12
|
}
|
|
13
|
-
export function probe402(
|
|
14
|
-
return __awaiter(this,
|
|
13
|
+
export function probe402(wsUrl_1) {
|
|
14
|
+
return __awaiter(this, arguments, void 0, function* (wsUrl, fetchFn = fetch) {
|
|
15
15
|
const httpUrl = wsToHttp(wsUrl);
|
|
16
|
-
const response = yield
|
|
16
|
+
const response = yield fetchFn(httpUrl);
|
|
17
17
|
if (response.status !== 402) {
|
|
18
18
|
throw new Error(`Expected 402 from ${httpUrl} but got ${response.status}`);
|
|
19
19
|
}
|