agentmail 0.0.36 → 0.0.38

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 (170) hide show
  1. package/api/resources/attachments/types/SendAttachment.d.ts +1 -1
  2. package/api/resources/contexts/client/Client.js +4 -4
  3. package/api/resources/drafts/client/Client.js +2 -2
  4. package/api/resources/drafts/types/Draft.d.ts +7 -5
  5. package/api/resources/drafts/types/DraftItem.d.ts +1 -5
  6. package/api/resources/drafts/types/index.d.ts +1 -5
  7. package/api/resources/drafts/types/index.js +1 -5
  8. package/api/resources/inboxes/client/Client.js +3 -3
  9. package/api/resources/inboxes/resources/drafts/client/Client.js +4 -4
  10. package/api/resources/inboxes/resources/messages/client/Client.d.ts +2 -0
  11. package/api/resources/inboxes/resources/messages/client/Client.js +8 -6
  12. package/api/resources/inboxes/resources/threads/client/Client.js +3 -3
  13. package/api/resources/messages/types/Message.d.ts +10 -3
  14. package/api/resources/messages/types/MessageItem.d.ts +0 -3
  15. package/api/resources/messages/types/ReplyToMessageRequest.d.ts +1 -0
  16. package/api/resources/messages/types/SendMessageReplyTo.d.ts +8 -0
  17. package/api/resources/messages/types/SendMessageRequest.d.ts +1 -0
  18. package/api/resources/messages/types/index.d.ts +1 -3
  19. package/api/resources/messages/types/index.js +1 -3
  20. package/api/resources/threads/client/Client.js +3 -3
  21. package/api/resources/threads/types/Thread.d.ts +5 -2
  22. package/api/resources/threads/types/ThreadItem.d.ts +1 -2
  23. package/api/resources/threads/types/index.d.ts +1 -2
  24. package/api/resources/threads/types/index.js +1 -2
  25. package/api/resources/webhooks/client/Client.js +4 -4
  26. package/dist/api/resources/attachments/types/SendAttachment.d.ts +1 -1
  27. package/dist/api/resources/contexts/client/Client.js +4 -4
  28. package/dist/api/resources/drafts/client/Client.js +2 -2
  29. package/dist/api/resources/drafts/types/Draft.d.ts +7 -5
  30. package/dist/api/resources/drafts/types/DraftItem.d.ts +1 -5
  31. package/dist/api/resources/drafts/types/index.d.ts +1 -5
  32. package/dist/api/resources/drafts/types/index.js +1 -5
  33. package/dist/api/resources/inboxes/client/Client.js +3 -3
  34. package/dist/api/resources/inboxes/resources/drafts/client/Client.js +4 -4
  35. package/dist/api/resources/inboxes/resources/messages/client/Client.d.ts +2 -0
  36. package/dist/api/resources/inboxes/resources/messages/client/Client.js +8 -6
  37. package/dist/api/resources/inboxes/resources/threads/client/Client.js +3 -3
  38. package/dist/api/resources/messages/types/Message.d.ts +10 -3
  39. package/dist/api/resources/messages/types/MessageItem.d.ts +0 -3
  40. package/dist/api/resources/messages/types/ReplyToMessageRequest.d.ts +1 -0
  41. package/dist/api/resources/messages/types/SendMessageReplyTo.d.ts +8 -0
  42. package/dist/api/resources/messages/types/SendMessageRequest.d.ts +1 -0
  43. package/dist/api/resources/messages/types/index.d.ts +1 -3
  44. package/dist/api/resources/messages/types/index.js +1 -3
  45. package/dist/api/resources/threads/client/Client.js +3 -3
  46. package/dist/api/resources/threads/types/Thread.d.ts +5 -2
  47. package/dist/api/resources/threads/types/ThreadItem.d.ts +1 -2
  48. package/dist/api/resources/threads/types/index.d.ts +1 -2
  49. package/dist/api/resources/threads/types/index.js +1 -2
  50. package/dist/api/resources/webhooks/client/Client.js +4 -4
  51. package/dist/serialization/resources/attachments/types/SendAttachment.d.ts +1 -1
  52. package/dist/serialization/resources/attachments/types/SendAttachment.js +1 -1
  53. package/dist/serialization/resources/drafts/types/Draft.d.ts +5 -10
  54. package/dist/serialization/resources/drafts/types/Draft.js +5 -10
  55. package/dist/serialization/resources/drafts/types/DraftItem.d.ts +2 -10
  56. package/dist/serialization/resources/drafts/types/DraftItem.js +2 -10
  57. package/dist/serialization/resources/drafts/types/index.d.ts +1 -5
  58. package/dist/serialization/resources/drafts/types/index.js +1 -5
  59. package/dist/serialization/resources/messages/types/Message.d.ts +5 -6
  60. package/dist/serialization/resources/messages/types/Message.js +5 -6
  61. package/dist/serialization/resources/messages/types/MessageItem.d.ts +0 -6
  62. package/dist/serialization/resources/messages/types/MessageItem.js +0 -6
  63. package/dist/serialization/resources/messages/types/ReplyToMessageRequest.d.ts +2 -0
  64. package/dist/serialization/resources/messages/types/ReplyToMessageRequest.js +2 -0
  65. package/dist/serialization/resources/messages/types/SendMessageReplyTo.d.ts +11 -0
  66. package/{api/resources/drafts/types/DraftInReplyTo.js → dist/serialization/resources/messages/types/SendMessageReplyTo.js} +3 -0
  67. package/dist/serialization/resources/messages/types/SendMessageRequest.d.ts +2 -0
  68. package/dist/serialization/resources/messages/types/SendMessageRequest.js +2 -0
  69. package/dist/serialization/resources/messages/types/index.d.ts +1 -3
  70. package/dist/serialization/resources/messages/types/index.js +1 -3
  71. package/dist/serialization/resources/threads/types/Thread.d.ts +4 -4
  72. package/dist/serialization/resources/threads/types/Thread.js +4 -4
  73. package/dist/serialization/resources/threads/types/ThreadItem.d.ts +2 -4
  74. package/dist/serialization/resources/threads/types/ThreadItem.js +2 -4
  75. package/dist/serialization/resources/threads/types/index.d.ts +1 -2
  76. package/dist/serialization/resources/threads/types/index.js +1 -2
  77. package/dist/version.d.ts +1 -1
  78. package/dist/version.js +1 -1
  79. package/package.json +1 -1
  80. package/reference.md +2 -0
  81. package/serialization/resources/attachments/types/SendAttachment.d.ts +1 -1
  82. package/serialization/resources/attachments/types/SendAttachment.js +1 -1
  83. package/serialization/resources/drafts/types/Draft.d.ts +5 -10
  84. package/serialization/resources/drafts/types/Draft.js +5 -10
  85. package/serialization/resources/drafts/types/DraftItem.d.ts +2 -10
  86. package/serialization/resources/drafts/types/DraftItem.js +2 -10
  87. package/serialization/resources/drafts/types/index.d.ts +1 -5
  88. package/serialization/resources/drafts/types/index.js +1 -5
  89. package/serialization/resources/messages/types/Message.d.ts +5 -6
  90. package/serialization/resources/messages/types/Message.js +5 -6
  91. package/serialization/resources/messages/types/MessageItem.d.ts +0 -6
  92. package/serialization/resources/messages/types/MessageItem.js +0 -6
  93. package/serialization/resources/messages/types/ReplyToMessageRequest.d.ts +2 -0
  94. package/serialization/resources/messages/types/ReplyToMessageRequest.js +2 -0
  95. package/serialization/resources/messages/types/SendMessageReplyTo.d.ts +11 -0
  96. package/{api/resources/drafts/types/DraftReferences.js → serialization/resources/messages/types/SendMessageReplyTo.js} +3 -0
  97. package/serialization/resources/messages/types/SendMessageRequest.d.ts +2 -0
  98. package/serialization/resources/messages/types/SendMessageRequest.js +2 -0
  99. package/serialization/resources/messages/types/index.d.ts +1 -3
  100. package/serialization/resources/messages/types/index.js +1 -3
  101. package/serialization/resources/threads/types/Thread.d.ts +4 -4
  102. package/serialization/resources/threads/types/Thread.js +4 -4
  103. package/serialization/resources/threads/types/ThreadItem.d.ts +2 -4
  104. package/serialization/resources/threads/types/ThreadItem.js +2 -4
  105. package/serialization/resources/threads/types/index.d.ts +1 -2
  106. package/serialization/resources/threads/types/index.js +1 -2
  107. package/version.d.ts +1 -1
  108. package/version.js +1 -1
  109. package/api/resources/drafts/types/DraftCreatedAt.d.ts +0 -7
  110. package/api/resources/drafts/types/DraftEventId.d.ts +0 -7
  111. package/api/resources/drafts/types/DraftInReplyTo.d.ts +0 -7
  112. package/api/resources/drafts/types/DraftReferences.d.ts +0 -7
  113. package/api/resources/messages/types/MessageEventId.d.ts +0 -7
  114. package/api/resources/messages/types/MessageEventId.js +0 -5
  115. package/api/resources/messages/types/MessageInReplyTo.d.ts +0 -7
  116. package/api/resources/messages/types/MessageInReplyTo.js +0 -5
  117. package/api/resources/messages/types/MessageReferences.d.ts +0 -7
  118. package/api/resources/messages/types/MessageReferences.js +0 -5
  119. package/api/resources/threads/types/ThreadEventId.d.ts +0 -7
  120. package/api/resources/threads/types/ThreadEventId.js +0 -5
  121. package/dist/api/resources/drafts/types/DraftCreatedAt.d.ts +0 -7
  122. package/dist/api/resources/drafts/types/DraftCreatedAt.js +0 -5
  123. package/dist/api/resources/drafts/types/DraftEventId.d.ts +0 -7
  124. package/dist/api/resources/drafts/types/DraftEventId.js +0 -5
  125. package/dist/api/resources/drafts/types/DraftInReplyTo.d.ts +0 -7
  126. package/dist/api/resources/drafts/types/DraftInReplyTo.js +0 -5
  127. package/dist/api/resources/drafts/types/DraftReferences.d.ts +0 -7
  128. package/dist/api/resources/drafts/types/DraftReferences.js +0 -5
  129. package/dist/api/resources/messages/types/MessageEventId.d.ts +0 -7
  130. package/dist/api/resources/messages/types/MessageEventId.js +0 -5
  131. package/dist/api/resources/messages/types/MessageInReplyTo.d.ts +0 -7
  132. package/dist/api/resources/messages/types/MessageInReplyTo.js +0 -5
  133. package/dist/api/resources/messages/types/MessageReferences.d.ts +0 -7
  134. package/dist/api/resources/messages/types/MessageReferences.js +0 -5
  135. package/dist/api/resources/threads/types/ThreadEventId.d.ts +0 -7
  136. package/dist/api/resources/threads/types/ThreadEventId.js +0 -5
  137. package/dist/serialization/resources/drafts/types/DraftCreatedAt.d.ts +0 -10
  138. package/dist/serialization/resources/drafts/types/DraftCreatedAt.js +0 -41
  139. package/dist/serialization/resources/drafts/types/DraftEventId.d.ts +0 -10
  140. package/dist/serialization/resources/drafts/types/DraftEventId.js +0 -41
  141. package/dist/serialization/resources/drafts/types/DraftInReplyTo.d.ts +0 -10
  142. package/dist/serialization/resources/drafts/types/DraftInReplyTo.js +0 -41
  143. package/dist/serialization/resources/drafts/types/DraftReferences.d.ts +0 -10
  144. package/dist/serialization/resources/drafts/types/DraftReferences.js +0 -41
  145. package/dist/serialization/resources/messages/types/MessageEventId.d.ts +0 -10
  146. package/dist/serialization/resources/messages/types/MessageEventId.js +0 -41
  147. package/dist/serialization/resources/messages/types/MessageInReplyTo.d.ts +0 -10
  148. package/dist/serialization/resources/messages/types/MessageInReplyTo.js +0 -41
  149. package/dist/serialization/resources/messages/types/MessageReferences.d.ts +0 -10
  150. package/dist/serialization/resources/messages/types/MessageReferences.js +0 -41
  151. package/dist/serialization/resources/threads/types/ThreadEventId.d.ts +0 -10
  152. package/dist/serialization/resources/threads/types/ThreadEventId.js +0 -41
  153. package/serialization/resources/drafts/types/DraftCreatedAt.d.ts +0 -10
  154. package/serialization/resources/drafts/types/DraftCreatedAt.js +0 -41
  155. package/serialization/resources/drafts/types/DraftEventId.d.ts +0 -10
  156. package/serialization/resources/drafts/types/DraftEventId.js +0 -41
  157. package/serialization/resources/drafts/types/DraftInReplyTo.d.ts +0 -10
  158. package/serialization/resources/drafts/types/DraftInReplyTo.js +0 -41
  159. package/serialization/resources/drafts/types/DraftReferences.d.ts +0 -10
  160. package/serialization/resources/drafts/types/DraftReferences.js +0 -41
  161. package/serialization/resources/messages/types/MessageEventId.d.ts +0 -10
  162. package/serialization/resources/messages/types/MessageEventId.js +0 -41
  163. package/serialization/resources/messages/types/MessageInReplyTo.d.ts +0 -10
  164. package/serialization/resources/messages/types/MessageInReplyTo.js +0 -41
  165. package/serialization/resources/messages/types/MessageReferences.d.ts +0 -10
  166. package/serialization/resources/messages/types/MessageReferences.js +0 -41
  167. package/serialization/resources/threads/types/ThreadEventId.d.ts +0 -10
  168. package/serialization/resources/threads/types/ThreadEventId.js +0 -41
  169. /package/api/resources/{drafts/types/DraftCreatedAt.js → messages/types/SendMessageReplyTo.js} +0 -0
  170. /package/{api/resources/drafts/types/DraftEventId.js → dist/api/resources/messages/types/SendMessageReplyTo.js} +0 -0
