agentmail 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +5 -2
  2. package/dist/cjs/Client.js +2 -2
  3. package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +1 -1
  4. package/dist/cjs/api/resources/apiKeys/client/Client.js +1 -1
  5. package/dist/cjs/api/resources/domains/client/Client.d.ts +1 -1
  6. package/dist/cjs/api/resources/domains/client/Client.js +1 -1
  7. package/dist/cjs/api/resources/drafts/client/Client.d.ts +1 -1
  8. package/dist/cjs/api/resources/drafts/client/Client.js +1 -1
  9. package/dist/cjs/api/resources/events/types/Bounce.d.ts +1 -0
  10. package/dist/cjs/api/resources/events/types/Complaint.d.ts +1 -0
  11. package/dist/cjs/api/resources/events/types/Delivery.d.ts +1 -0
  12. package/dist/cjs/api/resources/events/types/Reject.d.ts +1 -0
  13. package/dist/cjs/api/resources/events/types/Send.d.ts +1 -0
  14. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +1 -1
  15. package/dist/cjs/api/resources/inboxes/client/Client.js +1 -1
  16. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +1 -1
  17. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +1 -1
  18. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +1 -1
  19. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +1 -1
  20. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +1 -1
  21. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +1 -1
  22. package/dist/cjs/api/resources/pods/client/Client.d.ts +1 -1
  23. package/dist/cjs/api/resources/pods/client/Client.js +1 -1
  24. package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +1 -1
  25. package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +1 -1
  26. package/dist/cjs/api/resources/pods/resources/drafts/client/Client.d.ts +1 -1
  27. package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +1 -1
  28. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +1 -1
  29. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +1 -1
  30. package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +1 -1
  31. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +1 -1
  32. package/dist/cjs/api/resources/threads/client/Client.d.ts +1 -1
  33. package/dist/cjs/api/resources/threads/client/Client.js +1 -1
  34. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +1 -1
  35. package/dist/cjs/api/resources/webhooks/client/Client.js +1 -1
  36. package/dist/cjs/core/exports.d.ts +2 -0
  37. package/dist/cjs/core/exports.js +18 -0
  38. package/dist/cjs/core/pagination/Page.d.ts +7 -6
  39. package/dist/cjs/core/pagination/Page.js +1 -0
  40. package/dist/cjs/core/pagination/exports.d.ts +1 -0
  41. package/dist/cjs/core/pagination/exports.js +2 -0
  42. package/dist/cjs/core/pagination/index.d.ts +0 -1
  43. package/dist/cjs/core/pagination/index.js +1 -3
  44. package/dist/cjs/core/websocket/exports.d.ts +8 -0
  45. package/dist/cjs/core/websocket/exports.js +2 -0
  46. package/dist/cjs/exports.d.ts +1 -0
  47. package/dist/cjs/exports.js +17 -0
  48. package/dist/cjs/index.d.ts +1 -0
  49. package/dist/cjs/index.js +4 -0
  50. package/dist/cjs/serialization/resources/events/types/Bounce.d.ts +2 -0
  51. package/dist/cjs/serialization/resources/events/types/Bounce.js +2 -0
  52. package/dist/cjs/serialization/resources/events/types/Complaint.d.ts +2 -0
  53. package/dist/cjs/serialization/resources/events/types/Complaint.js +2 -0
  54. package/dist/cjs/serialization/resources/events/types/Delivery.d.ts +2 -0
  55. package/dist/cjs/serialization/resources/events/types/Delivery.js +2 -0
  56. package/dist/cjs/serialization/resources/events/types/Reject.d.ts +2 -0
  57. package/dist/cjs/serialization/resources/events/types/Reject.js +2 -0
  58. package/dist/cjs/serialization/resources/events/types/Send.d.ts +2 -0
  59. package/dist/cjs/serialization/resources/events/types/Send.js +2 -0
  60. package/dist/cjs/version.d.ts +1 -1
  61. package/dist/cjs/version.js +1 -1
  62. package/dist/esm/Client.mjs +2 -2
  63. package/dist/esm/api/resources/apiKeys/client/Client.d.mts +1 -1
  64. package/dist/esm/api/resources/apiKeys/client/Client.mjs +1 -1
  65. package/dist/esm/api/resources/domains/client/Client.d.mts +1 -1
  66. package/dist/esm/api/resources/domains/client/Client.mjs +1 -1
  67. package/dist/esm/api/resources/drafts/client/Client.d.mts +1 -1
  68. package/dist/esm/api/resources/drafts/client/Client.mjs +1 -1
  69. package/dist/esm/api/resources/events/types/Bounce.d.mts +1 -0
  70. package/dist/esm/api/resources/events/types/Complaint.d.mts +1 -0
  71. package/dist/esm/api/resources/events/types/Delivery.d.mts +1 -0
  72. package/dist/esm/api/resources/events/types/Reject.d.mts +1 -0
  73. package/dist/esm/api/resources/events/types/Send.d.mts +1 -0
  74. package/dist/esm/api/resources/inboxes/client/Client.d.mts +1 -1
  75. package/dist/esm/api/resources/inboxes/client/Client.mjs +1 -1
  76. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +1 -1
  77. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +1 -1
  78. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +1 -1
  79. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +1 -1
  80. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +1 -1
  81. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +1 -1
  82. package/dist/esm/api/resources/pods/client/Client.d.mts +1 -1
  83. package/dist/esm/api/resources/pods/client/Client.mjs +1 -1
  84. package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +1 -1
  85. package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +1 -1
  86. package/dist/esm/api/resources/pods/resources/drafts/client/Client.d.mts +1 -1
  87. package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +1 -1
  88. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +1 -1
  89. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +1 -1
  90. package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +1 -1
  91. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +1 -1
  92. package/dist/esm/api/resources/threads/client/Client.d.mts +1 -1
  93. package/dist/esm/api/resources/threads/client/Client.mjs +1 -1
  94. package/dist/esm/api/resources/webhooks/client/Client.d.mts +1 -1
  95. package/dist/esm/api/resources/webhooks/client/Client.mjs +1 -1
  96. package/dist/esm/core/exports.d.mts +2 -0
  97. package/dist/esm/core/exports.mjs +2 -0
  98. package/dist/esm/core/pagination/Page.d.mts +7 -6
  99. package/dist/esm/core/pagination/Page.mjs +1 -0
  100. package/dist/esm/core/pagination/exports.d.mts +1 -0
  101. package/dist/esm/core/pagination/exports.mjs +1 -0
  102. package/dist/esm/core/pagination/index.d.mts +0 -1
  103. package/dist/esm/core/pagination/index.mjs +0 -1
  104. package/dist/esm/core/websocket/exports.d.mts +8 -0
  105. package/dist/esm/core/websocket/exports.mjs +1 -0
  106. package/dist/esm/exports.d.mts +1 -0
  107. package/dist/esm/exports.mjs +1 -0
  108. package/dist/esm/index.d.mts +1 -0
  109. package/dist/esm/index.mjs +1 -0
  110. package/dist/esm/serialization/resources/events/types/Bounce.d.mts +2 -0
  111. package/dist/esm/serialization/resources/events/types/Bounce.mjs +2 -0
  112. package/dist/esm/serialization/resources/events/types/Complaint.d.mts +2 -0
  113. package/dist/esm/serialization/resources/events/types/Complaint.mjs +2 -0
  114. package/dist/esm/serialization/resources/events/types/Delivery.d.mts +2 -0
  115. package/dist/esm/serialization/resources/events/types/Delivery.mjs +2 -0
  116. package/dist/esm/serialization/resources/events/types/Reject.d.mts +2 -0
  117. package/dist/esm/serialization/resources/events/types/Reject.mjs +2 -0
  118. package/dist/esm/serialization/resources/events/types/Send.d.mts +2 -0
  119. package/dist/esm/serialization/resources/events/types/Send.mjs +2 -0
  120. package/dist/esm/version.d.mts +1 -1
  121. package/dist/esm/version.mjs +1 -1
  122. package/package.json +1 -1
  123. package/reference.md +84 -42
  124. package/dist/cjs/core/pagination/Pageable.d.ts +0 -14
  125. package/dist/cjs/core/pagination/Pageable.js +0 -10
  126. package/dist/esm/core/pagination/Pageable.d.mts +0 -14
  127. package/dist/esm/core/pagination/Pageable.mjs +0 -6
