agentmail 0.5.8 → 0.5.10

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 (196) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/domains/client/Client.d.ts +1 -2
  3. package/dist/cjs/api/resources/domains/client/Client.js +1 -2
  4. package/dist/cjs/api/resources/domains/types/CreateDomainRequest.d.ts +2 -1
  5. package/dist/cjs/api/resources/domains/types/Domain.d.ts +5 -1
  6. package/dist/cjs/api/resources/domains/types/DomainItem.d.ts +1 -0
  7. package/dist/cjs/api/resources/domains/types/SubdomainsEnabled.d.ts +5 -0
  8. package/dist/cjs/api/resources/domains/types/SubdomainsEnabled.js +3 -0
  9. package/dist/cjs/api/resources/domains/types/UpdateDomainRequest.d.ts +7 -0
  10. package/dist/cjs/api/resources/domains/types/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/domains/types/index.js +1 -0
  12. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +1 -0
  13. package/dist/cjs/api/resources/inboxes/client/Client.js +9 -0
  14. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +26 -0
  15. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +101 -1
  16. package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.ts +6 -0
  17. package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/SearchMessagesRequest.d.ts +14 -0
  18. package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/SearchMessagesRequest.js +3 -0
  19. package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +25 -0
  21. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +100 -1
  22. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.ts +6 -0
  23. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/SearchThreadsRequest.d.ts +14 -0
  24. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/SearchThreadsRequest.js +3 -0
  25. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/index.d.ts +1 -0
  26. package/dist/cjs/api/resources/inboxes/types/CreateInboxRequest.d.ts +5 -1
  27. package/dist/cjs/api/resources/messages/types/SearchMessageHighlights.d.ts +15 -0
  28. package/dist/cjs/api/resources/messages/types/SearchMessageHighlights.js +3 -0
  29. package/dist/cjs/api/resources/messages/types/SearchMessageItem.d.ts +5 -0
  30. package/dist/cjs/api/resources/messages/types/SearchMessageItem.js +3 -0
  31. package/dist/cjs/api/resources/messages/types/SearchMessagesResponse.d.ts +8 -0
  32. package/dist/cjs/api/resources/messages/types/SearchMessagesResponse.js +3 -0
  33. package/dist/cjs/api/resources/messages/types/index.d.ts +3 -0
  34. package/dist/cjs/api/resources/messages/types/index.js +3 -0
  35. package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +1 -2
  36. package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +1 -2
  37. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +1 -0
  38. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +9 -0
  39. package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +25 -0
  40. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +100 -1
  41. package/dist/cjs/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.ts +6 -0
  42. package/dist/cjs/api/resources/pods/resources/threads/client/requests/SearchThreadsRequest.d.ts +14 -0
  43. package/dist/cjs/api/resources/pods/resources/threads/client/requests/SearchThreadsRequest.js +3 -0
  44. package/dist/cjs/api/resources/pods/resources/threads/client/requests/index.d.ts +1 -0
  45. package/dist/cjs/api/resources/threads/client/Client.d.ts +26 -0
  46. package/dist/cjs/api/resources/threads/client/Client.js +101 -1
  47. package/dist/cjs/api/resources/threads/client/requests/ListThreadsRequest.d.ts +6 -0
  48. package/dist/cjs/api/resources/threads/client/requests/SearchThreadsRequest.d.ts +14 -0
  49. package/dist/cjs/api/resources/threads/client/requests/SearchThreadsRequest.js +3 -0
  50. package/dist/cjs/api/resources/threads/client/requests/index.d.ts +1 -0
  51. package/dist/cjs/api/resources/threads/types/SearchThreadHighlights.d.ts +15 -0
  52. package/dist/cjs/api/resources/threads/types/SearchThreadHighlights.js +3 -0
  53. package/dist/cjs/api/resources/threads/types/SearchThreadItem.d.ts +5 -0
  54. package/dist/cjs/api/resources/threads/types/SearchThreadItem.js +3 -0
  55. package/dist/cjs/api/resources/threads/types/SearchThreadsResponse.d.ts +8 -0
  56. package/dist/cjs/api/resources/threads/types/SearchThreadsResponse.js +3 -0
  57. package/dist/cjs/api/resources/threads/types/index.d.ts +3 -0
  58. package/dist/cjs/api/resources/threads/types/index.js +3 -0
  59. package/dist/cjs/api/types/Query.d.ts +5 -0
  60. package/dist/cjs/api/types/Query.js +3 -0
  61. package/dist/cjs/api/types/index.d.ts +1 -0
  62. package/dist/cjs/api/types/index.js +1 -0
  63. package/dist/cjs/serialization/resources/domains/types/CreateDomainRequest.d.ts +3 -1
  64. package/dist/cjs/serialization/resources/domains/types/CreateDomainRequest.js +3 -1
  65. package/dist/cjs/serialization/resources/domains/types/Domain.d.ts +2 -0
  66. package/dist/cjs/serialization/resources/domains/types/Domain.js +2 -0
  67. package/dist/cjs/serialization/resources/domains/types/DomainItem.d.ts +2 -0
  68. package/dist/cjs/serialization/resources/domains/types/DomainItem.js +2 -0
  69. package/dist/cjs/serialization/resources/domains/types/SubdomainsEnabled.d.ts +7 -0
  70. package/dist/cjs/serialization/resources/domains/types/SubdomainsEnabled.js +39 -0
  71. package/dist/cjs/serialization/resources/domains/types/UpdateDomainRequest.d.ts +2 -0
  72. package/dist/cjs/serialization/resources/domains/types/UpdateDomainRequest.js +2 -0
  73. package/dist/cjs/serialization/resources/domains/types/index.d.ts +1 -0
  74. package/dist/cjs/serialization/resources/domains/types/index.js +1 -0
  75. package/dist/cjs/serialization/resources/messages/types/SearchMessageHighlights.d.ts +12 -0
  76. package/dist/cjs/serialization/resources/messages/types/SearchMessageHighlights.js +44 -0
  77. package/dist/cjs/serialization/resources/messages/types/SearchMessageItem.d.ts +11 -0
  78. package/dist/cjs/serialization/resources/messages/types/SearchMessageItem.js +45 -0
  79. package/dist/cjs/serialization/resources/messages/types/SearchMessagesResponse.d.ts +16 -0
  80. package/dist/cjs/serialization/resources/messages/types/SearchMessagesResponse.js +48 -0
  81. package/dist/cjs/serialization/resources/messages/types/index.d.ts +3 -0
  82. package/dist/cjs/serialization/resources/messages/types/index.js +3 -0
  83. package/dist/cjs/serialization/resources/threads/types/SearchThreadHighlights.d.ts +12 -0
  84. package/dist/cjs/serialization/resources/threads/types/SearchThreadHighlights.js +44 -0
  85. package/dist/cjs/serialization/resources/threads/types/SearchThreadItem.d.ts +11 -0
  86. package/dist/cjs/serialization/resources/threads/types/SearchThreadItem.js +45 -0
  87. package/dist/cjs/serialization/resources/threads/types/SearchThreadsResponse.d.ts +16 -0
  88. package/dist/cjs/serialization/resources/threads/types/SearchThreadsResponse.js +48 -0
  89. package/dist/cjs/serialization/resources/threads/types/index.d.ts +3 -0
  90. package/dist/cjs/serialization/resources/threads/types/index.js +3 -0
  91. package/dist/cjs/serialization/types/Query.d.ts +7 -0
  92. package/dist/cjs/serialization/types/Query.js +39 -0
  93. package/dist/cjs/serialization/types/index.d.ts +1 -0
  94. package/dist/cjs/serialization/types/index.js +1 -0
  95. package/dist/cjs/version.d.ts +1 -1
  96. package/dist/cjs/version.js +1 -1
  97. package/dist/esm/BaseClient.mjs +2 -2
  98. package/dist/esm/api/resources/domains/client/Client.d.mts +1 -2
  99. package/dist/esm/api/resources/domains/client/Client.mjs +1 -2
  100. package/dist/esm/api/resources/domains/types/CreateDomainRequest.d.mts +2 -1
  101. package/dist/esm/api/resources/domains/types/Domain.d.mts +5 -1
  102. package/dist/esm/api/resources/domains/types/DomainItem.d.mts +1 -0
  103. package/dist/esm/api/resources/domains/types/SubdomainsEnabled.d.mts +5 -0
  104. package/dist/esm/api/resources/domains/types/SubdomainsEnabled.mjs +2 -0
  105. package/dist/esm/api/resources/domains/types/UpdateDomainRequest.d.mts +7 -0
  106. package/dist/esm/api/resources/domains/types/index.d.mts +1 -0
  107. package/dist/esm/api/resources/domains/types/index.mjs +1 -0
  108. package/dist/esm/api/resources/inboxes/client/Client.d.mts +1 -0
  109. package/dist/esm/api/resources/inboxes/client/Client.mjs +9 -0
  110. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +26 -0
  111. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +101 -1
  112. package/dist/esm/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.mts +6 -0
  113. package/dist/esm/api/resources/inboxes/resources/messages/client/requests/SearchMessagesRequest.d.mts +14 -0
  114. package/dist/esm/api/resources/inboxes/resources/messages/client/requests/SearchMessagesRequest.mjs +2 -0
  115. package/dist/esm/api/resources/inboxes/resources/messages/client/requests/index.d.mts +1 -0
  116. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +25 -0
  117. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +100 -1
  118. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.mts +6 -0
  119. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/SearchThreadsRequest.d.mts +14 -0
  120. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/SearchThreadsRequest.mjs +2 -0
  121. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/index.d.mts +1 -0
  122. package/dist/esm/api/resources/inboxes/types/CreateInboxRequest.d.mts +5 -1
  123. package/dist/esm/api/resources/messages/types/SearchMessageHighlights.d.mts +15 -0
  124. package/dist/esm/api/resources/messages/types/SearchMessageHighlights.mjs +2 -0
  125. package/dist/esm/api/resources/messages/types/SearchMessageItem.d.mts +5 -0
  126. package/dist/esm/api/resources/messages/types/SearchMessageItem.mjs +2 -0
  127. package/dist/esm/api/resources/messages/types/SearchMessagesResponse.d.mts +8 -0
  128. package/dist/esm/api/resources/messages/types/SearchMessagesResponse.mjs +2 -0
  129. package/dist/esm/api/resources/messages/types/index.d.mts +3 -0
  130. package/dist/esm/api/resources/messages/types/index.mjs +3 -0
  131. package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +1 -2
  132. package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +1 -2
  133. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +1 -0
  134. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +9 -0
  135. package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +25 -0
  136. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +100 -1
  137. package/dist/esm/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.mts +6 -0
  138. package/dist/esm/api/resources/pods/resources/threads/client/requests/SearchThreadsRequest.d.mts +14 -0
  139. package/dist/esm/api/resources/pods/resources/threads/client/requests/SearchThreadsRequest.mjs +2 -0
  140. package/dist/esm/api/resources/pods/resources/threads/client/requests/index.d.mts +1 -0
  141. package/dist/esm/api/resources/threads/client/Client.d.mts +26 -0
  142. package/dist/esm/api/resources/threads/client/Client.mjs +101 -1
  143. package/dist/esm/api/resources/threads/client/requests/ListThreadsRequest.d.mts +6 -0
  144. package/dist/esm/api/resources/threads/client/requests/SearchThreadsRequest.d.mts +14 -0
  145. package/dist/esm/api/resources/threads/client/requests/SearchThreadsRequest.mjs +2 -0
  146. package/dist/esm/api/resources/threads/client/requests/index.d.mts +1 -0
  147. package/dist/esm/api/resources/threads/types/SearchThreadHighlights.d.mts +15 -0
  148. package/dist/esm/api/resources/threads/types/SearchThreadHighlights.mjs +2 -0
  149. package/dist/esm/api/resources/threads/types/SearchThreadItem.d.mts +5 -0
  150. package/dist/esm/api/resources/threads/types/SearchThreadItem.mjs +2 -0
  151. package/dist/esm/api/resources/threads/types/SearchThreadsResponse.d.mts +8 -0
  152. package/dist/esm/api/resources/threads/types/SearchThreadsResponse.mjs +2 -0
  153. package/dist/esm/api/resources/threads/types/index.d.mts +3 -0
  154. package/dist/esm/api/resources/threads/types/index.mjs +3 -0
  155. package/dist/esm/api/types/Query.d.mts +5 -0
  156. package/dist/esm/api/types/Query.mjs +2 -0
  157. package/dist/esm/api/types/index.d.mts +1 -0
  158. package/dist/esm/api/types/index.mjs +1 -0
  159. package/dist/esm/serialization/resources/domains/types/CreateDomainRequest.d.mts +3 -1
  160. package/dist/esm/serialization/resources/domains/types/CreateDomainRequest.mjs +3 -1
  161. package/dist/esm/serialization/resources/domains/types/Domain.d.mts +2 -0
  162. package/dist/esm/serialization/resources/domains/types/Domain.mjs +2 -0
  163. package/dist/esm/serialization/resources/domains/types/DomainItem.d.mts +2 -0
  164. package/dist/esm/serialization/resources/domains/types/DomainItem.mjs +2 -0
  165. package/dist/esm/serialization/resources/domains/types/SubdomainsEnabled.d.mts +7 -0
  166. package/dist/esm/serialization/resources/domains/types/SubdomainsEnabled.mjs +3 -0
  167. package/dist/esm/serialization/resources/domains/types/UpdateDomainRequest.d.mts +2 -0
  168. package/dist/esm/serialization/resources/domains/types/UpdateDomainRequest.mjs +2 -0
  169. package/dist/esm/serialization/resources/domains/types/index.d.mts +1 -0
  170. package/dist/esm/serialization/resources/domains/types/index.mjs +1 -0
  171. package/dist/esm/serialization/resources/messages/types/SearchMessageHighlights.d.mts +12 -0
  172. package/dist/esm/serialization/resources/messages/types/SearchMessageHighlights.mjs +8 -0
  173. package/dist/esm/serialization/resources/messages/types/SearchMessageItem.d.mts +11 -0
  174. package/dist/esm/serialization/resources/messages/types/SearchMessageItem.mjs +9 -0
  175. package/dist/esm/serialization/resources/messages/types/SearchMessagesResponse.d.mts +16 -0
  176. package/dist/esm/serialization/resources/messages/types/SearchMessagesResponse.mjs +12 -0
  177. package/dist/esm/serialization/resources/messages/types/index.d.mts +3 -0
  178. package/dist/esm/serialization/resources/messages/types/index.mjs +3 -0
  179. package/dist/esm/serialization/resources/threads/types/SearchThreadHighlights.d.mts +12 -0
  180. package/dist/esm/serialization/resources/threads/types/SearchThreadHighlights.mjs +8 -0
  181. package/dist/esm/serialization/resources/threads/types/SearchThreadItem.d.mts +11 -0
  182. package/dist/esm/serialization/resources/threads/types/SearchThreadItem.mjs +9 -0
  183. package/dist/esm/serialization/resources/threads/types/SearchThreadsResponse.d.mts +16 -0
  184. package/dist/esm/serialization/resources/threads/types/SearchThreadsResponse.mjs +12 -0
  185. package/dist/esm/serialization/resources/threads/types/index.d.mts +3 -0
  186. package/dist/esm/serialization/resources/threads/types/index.mjs +3 -0
  187. package/dist/esm/serialization/types/Query.d.mts +7 -0
  188. package/dist/esm/serialization/types/Query.mjs +3 -0
  189. package/dist/esm/serialization/types/index.d.mts +1 -0
  190. package/dist/esm/serialization/types/index.mjs +1 -0
  191. package/dist/esm/version.d.mts +1 -1
  192. package/dist/esm/version.mjs +1 -1
  193. package/dist/llms-full.txt +10309 -2931
  194. package/dist/llms.txt +5 -0
  195. package/package.json +1 -1
  196. package/reference.md +321 -4
