agentmail 0.1.12 → 0.1.14

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 (114) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/attachments/types/AttachmentInline.d.ts +1 -1
  3. package/dist/cjs/api/resources/domains/types/FeedbackEnabled.d.ts +1 -1
  4. package/dist/cjs/api/resources/events/types/EventTypes.d.ts +1 -1
  5. package/dist/cjs/api/resources/events/types/InboxIds.d.ts +4 -0
  6. package/dist/cjs/api/resources/events/types/PodIds.d.ts +4 -0
  7. package/dist/cjs/api/resources/events/types/PodIds.js +3 -0
  8. package/dist/cjs/api/resources/events/types/index.d.ts +2 -0
  9. package/dist/cjs/api/resources/events/types/index.js +2 -0
  10. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +4 -1
  11. package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.ts +1 -0
  12. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +4 -1
  13. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
  14. package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +1 -14
  15. package/dist/cjs/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.d.ts +0 -4
  16. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +1 -14
  17. package/dist/cjs/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.d.ts +0 -4
  18. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +4 -1
  19. package/dist/cjs/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
  20. package/dist/cjs/api/resources/threads/client/Client.js +4 -1
  21. package/dist/cjs/api/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
  22. package/dist/cjs/api/resources/webhooks/types/CreateWebhookRequest.d.ts +2 -1
  23. package/dist/cjs/api/resources/webhooks/types/Webhook.d.ts +3 -2
  24. package/dist/cjs/api/resources/webhooks/types/index.d.ts +0 -1
  25. package/dist/cjs/api/resources/webhooks/types/index.js +0 -1
  26. package/dist/cjs/api/resources/websockets/types/Subscribe.d.ts +2 -4
  27. package/dist/cjs/api/resources/websockets/types/Subscribed.d.ts +2 -4
  28. package/dist/cjs/api/types/Ascending.d.ts +1 -1
  29. package/dist/cjs/api/types/IncludeSpam.d.ts +4 -0
  30. package/dist/cjs/api/types/IncludeSpam.js +3 -0
  31. package/dist/cjs/api/types/index.d.ts +1 -0
  32. package/dist/cjs/api/types/index.js +1 -0
  33. package/dist/cjs/serialization/resources/{webhooks → events}/types/InboxIds.d.ts +1 -1
  34. package/dist/cjs/serialization/resources/events/types/PodIds.d.ts +7 -0
  35. package/dist/cjs/serialization/resources/events/types/PodIds.js +39 -0
  36. package/dist/cjs/serialization/resources/events/types/index.d.ts +2 -0
  37. package/dist/cjs/serialization/resources/events/types/index.js +2 -0
  38. package/dist/cjs/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +3 -1
  39. package/dist/cjs/serialization/resources/webhooks/types/CreateWebhookRequest.js +3 -1
  40. package/dist/cjs/serialization/resources/webhooks/types/Webhook.d.ts +3 -1
  41. package/dist/cjs/serialization/resources/webhooks/types/Webhook.js +3 -1
  42. package/dist/cjs/serialization/resources/webhooks/types/index.d.ts +0 -1
  43. package/dist/cjs/serialization/resources/webhooks/types/index.js +0 -1
  44. package/dist/cjs/serialization/resources/websockets/types/Subscribe.d.ts +4 -2
  45. package/dist/cjs/serialization/resources/websockets/types/Subscribe.js +4 -2
  46. package/dist/cjs/serialization/resources/websockets/types/Subscribed.d.ts +4 -2
  47. package/dist/cjs/serialization/resources/websockets/types/Subscribed.js +4 -2
  48. package/dist/cjs/serialization/types/IncludeSpam.d.ts +7 -0
  49. package/dist/cjs/serialization/types/IncludeSpam.js +39 -0
  50. package/dist/cjs/serialization/types/index.d.ts +1 -0
  51. package/dist/cjs/serialization/types/index.js +1 -0
  52. package/dist/cjs/version.d.ts +1 -1
  53. package/dist/cjs/version.js +1 -1
  54. package/dist/esm/BaseClient.mjs +2 -2
  55. package/dist/esm/api/resources/attachments/types/AttachmentInline.d.mts +1 -1
  56. package/dist/esm/api/resources/domains/types/FeedbackEnabled.d.mts +1 -1
  57. package/dist/esm/api/resources/events/types/EventTypes.d.mts +1 -1
  58. package/dist/esm/api/resources/events/types/InboxIds.d.mts +4 -0
  59. package/dist/esm/api/resources/events/types/PodIds.d.mts +4 -0
  60. package/dist/esm/api/resources/events/types/PodIds.mjs +2 -0
  61. package/dist/esm/api/resources/events/types/index.d.mts +2 -0
  62. package/dist/esm/api/resources/events/types/index.mjs +2 -0
  63. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +4 -1
  64. package/dist/esm/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.mts +1 -0
  65. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +4 -1
  66. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
  67. package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +1 -14
  68. package/dist/esm/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.d.mts +0 -4
  69. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +1 -14
  70. package/dist/esm/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.d.mts +0 -4
  71. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +4 -1
  72. package/dist/esm/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
  73. package/dist/esm/api/resources/threads/client/Client.mjs +4 -1
  74. package/dist/esm/api/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
  75. package/dist/esm/api/resources/webhooks/types/CreateWebhookRequest.d.mts +2 -1
  76. package/dist/esm/api/resources/webhooks/types/Webhook.d.mts +3 -2
  77. package/dist/esm/api/resources/webhooks/types/index.d.mts +0 -1
  78. package/dist/esm/api/resources/webhooks/types/index.mjs +0 -1
  79. package/dist/esm/api/resources/websockets/types/Subscribe.d.mts +2 -4
  80. package/dist/esm/api/resources/websockets/types/Subscribed.d.mts +2 -4
  81. package/dist/esm/api/types/Ascending.d.mts +1 -1
  82. package/dist/esm/api/types/IncludeSpam.d.mts +4 -0
  83. package/dist/esm/api/types/IncludeSpam.mjs +2 -0
  84. package/dist/esm/api/types/index.d.mts +1 -0
  85. package/dist/esm/api/types/index.mjs +1 -0
  86. package/dist/esm/serialization/resources/{webhooks → events}/types/InboxIds.d.mts +1 -1
  87. package/dist/esm/serialization/resources/events/types/PodIds.d.mts +7 -0
  88. package/dist/esm/serialization/resources/events/types/PodIds.mjs +3 -0
  89. package/dist/esm/serialization/resources/events/types/index.d.mts +2 -0
  90. package/dist/esm/serialization/resources/events/types/index.mjs +2 -0
  91. package/dist/esm/serialization/resources/webhooks/types/CreateWebhookRequest.d.mts +3 -1
  92. package/dist/esm/serialization/resources/webhooks/types/CreateWebhookRequest.mjs +3 -1
  93. package/dist/esm/serialization/resources/webhooks/types/Webhook.d.mts +3 -1
  94. package/dist/esm/serialization/resources/webhooks/types/Webhook.mjs +3 -1
  95. package/dist/esm/serialization/resources/webhooks/types/index.d.mts +0 -1
  96. package/dist/esm/serialization/resources/webhooks/types/index.mjs +0 -1
  97. package/dist/esm/serialization/resources/websockets/types/Subscribe.d.mts +4 -2
  98. package/dist/esm/serialization/resources/websockets/types/Subscribe.mjs +4 -2
  99. package/dist/esm/serialization/resources/websockets/types/Subscribed.d.mts +4 -2
  100. package/dist/esm/serialization/resources/websockets/types/Subscribed.mjs +4 -2
  101. package/dist/esm/serialization/types/IncludeSpam.d.mts +7 -0
  102. package/dist/esm/serialization/types/IncludeSpam.mjs +3 -0
  103. package/dist/esm/serialization/types/index.d.mts +1 -0
  104. package/dist/esm/serialization/types/index.mjs +1 -0
  105. package/dist/esm/version.d.mts +1 -1
  106. package/dist/esm/version.mjs +1 -1
  107. package/dist/llms-full.txt +190 -150
  108. package/package.json +1 -1
  109. package/dist/cjs/api/resources/webhooks/types/InboxIds.d.ts +0 -4
  110. package/dist/esm/api/resources/webhooks/types/InboxIds.d.mts +0 -4
  111. /package/dist/cjs/api/resources/{webhooks → events}/types/InboxIds.js +0 -0
  112. /package/dist/cjs/serialization/resources/{webhooks → events}/types/InboxIds.js +0 -0
  113. /package/dist/esm/api/resources/{webhooks → events}/types/InboxIds.mjs +0 -0
  114. /package/dist/esm/serialization/resources/{webhooks → events}/types/InboxIds.mjs +0 -0