@@ -80,7 +80,7 @@ class Webhooks {
80
80
  const _response = yield core.fetcher({
81
81
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/webhooks"),
82
82
  method: "GET",
83
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
84
  contentType: "application/json",
85
85
  queryParameters: _queryParams,
86
86
  requestType: "json",
@@ -133,7 +133,7 @@ class Webhooks {
133
133
  const _response = yield core.fetcher({
134
134
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/webhooks/${encodeURIComponent(serializers.WebhookId.jsonOrThrow(webhookId))}`),
135
135
  method: "GET",
136
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
136
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
137
137
  contentType: "application/json",
138
138
  requestType: "json",
139
139
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -200,7 +200,7 @@ class Webhooks {
200
200
  const _response = yield core.fetcher({
201
201
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/webhooks"),
202
202
  method: "POST",
203
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
203
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
204
204
  contentType: "application/json",
205
205
  requestType: "json",
206
206
  body: serializers.CreateWebhookRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -264,7 +264,7 @@ class Webhooks {
264
264
  const _response = yield core.fetcher({
265
265
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/webhooks/${encodeURIComponent(serializers.WebhookId.jsonOrThrow(webhookId))}`),
266
266
  method: "DELETE",
267
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
267
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
268
268
  contentType: "application/json",
269
269
  requestType: "json",
270
270
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as AgentMail from "../../../index";
5
5
  export interface SendAttachment {
6
- filename: AgentMail.AttachmentFilename;
6
+ filename?: AgentMail.AttachmentFilename;
7
7
  contentType?: AgentMail.AttachmentContentType;
8
8
  content: AgentMail.AttachmentContent;
9
9
  }
@@ -80,7 +80,7 @@ class Contexts {
80
80
  const _response = yield core.fetcher({
81
81
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/contexts"),
82
82
  method: "GET",
83
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
84
  contentType: "application/json",
85
85
  queryParameters: _queryParams,
86
86
  requestType: "json",
@@ -133,7 +133,7 @@ class Contexts {
133
133
  const _response = yield core.fetcher({
134
134
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/contexts/${encodeURIComponent(serializers.ContextId.jsonOrThrow(contextId))}`),
135
135
  method: "GET",
136
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
136
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
137
137
  contentType: "application/json",
138
138
  requestType: "json",
139
139
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -205,7 +205,7 @@ class Contexts {
205
205
  const _response = yield core.fetcher({
206
206
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/contexts"),
207
207
  method: "POST",
208
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
208
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
209
209
  contentType: "application/json",
210
210
  requestType: "json",
211
211
  body: serializers.CreateContextRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -269,7 +269,7 @@ class Contexts {
269
269
  const _response = yield core.fetcher({
270
270
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/contexts/${encodeURIComponent(serializers.ContextId.jsonOrThrow(contextId))}`),
271
271
  method: "DELETE",
272
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
272
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
273
273
  contentType: "application/json",
274
274
  requestType: "json",
275
275
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -89,7 +89,7 @@ class Drafts {
89
89
  const _response = yield core.fetcher({
90
90
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/drafts"),
91
91
  method: "GET",
92
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
92
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
93
93
  contentType: "application/json",
94
94
  queryParameters: _queryParams,
95
95
  requestType: "json",
@@ -153,7 +153,7 @@ class Drafts {
153
153
  const _response = yield core.fetcher({
154
154
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/drafts/${encodeURIComponent(serializers.DraftId.jsonOrThrow(draftId))}`),
155
155
  method: "GET",
156
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
156
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
157
157
  contentType: "application/json",
158
158
  requestType: "json",
159
159
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -6,10 +6,7 @@ export interface Draft {
6
6
  inboxId: AgentMail.inboxes.InboxId;
7
7
  threadId: AgentMail.ThreadId;
8
8
  draftId: AgentMail.DraftId;
9
- eventId: AgentMail.DraftEventId;
10
9
  labels: AgentMail.DraftLabels;
11
- updatedAt: AgentMail.DraftUpdatedAt;
12
- createdAt: AgentMail.DraftCreatedAt;
13
10
  to?: AgentMail.DraftTo;
14
11
  cc?: AgentMail.DraftCc;
15
12
  bcc?: AgentMail.DraftBcc;
@@ -18,6 +15,11 @@ export interface Draft {
18
15
  text?: AgentMail.DraftText;
19
16
  html?: AgentMail.DraftHtml;
20
17
  attachments?: AgentMail.DraftAttachments;
21
- inReplyTo?: AgentMail.DraftInReplyTo;
22
- references?: AgentMail.DraftReferences;
18
+ /** ID of message being replied to. */
19
+ inReplyTo?: string;
20
+ /** IDs of previous messages in thread. */
21
+ references?: string[];
22
+ updatedAt: AgentMail.DraftUpdatedAt;
23
+ /** Time at which draft was created. */
24
+ createdAt: Date;
23
25
  }
@@ -6,16 +6,12 @@ export interface DraftItem {
6
6
  inboxId: AgentMail.inboxes.InboxId;
7
7
  threadId: AgentMail.ThreadId;
8
8
  draftId: AgentMail.DraftId;
9
- eventId: AgentMail.DraftEventId;
10
9
  labels: AgentMail.DraftLabels;
11
- updatedAt: AgentMail.DraftUpdatedAt;
12
- createdAt: AgentMail.DraftCreatedAt;
13
10
  to?: AgentMail.DraftTo;
14
11
  cc?: AgentMail.DraftCc;
15
12
  bcc?: AgentMail.DraftBcc;
16
13
  subject?: AgentMail.DraftSubject;
17
14
  preview?: AgentMail.DraftPreview;
18
15
  attachments?: AgentMail.DraftAttachments;
19
- inReplyTo?: AgentMail.DraftInReplyTo;
20
- references?: AgentMail.DraftReferences;
16
+ updatedAt: AgentMail.DraftUpdatedAt;
21
17
  }
@@ -1,8 +1,5 @@
1
1
  export * from "./DraftId";
2
- export * from "./DraftEventId";
3
2
  export * from "./DraftLabels";
4
- export * from "./DraftUpdatedAt";
5
- export * from "./DraftCreatedAt";
6
3
  export * from "./DraftTo";
7
4
  export * from "./DraftCc";
8
5
  export * from "./DraftBcc";
@@ -11,8 +8,7 @@ export * from "./DraftPreview";
11
8
  export * from "./DraftText";
12
9
  export * from "./DraftHtml";
13
10
  export * from "./DraftAttachments";
14
- export * from "./DraftInReplyTo";
15
- export * from "./DraftReferences";
11
+ export * from "./DraftUpdatedAt";
16
12
  export * from "./DraftItem";
17
13
  export * from "./Draft";
18
14
  export * from "./ListDraftsResponse";
@@ -15,10 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./DraftId"), exports);
18
- __exportStar(require("./DraftEventId"), exports);
19
18
  __exportStar(require("./DraftLabels"), exports);
20
- __exportStar(require("./DraftUpdatedAt"), exports);
21
- __exportStar(require("./DraftCreatedAt"), exports);
22
19
  __exportStar(require("./DraftTo"), exports);
23
20
  __exportStar(require("./DraftCc"), exports);
24
21
  __exportStar(require("./DraftBcc"), exports);
@@ -27,8 +24,7 @@ __exportStar(require("./DraftPreview"), exports);
27
24
  __exportStar(require("./DraftText"), exports);
28
25
  __exportStar(require("./DraftHtml"), exports);
29
26
  __exportStar(require("./DraftAttachments"), exports);
30
- __exportStar(require("./DraftInReplyTo"), exports);
31
- __exportStar(require("./DraftReferences"), exports);
27
+ __exportStar(require("./DraftUpdatedAt"), exports);
32
28
  __exportStar(require("./DraftItem"), exports);
33
29
  __exportStar(require("./Draft"), exports);
34
30
  __exportStar(require("./ListDraftsResponse"), exports);
@@ -95,7 +95,7 @@ class Inboxes {
95
95
  const _response = yield core.fetcher({
96
96
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/inboxes"),
97
97
  method: "GET",
98
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
98
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
99
99
  contentType: "application/json",
100
100
  queryParameters: _queryParams,
101
101
  requestType: "json",
@@ -148,7 +148,7 @@ class Inboxes {
148
148
  const _response = yield core.fetcher({
149
149
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}`),
150
150
  method: "GET",
151
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
151
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
152
152
  contentType: "application/json",
153
153
  requestType: "json",
154
154
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -215,7 +215,7 @@ class Inboxes {
215
215
  const _response = yield core.fetcher({
216
216
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/inboxes"),
217
217
  method: "POST",
218
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
218
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
219
219
  contentType: "application/json",
220
220
  requestType: "json",
221
221
  body: serializers.inboxes.CreateInboxRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -90,7 +90,7 @@ class Drafts {
90
90
  const _response = yield core.fetcher({
91
91
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts`),
92
92
  method: "GET",
93
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
93
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
94
94
  contentType: "application/json",
95
95
  queryParameters: _queryParams,
96
96
  requestType: "json",
@@ -155,7 +155,7 @@ class Drafts {
155
155
  const _response = yield core.fetcher({
156
156
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts/${encodeURIComponent(serializers.DraftId.jsonOrThrow(draftId))}`),
157
157
  method: "GET",
158
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
158
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
159
159
  contentType: "application/json",
160
160
  requestType: "json",
161
161
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -227,7 +227,7 @@ class Drafts {
227
227
  const _response = yield core.fetcher({
228
228
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts`),
229
229
  method: "POST",
230
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
230
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
231
231
  contentType: "application/json",
232
232
  requestType: "json",
233
233
  body: serializers.CreateDraftRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -298,7 +298,7 @@ class Drafts {
298
298
  const _response = yield core.fetcher({
299
299
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts/${encodeURIComponent(serializers.DraftId.jsonOrThrow(draftId))}/send`),
300
300
  method: "POST",
301
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
301
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
302
302
  contentType: "application/json",
303
303
  requestType: "json",
304
304
  body: serializers.UpdateMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -64,6 +64,7 @@ export declare class Messages {
64
64
  * @example
65
65
  * await client.inboxes.messages.send("inbox_id", {
66
66
  * labels: undefined,
67
+ * replyTo: undefined,
67
68
  * to: undefined,
68
69
  * cc: undefined,
69
70
  * bcc: undefined,
@@ -87,6 +88,7 @@ export declare class Messages {
87
88
  * @example
88
89
  * await client.inboxes.messages.reply("inbox_id", "message_id", {
89
90
  * labels: undefined,
91
+ * replyTo: undefined,
90
92
  * to: undefined,
91
93
  * cc: undefined,
92
94
  * bcc: undefined,
@@ -90,7 +90,7 @@ class Messages {
90
90
  const _response = yield core.fetcher({
91
91
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/messages`),
92
92
  method: "GET",
93
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
93
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
94
94
  contentType: "application/json",
95
95
  queryParameters: _queryParams,
96
96
  requestType: "json",
@@ -155,7 +155,7 @@ class Messages {
155
155
  const _response = yield core.fetcher({
156
156
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}`),
157
157
  method: "GET",
158
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
158
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
159
159
  contentType: "application/json",
160
160
  requestType: "json",
161
161
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -212,7 +212,7 @@ class Messages {
212
212
  const _response = yield core.fetcher({
213
213
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId))}`),
214
214
  method: "GET",
215
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
215
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
216
216
  contentType: "application/json",
217
217
  requestType: "json",
218
218
  responseType: "streaming",
@@ -267,6 +267,7 @@ class Messages {
267
267
  * @example
268
268
  * await client.inboxes.messages.send("inbox_id", {
269
269
  * labels: undefined,
270
+ * replyTo: undefined,
270
271
  * to: undefined,
271
272
  * cc: undefined,
272
273
  * bcc: undefined,
@@ -282,7 +283,7 @@ class Messages {
282
283
  const _response = yield core.fetcher({
283
284
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/messages/send`),
284
285
  method: "POST",
285
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
286
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
286
287
  contentType: "application/json",
287
288
  requestType: "json",
288
289
  body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -360,6 +361,7 @@ class Messages {
360
361
  * @example
361
362
  * await client.inboxes.messages.reply("inbox_id", "message_id", {
362
363
  * labels: undefined,
364
+ * replyTo: undefined,
363
365
  * to: undefined,
364
366
  * cc: undefined,
365
367
  * bcc: undefined,
@@ -374,7 +376,7 @@ class Messages {
374
376
  const _response = yield core.fetcher({
375
377
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}/reply`),
376
378
  method: "POST",
377
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
379
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
378
380
  contentType: "application/json",
379
381
  requestType: "json",
380
382
  body: serializers.ReplyToMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -460,7 +462,7 @@ class Messages {
460
462
  const _response = yield core.fetcher({
461
463
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}`),
462
464
  method: "PATCH",
463
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
465
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
464
466
  contentType: "application/json",
465
467
  requestType: "json",
466
468
  body: serializers.UpdateMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -90,7 +90,7 @@ class Threads {
90
90
  const _response = yield core.fetcher({
91
91
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/threads`),
92
92
  method: "GET",
93
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
93
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
94
94
  contentType: "application/json",
95
95
  queryParameters: _queryParams,
96
96
  requestType: "json",
@@ -155,7 +155,7 @@ class Threads {
155
155
  const _response = yield core.fetcher({
156
156
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId))}`),
157
157
  method: "GET",
158
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
158
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
159
159
  contentType: "application/json",
160
160
  requestType: "json",
161
161
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -212,7 +212,7 @@ class Threads {
212
212
  const _response = yield core.fetcher({
213
213
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId))}`),
214
214
  method: "GET",
215
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
215
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
216
216
  contentType: "application/json",
217
217
  requestType: "json",
218
218
  responseType: "streaming",
@@ -6,10 +6,11 @@ export interface Message {
6
6
  inboxId: AgentMail.inboxes.InboxId;
7
7
  threadId: AgentMail.ThreadId;
8
8
  messageId: AgentMail.MessageId;
9
- eventId: AgentMail.MessageEventId;
10
9
  labels: AgentMail.MessageLabels;
11
10
  timestamp: AgentMail.MessageTimestamp;
12
11
  from: AgentMail.MessageFrom;
12
+ /** Addresses of reply-to recipient. In format `username@domain.com` or `Display Name <username@domain.com>`. */
13
+ replyTo?: string[];
13
14
  to: AgentMail.MessageTo;
14
15
  cc?: AgentMail.MessageCc;
15
16
  bcc?: AgentMail.MessageBcc;
@@ -18,6 +19,12 @@ export interface Message {
18
19
  text?: AgentMail.MessageText;
19
20
  html?: AgentMail.MessageHtml;
20
21
  attachments?: AgentMail.MessageAttachments;
21
- inReplyTo?: AgentMail.MessageInReplyTo;
22
- references?: AgentMail.MessageReferences;
22
+ /** ID of message being replied to. */
23
+ inReplyTo?: string;
24
+ /** IDs of previous messages in thread. */
25
+ references?: string[];
26
+ /** Time at which message was last updated. */
27
+ updatedAt: Date;
28
+ /** Time at which message was created. */
29
+ createdAt: Date;
23
30
  }
@@ -6,7 +6,6 @@ export interface MessageItem {
6
6
  inboxId: AgentMail.inboxes.InboxId;
7
7
  threadId: AgentMail.ThreadId;
8
8
  messageId: AgentMail.MessageId;
9
- eventId: AgentMail.MessageEventId;
10
9
  labels: AgentMail.MessageLabels;
11
10
  timestamp: AgentMail.MessageTimestamp;
12
11
  from: AgentMail.MessageFrom;
@@ -16,6 +15,4 @@ export interface MessageItem {
16
15
  subject?: AgentMail.MessageSubject;
17
16
  preview?: AgentMail.MessagePreview;
18
17
  attachments?: AgentMail.MessageAttachments;
19
- inReplyTo?: AgentMail.MessageInReplyTo;
20
- references?: AgentMail.MessageReferences;
21
18
  }
@@ -4,6 +4,7 @@
4
4
  import * as AgentMail from "../../../index";
5
5
  export interface ReplyToMessageRequest {
6
6
  labels?: AgentMail.MessageLabels;
7
+ replyTo?: AgentMail.SendMessageReplyTo;
7
8
  to?: AgentMail.SendMessageTo;
8
9
  cc?: AgentMail.SendMessageCc;
9
10
  bcc?: AgentMail.SendMessageBcc;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AgentMail from "../../../index";
5
+ /**
6
+ * Reply-to address or addresses.
7
+ */
8
+ export type SendMessageReplyTo = AgentMail.Addresses;
@@ -4,6 +4,7 @@
4
4
  import * as AgentMail from "../../../index";
5
5
  export interface SendMessageRequest {
6
6
  labels?: AgentMail.MessageLabels;
7
+ replyTo?: AgentMail.SendMessageReplyTo;
7
8
  to?: AgentMail.SendMessageTo;
8
9
  cc?: AgentMail.SendMessageCc;
9
10
  bcc?: AgentMail.SendMessageBcc;
@@ -1,5 +1,4 @@
1
1
  export * from "./MessageId";
2
- export * from "./MessageEventId";
3
2
  export * from "./MessageLabels";
4
3
  export * from "./MessageTimestamp";
5
4
  export * from "./MessageFrom";
@@ -11,12 +10,11 @@ export * from "./MessagePreview";
11
10
  export * from "./MessageText";
12
11
  export * from "./MessageHtml";
13
12
  export * from "./MessageAttachments";
14
- export * from "./MessageInReplyTo";
15
- export * from "./MessageReferences";
16
13
  export * from "./MessageItem";
17
14
  export * from "./Message";
18
15
  export * from "./ListMessagesResponse";
19
16
  export * from "./Addresses";
17
+ export * from "./SendMessageReplyTo";
20
18
  export * from "./SendMessageTo";
21
19
  export * from "./SendMessageCc";
22
20
  export * from "./SendMessageBcc";
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./MessageId"), exports);
18
- __exportStar(require("./MessageEventId"), exports);
19
18
  __exportStar(require("./MessageLabels"), exports);
20
19
  __exportStar(require("./MessageTimestamp"), exports);
21
20
  __exportStar(require("./MessageFrom"), exports);
@@ -27,12 +26,11 @@ __exportStar(require("./MessagePreview"), exports);
27
26
  __exportStar(require("./MessageText"), exports);
28
27
  __exportStar(require("./MessageHtml"), exports);
29
28
  __exportStar(require("./MessageAttachments"), exports);
30
- __exportStar(require("./MessageInReplyTo"), exports);
31
- __exportStar(require("./MessageReferences"), exports);
32
29
  __exportStar(require("./MessageItem"), exports);
33
30
  __exportStar(require("./Message"), exports);
34
31
  __exportStar(require("./ListMessagesResponse"), exports);
35
32
  __exportStar(require("./Addresses"), exports);
33
+ __exportStar(require("./SendMessageReplyTo"), exports);
36
34
  __exportStar(require("./SendMessageTo"), exports);
37
35
  __exportStar(require("./SendMessageCc"), exports);
38
36
  __exportStar(require("./SendMessageBcc"), exports);
@@ -89,7 +89,7 @@ class Threads {
89
89
  const _response = yield core.fetcher({
90
90
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/threads"),
91
91
  method: "GET",
92
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
92
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
93
93
  contentType: "application/json",
94
94
  queryParameters: _queryParams,
95
95
  requestType: "json",
@@ -153,7 +153,7 @@ class Threads {
153
153
  const _response = yield core.fetcher({
154
154
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId))}`),
155
155
  method: "GET",
156
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
156
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
157
157
  contentType: "application/json",
158
158
  requestType: "json",
159
159
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -210,7 +210,7 @@ class Threads {
210
210
  const _response = yield core.fetcher({
211
211
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId))}`),
212
212
  method: "GET",
213
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.36", "User-Agent": "agentmail/0.0.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
213
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.38", "User-Agent": "agentmail/0.0.38", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
214
214
  contentType: "application/json",
215
215
  requestType: "json",
216
216
  responseType: "streaming",
@@ -5,15 +5,18 @@ import * as AgentMail from "../../../index";
5
5
  export interface Thread {
6
6
  inboxId: AgentMail.inboxes.InboxId;
7
7
  threadId: AgentMail.ThreadId;
8
- eventId: AgentMail.ThreadEventId;
9
8
  labels: AgentMail.ThreadLabels;
10
9
  timestamp: AgentMail.ThreadTimestamp;
11
10
  senders: AgentMail.ThreadSenders;
12
11
  recipients: AgentMail.ThreadRecipients;
13
- messageCount: AgentMail.ThreadMessageCount;
14
12
  subject?: AgentMail.ThreadSubject;
15
13
  preview?: AgentMail.ThreadPreview;
16
14
  attachments?: AgentMail.ThreadAttachments;
15
+ messageCount: AgentMail.ThreadMessageCount;
17
16
  /** Messages in thread. Ordered by `timestamp` ascending. */
18
17
  messages: AgentMail.Message[];
18
+ /** Time at which thread was last updated. */
19
+ updatedAt: Date;
20
+ /** Time at which thread was created. */
21
+ createdAt: Date;
19
22
  }
@@ -5,13 +5,12 @@ import * as AgentMail from "../../../index";
5
5
  export interface ThreadItem {
6
6
  inboxId: AgentMail.inboxes.InboxId;
7
7
  threadId: AgentMail.ThreadId;
8
- eventId: AgentMail.ThreadEventId;
9
8
  labels: AgentMail.ThreadLabels;
10
9
  timestamp: AgentMail.ThreadTimestamp;
11
10
  senders: AgentMail.ThreadSenders;
12
11
  recipients: AgentMail.ThreadRecipients;
13
- messageCount: AgentMail.ThreadMessageCount;
14
12
  subject?: AgentMail.ThreadSubject;
15
13
  preview?: AgentMail.ThreadPreview;
16
14
  attachments?: AgentMail.ThreadAttachments;
15
+ messageCount: AgentMail.ThreadMessageCount;
17
16
  }