@@ -173,6 +173,7 @@ export class InboxesClient {
173
173
  * @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
174
174
  *
175
175
  * @throws {@link AgentMail.ValidationError}
176
+ * @throws {@link AgentMail.UnprocessableError}
176
177
  *
177
178
  * @example
178
179
  * await client.pods.inboxes.create("pod_id", {})
@@ -225,6 +226,14 @@ export class InboxesClient {
225
226
  skipValidation: true,
226
227
  breadcrumbsPrefix: ["response"],
227
228
  }), _response.rawResponse);
229
+ case 422:
230
+ throw new AgentMail.UnprocessableError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
231
+ unrecognizedObjectKeys: "passthrough",
232
+ allowUnrecognizedUnionMembers: true,
233
+ allowUnrecognizedEnumValues: true,
234
+ skipValidation: true,
235
+ breadcrumbsPrefix: ["response"],
236
+ }), _response.rawResponse);
228
237
  default:
229
238
  throw new errors.AgentMailError({
230
239
  statusCode: _response.error.statusCode,
@@ -11,6 +11,11 @@ export declare class ThreadsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<ThreadsClient.Options>;
12
12
  constructor(options?: ThreadsClient.Options);
13
13
  /**
14
+ * Lists threads in the pod, most recent first. Pass `senders`,
15
+ * `recipients`, or `subject` to filter by substring. Filtered requests are
16
+ * served by search, which caps `limit` at 100. For relevance-ranked
17
+ * full-text search, use `Search Threads`.
18
+ *
14
19
  * **CLI:**
15
20
  * ```bash
16
21
  * agentmail pods:threads list --pod-id <pod_id>
@@ -27,6 +32,26 @@ export declare class ThreadsClient {
27
32
  */
28
33
  list(pod_id: AgentMail.pods.PodId, request?: AgentMail.pods.ListThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListThreadsResponse>;
29
34
  private __list;
35
+ /**
36
+ * Full-text search across threads in the pod, ranked by relevance. The
37
+ * query is matched against senders, recipients, and subject (substring)
38
+ * and the message body (tokenized full text). Spam, trash, blocked, and
39
+ * unauthenticated threads are always excluded. `limit` cannot exceed 100.
40
+ *
41
+ * @param {AgentMail.pods.PodId} pod_id
42
+ * @param {AgentMail.pods.SearchThreadsRequest} request
43
+ * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
44
+ *
45
+ * @throws {@link AgentMail.ValidationError}
46
+ * @throws {@link AgentMail.NotFoundError}
47
+ *
48
+ * @example
49
+ * await client.pods.threads.search("pod_id", {
50
+ * q: "q"
51
+ * })
52
+ */
53
+ search(pod_id: AgentMail.pods.PodId, request: AgentMail.pods.SearchThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.SearchThreadsResponse>;
54
+ private __search;
30
55
  /**
31
56
  * **CLI:**
32
57
  * ```bash
@@ -22,6 +22,11 @@ export class ThreadsClient {
22
22
  this._options = normalizeClientOptionsWithAuth(options);
23
23
  }
24
24
  /**
25
+ * Lists threads in the pod, most recent first. Pass `senders`,
26
+ * `recipients`, or `subject` to filter by substring. Filtered requests are
27
+ * served by search, which caps `limit` at 100. For relevance-ranked
28
+ * full-text search, use `Search Threads`.
29
+ *
25
30
  * **CLI:**
26
31
  * ```bash
27
32
  * agentmail pods:threads list --pod-id <pod_id>
@@ -42,7 +47,7 @@ export class ThreadsClient {
42
47
  __list(pod_id_1) {
43
48
  return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
44
49
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
45
- const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeUnauthenticated, includeTrash, } = request;
50
+ const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeUnauthenticated, includeTrash, senders, recipients, subject, } = request;
46
51
  const _queryParams = {
47
52
  limit,
48
53
  page_token: pageToken,
@@ -63,6 +68,9 @@ export class ThreadsClient {
63
68
  include_blocked: includeBlocked,
64
69
  include_unauthenticated: includeUnauthenticated,
65
70
  include_trash: includeTrash,
71
+ senders: senders != null ? toJson(senders) : undefined,
72
+ recipients: recipients != null ? toJson(recipients) : undefined,
73
+ subject: subject != null ? toJson(subject) : undefined,
66
74
  };
67
75
  const _authRequest = yield this._options.authProvider.getAuthRequest();
68
76
  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);
@@ -111,6 +119,97 @@ export class ThreadsClient {
111
119
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/threads");
112
120
  });
113
121
  }
122
+ /**
123
+ * Full-text search across threads in the pod, ranked by relevance. The
124
+ * query is matched against senders, recipients, and subject (substring)
125
+ * and the message body (tokenized full text). Spam, trash, blocked, and
126
+ * unauthenticated threads are always excluded. `limit` cannot exceed 100.
127
+ *
128
+ * @param {AgentMail.pods.PodId} pod_id
129
+ * @param {AgentMail.pods.SearchThreadsRequest} request
130
+ * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
131
+ *
132
+ * @throws {@link AgentMail.ValidationError}
133
+ * @throws {@link AgentMail.NotFoundError}
134
+ *
135
+ * @example
136
+ * await client.pods.threads.search("pod_id", {
137
+ * q: "q"
138
+ * })
139
+ */
140
+ search(pod_id, request, requestOptions) {
141
+ return core.HttpResponsePromise.fromPromise(this.__search(pod_id, request, requestOptions));
142
+ }
143
+ __search(pod_id, request, requestOptions) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
146
+ const { q, limit, pageToken, before, after } = request;
147
+ const _queryParams = {
148
+ q,
149
+ limit,
150
+ page_token: pageToken,
151
+ before: before != null
152
+ ? serializers.Before.jsonOrThrow(before, { unrecognizedObjectKeys: "strip", omitUndefined: true })
153
+ : undefined,
154
+ after: after != null
155
+ ? serializers.After.jsonOrThrow(after, { unrecognizedObjectKeys: "strip", omitUndefined: true })
156
+ : undefined,
157
+ };
158
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
159
+ 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);
160
+ const _response = yield core.fetcher({
161
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
162
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/threads/search`),
163
+ method: "GET",
164
+ headers: _headers,
165
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
166
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
167
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
168
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
169
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
170
+ logging: this._options.logging,
171
+ });
172
+ if (_response.ok) {
173
+ return {
174
+ data: serializers.SearchThreadsResponse.parseOrThrow(_response.body, {
175
+ unrecognizedObjectKeys: "passthrough",
176
+ allowUnrecognizedUnionMembers: true,
177
+ allowUnrecognizedEnumValues: true,
178
+ skipValidation: true,
179
+ breadcrumbsPrefix: ["response"],
180
+ }),
181
+ rawResponse: _response.rawResponse,
182
+ };
183
+ }
184
+ if (_response.error.reason === "status-code") {
185
+ switch (_response.error.statusCode) {
186
+ case 400:
187
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
188
+ unrecognizedObjectKeys: "passthrough",
189
+ allowUnrecognizedUnionMembers: true,
190
+ allowUnrecognizedEnumValues: true,
191
+ skipValidation: true,
192
+ breadcrumbsPrefix: ["response"],
193
+ }), _response.rawResponse);
194
+ case 404:
195
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
196
+ unrecognizedObjectKeys: "passthrough",
197
+ allowUnrecognizedUnionMembers: true,
198
+ allowUnrecognizedEnumValues: true,
199
+ skipValidation: true,
200
+ breadcrumbsPrefix: ["response"],
201
+ }), _response.rawResponse);
202
+ default:
203
+ throw new errors.AgentMailError({
204
+ statusCode: _response.error.statusCode,
205
+ body: _response.error.body,
206
+ rawResponse: _response.rawResponse,
207
+ });
208
+ }
209
+ }
210
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/threads/search");
211
+ });
212
+ }
114
213
  /**
115
214
  * **CLI:**
116
215
  * ```bash
@@ -14,4 +14,10 @@ export interface ListThreadsRequest {
14
14
  includeBlocked?: AgentMail.IncludeBlocked;
15
15
  includeUnauthenticated?: AgentMail.IncludeUnauthenticated;
16
16
  includeTrash?: AgentMail.IncludeTrash;
17
+ /** Filter to threads whose senders contain this value (substring match). Repeatable; all values must match. */
18
+ senders?: string[];
19
+ /** Filter to threads whose recipients contain this value (substring match). Repeatable; all values must match. */
20
+ recipients?: string[];
21
+ /** Filter to threads whose subject contains this value (substring match). Repeatable; all values must match. */
22
+ subject?: string[];
17
23
  }
@@ -0,0 +1,14 @@
1
+ import type * as AgentMail from "../../../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {
5
+ * q: "q"
6
+ * }
7
+ */
8
+ export interface SearchThreadsRequest {
9
+ q: AgentMail.Query;
10
+ limit?: AgentMail.Limit;
11
+ pageToken?: AgentMail.PageToken;
12
+ before?: AgentMail.Before;
13
+ after?: AgentMail.After;
14
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,2 +1,3 @@
1
1
  export type { DeleteThreadRequest } from "./DeleteThreadRequest.mjs";
2
2
  export type { ListThreadsRequest } from "./ListThreadsRequest.mjs";
3
+ export type { SearchThreadsRequest } from "./SearchThreadsRequest.mjs";
@@ -11,6 +11,12 @@ export declare class ThreadsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<ThreadsClient.Options>;
12
12
  constructor(options?: ThreadsClient.Options);
13
13
  /**
14
+ * Lists threads, most recent first. Pass `senders`, `recipients`, or
15
+ * `subject` to filter by substring. Filtered requests are served by
16
+ * search, which caps `limit` at 100. For relevance-ranked full-text
17
+ * search across senders, recipients, subject, and message body, use
18
+ * `Search Threads`.
19
+ *
14
20
  * **CLI:**
15
21
  * ```bash
16
22
  * agentmail threads list
@@ -26,6 +32,26 @@ export declare class ThreadsClient {
26
32
  */
27
33
  list(request?: AgentMail.ListThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListThreadsResponse>;
28
34
  private __list;
35
+ /**
36
+ * Full-text search across threads in the organization, ranked by
37
+ * relevance. The query is matched against senders, recipients, and
38
+ * subject (substring) and the message body (tokenized full text). Spam,
39
+ * trash, blocked, and unauthenticated threads are always excluded.
40
+ * `limit` cannot exceed 100.
41
+ *
42
+ * @param {AgentMail.SearchThreadsRequest} request
43
+ * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
44
+ *
45
+ * @throws {@link AgentMail.ValidationError}
46
+ * @throws {@link AgentMail.NotFoundError}
47
+ *
48
+ * @example
49
+ * await client.threads.search({
50
+ * q: "q"
51
+ * })
52
+ */
53
+ search(request: AgentMail.SearchThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.SearchThreadsResponse>;
54
+ private __search;
29
55
  /**
30
56
  * **CLI:**
31
57
  * ```bash
@@ -22,6 +22,12 @@ export class ThreadsClient {
22
22
  this._options = normalizeClientOptionsWithAuth(options);
23
23
  }
24
24
  /**
25
+ * Lists threads, most recent first. Pass `senders`, `recipients`, or
26
+ * `subject` to filter by substring. Filtered requests are served by
27
+ * search, which caps `limit` at 100. For relevance-ranked full-text
28
+ * search across senders, recipients, subject, and message body, use
29
+ * `Search Threads`.
30
+ *
25
31
  * **CLI:**
26
32
  * ```bash
27
33
  * agentmail threads list
@@ -41,7 +47,7 @@ export class ThreadsClient {
41
47
  __list() {
42
48
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
43
49
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
44
- const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeUnauthenticated, includeTrash, } = request;
50
+ const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeUnauthenticated, includeTrash, senders, recipients, subject, } = request;
45
51
  const _queryParams = {
46
52
  limit,
47
53
  page_token: pageToken,
@@ -62,6 +68,9 @@ export class ThreadsClient {
62
68
  include_blocked: includeBlocked,
63
69
  include_unauthenticated: includeUnauthenticated,
64
70
  include_trash: includeTrash,
71
+ senders: senders != null ? toJson(senders) : undefined,
72
+ recipients: recipients != null ? toJson(recipients) : undefined,
73
+ subject: subject != null ? toJson(subject) : undefined,
65
74
  };
66
75
  const _authRequest = yield this._options.authProvider.getAuthRequest();
67
76
  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);
@@ -110,6 +119,97 @@ export class ThreadsClient {
110
119
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/threads");
111
120
  });
112
121
  }
122
+ /**
123
+ * Full-text search across threads in the organization, ranked by
124
+ * relevance. The query is matched against senders, recipients, and
125
+ * subject (substring) and the message body (tokenized full text). Spam,
126
+ * trash, blocked, and unauthenticated threads are always excluded.
127
+ * `limit` cannot exceed 100.
128
+ *
129
+ * @param {AgentMail.SearchThreadsRequest} request
130
+ * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
131
+ *
132
+ * @throws {@link AgentMail.ValidationError}
133
+ * @throws {@link AgentMail.NotFoundError}
134
+ *
135
+ * @example
136
+ * await client.threads.search({
137
+ * q: "q"
138
+ * })
139
+ */
140
+ search(request, requestOptions) {
141
+ return core.HttpResponsePromise.fromPromise(this.__search(request, requestOptions));
142
+ }
143
+ __search(request, requestOptions) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
146
+ const { q, limit, pageToken, before, after } = request;
147
+ const _queryParams = {
148
+ q,
149
+ limit,
150
+ page_token: pageToken,
151
+ before: before != null
152
+ ? serializers.Before.jsonOrThrow(before, { unrecognizedObjectKeys: "strip", omitUndefined: true })
153
+ : undefined,
154
+ after: after != null
155
+ ? serializers.After.jsonOrThrow(after, { unrecognizedObjectKeys: "strip", omitUndefined: true })
156
+ : undefined,
157
+ };
158
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
159
+ 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);
160
+ const _response = yield core.fetcher({
161
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
162
+ .http, "/v0/threads/search"),
163
+ method: "GET",
164
+ headers: _headers,
165
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
166
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
167
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
168
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
169
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
170
+ logging: this._options.logging,
171
+ });
172
+ if (_response.ok) {
173
+ return {
174
+ data: serializers.SearchThreadsResponse.parseOrThrow(_response.body, {
175
+ unrecognizedObjectKeys: "passthrough",
176
+ allowUnrecognizedUnionMembers: true,
177
+ allowUnrecognizedEnumValues: true,
178
+ skipValidation: true,
179
+ breadcrumbsPrefix: ["response"],
180
+ }),
181
+ rawResponse: _response.rawResponse,
182
+ };
183
+ }
184
+ if (_response.error.reason === "status-code") {
185
+ switch (_response.error.statusCode) {
186
+ case 400:
187
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
188
+ unrecognizedObjectKeys: "passthrough",
189
+ allowUnrecognizedUnionMembers: true,
190
+ allowUnrecognizedEnumValues: true,
191
+ skipValidation: true,
192
+ breadcrumbsPrefix: ["response"],
193
+ }), _response.rawResponse);
194
+ case 404:
195
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
196
+ unrecognizedObjectKeys: "passthrough",
197
+ allowUnrecognizedUnionMembers: true,
198
+ allowUnrecognizedEnumValues: true,
199
+ skipValidation: true,
200
+ breadcrumbsPrefix: ["response"],
201
+ }), _response.rawResponse);
202
+ default:
203
+ throw new errors.AgentMailError({
204
+ statusCode: _response.error.statusCode,
205
+ body: _response.error.body,
206
+ rawResponse: _response.rawResponse,
207
+ });
208
+ }
209
+ }
210
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/threads/search");
211
+ });
212
+ }
113
213
  /**
114
214
  * **CLI:**
115
215
  * ```bash
@@ -14,4 +14,10 @@ export interface ListThreadsRequest {
14
14
  includeBlocked?: AgentMail.IncludeBlocked;
15
15
  includeUnauthenticated?: AgentMail.IncludeUnauthenticated;
16
16
  includeTrash?: AgentMail.IncludeTrash;
17
+ /** Filter to threads whose senders contain this value (substring match). Repeatable; all values must match. */
18
+ senders?: string[];
19
+ /** Filter to threads whose recipients contain this value (substring match). Repeatable; all values must match. */
20
+ recipients?: string[];
21
+ /** Filter to threads whose subject contains this value (substring match). Repeatable; all values must match. */
22
+ subject?: string[];
17
23
  }
