agentmail 0.0.33 → 0.0.34

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 (60) hide show
  1. package/api/resources/drafts/client/Client.js +2 -2
  2. package/api/resources/inboxes/client/Client.js +3 -3
  3. package/api/resources/inboxes/resources/drafts/client/Client.js +4 -4
  4. package/api/resources/inboxes/resources/messages/client/Client.js +6 -6
  5. package/api/resources/inboxes/resources/threads/client/Client.js +2 -2
  6. package/api/resources/threads/client/Client.js +2 -2
  7. package/api/resources/webhooks/client/Client.d.ts +2 -2
  8. package/api/resources/webhooks/client/Client.js +6 -6
  9. package/api/resources/webhooks/types/CreateWebhookRequest.d.ts +2 -2
  10. package/api/resources/webhooks/types/{Events.d.ts → EventTypes.d.ts} +1 -1
  11. package/api/resources/webhooks/types/InboxIds.d.ts +7 -0
  12. package/api/resources/webhooks/types/Webhook.d.ts +6 -2
  13. package/api/resources/webhooks/types/index.d.ts +2 -2
  14. package/api/resources/webhooks/types/index.js +2 -2
  15. package/dist/api/resources/drafts/client/Client.js +2 -2
  16. package/dist/api/resources/inboxes/client/Client.js +3 -3
  17. package/dist/api/resources/inboxes/resources/drafts/client/Client.js +4 -4
  18. package/dist/api/resources/inboxes/resources/messages/client/Client.js +6 -6
  19. package/dist/api/resources/inboxes/resources/threads/client/Client.js +2 -2
  20. package/dist/api/resources/threads/client/Client.js +2 -2
  21. package/dist/api/resources/webhooks/client/Client.d.ts +2 -2
  22. package/dist/api/resources/webhooks/client/Client.js +6 -6
  23. package/dist/api/resources/webhooks/types/CreateWebhookRequest.d.ts +2 -2
  24. package/dist/api/resources/webhooks/types/{Events.d.ts → EventTypes.d.ts} +1 -1
  25. package/dist/api/resources/webhooks/types/InboxIds.d.ts +7 -0
  26. package/dist/api/resources/webhooks/types/Webhook.d.ts +6 -2
  27. package/dist/api/resources/webhooks/types/index.d.ts +2 -2
  28. package/dist/api/resources/webhooks/types/index.js +2 -2
  29. package/dist/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +4 -4
  30. package/dist/serialization/resources/webhooks/types/CreateWebhookRequest.js +4 -4
  31. package/{serialization/resources/webhooks/types/Events.d.ts → dist/serialization/resources/webhooks/types/EventTypes.d.ts} +2 -2
  32. package/dist/serialization/resources/webhooks/types/{Events.js → EventTypes.js} +2 -2
  33. package/{serialization/resources/webhooks/types/Inboxes.d.ts → dist/serialization/resources/webhooks/types/InboxIds.d.ts} +2 -2
  34. package/dist/serialization/resources/webhooks/types/{Inboxes.js → InboxIds.js} +2 -2
  35. package/dist/serialization/resources/webhooks/types/Webhook.d.ts +6 -4
  36. package/dist/serialization/resources/webhooks/types/Webhook.js +6 -4
  37. package/dist/serialization/resources/webhooks/types/index.d.ts +2 -2
  38. package/dist/serialization/resources/webhooks/types/index.js +2 -2
  39. package/dist/version.d.ts +1 -1
  40. package/dist/version.js +1 -1
  41. package/package.json +1 -1
  42. package/reference.md +2 -2
  43. package/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +4 -4
  44. package/serialization/resources/webhooks/types/CreateWebhookRequest.js +4 -4
  45. package/{dist/serialization/resources/webhooks/types/Events.d.ts → serialization/resources/webhooks/types/EventTypes.d.ts} +2 -2
  46. package/serialization/resources/webhooks/types/{Events.js → EventTypes.js} +2 -2
  47. package/{dist/serialization/resources/webhooks/types/Inboxes.d.ts → serialization/resources/webhooks/types/InboxIds.d.ts} +2 -2
  48. package/serialization/resources/webhooks/types/{Inboxes.js → InboxIds.js} +2 -2
  49. package/serialization/resources/webhooks/types/Webhook.d.ts +6 -4
  50. package/serialization/resources/webhooks/types/Webhook.js +6 -4
  51. package/serialization/resources/webhooks/types/index.d.ts +2 -2
  52. package/serialization/resources/webhooks/types/index.js +2 -2
  53. package/version.d.ts +1 -1
  54. package/version.js +1 -1
  55. package/api/resources/webhooks/types/Inboxes.d.ts +0 -7
  56. package/dist/api/resources/webhooks/types/Inboxes.d.ts +0 -7
  57. /package/api/resources/webhooks/types/{Events.js → EventTypes.js} +0 -0
  58. /package/api/resources/webhooks/types/{Inboxes.js → InboxIds.js} +0 -0
  59. /package/dist/api/resources/webhooks/types/{Events.js → EventTypes.js} +0 -0
  60. /package/dist/api/resources/webhooks/types/{Inboxes.js → InboxIds.js} +0 -0