@@ -37,9 +37,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.Subscribed = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
39
  const EventTypes_js_1 = require("../../events/types/EventTypes.js");
40
+ const InboxIds_js_1 = require("../../events/types/InboxIds.js");
41
+ const PodIds_js_1 = require("../../events/types/PodIds.js");
40
42
  exports.Subscribed = core.serialization.object({
41
43
  type: core.serialization.stringLiteral("subscribed"),
42
44
  eventTypes: core.serialization.property("event_types", EventTypes_js_1.EventTypes.optional()),
43
- inboxIds: core.serialization.property("inbox_ids", core.serialization.list(core.serialization.string()).optional()),
44
- podIds: core.serialization.property("pod_ids", core.serialization.list(core.serialization.string()).optional()),
45
+ inboxIds: core.serialization.property("inbox_ids", InboxIds_js_1.InboxIds.optional()),
46
+ podIds: core.serialization.property("pod_ids", PodIds_js_1.PodIds.optional()),
45
47
  });
@@ -0,0 +1,7 @@
1
+ import type * as AgentMail from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const IncludeSpam: core.serialization.Schema<serializers.IncludeSpam.Raw, AgentMail.IncludeSpam>;
5
+ export declare namespace IncludeSpam {
6
+ type Raw = boolean;
7
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.IncludeSpam = void 0;
38
+ const core = __importStar(require("../../core/index.js"));
39
+ exports.IncludeSpam = core.serialization.boolean();
@@ -4,6 +4,7 @@ export * from "./Before.js";
4
4
  export * from "./Count.js";
5
5
  export * from "./ErrorName.js";
6
6
  export * from "./ErrorResponse.js";
7
+ export * from "./IncludeSpam.js";
7
8
  export * from "./Labels.js";
8
9
  export * from "./Limit.js";
9
10
  export * from "./OrganizationId.js";
@@ -20,6 +20,7 @@ __exportStar(require("./Before.js"), exports);
20
20
  __exportStar(require("./Count.js"), exports);
21
21
  __exportStar(require("./ErrorName.js"), exports);
22
22
  __exportStar(require("./ErrorResponse.js"), exports);
23
+ __exportStar(require("./IncludeSpam.js"), exports);
23
24
  __exportStar(require("./Labels.js"), exports);
24
25
  __exportStar(require("./Limit.js"), exports);
25
26
  __exportStar(require("./OrganizationId.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.12";
1
+ export declare const SDK_VERSION = "0.1.14";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.1.12";
4
+ exports.SDK_VERSION = "0.1.14";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "agentmail",
9
- "X-Fern-SDK-Version": "0.1.12",
10
- "User-Agent": "agentmail/0.1.12",
9
+ "X-Fern-SDK-Version": "0.1.14",
10
+ "User-Agent": "agentmail/0.1.14",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Whether attachment is part of message body.
2
+ * Attachment is part of message body.
3
3
  */
4
4
  export type AttachmentInline = boolean;
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Whether bounce and complaint notifications are sent to your inboxes.
2
+ * Bounce and complaint notifications are sent to your inboxes.
3
3
  */
4
4
  export type FeedbackEnabled = boolean;
@@ -1,5 +1,5 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
2
  /**
3
- * Event types to subscribe to.
3
+ * Event types for which to send events.
4
4
  */
5
5
  export type EventTypes = AgentMail.EventType[];
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Inboxes for which to send events.
3
+ */
4
+ export type InboxIds = string[];
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Pods for which to send events.
3
+ */
4
+ export type PodIds = string[];
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -5,12 +5,14 @@ export * from "./DomainVerifiedEvent.mjs";
5
5
  export * from "./EventId.mjs";
6
6
  export * from "./EventType.mjs";
7
7
  export * from "./EventTypes.mjs";
8
+ export * from "./InboxIds.mjs";
8
9
  export * from "./MessageBouncedEvent.mjs";
9
10
  export * from "./MessageComplainedEvent.mjs";
10
11
  export * from "./MessageDeliveredEvent.mjs";
11
12
  export * from "./MessageReceivedEvent.mjs";
12
13
  export * from "./MessageRejectedEvent.mjs";
13
14
  export * from "./MessageSentEvent.mjs";
15
+ export * from "./PodIds.mjs";
14
16
  export * from "./Recipient.mjs";
15
17
  export * from "./Reject.mjs";
16
18
  export * from "./Send.mjs";
@@ -5,12 +5,14 @@ export * from "./DomainVerifiedEvent.mjs";
5
5
  export * from "./EventId.mjs";
6
6
  export * from "./EventType.mjs";
7
7
  export * from "./EventTypes.mjs";
8
+ export * from "./InboxIds.mjs";
8
9
  export * from "./MessageBouncedEvent.mjs";
9
10
  export * from "./MessageComplainedEvent.mjs";
10
11
  export * from "./MessageDeliveredEvent.mjs";
11
12
  export * from "./MessageReceivedEvent.mjs";
12
13
  export * from "./MessageRejectedEvent.mjs";
13
14
  export * from "./MessageSentEvent.mjs";
15
+ export * from "./PodIds.mjs";
14
16
  export * from "./Recipient.mjs";
15
17
  export * from "./Reject.mjs";
16
18
  export * from "./Send.mjs";
@@ -36,7 +36,7 @@ export class MessagesClient {
36
36
  __list(inbox_id_1) {
37
37
  return __awaiter(this, arguments, void 0, function* (inbox_id, request = {}, requestOptions) {
38
38
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39
- const { limit, pageToken, labels, before, after, ascending } = request;
39
+ const { limit, pageToken, labels, before, after, ascending, includeSpam } = request;
40
40
  const _queryParams = {};
41
41
  if (limit != null) {
42
42
  _queryParams.limit = limit.toString();
@@ -56,6 +56,9 @@ export class MessagesClient {
56
56
  if (ascending != null) {
57
57
  _queryParams.ascending = ascending.toString();
58
58
  }
59
+ if (includeSpam != null) {
60
+ _queryParams.include_spam = includeSpam.toString();
61
+ }
59
62
  const _authRequest = yield this._options.authProvider.getAuthRequest();
60
63
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
61
64
  const _response = yield core.fetcher({
@@ -10,4 +10,5 @@ export interface ListMessagesRequest {
10
10
  before?: AgentMail.Before;
11
11
  after?: AgentMail.After;
12
12
  ascending?: AgentMail.Ascending;
13
+ includeSpam?: AgentMail.IncludeSpam;
13
14
  }
@@ -36,7 +36,7 @@ export class ThreadsClient {
36
36
  __list(inbox_id_1) {
37
37
  return __awaiter(this, arguments, void 0, function* (inbox_id, request = {}, requestOptions) {
38
38
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39
- const { limit, pageToken, labels, before, after, ascending } = request;
39
+ const { limit, pageToken, labels, before, after, ascending, includeSpam } = request;
40
40
  const _queryParams = {};
41
41
  if (limit != null) {
42
42
  _queryParams.limit = limit.toString();
@@ -56,6 +56,9 @@ export class ThreadsClient {
56
56
  if (ascending != null) {
57
57
  _queryParams.ascending = ascending.toString();
58
58
  }
59
+ if (includeSpam != null) {
60
+ _queryParams.include_spam = includeSpam.toString();
61
+ }
59
62
  const _authRequest = yield this._options.authProvider.getAuthRequest();
60
63
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
61
64
  const _response = yield core.fetcher({
@@ -10,4 +10,5 @@ export interface ListThreadsRequest {
10
10
  before?: AgentMail.Before;
11
11
  after?: AgentMail.After;
12
12
  ascending?: AgentMail.Ascending;
13
+ includeSpam?: AgentMail.IncludeSpam;
13
14
  }
@@ -11,7 +11,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
12
12
  import { mergeHeaders } from "../../../../../../core/headers.mjs";
13
13
  import * as core from "../../../../../../core/index.mjs";
14
- import { toJson } from "../../../../../../core/json.mjs";
15
14
  import * as environments from "../../../../../../environments.mjs";
16
15
  import * as errors from "../../../../../../errors/index.mjs";
17
16
  import * as serializers from "../../../../../../serialization/index.mjs";
@@ -36,7 +35,7 @@ export class DomainsClient {
36
35
  __list(pod_id_1) {
37
36
  return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
38
37
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39
- const { limit, pageToken, labels, before, after, ascending } = request;
38
+ const { limit, pageToken } = request;
40
39
  const _queryParams = {};
41
40
  if (limit != null) {
42
41
  _queryParams.limit = limit.toString();
@@ -44,18 +43,6 @@ export class DomainsClient {
44
43
  if (pageToken != null) {
45
44
  _queryParams.page_token = pageToken;
46
45
  }
47
- if (labels != null) {
48
- _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip", omitUndefined: true }));
49
- }
50
- if (before != null) {
51
- _queryParams.before = before.toISOString();
52
- }
53
- if (after != null) {
54
- _queryParams.after = after.toISOString();
55
- }
56
- if (ascending != null) {
57
- _queryParams.ascending = ascending.toString();
58
- }
59
46
  const _authRequest = yield this._options.authProvider.getAuthRequest();
60
47
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
61
48
  const _response = yield core.fetcher({
@@ -6,8 +6,4 @@ import type * as AgentMail from "../../../../../../index.mjs";
6
6
  export interface ListDomainsRequest {
7
7
  limit?: AgentMail.Limit;
8
8
  pageToken?: AgentMail.PageToken;
9
- labels?: AgentMail.Labels;
10
- before?: AgentMail.Before;
11
- after?: AgentMail.After;
12
- ascending?: AgentMail.Ascending;
13
9
  }
@@ -11,7 +11,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
12
12
  import { mergeHeaders } from "../../../../../../core/headers.mjs";
13
13
  import * as core from "../../../../../../core/index.mjs";
14
- import { toJson } from "../../../../../../core/json.mjs";
15
14
  import * as environments from "../../../../../../environments.mjs";
16
15
  import * as errors from "../../../../../../errors/index.mjs";
17
16
  import * as serializers from "../../../../../../serialization/index.mjs";
@@ -36,7 +35,7 @@ export class InboxesClient {
36
35
  __list(pod_id_1) {
37
36
  return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
38
37
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39
- const { limit, pageToken, labels, before, after, ascending } = request;
38
+ const { limit, pageToken } = request;
40
39
  const _queryParams = {};
41
40
  if (limit != null) {
42
41
  _queryParams.limit = limit.toString();
@@ -44,18 +43,6 @@ export class InboxesClient {
44
43
  if (pageToken != null) {
45
44
  _queryParams.page_token = pageToken;
46
45
  }
47
- if (labels != null) {
48
- _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip", omitUndefined: true }));
49
- }
50
- if (before != null) {
51
- _queryParams.before = before.toISOString();
52
- }
53
- if (after != null) {
54
- _queryParams.after = after.toISOString();
55
- }
56
- if (ascending != null) {
57
- _queryParams.ascending = ascending.toString();
58
- }
59
46
  const _authRequest = yield this._options.authProvider.getAuthRequest();
60
47
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
61
48
  const _response = yield core.fetcher({
@@ -6,8 +6,4 @@ import type * as AgentMail from "../../../../../../index.mjs";
6
6
  export interface ListInboxesRequest {
7
7
  limit?: AgentMail.Limit;
8
8
  pageToken?: AgentMail.PageToken;
9
- labels?: AgentMail.Labels;
10
- before?: AgentMail.Before;
11
- after?: AgentMail.After;
12
- ascending?: AgentMail.Ascending;
13
9
  }
@@ -36,7 +36,7 @@ export class ThreadsClient {
36
36
  __list(pod_id_1) {
37
37
  return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
38
38
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39
- const { limit, pageToken, labels, before, after, ascending } = request;
39
+ const { limit, pageToken, labels, before, after, ascending, includeSpam } = request;
40
40
  const _queryParams = {};
41
41
  if (limit != null) {
42
42
  _queryParams.limit = limit.toString();
@@ -56,6 +56,9 @@ export class ThreadsClient {
56
56
  if (ascending != null) {
57
57
  _queryParams.ascending = ascending.toString();
58
58
  }
59
+ if (includeSpam != null) {
60
+ _queryParams.include_spam = includeSpam.toString();
61
+ }
59
62
  const _authRequest = yield this._options.authProvider.getAuthRequest();
60
63
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
61
64
  const _response = yield core.fetcher({
@@ -10,4 +10,5 @@ export interface ListThreadsRequest {
10
10
  before?: AgentMail.Before;
11
11
  after?: AgentMail.After;
12
12
  ascending?: AgentMail.Ascending;
13
+ includeSpam?: AgentMail.IncludeSpam;
13
14
  }
@@ -35,7 +35,7 @@ export class ThreadsClient {
35
35
  __list() {
36
36
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
37
37
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
38
- const { limit, pageToken, labels, before, after, ascending } = request;
38
+ const { limit, pageToken, labels, before, after, ascending, includeSpam } = request;
39
39
  const _queryParams = {};
40
40
  if (limit != null) {
41
41
  _queryParams.limit = limit.toString();
@@ -55,6 +55,9 @@ export class ThreadsClient {
55
55
  if (ascending != null) {
56
56
  _queryParams.ascending = ascending.toString();
57
57
  }
58
+ if (includeSpam != null) {
59
+ _queryParams.include_spam = includeSpam.toString();
60
+ }
58
61
  const _authRequest = yield this._options.authProvider.getAuthRequest();
59
62
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
60
63
  const _response = yield core.fetcher({
@@ -10,4 +10,5 @@ export interface ListThreadsRequest {
10
10
  before?: AgentMail.Before;
11
11
  after?: AgentMail.After;
12
12
  ascending?: AgentMail.Ascending;
13
+ includeSpam?: AgentMail.IncludeSpam;
13
14
  }
@@ -2,6 +2,7 @@ import type * as AgentMail from "../../../index.mjs";
2
2
  export interface CreateWebhookRequest {
3
3
  url: AgentMail.webhooks.Url;
4
4
  eventTypes: AgentMail.EventTypes;
5
- inboxIds?: AgentMail.webhooks.InboxIds;
5
+ podIds?: AgentMail.PodIds;
6
+ inboxIds?: AgentMail.InboxIds;
6
7
  clientId?: AgentMail.webhooks.ClientId;
7
8
  }
@@ -3,10 +3,11 @@ export interface Webhook {
3
3
  webhookId: AgentMail.webhooks.WebhookId;
4
4
  url: AgentMail.webhooks.Url;
5
5
  eventTypes?: AgentMail.EventTypes;
6
- inboxIds?: AgentMail.webhooks.InboxIds;
6
+ podIds?: AgentMail.PodIds;
7
+ inboxIds?: AgentMail.InboxIds;
7
8
  /** Secret for webhook signature verification. */
8
9
  secret: string;
9
- /** Whether the webhook is enabled. */
10
+ /** Webhook is enabled. */
10
11
  enabled: boolean;
11
12
  /** Time at which webhook was last updated. */
12
13
  updatedAt: Date;
@@ -1,6 +1,5 @@
1
1
  export * from "./ClientId.mjs";
2
2
  export * from "./CreateWebhookRequest.mjs";
3
- export * from "./InboxIds.mjs";
4
3
  export * from "./ListWebhooksResponse.mjs";
5
4
  export * from "./Url.mjs";
6
5
  export * from "./Webhook.mjs";
@@ -1,6 +1,5 @@
1
1
  export * from "./ClientId.mjs";
2
2
  export * from "./CreateWebhookRequest.mjs";
3
- export * from "./InboxIds.mjs";
4
3
  export * from "./ListWebhooksResponse.mjs";
5
4
  export * from "./Url.mjs";
6
5
  export * from "./Webhook.mjs";
@@ -2,8 +2,6 @@ import type * as AgentMail from "../../../index.mjs";
2
2
  export interface Subscribe {
3
3
  type: "subscribe";
4
4
  eventTypes?: AgentMail.EventTypes;
5
- /** IDs of the inboxes to subscribe to. */
6
- inboxIds?: string[];
7
- /** IDs of the pods to subscribe to. */
8
- podIds?: string[];
5
+ inboxIds?: AgentMail.InboxIds;
6
+ podIds?: AgentMail.PodIds;
9
7
  }
@@ -2,8 +2,6 @@ import type * as AgentMail from "../../../index.mjs";
2
2
  export interface Subscribed {
3
3
  type: "subscribed";
4
4
  eventTypes?: AgentMail.EventTypes;
5
- /** IDs of the inboxes that have been subscribed to. */
6
- inboxIds?: string[];
7
- /** IDs of the pods that have been subscribed to. */
8
- podIds?: string[];
5
+ inboxIds?: AgentMail.InboxIds;
6
+ podIds?: AgentMail.PodIds;
9
7
  }
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Whether to sort in ascending temporal order.
2
+ * Sort in ascending temporal order.
3
3
  */
4
4
  export type Ascending = boolean;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Include spam in results.
3
+ */
4
+ export type IncludeSpam = boolean;
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -4,6 +4,7 @@ export * from "./Before.mjs";
4
4
  export * from "./Count.mjs";
5
5
  export * from "./ErrorName.mjs";
6
6
  export * from "./ErrorResponse.mjs";
7
+ export * from "./IncludeSpam.mjs";
7
8
  export * from "./Labels.mjs";
8
9
  export * from "./Limit.mjs";
9
10
  export * from "./OrganizationId.mjs";
@@ -4,6 +4,7 @@ export * from "./Before.mjs";
4
4
  export * from "./Count.mjs";
5
5
  export * from "./ErrorName.mjs";
6
6
  export * from "./ErrorResponse.mjs";
7
+ export * from "./IncludeSpam.mjs";
7
8
  export * from "./Labels.mjs";
8
9
  export * from "./Limit.mjs";
9
10
  export * from "./OrganizationId.mjs";
@@ -1,7 +1,7 @@
1
1
  import type * as AgentMail from "../../../../api/index.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
- export declare const InboxIds: core.serialization.Schema<serializers.webhooks.InboxIds.Raw, AgentMail.webhooks.InboxIds>;
4
+ export declare const InboxIds: core.serialization.Schema<serializers.InboxIds.Raw, AgentMail.InboxIds>;
5
5
  export declare namespace InboxIds {
6
6
  type Raw = string[];
7
7
  }
@@ -0,0 +1,7 @@
1
+ import type * as AgentMail from "../../../../api/index.mjs";
2
+ import * as core from "../../../../core/index.mjs";
3
+ import type * as serializers from "../../../index.mjs";
4
+ export declare const PodIds: core.serialization.Schema<serializers.PodIds.Raw, AgentMail.PodIds>;
5
+ export declare namespace PodIds {
6
+ type Raw = string[];
7
+ }
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../../../core/index.mjs";
3
+ export const PodIds = core.serialization.list(core.serialization.string());
@@ -5,12 +5,14 @@ export * from "./DomainVerifiedEvent.mjs";
5
5
  export * from "./EventId.mjs";
6
6
  export * from "./EventType.mjs";
7
7
  export * from "./EventTypes.mjs";
8
+ export * from "./InboxIds.mjs";
8
9
  export * from "./MessageBouncedEvent.mjs";
9
10
  export * from "./MessageComplainedEvent.mjs";
10
11
  export * from "./MessageDeliveredEvent.mjs";
11
12
  export * from "./MessageReceivedEvent.mjs";
12
13
  export * from "./MessageRejectedEvent.mjs";
13
14
  export * from "./MessageSentEvent.mjs";
15
+ export * from "./PodIds.mjs";
14
16
  export * from "./Recipient.mjs";
15
17
  export * from "./Reject.mjs";
16
18
  export * from "./Send.mjs";
@@ -5,12 +5,14 @@ export * from "./DomainVerifiedEvent.mjs";
5
5
  export * from "./EventId.mjs";
6
6
  export * from "./EventType.mjs";
7
7
  export * from "./EventTypes.mjs";
8
+ export * from "./InboxIds.mjs";
8
9
  export * from "./MessageBouncedEvent.mjs";
9
10
  export * from "./MessageComplainedEvent.mjs";
10
11
  export * from "./MessageDeliveredEvent.mjs";
11
12
  export * from "./MessageReceivedEvent.mjs";
12
13
  export * from "./MessageRejectedEvent.mjs";
13
14
  export * from "./MessageSentEvent.mjs";
15
+ export * from "./PodIds.mjs";
14
16
  export * from "./Recipient.mjs";
15
17
  export * from "./Reject.mjs";
16
18
  export * from "./Send.mjs";
@@ -2,14 +2,16 @@ import type * as AgentMail from "../../../../api/index.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  import { EventTypes } from "../../events/types/EventTypes.mjs";
5
+ import { InboxIds } from "../../events/types/InboxIds.mjs";
6
+ import { PodIds } from "../../events/types/PodIds.mjs";
5
7
  import { ClientId } from "./ClientId.mjs";
6
- import { InboxIds } from "./InboxIds.mjs";
7
8
  import { Url } from "./Url.mjs";
8
9
  export declare const CreateWebhookRequest: core.serialization.ObjectSchema<serializers.webhooks.CreateWebhookRequest.Raw, AgentMail.webhooks.CreateWebhookRequest>;
9
10
  export declare namespace CreateWebhookRequest {
10
11
  interface Raw {
11
12
  url: Url.Raw;
12
13
  event_types: EventTypes.Raw;
14
+ pod_ids?: PodIds.Raw | null;
13
15
  inbox_ids?: InboxIds.Raw | null;
14
16
  client_id?: ClientId.Raw | null;
15
17
  }
@@ -1,12 +1,14 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import { EventTypes } from "../../events/types/EventTypes.mjs";
4
+ import { InboxIds } from "../../events/types/InboxIds.mjs";
5
+ import { PodIds } from "../../events/types/PodIds.mjs";
4
6
  import { ClientId } from "./ClientId.mjs";
5
- import { InboxIds } from "./InboxIds.mjs";
6
7
  import { Url } from "./Url.mjs";
7
8
  export const CreateWebhookRequest = core.serialization.object({
8
9
  url: Url,
9
10
  eventTypes: core.serialization.property("event_types", EventTypes),
11
+ podIds: core.serialization.property("pod_ids", PodIds.optional()),
10
12
  inboxIds: core.serialization.property("inbox_ids", InboxIds.optional()),
11
13
  clientId: core.serialization.property("client_id", ClientId.optional()),
12
14
  });
@@ -2,8 +2,9 @@ import type * as AgentMail from "../../../../api/index.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  import { EventTypes } from "../../events/types/EventTypes.mjs";
5
+ import { InboxIds } from "../../events/types/InboxIds.mjs";
6
+ import { PodIds } from "../../events/types/PodIds.mjs";
5
7
  import { ClientId } from "./ClientId.mjs";
6
- import { InboxIds } from "./InboxIds.mjs";
7
8
  import { Url } from "./Url.mjs";
8
9
  import { WebhookId } from "./WebhookId.mjs";
9
10
  export declare const Webhook: core.serialization.ObjectSchema<serializers.webhooks.Webhook.Raw, AgentMail.webhooks.Webhook>;
@@ -12,6 +13,7 @@ export declare namespace Webhook {
12
13
  webhook_id: WebhookId.Raw;
13
14
  url: Url.Raw;
14
15
  event_types?: EventTypes.Raw | null;
16
+ pod_ids?: PodIds.Raw | null;
15
17
  inbox_ids?: InboxIds.Raw | null;
16
18
  secret: string;
17
19
  enabled: boolean;
@@ -1,14 +1,16 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import { EventTypes } from "../../events/types/EventTypes.mjs";
4
+ import { InboxIds } from "../../events/types/InboxIds.mjs";
5
+ import { PodIds } from "../../events/types/PodIds.mjs";
4
6
  import { ClientId } from "./ClientId.mjs";
5
- import { InboxIds } from "./InboxIds.mjs";
6
7
  import { Url } from "./Url.mjs";
7
8
  import { WebhookId } from "./WebhookId.mjs";
8
9
  export const Webhook = core.serialization.object({
9
10
  webhookId: core.serialization.property("webhook_id", WebhookId),
10
11
  url: Url,
11
12
  eventTypes: core.serialization.property("event_types", EventTypes.optional()),
13
+ podIds: core.serialization.property("pod_ids", PodIds.optional()),
12
14
  inboxIds: core.serialization.property("inbox_ids", InboxIds.optional()),
13
15
  secret: core.serialization.string(),
14
16
  enabled: core.serialization.boolean(),
@@ -1,6 +1,5 @@
1
1
  export * from "./ClientId.mjs";
2
2
  export * from "./CreateWebhookRequest.mjs";
3
- export * from "./InboxIds.mjs";
4
3
  export * from "./ListWebhooksResponse.mjs";
5
4
  export * from "./Url.mjs";
6
5
  export * from "./Webhook.mjs";