@@ -0,0 +1,14 @@
1
+ import type * as AgentMail from "../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {
5
+ * q: "q"
6
+ * }
7
+ */
8
+ export interface SearchThreadsRequest {
9
+ q: AgentMail.Query;
10
+ limit?: AgentMail.Limit;
11
+ pageToken?: AgentMail.PageToken;
12
+ before?: AgentMail.Before;
13
+ after?: AgentMail.After;
14
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,2 +1,3 @@
1
1
  export type { DeleteThreadRequest } from "./DeleteThreadRequest.mjs";
2
2
  export type { ListThreadsRequest } from "./ListThreadsRequest.mjs";
3
+ export type { SearchThreadsRequest } from "./SearchThreadsRequest.mjs";
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Matched fragments per field on a thread search result, with matched terms
3
+ * wrapped in `**`. A field key is present only when the query matched that
4
+ * field, so the present keys also tell you which fields produced the hit.
5
+ */
6
+ export interface SearchThreadHighlights {
7
+ /** Matched fragments from a sender address in the thread. */
8
+ from?: string[];
9
+ /** Matched fragments from a recipient address in the thread (to, cc, or bcc). */
10
+ recipients?: string[];
11
+ /** Matched fragments from the subject. */
12
+ subject?: string[];
13
+ /** Matched fragments from a message body in the thread. */
14
+ text?: string[];
15
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type * as AgentMail from "../../../index.mjs";
2
+ export interface SearchThreadItem extends AgentMail.ThreadItem {
3
+ /** Matched fragments per field. Present only when the query matched an indexed field. */
4
+ highlights?: AgentMail.SearchThreadHighlights;
5
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ import type * as AgentMail from "../../../index.mjs";
2
+ export interface SearchThreadsResponse {
3
+ count: AgentMail.Count;
4
+ limit?: AgentMail.Limit;
5
+ nextPageToken?: AgentMail.PageToken;
6
+ /** Ordered by relevance, best match first. */
7
+ threads: AgentMail.SearchThreadItem[];
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,4 +1,7 @@
1
1
  export * from "./ListThreadsResponse.mjs";
2
+ export * from "./SearchThreadHighlights.mjs";
3
+ export * from "./SearchThreadItem.mjs";
4
+ export * from "./SearchThreadsResponse.mjs";
2
5
  export * from "./Thread.mjs";
3
6
  export * from "./ThreadAttachments.mjs";
4
7
  export * from "./ThreadCreatedAt.mjs";
@@ -1,4 +1,7 @@
1
1
  export * from "./ListThreadsResponse.mjs";
2
+ export * from "./SearchThreadHighlights.mjs";
3
+ export * from "./SearchThreadItem.mjs";
4
+ export * from "./SearchThreadsResponse.mjs";
2
5
  export * from "./Thread.mjs";
3
6
  export * from "./ThreadAttachments.mjs";
4
7
  export * from "./ThreadCreatedAt.mjs";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Full-text search query. Matched against the sender, recipients, and
3
+ * subject (substring) and the message body (tokenized full text).
4
+ */
5
+ export type Query = string;
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -13,4 +13,5 @@ export * from "./Labels.mjs";
13
13
  export * from "./Limit.mjs";
14
14
  export * from "./OrganizationId.mjs";
15
15
  export * from "./PageToken.mjs";
16
+ export * from "./Query.mjs";
16
17
  export * from "./ValidationErrorResponse.mjs";
@@ -13,4 +13,5 @@ export * from "./Labels.mjs";
13
13
  export * from "./Limit.mjs";
14
14
  export * from "./OrganizationId.mjs";
15
15
  export * from "./PageToken.mjs";
16
+ export * from "./Query.mjs";
16
17
  export * from "./ValidationErrorResponse.mjs";
@@ -3,10 +3,12 @@ import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  import { DomainName } from "./DomainName.mjs";
5
5
  import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
6
+ import { SubdomainsEnabled } from "./SubdomainsEnabled.mjs";
6
7
  export declare const CreateDomainRequest: core.serialization.ObjectSchema<serializers.CreateDomainRequest.Raw, AgentMail.CreateDomainRequest>;
7
8
  export declare namespace CreateDomainRequest {
8
9
  interface Raw {
9
10
  domain: DomainName.Raw;
10
- feedback_enabled: FeedbackEnabled.Raw;
11
+ feedback_enabled?: FeedbackEnabled.Raw | null;
12
+ subdomains_enabled?: SubdomainsEnabled.Raw | null;
11
13
  }
12
14
  }
@@ -2,7 +2,9 @@
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import { DomainName } from "./DomainName.mjs";
4
4
  import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
5
+ import { SubdomainsEnabled } from "./SubdomainsEnabled.mjs";
5
6
  export const CreateDomainRequest = core.serialization.object({
6
7
  domain: DomainName,
7
- feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled),
8
+ feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled.optional()),
9
+ subdomainsEnabled: core.serialization.property("subdomains_enabled", SubdomainsEnabled.optional()),
8
10
  });
@@ -7,6 +7,7 @@ import { DomainId } from "./DomainId.mjs";
7
7
  import { DomainName } from "./DomainName.mjs";
8
8
  import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
9
9
  import { Status } from "./Status.mjs";
10
+ import { SubdomainsEnabled } from "./SubdomainsEnabled.mjs";
10
11
  import { VerificationRecord } from "./VerificationRecord.mjs";
11
12
  export declare const Domain: core.serialization.ObjectSchema<serializers.Domain.Raw, AgentMail.Domain>;
12
13
  export declare namespace Domain {
@@ -16,6 +17,7 @@ export declare namespace Domain {
16
17
  domain: DomainName.Raw;
17
18
  status: Status.Raw;
18
19
  feedback_enabled: FeedbackEnabled.Raw;
20
+ subdomains_enabled: SubdomainsEnabled.Raw;
19
21
  records: VerificationRecord.Raw[];
20
22
  client_id?: ClientId.Raw | null;
21
23
  updated_at: string;
@@ -6,6 +6,7 @@ import { DomainId } from "./DomainId.mjs";
6
6
  import { DomainName } from "./DomainName.mjs";
7
7
  import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
8
8
  import { Status } from "./Status.mjs";
9
+ import { SubdomainsEnabled } from "./SubdomainsEnabled.mjs";
9
10
  import { VerificationRecord } from "./VerificationRecord.mjs";
10
11
  export const Domain = core.serialization.object({
11
12
  podId: core.serialization.property("pod_id", PodId.optional()),
@@ -13,6 +14,7 @@ export const Domain = core.serialization.object({
13
14
  domain: DomainName,
14
15
  status: Status,
15
16
  feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled),
17
+ subdomainsEnabled: core.serialization.property("subdomains_enabled", SubdomainsEnabled),
16
18
  records: core.serialization.list(VerificationRecord),
17
19
  clientId: core.serialization.property("client_id", ClientId.optional()),
18
20
  updatedAt: core.serialization.property("updated_at", core.serialization.date()),
@@ -6,6 +6,7 @@ import { ClientId } from "./ClientId.mjs";
6
6
  import { DomainId } from "./DomainId.mjs";
7
7
  import { DomainName } from "./DomainName.mjs";
8
8
  import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
9
+ import { SubdomainsEnabled } from "./SubdomainsEnabled.mjs";
9
10
  export declare const DomainItem: core.serialization.ObjectSchema<serializers.DomainItem.Raw, AgentMail.DomainItem>;
10
11
  export declare namespace DomainItem {
11
12
  interface Raw {
@@ -13,6 +14,7 @@ export declare namespace DomainItem {
13
14
  domain_id: DomainId.Raw;
14
15
  domain: DomainName.Raw;
15
16
  feedback_enabled: FeedbackEnabled.Raw;
17
+ subdomains_enabled: SubdomainsEnabled.Raw;
16
18
  client_id?: ClientId.Raw | null;
17
19
  updated_at: string;
18
20
  created_at: string;
@@ -5,11 +5,13 @@ import { ClientId } from "./ClientId.mjs";
5
5
  import { DomainId } from "./DomainId.mjs";
6
6
  import { DomainName } from "./DomainName.mjs";
7
7
  import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
8
+ import { SubdomainsEnabled } from "./SubdomainsEnabled.mjs";
8
9
  export const DomainItem = core.serialization.object({
9
10
  podId: core.serialization.property("pod_id", PodId.optional()),
10
11
  domainId: core.serialization.property("domain_id", DomainId),
11
12
  domain: DomainName,
12
13
  feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled),
14
+ subdomainsEnabled: core.serialization.property("subdomains_enabled", SubdomainsEnabled),
13
15
  clientId: core.serialization.property("client_id", ClientId.optional()),
14
16
  updatedAt: core.serialization.property("updated_at", core.serialization.date()),
15
17
  createdAt: core.serialization.property("created_at", core.serialization.date()),
@@ -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 SubdomainsEnabled: core.serialization.Schema<serializers.SubdomainsEnabled.Raw, AgentMail.SubdomainsEnabled>;
5
+ export declare namespace SubdomainsEnabled {
6
+ type Raw = boolean;
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 SubdomainsEnabled = core.serialization.boolean();