agentmail 0.0.38 → 0.0.40

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 (115) 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.js +6 -6
  15. package/api/resources/inboxes/resources/threads/client/Client.js +3 -3
  16. package/api/resources/inboxes/types/ClientId.d.ts +7 -0
  17. package/api/resources/inboxes/types/ClientId.js +5 -0
  18. package/api/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
  19. package/api/resources/inboxes/types/Inbox.d.ts +1 -0
  20. package/api/resources/inboxes/types/index.d.ts +1 -0
  21. package/api/resources/inboxes/types/index.js +1 -0
  22. package/api/resources/messages/types/Message.d.ts +1 -1
  23. package/api/resources/threads/client/Client.js +3 -3
  24. package/api/resources/webhooks/client/Client.d.ts +2 -1
  25. package/api/resources/webhooks/client/Client.js +6 -5
  26. package/api/resources/webhooks/types/ClientId.d.ts +7 -0
  27. package/api/resources/webhooks/types/ClientId.js +5 -0
  28. package/api/resources/webhooks/types/CreateWebhookRequest.d.ts +1 -0
  29. package/api/resources/webhooks/types/Webhook.d.ts +1 -0
  30. package/api/resources/webhooks/types/index.d.ts +1 -0
  31. package/api/resources/webhooks/types/index.js +1 -0
  32. package/dist/api/resources/contexts/client/Client.js +4 -4
  33. package/dist/api/resources/drafts/client/Client.js +2 -2
  34. package/dist/api/resources/drafts/types/CreateDraftRequest.d.ts +1 -0
  35. package/dist/api/resources/drafts/types/Draft.d.ts +1 -0
  36. package/dist/api/resources/drafts/types/DraftReplyTo.d.ts +7 -0
  37. package/dist/api/resources/drafts/types/DraftReplyTo.js +5 -0
  38. package/dist/api/resources/drafts/types/index.d.ts +1 -0
  39. package/dist/api/resources/drafts/types/index.js +1 -0
  40. package/dist/api/resources/inboxes/client/Client.d.ts +2 -1
  41. package/dist/api/resources/inboxes/client/Client.js +5 -4
  42. package/dist/api/resources/inboxes/resources/drafts/client/Client.d.ts +1 -0
  43. package/dist/api/resources/inboxes/resources/drafts/client/Client.js +5 -4
  44. package/dist/api/resources/inboxes/resources/messages/client/Client.js +6 -6
  45. package/dist/api/resources/inboxes/resources/threads/client/Client.js +3 -3
  46. package/dist/api/resources/inboxes/types/ClientId.d.ts +7 -0
  47. package/dist/api/resources/inboxes/types/ClientId.js +5 -0
  48. package/dist/api/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
  49. package/dist/api/resources/inboxes/types/Inbox.d.ts +1 -0
  50. package/dist/api/resources/inboxes/types/index.d.ts +1 -0
  51. package/dist/api/resources/inboxes/types/index.js +1 -0
  52. package/dist/api/resources/messages/types/Message.d.ts +1 -1
  53. package/dist/api/resources/threads/client/Client.js +3 -3
  54. package/dist/api/resources/webhooks/client/Client.d.ts +2 -1
  55. package/dist/api/resources/webhooks/client/Client.js +6 -5
  56. package/dist/api/resources/webhooks/types/ClientId.d.ts +7 -0
  57. package/dist/api/resources/webhooks/types/ClientId.js +5 -0
  58. package/dist/api/resources/webhooks/types/CreateWebhookRequest.d.ts +1 -0
  59. package/dist/api/resources/webhooks/types/Webhook.d.ts +1 -0
  60. package/dist/api/resources/webhooks/types/index.d.ts +1 -0
  61. package/dist/api/resources/webhooks/types/index.js +1 -0
  62. package/dist/serialization/resources/drafts/types/CreateDraftRequest.d.ts +2 -0
  63. package/dist/serialization/resources/drafts/types/CreateDraftRequest.js +2 -0
  64. package/dist/serialization/resources/drafts/types/Draft.d.ts +2 -0
  65. package/dist/serialization/resources/drafts/types/Draft.js +2 -0
  66. package/dist/serialization/resources/drafts/types/DraftReplyTo.d.ts +10 -0
  67. package/dist/serialization/resources/drafts/types/DraftReplyTo.js +41 -0
  68. package/dist/serialization/resources/drafts/types/index.d.ts +1 -0
  69. package/dist/serialization/resources/drafts/types/index.js +1 -0
  70. package/dist/serialization/resources/inboxes/types/ClientId.d.ts +10 -0
  71. package/dist/serialization/resources/inboxes/types/ClientId.js +41 -0
  72. package/dist/serialization/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
  73. package/dist/serialization/resources/inboxes/types/CreateInboxRequest.js +2 -0
  74. package/dist/serialization/resources/inboxes/types/Inbox.d.ts +2 -0
  75. package/dist/serialization/resources/inboxes/types/Inbox.js +2 -0
  76. package/dist/serialization/resources/inboxes/types/index.d.ts +1 -0
  77. package/dist/serialization/resources/inboxes/types/index.js +1 -0
  78. package/dist/serialization/resources/webhooks/types/ClientId.d.ts +10 -0
  79. package/dist/serialization/resources/webhooks/types/ClientId.js +41 -0
  80. package/dist/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +2 -0
  81. package/dist/serialization/resources/webhooks/types/CreateWebhookRequest.js +2 -0
  82. package/dist/serialization/resources/webhooks/types/Webhook.d.ts +2 -0
  83. package/dist/serialization/resources/webhooks/types/Webhook.js +2 -0
  84. package/dist/serialization/resources/webhooks/types/index.d.ts +1 -0
  85. package/dist/serialization/resources/webhooks/types/index.js +1 -0
  86. package/dist/version.d.ts +1 -1
  87. package/dist/version.js +1 -1
  88. package/package.json +1 -1
  89. package/reference.md +3 -0
  90. package/serialization/resources/drafts/types/CreateDraftRequest.d.ts +2 -0
  91. package/serialization/resources/drafts/types/CreateDraftRequest.js +2 -0
  92. package/serialization/resources/drafts/types/Draft.d.ts +2 -0
  93. package/serialization/resources/drafts/types/Draft.js +2 -0
  94. package/serialization/resources/drafts/types/DraftReplyTo.d.ts +10 -0
  95. package/serialization/resources/drafts/types/DraftReplyTo.js +41 -0
  96. package/serialization/resources/drafts/types/index.d.ts +1 -0
  97. package/serialization/resources/drafts/types/index.js +1 -0
  98. package/serialization/resources/inboxes/types/ClientId.d.ts +10 -0
  99. package/serialization/resources/inboxes/types/ClientId.js +41 -0
  100. package/serialization/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
  101. package/serialization/resources/inboxes/types/CreateInboxRequest.js +2 -0
  102. package/serialization/resources/inboxes/types/Inbox.d.ts +2 -0
  103. package/serialization/resources/inboxes/types/Inbox.js +2 -0
  104. package/serialization/resources/inboxes/types/index.d.ts +1 -0
  105. package/serialization/resources/inboxes/types/index.js +1 -0
  106. package/serialization/resources/webhooks/types/ClientId.d.ts +10 -0
  107. package/serialization/resources/webhooks/types/ClientId.js +41 -0
  108. package/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +2 -0
  109. package/serialization/resources/webhooks/types/CreateWebhookRequest.js +2 -0
  110. package/serialization/resources/webhooks/types/Webhook.d.ts +2 -0
  111. package/serialization/resources/webhooks/types/Webhook.js +2 -0
  112. package/serialization/resources/webhooks/types/index.d.ts +1 -0
  113. package/serialization/resources/webhooks/types/index.js +1 -0
  114. package/version.d.ts +1 -1
  115. 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.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),
