agentmail 0.0.37 → 0.0.39

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 (149) hide show
  1. package/README.md +1 -0
  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/CreateDraftRequest.d.ts +1 -0
  5. package/api/resources/drafts/types/Draft.d.ts +1 -0
  6. package/api/resources/drafts/types/DraftReplyTo.d.ts +7 -0
  7. package/api/resources/drafts/types/DraftReplyTo.js +5 -0
  8. package/api/resources/drafts/types/index.d.ts +1 -0
  9. package/api/resources/drafts/types/index.js +1 -0
  10. package/api/resources/inboxes/client/Client.d.ts +2 -1
  11. package/api/resources/inboxes/client/Client.js +5 -4
  12. package/api/resources/inboxes/resources/drafts/client/Client.d.ts +1 -0
  13. package/api/resources/inboxes/resources/drafts/client/Client.js +5 -4
  14. package/api/resources/inboxes/resources/messages/client/Client.d.ts +2 -0
  15. package/api/resources/inboxes/resources/messages/client/Client.js +8 -6
  16. package/api/resources/inboxes/resources/threads/client/Client.js +3 -3
  17. package/api/resources/inboxes/types/ClientId.d.ts +7 -0
  18. package/api/resources/inboxes/types/ClientId.js +5 -0
  19. package/api/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
  20. package/api/resources/inboxes/types/Inbox.d.ts +1 -0
  21. package/api/resources/inboxes/types/index.d.ts +1 -0
  22. package/api/resources/inboxes/types/index.js +1 -0
  23. package/api/resources/messages/types/Message.d.ts +2 -0
  24. package/api/resources/messages/types/ReplyToMessageRequest.d.ts +1 -0
  25. package/api/resources/messages/types/SendMessageReplyTo.d.ts +8 -0
  26. package/api/resources/messages/types/SendMessageReplyTo.js +5 -0
  27. package/api/resources/messages/types/SendMessageRequest.d.ts +1 -0
  28. package/api/resources/messages/types/index.d.ts +1 -0
  29. package/api/resources/messages/types/index.js +1 -0
  30. package/api/resources/threads/client/Client.js +3 -3
  31. package/api/resources/webhooks/client/Client.d.ts +2 -1
  32. package/api/resources/webhooks/client/Client.js +6 -5
  33. package/api/resources/webhooks/types/ClientId.d.ts +7 -0
  34. package/api/resources/webhooks/types/ClientId.js +5 -0
  35. package/api/resources/webhooks/types/CreateWebhookRequest.d.ts +1 -0
  36. package/api/resources/webhooks/types/Webhook.d.ts +1 -0
  37. package/api/resources/webhooks/types/index.d.ts +1 -0
  38. package/api/resources/webhooks/types/index.js +1 -0
  39. package/dist/api/resources/contexts/client/Client.js +4 -4
  40. package/dist/api/resources/drafts/client/Client.js +2 -2
  41. package/dist/api/resources/drafts/types/CreateDraftRequest.d.ts +1 -0
  42. package/dist/api/resources/drafts/types/Draft.d.ts +1 -0
  43. package/dist/api/resources/drafts/types/DraftReplyTo.d.ts +7 -0
  44. package/dist/api/resources/drafts/types/DraftReplyTo.js +5 -0
  45. package/dist/api/resources/drafts/types/index.d.ts +1 -0
  46. package/dist/api/resources/drafts/types/index.js +1 -0
  47. package/dist/api/resources/inboxes/client/Client.d.ts +2 -1
  48. package/dist/api/resources/inboxes/client/Client.js +5 -4
  49. package/dist/api/resources/inboxes/resources/drafts/client/Client.d.ts +1 -0
  50. package/dist/api/resources/inboxes/resources/drafts/client/Client.js +5 -4
  51. package/dist/api/resources/inboxes/resources/messages/client/Client.d.ts +2 -0
  52. package/dist/api/resources/inboxes/resources/messages/client/Client.js +8 -6
  53. package/dist/api/resources/inboxes/resources/threads/client/Client.js +3 -3
  54. package/dist/api/resources/inboxes/types/ClientId.d.ts +7 -0
  55. package/dist/api/resources/inboxes/types/ClientId.js +5 -0
  56. package/dist/api/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
  57. package/dist/api/resources/inboxes/types/Inbox.d.ts +1 -0
  58. package/dist/api/resources/inboxes/types/index.d.ts +1 -0
  59. package/dist/api/resources/inboxes/types/index.js +1 -0
  60. package/dist/api/resources/messages/types/Message.d.ts +2 -0
  61. package/dist/api/resources/messages/types/ReplyToMessageRequest.d.ts +1 -0
  62. package/dist/api/resources/messages/types/SendMessageReplyTo.d.ts +8 -0
  63. package/dist/api/resources/messages/types/SendMessageReplyTo.js +5 -0
  64. package/dist/api/resources/messages/types/SendMessageRequest.d.ts +1 -0
  65. package/dist/api/resources/messages/types/index.d.ts +1 -0
  66. package/dist/api/resources/messages/types/index.js +1 -0
  67. package/dist/api/resources/threads/client/Client.js +3 -3
  68. package/dist/api/resources/webhooks/client/Client.d.ts +2 -1
  69. package/dist/api/resources/webhooks/client/Client.js +6 -5
  70. package/dist/api/resources/webhooks/types/ClientId.d.ts +7 -0
  71. package/dist/api/resources/webhooks/types/ClientId.js +5 -0
  72. package/dist/api/resources/webhooks/types/CreateWebhookRequest.d.ts +1 -0
  73. package/dist/api/resources/webhooks/types/Webhook.d.ts +1 -0
  74. package/dist/api/resources/webhooks/types/index.d.ts +1 -0
  75. package/dist/api/resources/webhooks/types/index.js +1 -0
  76. package/dist/serialization/resources/drafts/types/CreateDraftRequest.d.ts +2 -0
  77. package/dist/serialization/resources/drafts/types/CreateDraftRequest.js +2 -0
  78. package/dist/serialization/resources/drafts/types/Draft.d.ts +2 -0
  79. package/dist/serialization/resources/drafts/types/Draft.js +2 -0
  80. package/dist/serialization/resources/drafts/types/DraftReplyTo.d.ts +10 -0
  81. package/dist/serialization/resources/drafts/types/DraftReplyTo.js +41 -0
  82. package/dist/serialization/resources/drafts/types/index.d.ts +1 -0
  83. package/dist/serialization/resources/drafts/types/index.js +1 -0
  84. package/dist/serialization/resources/inboxes/types/ClientId.d.ts +10 -0
  85. package/dist/serialization/resources/inboxes/types/ClientId.js +41 -0
  86. package/dist/serialization/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
  87. package/dist/serialization/resources/inboxes/types/CreateInboxRequest.js +2 -0
  88. package/dist/serialization/resources/inboxes/types/Inbox.d.ts +2 -0
  89. package/dist/serialization/resources/inboxes/types/Inbox.js +2 -0
  90. package/dist/serialization/resources/inboxes/types/index.d.ts +1 -0
  91. package/dist/serialization/resources/inboxes/types/index.js +1 -0
  92. package/dist/serialization/resources/messages/types/Message.d.ts +1 -0
  93. package/dist/serialization/resources/messages/types/Message.js +1 -0
  94. package/dist/serialization/resources/messages/types/ReplyToMessageRequest.d.ts +2 -0
  95. package/dist/serialization/resources/messages/types/ReplyToMessageRequest.js +2 -0
  96. package/dist/serialization/resources/messages/types/SendMessageReplyTo.d.ts +11 -0
  97. package/dist/serialization/resources/messages/types/SendMessageReplyTo.js +8 -0
  98. package/dist/serialization/resources/messages/types/SendMessageRequest.d.ts +2 -0
  99. package/dist/serialization/resources/messages/types/SendMessageRequest.js +2 -0
  100. package/dist/serialization/resources/messages/types/index.d.ts +1 -0
  101. package/dist/serialization/resources/messages/types/index.js +1 -0
  102. package/dist/serialization/resources/webhooks/types/ClientId.d.ts +10 -0
  103. package/dist/serialization/resources/webhooks/types/ClientId.js +41 -0
  104. package/dist/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +2 -0
  105. package/dist/serialization/resources/webhooks/types/CreateWebhookRequest.js +2 -0
  106. package/dist/serialization/resources/webhooks/types/Webhook.d.ts +2 -0
  107. package/dist/serialization/resources/webhooks/types/Webhook.js +2 -0
  108. package/dist/serialization/resources/webhooks/types/index.d.ts +1 -0
  109. package/dist/serialization/resources/webhooks/types/index.js +1 -0
  110. package/dist/version.d.ts +1 -1
  111. package/dist/version.js +1 -1
  112. package/package.json +1 -1
  113. package/reference.md +5 -0
  114. package/serialization/resources/drafts/types/CreateDraftRequest.d.ts +2 -0
  115. package/serialization/resources/drafts/types/CreateDraftRequest.js +2 -0
  116. package/serialization/resources/drafts/types/Draft.d.ts +2 -0
  117. package/serialization/resources/drafts/types/Draft.js +2 -0
  118. package/serialization/resources/drafts/types/DraftReplyTo.d.ts +10 -0
  119. package/serialization/resources/drafts/types/DraftReplyTo.js +41 -0
  120. package/serialization/resources/drafts/types/index.d.ts +1 -0
  121. package/serialization/resources/drafts/types/index.js +1 -0
  122. package/serialization/resources/inboxes/types/ClientId.d.ts +10 -0
  123. package/serialization/resources/inboxes/types/ClientId.js +41 -0
  124. package/serialization/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
  125. package/serialization/resources/inboxes/types/CreateInboxRequest.js +2 -0
  126. package/serialization/resources/inboxes/types/Inbox.d.ts +2 -0
  127. package/serialization/resources/inboxes/types/Inbox.js +2 -0
  128. package/serialization/resources/inboxes/types/index.d.ts +1 -0
  129. package/serialization/resources/inboxes/types/index.js +1 -0
  130. package/serialization/resources/messages/types/Message.d.ts +1 -0
  131. package/serialization/resources/messages/types/Message.js +1 -0
  132. package/serialization/resources/messages/types/ReplyToMessageRequest.d.ts +2 -0
  133. package/serialization/resources/messages/types/ReplyToMessageRequest.js +2 -0
  134. package/serialization/resources/messages/types/SendMessageReplyTo.d.ts +11 -0
  135. package/serialization/resources/messages/types/SendMessageReplyTo.js +8 -0
  136. package/serialization/resources/messages/types/SendMessageRequest.d.ts +2 -0
  137. package/serialization/resources/messages/types/SendMessageRequest.js +2 -0
  138. package/serialization/resources/messages/types/index.d.ts +1 -0
  139. package/serialization/resources/messages/types/index.js +1 -0
  140. package/serialization/resources/webhooks/types/ClientId.d.ts +10 -0
  141. package/serialization/resources/webhooks/types/ClientId.js +41 -0
  142. package/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +2 -0
  143. package/serialization/resources/webhooks/types/CreateWebhookRequest.js +2 -0
  144. package/serialization/resources/webhooks/types/Webhook.d.ts +2 -0
  145. package/serialization/resources/webhooks/types/Webhook.js +2 -0
  146. package/serialization/resources/webhooks/types/index.d.ts +1 -0
  147. package/serialization/resources/webhooks/types/index.js +1 -0
  148. package/version.d.ts +1 -1
  149. package/version.js +1 -1