@@ -38,9 +38,11 @@ exports.Reject = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
39
  const InboxId_js_1 = require("../../inboxes/types/InboxId.js");
40
40
  const MessageId_js_1 = require("../../messages/types/MessageId.js");
41
+ const ThreadId_js_1 = require("../../threads/types/ThreadId.js");
41
42
  const Timestamp_js_1 = require("./Timestamp.js");
42
43
  exports.Reject = core.serialization.object({
43
44
  inboxId: core.serialization.property("inbox_id", InboxId_js_1.InboxId),
45
+ threadId: core.serialization.property("thread_id", ThreadId_js_1.ThreadId),
44
46
  messageId: core.serialization.property("message_id", MessageId_js_1.MessageId),
45
47
  timestamp: Timestamp_js_1.Timestamp,
46
48
  reason: core.serialization.string(),
@@ -3,11 +3,13 @@ import * as core from "../../../../core/index.js";
3
3
  import type * as serializers from "../../../index.js";
4
4
  import { InboxId } from "../../inboxes/types/InboxId.js";
5
5
  import { MessageId } from "../../messages/types/MessageId.js";
6
+ import { ThreadId } from "../../threads/types/ThreadId.js";
6
7
  import { Timestamp } from "./Timestamp.js";
7
8
  export declare const Send: core.serialization.ObjectSchema<serializers.Send.Raw, AgentMail.Send>;
8
9
  export declare namespace Send {
9
10
  interface Raw {
10
11
  inbox_id: InboxId.Raw;
12
+ thread_id: ThreadId.Raw;
11
13
  message_id: MessageId.Raw;
12
14
  timestamp: Timestamp.Raw;
13
15
  recipients: string[];
@@ -38,9 +38,11 @@ exports.Send = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
39
  const InboxId_js_1 = require("../../inboxes/types/InboxId.js");
40
40
  const MessageId_js_1 = require("../../messages/types/MessageId.js");
41
+ const ThreadId_js_1 = require("../../threads/types/ThreadId.js");
41
42
  const Timestamp_js_1 = require("./Timestamp.js");
42
43
  exports.Send = core.serialization.object({
43
44
  inboxId: core.serialization.property("inbox_id", InboxId_js_1.InboxId),
45
+ threadId: core.serialization.property("thread_id", ThreadId_js_1.ThreadId),
44
46
  messageId: core.serialization.property("message_id", MessageId_js_1.MessageId),
45
47
  timestamp: Timestamp_js_1.Timestamp,
46
48
  recipients: core.serialization.list(core.serialization.string()),
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.0";
1
+ export declare const SDK_VERSION = "0.1.1";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.1.0";
4
+ exports.SDK_VERSION = "0.1.1";
@@ -15,8 +15,8 @@ export class AgentMailClient {
15
15
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
16
16
  "X-Fern-Language": "JavaScript",
17
17
  "X-Fern-SDK-Name": "agentmail",
18
- "X-Fern-SDK-Version": "0.1.0",
19
- "User-Agent": "agentmail/0.1.0",
18
+ "X-Fern-SDK-Version": "0.1.1",
19
+ "User-Agent": "agentmail/0.1.1",
20
20
  "X-Fern-Runtime": core.RUNTIME.type,
21
21
  "X-Fern-Runtime-Version": core.RUNTIME.version,
22
22
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -17,7 +17,7 @@ export declare class ApiKeys {
17
17
  * @example
18
18
  * await client.apiKeys.list()
19
19
  */
20
- list(request?: AgentMail.ListApiKeysRequest, requestOptions?: ApiKeys.RequestOptions): Promise<core.Page<AgentMail.ApiKey>>;
20
+ list(request?: AgentMail.ListApiKeysRequest, requestOptions?: ApiKeys.RequestOptions): Promise<core.Page<AgentMail.ApiKey, AgentMail.ListApiKeysResponse>>;
21
21
  /**
22
22
  * @param {AgentMail.CreateApiKeyRequest} request
23
23
  * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
@@ -83,7 +83,7 @@ export class ApiKeys {
83
83
  }
84
84
  }));
85
85
  const dataWithRawResponse = yield list(request).withRawResponse();
86
- return new core.Pageable({
86
+ return new core.Page({
87
87
  response: dataWithRawResponse.data,
88
88
  rawResponse: dataWithRawResponse.rawResponse,
89
89
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -17,7 +17,7 @@ export declare class Domains {
17
17
  * @example
18
18
  * await client.domains.list()
19
19
  */
20
- list(request?: AgentMail.ListDomainsRequest, requestOptions?: Domains.RequestOptions): Promise<core.Page<AgentMail.DomainSummary>>;
20
+ list(request?: AgentMail.ListDomainsRequest, requestOptions?: Domains.RequestOptions): Promise<core.Page<AgentMail.DomainSummary, AgentMail.ListDomainsResponse>>;
21
21
  /**
22
22
  * @param {AgentMail.DomainId} domainId
23
23
  * @param {Domains.RequestOptions} requestOptions - Request-specific configuration.
@@ -83,7 +83,7 @@ export class Domains {
83
83
  }
84
84
  }));
85
85
  const dataWithRawResponse = yield list(request).withRawResponse();
86
- return new core.Pageable({
86
+ return new core.Page({
87
87
  response: dataWithRawResponse.data,
88
88
  rawResponse: dataWithRawResponse.rawResponse,
89
89
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -19,7 +19,7 @@ export declare class Drafts {
19
19
  * @example
20
20
  * await client.drafts.list()
21
21
  */
22
- list(request?: AgentMail.ListDraftsRequest, requestOptions?: Drafts.RequestOptions): Promise<core.Page<AgentMail.DraftItem>>;
22
+ list(request?: AgentMail.ListDraftsRequest, requestOptions?: Drafts.RequestOptions): Promise<core.Page<AgentMail.DraftItem, AgentMail.ListDraftsResponse>>;
23
23
  /**
24
24
  * @param {AgentMail.DraftId} draftId
25
25
  * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
@@ -112,7 +112,7 @@ export class Drafts {
112
112
  }
113
113
  }));
114
114
  const dataWithRawResponse = yield list(request).withRawResponse();
115
- return new core.Pageable({
115
+ return new core.Page({
116
116
  response: dataWithRawResponse.data,
117
117
  rawResponse: dataWithRawResponse.rawResponse,
118
118
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -1,6 +1,7 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
2
  export interface Bounce {
3
3
  inboxId: AgentMail.inboxes.InboxId;
4
+ threadId: AgentMail.ThreadId;
4
5
  messageId: AgentMail.MessageId;
5
6
  timestamp: AgentMail.Timestamp;
6
7
  /** Bounce type. */
@@ -1,6 +1,7 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
2
  export interface Complaint {
3
3
  inboxId: AgentMail.inboxes.InboxId;
4
+ threadId: AgentMail.ThreadId;
4
5
  messageId: AgentMail.MessageId;
5
6
  timestamp: AgentMail.Timestamp;
6
7
  /** Complaint type. */
@@ -1,6 +1,7 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
2
  export interface Delivery {
3
3
  inboxId: AgentMail.inboxes.InboxId;
4
+ threadId: AgentMail.ThreadId;
4
5
  messageId: AgentMail.MessageId;
5
6
  timestamp: AgentMail.Timestamp;
6
7
  /** Delivered recipients. */
@@ -1,6 +1,7 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
2
  export interface Reject {
3
3
  inboxId: AgentMail.inboxes.InboxId;
4
+ threadId: AgentMail.ThreadId;
4
5
  messageId: AgentMail.MessageId;
5
6
  timestamp: AgentMail.Timestamp;
6
7
  /** Reject reason. */
@@ -1,6 +1,7 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
2
  export interface Send {
3
3
  inboxId: AgentMail.inboxes.InboxId;
4
+ threadId: AgentMail.ThreadId;
4
5
  messageId: AgentMail.MessageId;
5
6
  timestamp: AgentMail.Timestamp;
6
7
  /** Sent recipients. */
@@ -29,7 +29,7 @@ export declare class Inboxes {
29
29
  * @example
30
30
  * await client.inboxes.list()
31
31
  */
32
- list(request?: AgentMail.inboxes.ListInboxesRequest, requestOptions?: Inboxes.RequestOptions): Promise<core.Page<AgentMail.inboxes.Inbox>>;
32
+ list(request?: AgentMail.inboxes.ListInboxesRequest, requestOptions?: Inboxes.RequestOptions): Promise<core.Page<AgentMail.inboxes.Inbox, AgentMail.inboxes.ListInboxesResponse>>;
33
33
  /**
34
34
  * @param {AgentMail.inboxes.InboxId} inboxId
35
35
  * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
@@ -103,7 +103,7 @@ export class Inboxes {
103
103
  }
104
104
  }));
105
105
  const dataWithRawResponse = yield list(request).withRawResponse();
106
- return new core.Pageable({
106
+ return new core.Page({
107
107
  response: dataWithRawResponse.data,
108
108
  rawResponse: dataWithRawResponse.rawResponse,
109
109
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -20,7 +20,7 @@ export declare class Drafts {
20
20
  * @example
21
21
  * await client.inboxes.drafts.list("inbox_id")
22
22
  */
23
- list(inboxId: AgentMail.inboxes.InboxId, request?: AgentMail.inboxes.ListDraftsRequest, requestOptions?: Drafts.RequestOptions): Promise<core.Page<AgentMail.DraftItem>>;
23
+ list(inboxId: AgentMail.inboxes.InboxId, request?: AgentMail.inboxes.ListDraftsRequest, requestOptions?: Drafts.RequestOptions): Promise<core.Page<AgentMail.DraftItem, AgentMail.ListDraftsResponse>>;
24
24
  /**
25
25
  * @param {AgentMail.inboxes.InboxId} inboxId
26
26
  * @param {AgentMail.DraftId} draftId
@@ -113,7 +113,7 @@ export class Drafts {
113
113
  }
114
114
  }));
115
115
  const dataWithRawResponse = yield list(request).withRawResponse();
116
- return new core.Pageable({
116
+ return new core.Page({
117
117
  response: dataWithRawResponse.data,
118
118
  rawResponse: dataWithRawResponse.rawResponse,
119
119
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -20,7 +20,7 @@ export declare class Messages {
20
20
  * @example
21
21
  * await client.inboxes.messages.list("inbox_id")
22
22
  */
23
- list(inboxId: AgentMail.inboxes.InboxId, request?: AgentMail.inboxes.ListMessagesRequest, requestOptions?: Messages.RequestOptions): Promise<core.Page<AgentMail.MessageItem>>;
23
+ list(inboxId: AgentMail.inboxes.InboxId, request?: AgentMail.inboxes.ListMessagesRequest, requestOptions?: Messages.RequestOptions): Promise<core.Page<AgentMail.MessageItem, AgentMail.ListMessagesResponse>>;
24
24
  /**
25
25
  * @param {AgentMail.inboxes.InboxId} inboxId
26
26
  * @param {AgentMail.MessageId} messageId
@@ -113,7 +113,7 @@ export class Messages {
113
113
  }
114
114
  }));
115
115
  const dataWithRawResponse = yield list(request).withRawResponse();
116
- return new core.Pageable({
116
+ return new core.Page({
117
117
  response: dataWithRawResponse.data,
118
118
  rawResponse: dataWithRawResponse.rawResponse,
119
119
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -20,7 +20,7 @@ export declare class Threads {
20
20
  * @example
21
21
  * await client.inboxes.threads.list("inbox_id")
22
22
  */
23
- list(inboxId: AgentMail.inboxes.InboxId, request?: AgentMail.inboxes.ListThreadsRequest, requestOptions?: Threads.RequestOptions): Promise<core.Page<AgentMail.ThreadItem>>;
23
+ list(inboxId: AgentMail.inboxes.InboxId, request?: AgentMail.inboxes.ListThreadsRequest, requestOptions?: Threads.RequestOptions): Promise<core.Page<AgentMail.ThreadItem, AgentMail.ListThreadsResponse>>;
24
24
  /**
25
25
  * @param {AgentMail.inboxes.InboxId} inboxId
26
26
  * @param {AgentMail.ThreadId} threadId
@@ -113,7 +113,7 @@ export class Threads {
113
113
  }
114
114
  }));
115
115
  const dataWithRawResponse = yield list(request).withRawResponse();
116
- return new core.Pageable({
116
+ return new core.Page({
117
117
  response: dataWithRawResponse.data,
118
118
  rawResponse: dataWithRawResponse.rawResponse,
119
119
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -29,7 +29,7 @@ export declare class Pods {
29
29
  * @example
30
30
  * await client.pods.list()
31
31
  */
32
- list(request?: AgentMail.pods.ListPodsRequest, requestOptions?: Pods.RequestOptions): Promise<core.Page<AgentMail.pods.Pod>>;
32
+ list(request?: AgentMail.pods.ListPodsRequest, requestOptions?: Pods.RequestOptions): Promise<core.Page<AgentMail.pods.Pod, AgentMail.pods.ListPodsResponse>>;
33
33
  /**
34
34
  * @param {AgentMail.pods.PodId} podId
35
35
  * @param {Pods.RequestOptions} requestOptions - Request-specific configuration.
@@ -103,7 +103,7 @@ export class Pods {
103
103
  }
104
104
  }));
105
105
  const dataWithRawResponse = yield list(request).withRawResponse();
106
- return new core.Pageable({
106
+ return new core.Page({
107
107
  response: dataWithRawResponse.data,
108
108
  rawResponse: dataWithRawResponse.rawResponse,
109
109
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -20,7 +20,7 @@ export declare class Domains {
20
20
  * @example
21
21
  * await client.pods.domains.list("pod_id")
22
22
  */
23
- list(podId: AgentMail.pods.PodId, request?: AgentMail.pods.ListDomainsRequest, requestOptions?: Domains.RequestOptions): Promise<core.Page<AgentMail.DomainSummary>>;
23
+ list(podId: AgentMail.pods.PodId, request?: AgentMail.pods.ListDomainsRequest, requestOptions?: Domains.RequestOptions): Promise<core.Page<AgentMail.DomainSummary, AgentMail.ListDomainsResponse>>;
24
24
  /**
25
25
  * @param {AgentMail.pods.PodId} podId
26
26
  * @param {AgentMail.CreateDomainRequest} request
@@ -113,7 +113,7 @@ export class Domains {
113
113
  }
114
114
  }));
115
115
  const dataWithRawResponse = yield list(request).withRawResponse();
116
- return new core.Pageable({
116
+ return new core.Page({
117
117
  response: dataWithRawResponse.data,
118
118
  rawResponse: dataWithRawResponse.rawResponse,
119
119
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -20,7 +20,7 @@ export declare class Drafts {
20
20
  * @example
21
21
  * await client.pods.drafts.list("pod_id")
22
22
  */
23
- list(podId: AgentMail.pods.PodId, request?: AgentMail.pods.ListDraftsRequest, requestOptions?: Drafts.RequestOptions): Promise<core.Page<AgentMail.DraftItem>>;
23
+ list(podId: AgentMail.pods.PodId, request?: AgentMail.pods.ListDraftsRequest, requestOptions?: Drafts.RequestOptions): Promise<core.Page<AgentMail.DraftItem, AgentMail.ListDraftsResponse>>;
24
24
  /**
25
25
  * @param {AgentMail.pods.PodId} podId
26
26
  * @param {AgentMail.DraftId} draftId
@@ -113,7 +113,7 @@ export class Drafts {
113
113
  }
114
114
  }));
115
115
  const dataWithRawResponse = yield list(request).withRawResponse();
116
- return new core.Pageable({
116
+ return new core.Page({
117
117
  response: dataWithRawResponse.data,
118
118
  rawResponse: dataWithRawResponse.rawResponse,
119
119
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -20,7 +20,7 @@ export declare class Inboxes {
20
20
  * @example
21
21
  * await client.pods.inboxes.list("pod_id")
22
22
  */
23
- list(podId: AgentMail.pods.PodId, request?: AgentMail.pods.ListInboxesRequest, requestOptions?: Inboxes.RequestOptions): Promise<core.Page<AgentMail.inboxes.Inbox>>;
23
+ list(podId: AgentMail.pods.PodId, request?: AgentMail.pods.ListInboxesRequest, requestOptions?: Inboxes.RequestOptions): Promise<core.Page<AgentMail.inboxes.Inbox, AgentMail.inboxes.ListInboxesResponse>>;
24
24
  /**
25
25
  * @param {AgentMail.pods.PodId} podId
26
26
  * @param {AgentMail.inboxes.InboxId} inboxId
@@ -113,7 +113,7 @@ export class Inboxes {
113
113
  }
114
114
  }));
115
115
  const dataWithRawResponse = yield list(request).withRawResponse();
116
- return new core.Pageable({
116
+ return new core.Page({
117
117
  response: dataWithRawResponse.data,
118
118
  rawResponse: dataWithRawResponse.rawResponse,
119
119
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -20,7 +20,7 @@ export declare class Threads {
20
20
  * @example
21
21
  * await client.pods.threads.list("pod_id")
22
22
  */
23
- list(podId: AgentMail.pods.PodId, request?: AgentMail.pods.ListThreadsRequest, requestOptions?: Threads.RequestOptions): Promise<core.Page<AgentMail.ThreadItem>>;
23
+ list(podId: AgentMail.pods.PodId, request?: AgentMail.pods.ListThreadsRequest, requestOptions?: Threads.RequestOptions): Promise<core.Page<AgentMail.ThreadItem, AgentMail.ListThreadsResponse>>;
24
24
  /**
25
25
  * @param {AgentMail.pods.PodId} podId
26
26
  * @param {AgentMail.ThreadId} threadId
@@ -113,7 +113,7 @@ export class Threads {
113
113
  }
114
114
  }));
115
115
  const dataWithRawResponse = yield list(request).withRawResponse();
116
- return new core.Pageable({
116
+ return new core.Page({
117
117
  response: dataWithRawResponse.data,
118
118
  rawResponse: dataWithRawResponse.rawResponse,
119
119
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -19,7 +19,7 @@ export declare class Threads {
19
19
  * @example
20
20
  * await client.threads.list()
21
21
  */
22
- list(request?: AgentMail.ListThreadsRequest, requestOptions?: Threads.RequestOptions): Promise<core.Page<AgentMail.ThreadItem>>;
22
+ list(request?: AgentMail.ListThreadsRequest, requestOptions?: Threads.RequestOptions): Promise<core.Page<AgentMail.ThreadItem, AgentMail.ListThreadsResponse>>;
23
23
  /**
24
24
  * @param {AgentMail.ThreadId} threadId
25
25
  * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
@@ -112,7 +112,7 @@ export class Threads {
112
112
  }
113
113
  }));
114
114
  const dataWithRawResponse = yield list(request).withRawResponse();
115
- return new core.Pageable({
115
+ return new core.Page({
116
116
  response: dataWithRawResponse.data,
117
117
  rawResponse: dataWithRawResponse.rawResponse,
118
118
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -17,7 +17,7 @@ export declare class Webhooks {
17
17
  * @example
18
18
  * await client.webhooks.list()
19
19
  */
20
- list(request?: AgentMail.webhooks.ListWebhooksRequest, requestOptions?: Webhooks.RequestOptions): Promise<core.Page<AgentMail.webhooks.Webhook>>;
20
+ list(request?: AgentMail.webhooks.ListWebhooksRequest, requestOptions?: Webhooks.RequestOptions): Promise<core.Page<AgentMail.webhooks.Webhook, AgentMail.webhooks.ListWebhooksResponse>>;
21
21
  /**
22
22
  * @param {AgentMail.webhooks.WebhookId} webhookId
23
23
  * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
@@ -83,7 +83,7 @@ export class Webhooks {
83
83
  }
84
84
  }));
85
85
  const dataWithRawResponse = yield list(request).withRawResponse();
86
- return new core.Pageable({
86
+ return new core.Page({
87
87
  response: dataWithRawResponse.data,
88
88
  rawResponse: dataWithRawResponse.rawResponse,
89
89
  hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
@@ -0,0 +1,2 @@
1
+ export * from "./pagination/exports.mjs";
2
+ export * from "./websocket/exports.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./pagination/exports.mjs";
2
+ export * from "./websocket/exports.mjs";
@@ -3,20 +3,21 @@ import type { HttpResponsePromise, RawResponse } from "../fetcher/index.mjs";
3
3
  * A page of results from a paginated API.
4
4
  *
5
5
  * @template T The type of the items in the page.
6
+ * @template R The type of the API response.
6
7
  */
7
- export declare class Page<T> implements AsyncIterable<T> {
8
+ export declare class Page<T, R = unknown> implements AsyncIterable<T> {
8
9
  data: T[];
9
10
  rawResponse: RawResponse;
10
- private response;
11
+ response: R;
11
12
  private _hasNextPage;
12
13
  private getItems;
13
14
  private loadNextPage;
14
15
  constructor({ response, rawResponse, hasNextPage, getItems, loadPage, }: {
15
- response: unknown;
16
+ response: R;
16
17
  rawResponse: RawResponse;
17
- hasNextPage: (response: unknown) => boolean;
18
- getItems: (response: unknown) => T[];
19
- loadPage: (response: unknown) => HttpResponsePromise<any>;
18
+ hasNextPage: (response: R) => boolean;
19
+ getItems: (response: R) => T[];
20
+ loadPage: (response: R) => HttpResponsePromise<R>;
20
21
  });
21
22
  /**
22
23
  * Retrieves the next page
@@ -31,6 +31,7 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
31
31
  * A page of results from a paginated API.
32
32
  *
33
33
  * @template T The type of the items in the page.
34
+ * @template R The type of the API response.
34
35
  */
35
36
  export class Page {
36
37
  constructor({ response, rawResponse, hasNextPage, getItems, loadPage, }) {
@@ -0,0 +1 @@
1
+ export type { Page } from "./Page.mjs";
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1 @@
1
1
  export { Page } from "./Page.mjs";
2
- export { Pageable } from "./Pageable.mjs";
@@ -1,2 +1 @@
1
1
  export { Page } from "./Page.mjs";
2
- export { Pageable } from "./Pageable.mjs";
@@ -0,0 +1,8 @@
1
+ import type * as events from "./events.mjs";
2
+ import type * as ws from "./ws.mjs";
3
+ export type ReconnectingWebSocket = typeof ws.ReconnectingWebSocket;
4
+ export declare namespace ReconnectingWebSocket {
5
+ type Event = events.Event;
6
+ type CloseEvent = events.CloseEvent;
7
+ type ErrorEvent = events.ErrorEvent;
8
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./core/exports.mjs";
@@ -0,0 +1 @@
1
+ export * from "./core/exports.mjs";
@@ -3,4 +3,5 @@ export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
3
3
  export { AgentMailClient } from "./Client.mjs";
4
4
  export { AgentMailEnvironment, type AgentMailEnvironmentUrls } from "./environments.mjs";
5
5
  export { AgentMailError, AgentMailTimeoutError } from "./errors/index.mjs";
6
+ export * from "./exports.mjs";
6
7
  export * as serialization from "./serialization/index.mjs";
@@ -2,4 +2,5 @@ export * as AgentMail from "./api/index.mjs";
2
2
  export { AgentMailClient } from "./Client.mjs";
3
3
  export { AgentMailEnvironment } from "./environments.mjs";
4
4
  export { AgentMailError, AgentMailTimeoutError } from "./errors/index.mjs";
5
+ export * from "./exports.mjs";
5
6
  export * as serialization from "./serialization/index.mjs";
@@ -3,12 +3,14 @@ import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  import { InboxId } from "../../inboxes/types/InboxId.mjs";
5
5
  import { MessageId } from "../../messages/types/MessageId.mjs";
6
+ import { ThreadId } from "../../threads/types/ThreadId.mjs";
6
7
  import { Recipient } from "./Recipient.mjs";
7
8
  import { Timestamp } from "./Timestamp.mjs";
8
9
  export declare const Bounce: core.serialization.ObjectSchema<serializers.Bounce.Raw, AgentMail.Bounce>;
9
10
  export declare namespace Bounce {
10
11
  interface Raw {
11
12
  inbox_id: InboxId.Raw;
13
+ thread_id: ThreadId.Raw;
12
14
  message_id: MessageId.Raw;
13
15
  timestamp: Timestamp.Raw;
14
16
  type: string;
@@ -2,10 +2,12 @@
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import { InboxId } from "../../inboxes/types/InboxId.mjs";
4
4
  import { MessageId } from "../../messages/types/MessageId.mjs";
5
+ import { ThreadId } from "../../threads/types/ThreadId.mjs";
5
6
  import { Recipient } from "./Recipient.mjs";
6
7
  import { Timestamp } from "./Timestamp.mjs";
7
8
  export const Bounce = core.serialization.object({
8
9
  inboxId: core.serialization.property("inbox_id", InboxId),
10
+ threadId: core.serialization.property("thread_id", ThreadId),
9
11
  messageId: core.serialization.property("message_id", MessageId),
10
12
  timestamp: Timestamp,
11
13
  type: core.serialization.string(),
@@ -3,11 +3,13 @@ import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  import { InboxId } from "../../inboxes/types/InboxId.mjs";
5
5
  import { MessageId } from "../../messages/types/MessageId.mjs";
6
+ import { ThreadId } from "../../threads/types/ThreadId.mjs";
6
7
  import { Timestamp } from "./Timestamp.mjs";
7
8
  export declare const Complaint: core.serialization.ObjectSchema<serializers.Complaint.Raw, AgentMail.Complaint>;
8
9
  export declare namespace Complaint {
9
10
  interface Raw {
10
11
  inbox_id: InboxId.Raw;
12
+ thread_id: ThreadId.Raw;
11
13
  message_id: MessageId.Raw;
12
14
  timestamp: Timestamp.Raw;
13
15
  type: string;
@@ -2,9 +2,11 @@
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import { InboxId } from "../../inboxes/types/InboxId.mjs";
4
4
  import { MessageId } from "../../messages/types/MessageId.mjs";
5
+ import { ThreadId } from "../../threads/types/ThreadId.mjs";
5
6
  import { Timestamp } from "./Timestamp.mjs";
6
7
  export const Complaint = core.serialization.object({
7
8
  inboxId: core.serialization.property("inbox_id", InboxId),
9
+ threadId: core.serialization.property("thread_id", ThreadId),
8
10
  messageId: core.serialization.property("message_id", MessageId),
9
11
  timestamp: Timestamp,
10
12
  type: core.serialization.string(),
@@ -3,11 +3,13 @@ import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  import { InboxId } from "../../inboxes/types/InboxId.mjs";
5
5
  import { MessageId } from "../../messages/types/MessageId.mjs";
6
+ import { ThreadId } from "../../threads/types/ThreadId.mjs";
6
7
  import { Timestamp } from "./Timestamp.mjs";
7
8
  export declare const Delivery: core.serialization.ObjectSchema<serializers.Delivery.Raw, AgentMail.Delivery>;
8
9
  export declare namespace Delivery {
9
10
  interface Raw {
10
11
  inbox_id: InboxId.Raw;
12
+ thread_id: ThreadId.Raw;
11
13
  message_id: MessageId.Raw;
12
14
  timestamp: Timestamp.Raw;
13
15
  recipients: string[];
@@ -2,9 +2,11 @@
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import { InboxId } from "../../inboxes/types/InboxId.mjs";
4
4
  import { MessageId } from "../../messages/types/MessageId.mjs";
5
+ import { ThreadId } from "../../threads/types/ThreadId.mjs";
5
6
  import { Timestamp } from "./Timestamp.mjs";
6
7
  export const Delivery = core.serialization.object({
7
8
  inboxId: core.serialization.property("inbox_id", InboxId),
9
+ threadId: core.serialization.property("thread_id", ThreadId),
8
10
  messageId: core.serialization.property("message_id", MessageId),
9
11
  timestamp: Timestamp,
10
12
  recipients: core.serialization.list(core.serialization.string()),
@@ -3,11 +3,13 @@ import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  import { InboxId } from "../../inboxes/types/InboxId.mjs";
5
5
  import { MessageId } from "../../messages/types/MessageId.mjs";
6
+ import { ThreadId } from "../../threads/types/ThreadId.mjs";
6
7
  import { Timestamp } from "./Timestamp.mjs";
7
8
  export declare const Reject: core.serialization.ObjectSchema<serializers.Reject.Raw, AgentMail.Reject>;
8
9
  export declare namespace Reject {
9
10
  interface Raw {
10
11
  inbox_id: InboxId.Raw;
12
+ thread_id: ThreadId.Raw;
11
13
  message_id: MessageId.Raw;
12
14
  timestamp: Timestamp.Raw;
13
15
  reason: string;
@@ -2,9 +2,11 @@
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import { InboxId } from "../../inboxes/types/InboxId.mjs";
4
4
  import { MessageId } from "../../messages/types/MessageId.mjs";
5
+ import { ThreadId } from "../../threads/types/ThreadId.mjs";
5
6
  import { Timestamp } from "./Timestamp.mjs";
6
7
  export const Reject = core.serialization.object({
7
8
  inboxId: core.serialization.property("inbox_id", InboxId),
9
+ threadId: core.serialization.property("thread_id", ThreadId),
8
10
  messageId: core.serialization.property("message_id", MessageId),
9
11
  timestamp: Timestamp,
10
12
  reason: core.serialization.string(),