agentmail 0.3.1 → 0.3.3
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/Client.d.ts +3 -0
- package/dist/cjs/Client.js +17 -12
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +2 -1
- package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +2 -1
- package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/resources/lists/client/Client.d.ts +65 -0
- package/dist/cjs/api/resources/lists/client/Client.js +307 -0
- package/dist/cjs/api/resources/lists/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/lists/client/index.js +17 -0
- package/dist/cjs/api/resources/lists/client/requests/ListListEntriesRequest.d.ts +9 -0
- package/dist/cjs/api/resources/lists/client/requests/ListListEntriesRequest.js +3 -0
- package/dist/cjs/api/resources/lists/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/lists/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/lists/index.d.ts +2 -0
- package/dist/cjs/api/resources/lists/index.js +18 -0
- package/dist/cjs/api/resources/lists/types/CreateListEntryRequest.d.ts +6 -0
- package/dist/cjs/api/resources/lists/types/CreateListEntryRequest.js +3 -0
- package/dist/cjs/api/resources/lists/types/Direction.d.ts +6 -0
- package/dist/cjs/api/resources/lists/types/Direction.js +9 -0
- package/dist/cjs/api/resources/lists/types/EntryType.d.ts +6 -0
- package/dist/cjs/api/resources/lists/types/EntryType.js +9 -0
- package/dist/cjs/api/resources/lists/types/ListEntry.d.ts +3 -0
- package/dist/cjs/api/resources/lists/types/ListEntry.js +3 -0
- package/dist/cjs/api/resources/lists/types/ListEntryBase.d.ts +13 -0
- package/dist/cjs/api/resources/lists/types/ListEntryBase.js +3 -0
- package/dist/cjs/api/resources/lists/types/ListListEntriesResponse.d.ts +8 -0
- package/dist/cjs/api/resources/lists/types/ListListEntriesResponse.js +3 -0
- package/dist/cjs/api/resources/lists/types/ListType.d.ts +6 -0
- package/dist/cjs/api/resources/lists/types/ListType.js +9 -0
- package/dist/cjs/api/resources/lists/types/PodListEntry.d.ts +7 -0
- package/dist/cjs/api/resources/lists/types/PodListEntry.js +3 -0
- package/dist/cjs/api/resources/lists/types/PodListListEntriesResponse.d.ts +8 -0
- package/dist/cjs/api/resources/lists/types/PodListListEntriesResponse.js +3 -0
- package/dist/cjs/api/resources/lists/types/index.d.ts +9 -0
- package/dist/cjs/api/resources/lists/types/index.js +25 -0
- package/dist/cjs/api/resources/pods/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/pods/client/Client.js +7 -2
- package/dist/cjs/api/resources/pods/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/index.js +3 -1
- package/dist/cjs/api/resources/pods/resources/lists/client/Client.d.ts +69 -0
- package/dist/cjs/api/resources/pods/resources/lists/client/Client.js +311 -0
- package/dist/cjs/api/resources/pods/resources/lists/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/lists/client/index.js +17 -0
- package/dist/cjs/api/resources/pods/resources/lists/client/requests/ListListEntriesRequest.d.ts +9 -0
- package/dist/cjs/api/resources/pods/resources/lists/client/requests/ListListEntriesRequest.js +3 -0
- package/dist/cjs/api/resources/pods/resources/lists/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/lists/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/pods/resources/lists/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/lists/index.js +17 -0
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +2 -1
- package/dist/cjs/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/threads/client/Client.js +2 -1
- package/dist/cjs/api/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
- package/dist/cjs/api/types/IncludeBlocked.d.ts +4 -0
- package/dist/cjs/api/types/IncludeBlocked.js +3 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/serialization/resources/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/index.js +3 -1
- package/dist/cjs/serialization/resources/lists/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/lists/index.js +17 -0
- package/dist/cjs/serialization/resources/lists/types/CreateListEntryRequest.d.ts +10 -0
- package/dist/cjs/serialization/resources/lists/types/CreateListEntryRequest.js +42 -0
- package/dist/cjs/serialization/resources/lists/types/Direction.d.ts +7 -0
- package/dist/cjs/serialization/resources/lists/types/Direction.js +39 -0
- package/dist/cjs/serialization/resources/lists/types/EntryType.d.ts +7 -0
- package/dist/cjs/serialization/resources/lists/types/EntryType.js +39 -0
- package/dist/cjs/serialization/resources/lists/types/ListEntry.d.ts +9 -0
- package/dist/cjs/serialization/resources/lists/types/ListEntry.js +40 -0
- package/dist/cjs/serialization/resources/lists/types/ListEntryBase.d.ts +19 -0
- package/dist/cjs/serialization/resources/lists/types/ListEntryBase.js +51 -0
- package/dist/cjs/serialization/resources/lists/types/ListListEntriesResponse.d.ts +16 -0
- package/dist/cjs/serialization/resources/lists/types/ListListEntriesResponse.js +48 -0
- package/dist/cjs/serialization/resources/lists/types/ListType.d.ts +7 -0
- package/dist/cjs/serialization/resources/lists/types/ListType.js +39 -0
- package/dist/cjs/serialization/resources/lists/types/PodListEntry.d.ts +11 -0
- package/dist/cjs/serialization/resources/lists/types/PodListEntry.js +45 -0
- package/dist/cjs/serialization/resources/lists/types/PodListListEntriesResponse.d.ts +16 -0
- package/dist/cjs/serialization/resources/lists/types/PodListListEntriesResponse.js +48 -0
- package/dist/cjs/serialization/resources/lists/types/index.d.ts +9 -0
- package/dist/cjs/serialization/resources/lists/types/index.js +25 -0
- package/dist/cjs/serialization/types/IncludeBlocked.d.ts +7 -0
- package/dist/cjs/serialization/types/IncludeBlocked.js +39 -0
- package/dist/cjs/serialization/types/index.d.ts +1 -0
- package/dist/cjs/serialization/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrapper/Client.d.ts +1 -1
- package/dist/cjs/wrapper/Client.js +4 -4
- package/dist/cjs/wrapper/WebsocketsClient.d.ts +3 -3
- package/dist/cjs/wrapper/WebsocketsClient.js +5 -5
- package/dist/cjs/wrapper/mpp.d.ts +1 -1
- package/dist/cjs/wrapper/mpp.js +2 -2
- package/dist/cjs/wrapper/x402.d.ts +1 -1
- package/dist/cjs/wrapper/x402.js +2 -2
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +2 -1
- package/dist/esm/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +2 -1
- package/dist/esm/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
- package/dist/esm/api/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/resources/lists/client/Client.d.mts +65 -0
- package/dist/esm/api/resources/lists/client/Client.mjs +270 -0
- package/dist/esm/api/resources/lists/client/index.d.mts +1 -0
- package/dist/esm/api/resources/lists/client/index.mjs +1 -0
- package/dist/esm/api/resources/lists/client/requests/ListListEntriesRequest.d.mts +9 -0
- package/dist/esm/api/resources/lists/client/requests/ListListEntriesRequest.mjs +2 -0
- package/dist/esm/api/resources/lists/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/lists/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/lists/index.d.mts +2 -0
- package/dist/esm/api/resources/lists/index.mjs +2 -0
- package/dist/esm/api/resources/lists/types/CreateListEntryRequest.d.mts +6 -0
- package/dist/esm/api/resources/lists/types/CreateListEntryRequest.mjs +2 -0
- package/dist/esm/api/resources/lists/types/Direction.d.mts +6 -0
- package/dist/esm/api/resources/lists/types/Direction.mjs +6 -0
- package/dist/esm/api/resources/lists/types/EntryType.d.mts +6 -0
- package/dist/esm/api/resources/lists/types/EntryType.mjs +6 -0
- package/dist/esm/api/resources/lists/types/ListEntry.d.mts +3 -0
- package/dist/esm/api/resources/lists/types/ListEntry.mjs +2 -0
- package/dist/esm/api/resources/lists/types/ListEntryBase.d.mts +13 -0
- package/dist/esm/api/resources/lists/types/ListEntryBase.mjs +2 -0
- package/dist/esm/api/resources/lists/types/ListListEntriesResponse.d.mts +8 -0
- package/dist/esm/api/resources/lists/types/ListListEntriesResponse.mjs +2 -0
- package/dist/esm/api/resources/lists/types/ListType.d.mts +6 -0
- package/dist/esm/api/resources/lists/types/ListType.mjs +6 -0
- package/dist/esm/api/resources/lists/types/PodListEntry.d.mts +7 -0
- package/dist/esm/api/resources/lists/types/PodListEntry.mjs +2 -0
- package/dist/esm/api/resources/lists/types/PodListListEntriesResponse.d.mts +8 -0
- package/dist/esm/api/resources/lists/types/PodListListEntriesResponse.mjs +2 -0
- package/dist/esm/api/resources/lists/types/index.d.mts +9 -0
- package/dist/esm/api/resources/lists/types/index.mjs +9 -0
- package/dist/esm/api/resources/pods/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/pods/client/Client.mjs +5 -0
- package/dist/esm/api/resources/pods/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/index.mjs +2 -0
- package/dist/esm/api/resources/pods/resources/lists/client/Client.d.mts +69 -0
- package/dist/esm/api/resources/pods/resources/lists/client/Client.mjs +274 -0
- package/dist/esm/api/resources/pods/resources/lists/client/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/lists/client/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/lists/client/requests/ListListEntriesRequest.d.mts +9 -0
- package/dist/esm/api/resources/pods/resources/lists/client/requests/ListListEntriesRequest.mjs +2 -0
- package/dist/esm/api/resources/pods/resources/lists/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/lists/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/lists/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/lists/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +2 -1
- package/dist/esm/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
- package/dist/esm/api/resources/threads/client/Client.mjs +2 -1
- package/dist/esm/api/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
- package/dist/esm/api/types/IncludeBlocked.d.mts +4 -0
- package/dist/esm/api/types/IncludeBlocked.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/serialization/resources/index.d.mts +2 -0
- package/dist/esm/serialization/resources/index.mjs +2 -0
- package/dist/esm/serialization/resources/lists/index.d.mts +1 -0
- package/dist/esm/serialization/resources/lists/index.mjs +1 -0
- package/dist/esm/serialization/resources/lists/types/CreateListEntryRequest.d.mts +10 -0
- package/dist/esm/serialization/resources/lists/types/CreateListEntryRequest.mjs +6 -0
- package/dist/esm/serialization/resources/lists/types/Direction.d.mts +7 -0
- package/dist/esm/serialization/resources/lists/types/Direction.mjs +3 -0
- package/dist/esm/serialization/resources/lists/types/EntryType.d.mts +7 -0
- package/dist/esm/serialization/resources/lists/types/EntryType.mjs +3 -0
- package/dist/esm/serialization/resources/lists/types/ListEntry.d.mts +9 -0
- package/dist/esm/serialization/resources/lists/types/ListEntry.mjs +4 -0
- package/dist/esm/serialization/resources/lists/types/ListEntryBase.d.mts +19 -0
- package/dist/esm/serialization/resources/lists/types/ListEntryBase.mjs +15 -0
- package/dist/esm/serialization/resources/lists/types/ListListEntriesResponse.d.mts +16 -0
- package/dist/esm/serialization/resources/lists/types/ListListEntriesResponse.mjs +12 -0
- package/dist/esm/serialization/resources/lists/types/ListType.d.mts +7 -0
- package/dist/esm/serialization/resources/lists/types/ListType.mjs +3 -0
- package/dist/esm/serialization/resources/lists/types/PodListEntry.d.mts +11 -0
- package/dist/esm/serialization/resources/lists/types/PodListEntry.mjs +9 -0
- package/dist/esm/serialization/resources/lists/types/PodListListEntriesResponse.d.mts +16 -0
- package/dist/esm/serialization/resources/lists/types/PodListListEntriesResponse.mjs +12 -0
- package/dist/esm/serialization/resources/lists/types/index.d.mts +9 -0
- package/dist/esm/serialization/resources/lists/types/index.mjs +9 -0
- package/dist/esm/serialization/types/IncludeBlocked.d.mts +7 -0
- package/dist/esm/serialization/types/IncludeBlocked.mjs +3 -0
- package/dist/esm/serialization/types/index.d.mts +1 -0
- package/dist/esm/serialization/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/esm/wrapper/Client.d.mts +1 -1
- package/dist/esm/wrapper/Client.mjs +6 -6
- package/dist/esm/wrapper/WebsocketsClient.d.mts +3 -3
- package/dist/esm/wrapper/WebsocketsClient.mjs +5 -5
- package/dist/esm/wrapper/mpp.d.mts +1 -1
- package/dist/esm/wrapper/mpp.mjs +1 -1
- package/dist/esm/wrapper/x402.d.mts +1 -1
- package/dist/esm/wrapper/x402.mjs +1 -1
- package/dist/llms.txt +7 -1
- package/package.json +1 -1
- package/reference.md +558 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./CreateListEntryRequest.mjs";
|
|
2
|
+
export * from "./Direction.mjs";
|
|
3
|
+
export * from "./EntryType.mjs";
|
|
4
|
+
export * from "./ListEntry.mjs";
|
|
5
|
+
export * from "./ListEntryBase.mjs";
|
|
6
|
+
export * from "./ListListEntriesResponse.mjs";
|
|
7
|
+
export * from "./ListType.mjs";
|
|
8
|
+
export * from "./PodListEntry.mjs";
|
|
9
|
+
export * from "./PodListListEntriesResponse.mjs";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./CreateListEntryRequest.mjs";
|
|
2
|
+
export * from "./Direction.mjs";
|
|
3
|
+
export * from "./EntryType.mjs";
|
|
4
|
+
export * from "./ListEntry.mjs";
|
|
5
|
+
export * from "./ListEntryBase.mjs";
|
|
6
|
+
export * from "./ListListEntriesResponse.mjs";
|
|
7
|
+
export * from "./ListType.mjs";
|
|
8
|
+
export * from "./PodListEntry.mjs";
|
|
9
|
+
export * from "./PodListListEntriesResponse.mjs";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as AgentMail from "../../api/index.mjs";
|
|
2
|
+
import * as core from "../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../index.mjs";
|
|
4
|
+
export declare const IncludeBlocked: core.serialization.Schema<serializers.IncludeBlocked.Raw, AgentMail.IncludeBlocked>;
|
|
5
|
+
export declare namespace IncludeBlocked {
|
|
6
|
+
type Raw = boolean;
|
|
7
|
+
}
|
|
@@ -5,6 +5,7 @@ export * from "./Count.mjs";
|
|
|
5
5
|
export * from "./ErrorMessage.mjs";
|
|
6
6
|
export * from "./ErrorName.mjs";
|
|
7
7
|
export * from "./ErrorResponse.mjs";
|
|
8
|
+
export * from "./IncludeBlocked.mjs";
|
|
8
9
|
export * from "./IncludeSpam.mjs";
|
|
9
10
|
export * from "./Labels.mjs";
|
|
10
11
|
export * from "./Limit.mjs";
|
|
@@ -5,6 +5,7 @@ export * from "./Count.mjs";
|
|
|
5
5
|
export * from "./ErrorMessage.mjs";
|
|
6
6
|
export * from "./ErrorName.mjs";
|
|
7
7
|
export * from "./ErrorResponse.mjs";
|
|
8
|
+
export * from "./IncludeBlocked.mjs";
|
|
8
9
|
export * from "./IncludeSpam.mjs";
|
|
9
10
|
export * from "./Labels.mjs";
|
|
10
11
|
export * from "./Limit.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.3.
|
|
1
|
+
export declare const SDK_VERSION = "0.3.3";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.3.
|
|
1
|
+
export const SDK_VERSION = "0.3.3";
|
|
@@ -22,7 +22,7 @@ export declare namespace AgentMailClient {
|
|
|
22
22
|
}
|
|
23
23
|
export declare class AgentMailClient extends FernAgentMailClient {
|
|
24
24
|
protected _websockets: WebsocketsClient | undefined;
|
|
25
|
-
private readonly
|
|
25
|
+
private readonly _getPaymentCredentials;
|
|
26
26
|
get websockets(): WebsocketsClient;
|
|
27
27
|
constructor(options?: AgentMailClient.Options);
|
|
28
28
|
}
|
|
@@ -23,12 +23,12 @@ import { NoOpAuthProvider } from "../core/auth/NoOpAuthProvider.mjs";
|
|
|
23
23
|
import { AgentMailEnvironment } from "../environments.mjs";
|
|
24
24
|
import { AgentMailClient as FernAgentMailClient } from "../Client.mjs";
|
|
25
25
|
import { WebsocketsClient } from "./WebsocketsClient.mjs";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
26
|
+
import { getPaymentCredentials as getX402Credentials } from "./x402.mjs";
|
|
27
|
+
import { getPaymentCredentials as getMppCredentials } from "./mpp.mjs";
|
|
28
28
|
export class AgentMailClient extends FernAgentMailClient {
|
|
29
29
|
get websockets() {
|
|
30
30
|
var _a;
|
|
31
|
-
return ((_a = this._websockets) !== null && _a !== void 0 ? _a : (this._websockets = new WebsocketsClient(this._options, this.
|
|
31
|
+
return ((_a = this._websockets) !== null && _a !== void 0 ? _a : (this._websockets = new WebsocketsClient(this._options, this._getPaymentCredentials)));
|
|
32
32
|
}
|
|
33
33
|
constructor(options = {}) {
|
|
34
34
|
if (options.x402) {
|
|
@@ -45,7 +45,7 @@ export class AgentMailClient extends FernAgentMailClient {
|
|
|
45
45
|
fernOptions.environment = AgentMailEnvironment.ProdX402;
|
|
46
46
|
}
|
|
47
47
|
super(fernOptions);
|
|
48
|
-
this.
|
|
48
|
+
this._getPaymentCredentials = (wsUrl) => getX402Credentials(wsUrl, x402);
|
|
49
49
|
}
|
|
50
50
|
else if (options.mpp) {
|
|
51
51
|
const { mpp } = options, rest = __rest(options, ["mpp"]);
|
|
@@ -54,7 +54,7 @@ export class AgentMailClient extends FernAgentMailClient {
|
|
|
54
54
|
fernOptions.environment = AgentMailEnvironment.ProdMpp;
|
|
55
55
|
}
|
|
56
56
|
super(fernOptions);
|
|
57
|
-
this.
|
|
57
|
+
this._getPaymentCredentials = (wsUrl) => getMppCredentials(wsUrl, mpp);
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
60
|
let fernOptions = options;
|
|
@@ -68,7 +68,7 @@ export class AgentMailClient extends FernAgentMailClient {
|
|
|
68
68
|
}) });
|
|
69
69
|
}
|
|
70
70
|
super(fernOptions);
|
|
71
|
-
this.
|
|
71
|
+
this._getPaymentCredentials = undefined;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WebsocketsClient as FernWebsocketsClient } from "../api/resources/websockets/client/Client.mjs";
|
|
2
2
|
import type { WebsocketsSocket } from "../api/resources/websockets/client/Socket.mjs";
|
|
3
|
-
export type
|
|
3
|
+
export type GetPaymentCredentials = (wsUrl: string) => Promise<Record<string, string>>;
|
|
4
4
|
export declare class WebsocketsClient extends FernWebsocketsClient {
|
|
5
|
-
private readonly
|
|
6
|
-
constructor(options: FernWebsocketsClient.Options,
|
|
5
|
+
private readonly _getPaymentCredentials;
|
|
6
|
+
constructor(options: FernWebsocketsClient.Options, getPaymentCredentials?: GetPaymentCredentials);
|
|
7
7
|
connect(args?: FernWebsocketsClient.ConnectArgs): Promise<WebsocketsSocket>;
|
|
8
8
|
}
|
|
@@ -11,9 +11,9 @@ import { WebsocketsClient as FernWebsocketsClient } from "../api/resources/webso
|
|
|
11
11
|
import * as core from "../core/index.mjs";
|
|
12
12
|
import * as environments from "../environments.mjs";
|
|
13
13
|
export class WebsocketsClient extends FernWebsocketsClient {
|
|
14
|
-
constructor(options,
|
|
14
|
+
constructor(options, getPaymentCredentials) {
|
|
15
15
|
super(options);
|
|
16
|
-
this.
|
|
16
|
+
this._getPaymentCredentials = getPaymentCredentials;
|
|
17
17
|
}
|
|
18
18
|
connect() {
|
|
19
19
|
const _super = Object.create(null, {
|
|
@@ -21,11 +21,11 @@ export class WebsocketsClient extends FernWebsocketsClient {
|
|
|
21
21
|
});
|
|
22
22
|
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
23
23
|
var _a, _b, _c;
|
|
24
|
-
if (this.
|
|
24
|
+
if (this._getPaymentCredentials) {
|
|
25
25
|
const wsUrl = core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Prod)
|
|
26
26
|
.websockets, "/v0");
|
|
27
|
-
const
|
|
28
|
-
return _super.connect.call(this, Object.assign(Object.assign({}, args), {
|
|
27
|
+
const credentials = yield this._getPaymentCredentials(wsUrl);
|
|
28
|
+
return _super.connect.call(this, Object.assign(Object.assign({}, args), { queryParams: Object.assign(Object.assign({}, credentials), args.queryParams) }));
|
|
29
29
|
}
|
|
30
30
|
if (!args.apiKey) {
|
|
31
31
|
const apiKey = (_c = (yield core.Supplier.get(this._options.apiKey))) !== null && _c !== void 0 ? _c : process.env.AGENTMAIL_API_KEY;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Mppx } from "mppx/client";
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function getPaymentCredentials(wsUrl: string, mpp: Mppx.Mppx): Promise<Record<string, string>>;
|
package/dist/esm/wrapper/mpp.mjs
CHANGED
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { probe402 } from "./probe402.mjs";
|
|
11
|
-
export function
|
|
11
|
+
export function getPaymentCredentials(wsUrl, mpp) {
|
|
12
12
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13
13
|
const response = yield probe402(wsUrl);
|
|
14
14
|
const credential = yield mpp.createCredential(response);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { x402Client } from "@x402/fetch";
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function getPaymentCredentials(wsUrl: string, client: x402Client): Promise<Record<string, string>>;
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { probe402 } from "./probe402.mjs";
|
|
11
|
-
export function
|
|
11
|
+
export function getPaymentCredentials(wsUrl, client) {
|
|
12
12
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13
13
|
const { x402HTTPClient } = yield import("@x402/fetch");
|
|
14
14
|
const httpClient = new x402HTTPClient(client);
|
package/dist/llms.txt
CHANGED
|
@@ -117,4 +117,10 @@
|
|
|
117
117
|
- API Reference > Pods > Domains [List Domains](https://docs.agentmail.to/api-reference/pods/domains/list.mdx)
|
|
118
118
|
- API Reference > Pods > Domains [Create Domain](https://docs.agentmail.to/api-reference/pods/domains/create.mdx)
|
|
119
119
|
- API Reference > Pods > Domains [Delete Domain](https://docs.agentmail.to/api-reference/pods/domains/delete.mdx)
|
|
120
|
-
- API Reference > Organizations [Get Organization](https://docs.agentmail.to/api-reference/organizations/get.mdx)
|
|
120
|
+
- API Reference > Organizations [Get Organization](https://docs.agentmail.to/api-reference/organizations/get.mdx)
|
|
121
|
+
|
|
122
|
+
## OpenAPI Specification
|
|
123
|
+
|
|
124
|
+
The raw OpenAPI 3.1 specification for this API is available at:
|
|
125
|
+
- [OpenAPI JSON](https://docs.agentmail.to/openapi.json)
|
|
126
|
+
- [OpenAPI YAML](https://docs.agentmail.to/openapi.yaml)
|