package/README.md CHANGED
@@ -27,6 +27,7 @@ await client.inboxes.create({
27
27
  username: undefined,
28
28
  domain: undefined,
29
29
  displayName: undefined,
30
+ clientId: undefined,
30
31
  });
31
32
  ```
32
33
 
@@ -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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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,
@@ -4,6 +4,7 @@
4
4
  import * as AgentMail from "../../../index";
5
5
  export interface CreateDraftRequest {
6
6
  labels?: AgentMail.DraftLabels;
7
+ replyTo?: AgentMail.DraftReplyTo;
7
8
  to?: AgentMail.DraftTo;
8
9
  cc?: AgentMail.DraftCc;
9
10
  bcc?: AgentMail.DraftBcc;
@@ -7,6 +7,7 @@ export interface Draft {
7
7
  threadId: AgentMail.ThreadId;
8
8
  draftId: AgentMail.DraftId;
9
9
  labels: AgentMail.DraftLabels;
10
+ replyTo?: AgentMail.DraftReplyTo;
10
11
  to?: AgentMail.DraftTo;
11
12
  cc?: AgentMail.DraftCc;
12
13
  bcc?: AgentMail.DraftBcc;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`.
6
+ */
7
+ export type DraftReplyTo = string[];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,6 @@
1
1
  export * from "./DraftId";