83
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
136
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
208
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
272
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
92
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
156
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
98
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
151
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
158
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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" }),
@@ -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.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
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
158
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
215
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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",
@@ -283,7 +283,7 @@ class Messages {
283
283
  const _response = yield core.fetcher({
284
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`),
285
285
  method: "POST",
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
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
287
287
  contentType: "application/json",
288
288
  requestType: "json",
289
289
  body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -376,7 +376,7 @@ class Messages {
376
376
  const _response = yield core.fetcher({
377
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`),
378
378
  method: "POST",
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),
379
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
380
380
  contentType: "application/json",
381
381
  requestType: "json",
382
382
  body: serializers.ReplyToMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -462,7 +462,7 @@ class Messages {
462
462
  const _response = yield core.fetcher({
463
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))}`),
464
464
  method: "PATCH",
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),
465
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
466
466
  contentType: "application/json",
467
467
  requestType: "json",
468
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.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
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
158
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
215
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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,7 +9,7 @@ export interface Message {
9
9
  labels: AgentMail.MessageLabels;
10
10
  timestamp: AgentMail.MessageTimestamp;
11
11
  from: AgentMail.MessageFrom;
12
- /** Addresses of reply-to recipient. In format `username@domain.com` or `Display Name <username@domain.com>`. */
12
+ /** Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`. */
13
13
  replyTo?: string[];
14
14
  to: AgentMail.MessageTo;
15
15
  cc?: AgentMail.MessageCc;
@@ -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.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),
92
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
156
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
213
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
83
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
136
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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 });
@@ -6,4 +6,5 @@ export interface CreateWebhookRequest {
6
6
  url: AgentMail.Url;
7
7
  eventTypes: AgentMail.EventTypes;
8
8
  inboxIds?: AgentMail.InboxIds;
9
+ clientId?: AgentMail.ClientId;
9
10
  }
@@ -15,4 +15,5 @@ export interface Webhook {
15
15
  updatedAt: Date;
16
16
  /** Time at which webhook was created. */
17
17
  createdAt: Date;
18
+ clientId?: AgentMail.ClientId;
18
19
  }
@@ -1,4 +1,5 @@
1
1
  export * from "./WebhookId";
2
+ export * from "./ClientId";
2
3
  export * from "./Url";
3
4
  export * from "./EventType";
4
5
  export * from "./EventTypes";
@@ -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("./WebhookId"), exports);
18
+ __exportStar(require("./ClientId"), exports);
18
19
  __exportStar(require("./Url"), exports);
19
20
  __exportStar(require("./EventType"), exports);
20
21
  __exportStar(require("./EventTypes"), exports);
@@ -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.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),
83
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
136
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
208
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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.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),
272
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.40", "User-Agent": "agentmail/0.0.40", "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,