@@ -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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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,
@@ -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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
152
152
  contentType: "application/json",
153
153
  requestType: "json",
154
154
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -215,7 +215,7 @@ class Inboxes {
215
215
  const _response = yield core.fetcher({
216
216
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/inboxes"),
217
217
  method: "POST",
218
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
218
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
219
219
  contentType: "application/json",
220
220
  requestType: "json",
221
221
  body: serializers.inboxes.CreateInboxRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -90,7 +90,7 @@ class Drafts {
90
90
  const _response = yield core.fetcher({
91
91
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts`),
92
92
  method: "GET",
93
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
159
159
  contentType: "application/json",
160
160
  requestType: "json",
161
161
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -227,7 +227,7 @@ class Drafts {
227
227
  const _response = yield core.fetcher({
228
228
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts`),
229
229
  method: "POST",
230
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
230
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
231
231
  contentType: "application/json",
232
232
  requestType: "json",
233
233
  body: serializers.CreateDraftRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -298,7 +298,7 @@ class Drafts {
298
298
  const _response = yield core.fetcher({
299
299
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts/${encodeURIComponent(serializers.DraftId.jsonOrThrow(draftId))}/send`),
300
300
  method: "POST",
301
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
301
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
302
302
  contentType: "application/json",
303
303
  requestType: "json",
304
304
  body: serializers.UpdateMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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",
@@ -282,7 +282,7 @@ class Messages {
282
282
  const _response = yield core.fetcher({
283
283
  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
284
  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.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
285
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
286
286
  contentType: "application/json",
287
287
  requestType: "json",
288
288
  body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -374,7 +374,7 @@ class Messages {
374
374
  const _response = yield core.fetcher({
375
375
  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
376
  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.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
377
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
378
378
  contentType: "application/json",
379
379
  requestType: "json",
380
380
  body: serializers.ReplyToMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -460,7 +460,7 @@ class Messages {
460
460
  const _response = yield core.fetcher({
461
461
  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
462
  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.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
463
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
464
464
  contentType: "application/json",
465
465
  requestType: "json",
466
466
  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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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,
@@ -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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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,
@@ -52,8 +52,8 @@ export declare class Webhooks {
52
52
  * @example
53
53
  * await client.webhooks.create({
54
54
  * url: "url",
55
- * events: ["message.received", "message.received"],
56
- * inboxes: undefined
55
+ * eventTypes: ["message.received", "message.received"],
56
+ * inboxIds: undefined
57
57
  * })
58
58
  */
59
59
  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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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,
@@ -190,8 +190,8 @@ class Webhooks {
190
190
  * @example
191
191
  * await client.webhooks.create({
192
192
  * url: "url",
193
- * events: ["message.received", "message.received"],
194
- * inboxes: undefined
193
+ * eventTypes: ["message.received", "message.received"],
194
+ * inboxIds: undefined
195
195
  * })
196
196
  */
197
197
  create(request, requestOptions) {
@@ -200,7 +200,7 @@ class Webhooks {
200
200
  const _response = yield core.fetcher({
201
201
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/webhooks"),
202
202
  method: "POST",
203
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
203
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
204
204
  contentType: "application/json",
205
205
  requestType: "json",
206
206
  body: serializers.CreateWebhookRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -264,7 +264,7 @@ class Webhooks {
264
264
  const _response = yield core.fetcher({
265
265
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/webhooks/${encodeURIComponent(serializers.WebhookId.jsonOrThrow(webhookId))}`),
266
266
  method: "DELETE",
267
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
267
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
268
268
  contentType: "application/json",
269
269
  requestType: "json",
270
270
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -4,6 +4,6 @@
4
4
  import * as AgentMail from "../../../index";
5
5
  export interface CreateWebhookRequest {
6
6
  url: AgentMail.Url;
7
- events: AgentMail.Events;
8
- inboxes?: AgentMail.Inboxes;
7
+ eventTypes: AgentMail.EventTypes;
8
+ inboxIds?: AgentMail.InboxIds;
9
9
  }
@@ -5,4 +5,4 @@ import * as AgentMail from "../../../index";
5
5
  /**
6
6
  * Event types to send. Must explicitly include all event types to receive.
7
7
  */
8
- export type Events = AgentMail.EventType[];
8
+ export type EventTypes = AgentMail.EventType[];
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Inbox IDs for which to send events. Omit to send events for all inboxes.
6
+ */
7
+ export type InboxIds = string[];
@@ -5,10 +5,14 @@ import * as AgentMail from "../../../index";
5
5
  export interface Webhook {
6
6
  webhookId: AgentMail.WebhookId;
7
7
  url: AgentMail.Url;
8
- events?: AgentMail.Events;
9
- inboxes?: AgentMail.Inboxes;
8
+ eventTypes?: AgentMail.EventTypes;
9
+ inboxIds?: AgentMail.InboxIds;
10
10
  /** Secret for webhook signature verification. */
11
11
  secret: string;
12
+ /** Whether the webhook is enabled. */
13
+ enabled: boolean;
14
+ /** Time at which webhook was last updated. */
15
+ updatedAt: Date;
12
16
  /** Time at which webhook was created. */
13
17
  createdAt: Date;
14
18
  }
@@ -1,8 +1,8 @@
1
1
  export * from "./WebhookId";
2
2
  export * from "./Url";
3
3
  export * from "./EventType";
4
- export * from "./Events";
5
- export * from "./Inboxes";
4
+ export * from "./EventTypes";
5
+ export * from "./InboxIds";
6
6
  export * from "./Webhook";
7
7
  export * from "./ListWebhooksResponse";
8
8
  export * from "./CreateWebhookRequest";
@@ -17,8 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./WebhookId"), exports);
18
18
  __exportStar(require("./Url"), exports);
19
19
  __exportStar(require("./EventType"), exports);
20
- __exportStar(require("./Events"), exports);
21
- __exportStar(require("./Inboxes"), exports);
20
+ __exportStar(require("./EventTypes"), exports);
21
+ __exportStar(require("./InboxIds"), exports);
22
22
  __exportStar(require("./Webhook"), exports);
23
23
  __exportStar(require("./ListWebhooksResponse"), exports);
24
24
  __exportStar(require("./CreateWebhookRequest"), exports);
@@ -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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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,
@@ -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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
152
152
  contentType: "application/json",
153
153
  requestType: "json",
154
154
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -215,7 +215,7 @@ class Inboxes {
215
215
  const _response = yield core.fetcher({
216
216
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/inboxes"),
217
217
  method: "POST",
218
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
218
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
219
219
  contentType: "application/json",
220
220
  requestType: "json",
221
221
  body: serializers.inboxes.CreateInboxRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -90,7 +90,7 @@ class Drafts {
90
90
  const _response = yield core.fetcher({
91
91
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts`),
92
92
  method: "GET",
93
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
159
159
  contentType: "application/json",
160
160
  requestType: "json",
161
161
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -227,7 +227,7 @@ class Drafts {
227
227
  const _response = yield core.fetcher({
228
228
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts`),
229
229
  method: "POST",
230
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
230
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
231
231
  contentType: "application/json",
232
232
  requestType: "json",
233
233
  body: serializers.CreateDraftRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -298,7 +298,7 @@ class Drafts {
298
298
  const _response = yield core.fetcher({
299
299
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts/${encodeURIComponent(serializers.DraftId.jsonOrThrow(draftId))}/send`),
300
300
  method: "POST",
301
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
301
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
302
302
  contentType: "application/json",
303
303
  requestType: "json",
304
304
  body: serializers.UpdateMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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",
@@ -282,7 +282,7 @@ class Messages {
282
282
  const _response = yield core.fetcher({
283
283
  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
284
  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.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
285
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
286
286
  contentType: "application/json",
287
287
  requestType: "json",
288
288
  body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -374,7 +374,7 @@ class Messages {
374
374
  const _response = yield core.fetcher({
375
375
  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
376
  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.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
377
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
378
378
  contentType: "application/json",
379
379
  requestType: "json",
380
380
  body: serializers.ReplyToMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -460,7 +460,7 @@ class Messages {
460
460
  const _response = yield core.fetcher({
461
461
  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
462
  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.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
463
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
464
464
  contentType: "application/json",
465
465
  requestType: "json",
466
466
  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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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,
@@ -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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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,
@@ -52,8 +52,8 @@ export declare class Webhooks {
52
52
  * @example
53
53
  * await client.webhooks.create({
54
54
  * url: "url",
55
- * events: ["message.received", "message.received"],
56
- * inboxes: undefined
55
+ * eventTypes: ["message.received", "message.received"],
56
+ * inboxIds: undefined
57
57
  * })
58
58
  */
59
59
  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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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.33", "User-Agent": "agentmail/0.0.33", "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.34", "User-Agent": "agentmail/0.0.34", "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,
@@ -190,8 +190,8 @@ class Webhooks {
190
190
  * @example
191
191
  * await client.webhooks.create({
192
192
  * url: "url",
193
- * events: ["message.received", "message.received"],
194
- * inboxes: undefined
193
+ * eventTypes: ["message.received", "message.received"],
194
+ * inboxIds: undefined
195
195
  * })
196
196
  */
197
197
  create(request, requestOptions) {
@@ -200,7 +200,7 @@ class Webhooks {
200
200
  const _response = yield core.fetcher({
201
201
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/webhooks"),
202
202
  method: "POST",
203
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
203
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
204
204
  contentType: "application/json",
205
205
  requestType: "json",
206
206
  body: serializers.CreateWebhookRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -264,7 +264,7 @@ class Webhooks {
264
264
  const _response = yield core.fetcher({
265
265
  url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/webhooks/${encodeURIComponent(serializers.WebhookId.jsonOrThrow(webhookId))}`),
266
266
  method: "DELETE",
267
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
267
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.34", "User-Agent": "agentmail/0.0.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
268
268
  contentType: "application/json",
269
269
  requestType: "json",
270
270
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -4,6 +4,6 @@
4
4
  import * as AgentMail from "../../../index";
5
5
  export interface CreateWebhookRequest {
6
6
  url: AgentMail.Url;
7
- events: AgentMail.Events;
8
- inboxes?: AgentMail.Inboxes;
7
+ eventTypes: AgentMail.EventTypes;
8
+ inboxIds?: AgentMail.InboxIds;
9
9
  }
@@ -5,4 +5,4 @@ import * as AgentMail from "../../../index";
5
5
  /**
6
6
  * Event types to send. Must explicitly include all event types to receive.
7
7
  */
8
- export type Events = AgentMail.EventType[];
8
+ export type EventTypes = AgentMail.EventType[];
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Inbox IDs for which to send events. Omit to send events for all inboxes.
6
+ */
7
+ export type InboxIds = string[];
@@ -5,10 +5,14 @@ import * as AgentMail from "../../../index";
5
5
  export interface Webhook {
6
6
  webhookId: AgentMail.WebhookId;
7
7
  url: AgentMail.Url;
8
- events?: AgentMail.Events;
9
- inboxes?: AgentMail.Inboxes;
8
+ eventTypes?: AgentMail.EventTypes;
9
+ inboxIds?: AgentMail.InboxIds;
10
10
  /** Secret for webhook signature verification. */
11
11
  secret: string;
12
+ /** Whether the webhook is enabled. */
13
+ enabled: boolean;
14
+ /** Time at which webhook was last updated. */
15
+ updatedAt: Date;
12
16
  /** Time at which webhook was created. */
13
17
  createdAt: Date;
14
18
  }
@@ -1,8 +1,8 @@
1
1
  export * from "./WebhookId";
2
2
  export * from "./Url";
3
3
  export * from "./EventType";
4
- export * from "./Events";
5
- export * from "./Inboxes";
4
+ export * from "./EventTypes";
5
+ export * from "./InboxIds";
6
6
  export * from "./Webhook";
7
7
  export * from "./ListWebhooksResponse";
8
8
  export * from "./CreateWebhookRequest";
@@ -17,8 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./WebhookId"), exports);
18
18
  __exportStar(require("./Url"), exports);
19
19
  __exportStar(require("./EventType"), exports);
20
- __exportStar(require("./Events"), exports);
21
- __exportStar(require("./Inboxes"), exports);
20
+ __exportStar(require("./EventTypes"), exports);
21
+ __exportStar(require("./InboxIds"), exports);
22
22
  __exportStar(require("./Webhook"), exports);
23
23
  __exportStar(require("./ListWebhooksResponse"), exports);
24
24
  __exportStar(require("./CreateWebhookRequest"), exports);
@@ -5,13 +5,13 @@ import * as serializers from "../../../index";
5
5
  import * as AgentMail from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  import { Url } from "./Url";
8
- import { Events } from "./Events";
9
- import { Inboxes } from "./Inboxes";
8
+ import { EventTypes } from "./EventTypes";
9
+ import { InboxIds } from "./InboxIds";
10
10
  export declare const CreateWebhookRequest: core.serialization.ObjectSchema<serializers.CreateWebhookRequest.Raw, AgentMail.CreateWebhookRequest>;
11
11
  export declare namespace CreateWebhookRequest {
12
12
  interface Raw {
13
13
  url: Url.Raw;
14
- events: Events.Raw;
15
- inboxes?: Inboxes.Raw | null;
14
+ event_types: EventTypes.Raw;
15
+ inbox_ids?: InboxIds.Raw | null;
16
16
  }
17
17
  }
@@ -39,10 +39,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.CreateWebhookRequest = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  const Url_1 = require("./Url");
42
- const Events_1 = require("./Events");
43
- const Inboxes_1 = require("./Inboxes");
42
+ const EventTypes_1 = require("./EventTypes");
43
+ const InboxIds_1 = require("./InboxIds");
44
44
  exports.CreateWebhookRequest = core.serialization.object({
45
45
  url: Url_1.Url,
46
- events: Events_1.Events,
47
- inboxes: Inboxes_1.Inboxes.optional(),
46
+ eventTypes: core.serialization.property("event_types", EventTypes_1.EventTypes),
47
+ inboxIds: core.serialization.property("inbox_ids", InboxIds_1.InboxIds.optional()),
48
48
  });
@@ -5,7 +5,7 @@ import * as serializers from "../../../index";
5
5
  import * as AgentMail from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  import { EventType } from "./EventType";
8
- export declare const Events: core.serialization.Schema<serializers.Events.Raw, AgentMail.Events>;
9
- export declare namespace Events {
8
+ export declare const EventTypes: core.serialization.Schema<serializers.EventTypes.Raw, AgentMail.EventTypes>;
9
+ export declare namespace EventTypes {
10
10
  type Raw = EventType.Raw[];
11
11
  }
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.Events = void 0;
39
+ exports.EventTypes = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  const EventType_1 = require("./EventType");
42
- exports.Events = core.serialization.list(EventType_1.EventType);
42
+ exports.EventTypes = core.serialization.list(EventType_1.EventType);
@@ -4,7 +4,7 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as AgentMail from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- export declare const Inboxes: core.serialization.Schema<serializers.Inboxes.Raw, AgentMail.Inboxes>;
8
- export declare namespace Inboxes {
7
+ export declare const InboxIds: core.serialization.Schema<serializers.InboxIds.Raw, AgentMail.InboxIds>;
8
+ export declare namespace InboxIds {
9
9
  type Raw = string[];
10
10
  }
@@ -36,6 +36,6 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.Inboxes = void 0;
39
+ exports.InboxIds = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
- exports.Inboxes = core.serialization.list(core.serialization.string());
41
+ exports.InboxIds = core.serialization.list(core.serialization.string());
@@ -6,16 +6,18 @@ import * as AgentMail from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  import { WebhookId } from "./WebhookId";
8
8
  import { Url } from "./Url";
9
- import { Events } from "./Events";
10
- import { Inboxes } from "./Inboxes";
9
+ import { EventTypes } from "./EventTypes";
10
+ import { InboxIds } from "./InboxIds";
11
11
  export declare const Webhook: core.serialization.ObjectSchema<serializers.Webhook.Raw, AgentMail.Webhook>;
12
12
  export declare namespace Webhook {
13
13
  interface Raw {
14
14
  webhook_id: WebhookId.Raw;
15
15
  url: Url.Raw;
16
- events?: Events.Raw | null;
17
- inboxes?: Inboxes.Raw | null;
16
+ event_types?: EventTypes.Raw | null;
17
+ inbox_ids?: InboxIds.Raw | null;
18
18
  secret: string;
19
+ enabled: boolean;
20
+ updated_at: string;
19
21
  created_at: string;
20
22
  }
21
23
  }
@@ -40,13 +40,15 @@ exports.Webhook = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  const WebhookId_1 = require("./WebhookId");
42
42
  const Url_1 = require("./Url");
43
- const Events_1 = require("./Events");
44
- const Inboxes_1 = require("./Inboxes");
43
+ const EventTypes_1 = require("./EventTypes");
44
+ const InboxIds_1 = require("./InboxIds");
45
45
  exports.Webhook = core.serialization.object({
46
46
  webhookId: core.serialization.property("webhook_id", WebhookId_1.WebhookId),
47
47
  url: Url_1.Url,
48
- events: Events_1.Events.optional(),
49
- inboxes: Inboxes_1.Inboxes.optional(),
48
+ eventTypes: core.serialization.property("event_types", EventTypes_1.EventTypes.optional()),
49
+ inboxIds: core.serialization.property("inbox_ids", InboxIds_1.InboxIds.optional()),
50
50
  secret: core.serialization.string(),
51
+ enabled: core.serialization.boolean(),
52
+ updatedAt: core.serialization.property("updated_at", core.serialization.date()),
51
53
  createdAt: core.serialization.property("created_at", core.serialization.date()),
52
54
  });
@@ -1,8 +1,8 @@
1
1
  export * from "./WebhookId";
2
2
  export * from "./Url";
3
3
  export * from "./EventType";
4
- export * from "./Events";
5
- export * from "./Inboxes";
4
+ export * from "./EventTypes";
5
+ export * from "./InboxIds";
6
6
  export * from "./Webhook";
7
7
  export * from "./ListWebhooksResponse";
8
8
  export * from "./CreateWebhookRequest";
@@ -17,8 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./WebhookId"), exports);
18
18
  __exportStar(require("./Url"), exports);
19
19
  __exportStar(require("./EventType"), exports);
20
- __exportStar(require("./Events"), exports);
21
- __exportStar(require("./Inboxes"), exports);
20
+ __exportStar(require("./EventTypes"), exports);
21
+ __exportStar(require("./InboxIds"), exports);
22
22
  __exportStar(require("./Webhook"), exports);
23
23
  __exportStar(require("./ListWebhooksResponse"), exports);
24
24
  __exportStar(require("./CreateWebhookRequest"), exports);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.33";
1
+ export declare const SDK_VERSION = "0.0.34";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.33";
4
+ exports.SDK_VERSION = "0.0.34";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentmail",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "private": false,
5
5
  "repository": "https://github.com/agentmail-to/agentmail-node",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -1136,8 +1136,8 @@ await client.webhooks.get("webhook_id");
1136
1136
  ```typescript
1137
1137
  await client.webhooks.create({
1138
1138
  url: "url",
1139
- events: ["message.received", "message.received"],
1140
- inboxes: undefined,
1139
+ eventTypes: ["message.received", "message.received"],
1140
+ inboxIds: undefined,
1141
1141
  });
1142
1142
  ```
1143
1143
 
@@ -5,13 +5,13 @@ import * as serializers from "../../../index";
5
5
  import * as AgentMail from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  import { Url } from "./Url";
8
- import { Events } from "./Events";
9
- import { Inboxes } from "./Inboxes";
8
+ import { EventTypes } from "./EventTypes";
9
+ import { InboxIds } from "./InboxIds";
10
10
  export declare const CreateWebhookRequest: core.serialization.ObjectSchema<serializers.CreateWebhookRequest.Raw, AgentMail.CreateWebhookRequest>;
11
11
  export declare namespace CreateWebhookRequest {
12
12
  interface Raw {
13
13
  url: Url.Raw;
14
- events: Events.Raw;
15
- inboxes?: Inboxes.Raw | null;
14
+ event_types: EventTypes.Raw;
15
+ inbox_ids?: InboxIds.Raw | null;
16
16
  }
17
17
  }
@@ -39,10 +39,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.CreateWebhookRequest = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  const Url_1 = require("./Url");
42
- const Events_1 = require("./Events");
43
- const Inboxes_1 = require("./Inboxes");
42
+ const EventTypes_1 = require("./EventTypes");
43
+ const InboxIds_1 = require("./InboxIds");
44
44
  exports.CreateWebhookRequest = core.serialization.object({
45
45
  url: Url_1.Url,
46
- events: Events_1.Events,
47
- inboxes: Inboxes_1.Inboxes.optional(),
46
+ eventTypes: core.serialization.property("event_types", EventTypes_1.EventTypes),
47
+ inboxIds: core.serialization.property("inbox_ids", InboxIds_1.InboxIds.optional()),
48
48
  });
@@ -5,7 +5,7 @@ import * as serializers from "../../../index";
5
5
  import * as AgentMail from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  import { EventType } from "./EventType";
8
- export declare const Events: core.serialization.Schema<serializers.Events.Raw, AgentMail.Events>;
9
- export declare namespace Events {
8
+ export declare const EventTypes: core.serialization.Schema<serializers.EventTypes.Raw, AgentMail.EventTypes>;
9
+ export declare namespace EventTypes {
10
10
  type Raw = EventType.Raw[];
11
11
  }
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.Events = void 0;
39
+ exports.EventTypes = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  const EventType_1 = require("./EventType");
42
- exports.Events = core.serialization.list(EventType_1.EventType);
42
+ exports.EventTypes = core.serialization.list(EventType_1.EventType);
@@ -4,7 +4,7 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as AgentMail from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- export declare const Inboxes: core.serialization.Schema<serializers.Inboxes.Raw, AgentMail.Inboxes>;
8
- export declare namespace Inboxes {
7
+ export declare const InboxIds: core.serialization.Schema<serializers.InboxIds.Raw, AgentMail.InboxIds>;
8
+ export declare namespace InboxIds {
9
9
  type Raw = string[];
10
10
  }
@@ -36,6 +36,6 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.Inboxes = void 0;
39
+ exports.InboxIds = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
- exports.Inboxes = core.serialization.list(core.serialization.string());
41
+ exports.InboxIds = core.serialization.list(core.serialization.string());
@@ -6,16 +6,18 @@ import * as AgentMail from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  import { WebhookId } from "./WebhookId";
8
8
  import { Url } from "./Url";
9
- import { Events } from "./Events";
10
- import { Inboxes } from "./Inboxes";
9
+ import { EventTypes } from "./EventTypes";
10
+ import { InboxIds } from "./InboxIds";
11
11
  export declare const Webhook: core.serialization.ObjectSchema<serializers.Webhook.Raw, AgentMail.Webhook>;
12
12
  export declare namespace Webhook {
13
13
  interface Raw {
14
14
  webhook_id: WebhookId.Raw;
15
15
  url: Url.Raw;
16
- events?: Events.Raw | null;
17
- inboxes?: Inboxes.Raw | null;
16
+ event_types?: EventTypes.Raw | null;
17
+ inbox_ids?: InboxIds.Raw | null;
18
18
  secret: string;
19
+ enabled: boolean;
20
+ updated_at: string;
19
21
  created_at: string;
20
22
  }
21
23
  }
@@ -40,13 +40,15 @@ exports.Webhook = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  const WebhookId_1 = require("./WebhookId");
42
42
  const Url_1 = require("./Url");
43
- const Events_1 = require("./Events");
44
- const Inboxes_1 = require("./Inboxes");
43
+ const EventTypes_1 = require("./EventTypes");
44
+ const InboxIds_1 = require("./InboxIds");
45
45
  exports.Webhook = core.serialization.object({
46
46
  webhookId: core.serialization.property("webhook_id", WebhookId_1.WebhookId),
47
47
  url: Url_1.Url,
48
- events: Events_1.Events.optional(),
49
- inboxes: Inboxes_1.Inboxes.optional(),
48
+ eventTypes: core.serialization.property("event_types", EventTypes_1.EventTypes.optional()),
49
+ inboxIds: core.serialization.property("inbox_ids", InboxIds_1.InboxIds.optional()),
50
50
  secret: core.serialization.string(),
51
+ enabled: core.serialization.boolean(),
52
+ updatedAt: core.serialization.property("updated_at", core.serialization.date()),
51
53
  createdAt: core.serialization.property("created_at", core.serialization.date()),
52
54
  });
@@ -1,8 +1,8 @@
1
1
  export * from "./WebhookId";
2
2
  export * from "./Url";
3
3
  export * from "./EventType";
4
- export * from "./Events";
5
- export * from "./Inboxes";
4
+ export * from "./EventTypes";
5
+ export * from "./InboxIds";
6
6
  export * from "./Webhook";
7
7
  export * from "./ListWebhooksResponse";
8
8
  export * from "./CreateWebhookRequest";
@@ -17,8 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./WebhookId"), exports);
18
18
  __exportStar(require("./Url"), exports);
19
19
  __exportStar(require("./EventType"), exports);
20
- __exportStar(require("./Events"), exports);
21
- __exportStar(require("./Inboxes"), exports);
20
+ __exportStar(require("./EventTypes"), exports);
21
+ __exportStar(require("./InboxIds"), exports);
22
22
  __exportStar(require("./Webhook"), exports);
23
23
  __exportStar(require("./ListWebhooksResponse"), exports);
24
24
  __exportStar(require("./CreateWebhookRequest"), exports);
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.33";
1
+ export declare const SDK_VERSION = "0.0.34";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.33";
4
+ exports.SDK_VERSION = "0.0.34";
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * Inboxes for which to send events. Omit to send events for all inboxes.
6
- */
7
- export type Inboxes = string[];
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * Inboxes for which to send events. Omit to send events for all inboxes.
6
- */
7
- export type Inboxes = string[];