2
2
  export * from "./DraftLabels";
3
+ export * from "./DraftReplyTo";
3
4
  export * from "./DraftTo";
4
5
  export * from "./DraftCc";
5
6
  export * from "./DraftBcc";
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./DraftId"), exports);
18
18
  __exportStar(require("./DraftLabels"), exports);
19
+ __exportStar(require("./DraftReplyTo"), exports);
19
20
  __exportStar(require("./DraftTo"), exports);
20
21
  __exportStar(require("./DraftCc"), exports);
21
22
  __exportStar(require("./DraftBcc"), exports);
@@ -62,7 +62,8 @@ export declare class Inboxes {
62
62
  * await client.inboxes.create({
63
63
  * username: undefined,
64
64
  * domain: undefined,
65
- * displayName: undefined
65
+ * displayName: undefined,
66
+ * clientId: undefined
66
67
  * })
67
68
  */
68
69
  create(request: AgentMail.inboxes.CreateInboxRequest, requestOptions?: Inboxes.RequestOptions): Promise<AgentMail.inboxes.Inbox>;
@@ -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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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,
@@ -206,7 +206,8 @@ class Inboxes {
206
206
  * await client.inboxes.create({
207
207
  * username: undefined,
208
208
  * domain: undefined,
209
- * displayName: undefined
209
+ * displayName: undefined,
210
+ * clientId: undefined
210
211
  * })
211
212
  */
212
213
  create(request, requestOptions) {
@@ -215,7 +216,7 @@ class Inboxes {
215
216
  const _response = yield core.fetcher({
216
217
  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
218
  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.37", "User-Agent": "agentmail/0.0.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
219
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
219
220
  contentType: "application/json",
220
221
  requestType: "json",
221
222
  body: serializers.inboxes.CreateInboxRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -57,6 +57,7 @@ export declare class Drafts {
57
57
  * @example
58
58
  * await client.inboxes.drafts.create("inbox_id", {
59
59
  * labels: undefined,
60
+ * replyTo: undefined,
60
61
  * to: undefined,
61
62
  * cc: undefined,
62
63
  * bcc: undefined,
@@ -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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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,
@@ -213,6 +213,7 @@ class Drafts {
213
213
  * @example
214
214
  * await client.inboxes.drafts.create("inbox_id", {
215
215
  * labels: undefined,
216
+ * replyTo: undefined,
216
217
  * to: undefined,
217
218
  * cc: undefined,
218
219
  * bcc: undefined,
@@ -227,7 +228,7 @@ class Drafts {
227
228
  const _response = yield core.fetcher({
228
229
  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
230
  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.37", "User-Agent": "agentmail/0.0.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
231
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
231
232
  contentType: "application/json",
232
233
  requestType: "json",
233
234
  body: serializers.CreateDraftRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -298,7 +299,7 @@ class Drafts {
298
299
  const _response = yield core.fetcher({
299
300
  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
301
  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.37", "User-Agent": "agentmail/0.0.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
302
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
302
303
  contentType: "application/json",
303
304
  requestType: "json",
304
305
  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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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",
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Client ID of inbox.
6
+ */
7
+ export type ClientId = string;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as AgentMail from "../../../index";
4
5
  export interface CreateInboxRequest {
5
6
  /** Username of address. Randomly generated if not specified. */
6
7
  username?: string;
@@ -8,4 +9,5 @@ export interface CreateInboxRequest {
8
9
  domain?: string;
9
10
  /** Display name: `Display Name <username@domain.com>`. Defaults to `AgentMail`. Pass empty string to omit. */
10
11
  displayName?: string;
12
+ clientId?: AgentMail.inboxes.ClientId;
11
13
  }
@@ -10,4 +10,5 @@ export interface Inbox {
10
10
  updatedAt: Date;
11
11
  /** Time at which inbox was created. */
12
12
  createdAt: Date;
13
+ clientId?: AgentMail.inboxes.ClientId;
13
14
  }
@@ -1,4 +1,5 @@
1
1
  export * from "./InboxId";
2
+ export * from "./ClientId";
2
3
  export * from "./Inbox";
3
4
  export * from "./ListInboxesResponse";
4
5
  export * from "./CreateInboxRequest";
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./InboxId"), exports);
18
+ __exportStar(require("./ClientId"), exports);
18
19
  __exportStar(require("./Inbox"), exports);
19
20
  __exportStar(require("./ListInboxesResponse"), exports);
20
21
  __exportStar(require("./CreateInboxRequest"), exports);
@@ -9,6 +9,8 @@ export interface Message {
9
9
  labels: AgentMail.MessageLabels;
10
10
  timestamp: AgentMail.MessageTimestamp;
11
11
  from: AgentMail.MessageFrom;
12
+ /** Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`. */
13
+ replyTo?: string[];
12
14
  to: AgentMail.MessageTo;
13
15
  cc?: AgentMail.MessageCc;
14
16
  bcc?: AgentMail.MessageBcc;
@@ -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;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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;
@@ -14,6 +14,7 @@ export * from "./MessageItem";
14
14
  export * from "./Message";
15
15
  export * from "./ListMessagesResponse";
16
16
  export * from "./Addresses";
17
+ export * from "./SendMessageReplyTo";
17
18
  export * from "./SendMessageTo";
18
19
  export * from "./SendMessageCc";
19
20
  export * from "./SendMessageBcc";
@@ -30,6 +30,7 @@ __exportStar(require("./MessageItem"), exports);
30
30
  __exportStar(require("./Message"), exports);
31
31
  __exportStar(require("./ListMessagesResponse"), exports);
32
32
  __exportStar(require("./Addresses"), exports);
33
+ __exportStar(require("./SendMessageReplyTo"), exports);
33
34
  __exportStar(require("./SendMessageTo"), exports);
34
35
  __exportStar(require("./SendMessageCc"), exports);
35
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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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",
@@ -53,7 +53,8 @@ export declare class Webhooks {
53
53
  * await client.webhooks.create({
54
54
  * url: "url",
55
55
  * eventTypes: ["message.received", "message.received"],
56
- * inboxIds: undefined
56
+ * inboxIds: undefined,
57
+ * clientId: undefined
57
58
  * })
58
59
  */
59
60
  create(request: AgentMail.CreateWebhookRequest, requestOptions?: Webhooks.RequestOptions): Promise<AgentMail.Webhook>;
@@ -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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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.37", "User-Agent": "agentmail/0.0.37", "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.39", "User-Agent": "agentmail/0.0.39", "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,
@@ -191,7 +191,8 @@ class Webhooks {
191
191
  * await client.webhooks.create({
192
192
  * url: "url",
193
193
  * eventTypes: ["message.received", "message.received"],
194
- * inboxIds: undefined
194
+ * inboxIds: undefined,
195
+ * clientId: undefined
195
196
  * })
196
197
  */
197
198
  create(request, requestOptions) {
@@ -200,7 +201,7 @@ class Webhooks {
200
201
  const _response = yield core.fetcher({
201
202
  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
203
  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.37", "User-Agent": "agentmail/0.0.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
204
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
204
205
  contentType: "application/json",
205
206
  requestType: "json",
206
207
  body: serializers.CreateWebhookRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -264,7 +265,7 @@ class Webhooks {
264
265
  const _response = yield core.fetcher({
265
266
  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
267
  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.37", "User-Agent": "agentmail/0.0.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
268
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
268
269
  contentType: "application/json",
269
270
  requestType: "json",
270
271
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Client ID of webhook.
6
+ */
7
+ export type ClientId = string;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });