agentmail 0.5.7 → 0.5.9

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 (192) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +25 -20
  4. package/dist/cjs/api/resources/auth/client/Client.d.ts +28 -0
  5. package/dist/cjs/api/resources/auth/client/Client.js +114 -0
  6. package/dist/cjs/api/resources/auth/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/auth/client/index.js +2 -0
  8. package/dist/cjs/api/resources/auth/exports.d.ts +2 -0
  9. package/dist/cjs/api/resources/auth/exports.js +21 -0
  10. package/dist/cjs/api/resources/auth/index.d.ts +2 -0
  11. package/dist/cjs/api/resources/auth/index.js +18 -0
  12. package/dist/cjs/api/resources/auth/types/Identity.d.ts +19 -0
  13. package/dist/cjs/api/resources/auth/types/Identity.js +3 -0
  14. package/dist/cjs/api/resources/auth/types/ScopeType.d.ts +7 -0
  15. package/dist/cjs/api/resources/auth/types/ScopeType.js +10 -0
  16. package/dist/cjs/api/resources/auth/types/index.d.ts +2 -0
  17. package/dist/cjs/api/resources/auth/types/index.js +18 -0
  18. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +26 -0
  19. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +101 -1
  20. package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.ts +6 -0
  21. package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/SearchMessagesRequest.d.ts +14 -0
  22. package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/SearchMessagesRequest.js +3 -0
  23. package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/index.d.ts +1 -0
  24. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +25 -0
  25. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +100 -1
  26. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.ts +6 -0
  27. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/SearchThreadsRequest.d.ts +14 -0
  28. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/SearchThreadsRequest.js +3 -0
  29. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/index.d.ts +1 -0
  30. package/dist/cjs/api/resources/index.d.ts +2 -0
  31. package/dist/cjs/api/resources/index.js +3 -1
  32. package/dist/cjs/api/resources/messages/types/SearchMessageHighlights.d.ts +15 -0
  33. package/dist/cjs/api/resources/messages/types/SearchMessageHighlights.js +3 -0
  34. package/dist/cjs/api/resources/messages/types/SearchMessageItem.d.ts +5 -0
  35. package/dist/cjs/api/resources/messages/types/SearchMessageItem.js +3 -0
  36. package/dist/cjs/api/resources/messages/types/SearchMessagesResponse.d.ts +8 -0
  37. package/dist/cjs/api/resources/messages/types/SearchMessagesResponse.js +3 -0
  38. package/dist/cjs/api/resources/messages/types/index.d.ts +3 -0
  39. package/dist/cjs/api/resources/messages/types/index.js +3 -0
  40. package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +25 -0
  41. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +100 -1
  42. package/dist/cjs/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.ts +6 -0
  43. package/dist/cjs/api/resources/pods/resources/threads/client/requests/SearchThreadsRequest.d.ts +14 -0
  44. package/dist/cjs/api/resources/pods/resources/threads/client/requests/SearchThreadsRequest.js +3 -0
  45. package/dist/cjs/api/resources/pods/resources/threads/client/requests/index.d.ts +1 -0
  46. package/dist/cjs/api/resources/threads/client/Client.d.ts +26 -0
  47. package/dist/cjs/api/resources/threads/client/Client.js +101 -1
  48. package/dist/cjs/api/resources/threads/client/requests/ListThreadsRequest.d.ts +6 -0
  49. package/dist/cjs/api/resources/threads/client/requests/SearchThreadsRequest.d.ts +14 -0
  50. package/dist/cjs/api/resources/threads/client/requests/SearchThreadsRequest.js +3 -0
  51. package/dist/cjs/api/resources/threads/client/requests/index.d.ts +1 -0
  52. package/dist/cjs/api/resources/threads/types/SearchThreadHighlights.d.ts +15 -0
  53. package/dist/cjs/api/resources/threads/types/SearchThreadHighlights.js +3 -0
  54. package/dist/cjs/api/resources/threads/types/SearchThreadItem.d.ts +5 -0
  55. package/dist/cjs/api/resources/threads/types/SearchThreadItem.js +3 -0
  56. package/dist/cjs/api/resources/threads/types/SearchThreadsResponse.d.ts +8 -0
  57. package/dist/cjs/api/resources/threads/types/SearchThreadsResponse.js +3 -0
  58. package/dist/cjs/api/resources/threads/types/index.d.ts +3 -0
  59. package/dist/cjs/api/resources/threads/types/index.js +3 -0
  60. package/dist/cjs/api/types/Query.d.ts +5 -0
  61. package/dist/cjs/api/types/Query.js +3 -0
  62. package/dist/cjs/api/types/index.d.ts +1 -0
  63. package/dist/cjs/api/types/index.js +1 -0
  64. package/dist/cjs/serialization/resources/auth/index.d.ts +1 -0
  65. package/dist/cjs/serialization/resources/auth/index.js +17 -0
  66. package/dist/cjs/serialization/resources/auth/types/Identity.d.ts +16 -0
  67. package/dist/cjs/serialization/resources/auth/types/Identity.js +48 -0
  68. package/dist/cjs/serialization/resources/auth/types/ScopeType.d.ts +7 -0
  69. package/dist/cjs/serialization/resources/auth/types/ScopeType.js +39 -0
  70. package/dist/cjs/serialization/resources/auth/types/index.d.ts +2 -0
  71. package/dist/cjs/serialization/resources/auth/types/index.js +18 -0
  72. package/dist/cjs/serialization/resources/index.d.ts +2 -0
  73. package/dist/cjs/serialization/resources/index.js +3 -1
  74. package/dist/cjs/serialization/resources/messages/types/SearchMessageHighlights.d.ts +12 -0
  75. package/dist/cjs/serialization/resources/messages/types/SearchMessageHighlights.js +44 -0
  76. package/dist/cjs/serialization/resources/messages/types/SearchMessageItem.d.ts +11 -0
  77. package/dist/cjs/serialization/resources/messages/types/SearchMessageItem.js +45 -0
  78. package/dist/cjs/serialization/resources/messages/types/SearchMessagesResponse.d.ts +16 -0
  79. package/dist/cjs/serialization/resources/messages/types/SearchMessagesResponse.js +48 -0
  80. package/dist/cjs/serialization/resources/messages/types/index.d.ts +3 -0
  81. package/dist/cjs/serialization/resources/messages/types/index.js +3 -0
  82. package/dist/cjs/serialization/resources/threads/types/SearchThreadHighlights.d.ts +12 -0
  83. package/dist/cjs/serialization/resources/threads/types/SearchThreadHighlights.js +44 -0
  84. package/dist/cjs/serialization/resources/threads/types/SearchThreadItem.d.ts +11 -0
  85. package/dist/cjs/serialization/resources/threads/types/SearchThreadItem.js +45 -0
  86. package/dist/cjs/serialization/resources/threads/types/SearchThreadsResponse.d.ts +16 -0
  87. package/dist/cjs/serialization/resources/threads/types/SearchThreadsResponse.js +48 -0
  88. package/dist/cjs/serialization/resources/threads/types/index.d.ts +3 -0
  89. package/dist/cjs/serialization/resources/threads/types/index.js +3 -0
  90. package/dist/cjs/serialization/types/Query.d.ts +7 -0
  91. package/dist/cjs/serialization/types/Query.js +39 -0
  92. package/dist/cjs/serialization/types/index.d.ts +1 -0
  93. package/dist/cjs/serialization/types/index.js +1 -0
  94. package/dist/cjs/version.d.ts +1 -1
  95. package/dist/cjs/version.js +1 -1
  96. package/dist/esm/BaseClient.mjs +2 -2
  97. package/dist/esm/Client.d.mts +3 -0
  98. package/dist/esm/Client.mjs +5 -0
  99. package/dist/esm/api/resources/auth/client/Client.d.mts +28 -0
  100. package/dist/esm/api/resources/auth/client/Client.mjs +77 -0
  101. package/dist/esm/api/resources/auth/client/index.d.mts +1 -0
  102. package/dist/esm/api/resources/auth/client/index.mjs +1 -0
  103. package/dist/esm/api/resources/auth/exports.d.mts +2 -0
  104. package/dist/esm/api/resources/auth/exports.mjs +3 -0
  105. package/dist/esm/api/resources/auth/index.d.mts +2 -0
  106. package/dist/esm/api/resources/auth/index.mjs +2 -0
  107. package/dist/esm/api/resources/auth/types/Identity.d.mts +19 -0
  108. package/dist/esm/api/resources/auth/types/Identity.mjs +2 -0
  109. package/dist/esm/api/resources/auth/types/ScopeType.d.mts +7 -0
  110. package/dist/esm/api/resources/auth/types/ScopeType.mjs +7 -0
  111. package/dist/esm/api/resources/auth/types/index.d.mts +2 -0
  112. package/dist/esm/api/resources/auth/types/index.mjs +2 -0
  113. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +26 -0
  114. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +101 -1
  115. package/dist/esm/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.mts +6 -0
  116. package/dist/esm/api/resources/inboxes/resources/messages/client/requests/SearchMessagesRequest.d.mts +14 -0
  117. package/dist/esm/api/resources/inboxes/resources/messages/client/requests/SearchMessagesRequest.mjs +2 -0
  118. package/dist/esm/api/resources/inboxes/resources/messages/client/requests/index.d.mts +1 -0
  119. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +25 -0
  120. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +100 -1
  121. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.mts +6 -0
  122. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/SearchThreadsRequest.d.mts +14 -0
  123. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/SearchThreadsRequest.mjs +2 -0
  124. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/index.d.mts +1 -0
  125. package/dist/esm/api/resources/index.d.mts +2 -0
  126. package/dist/esm/api/resources/index.mjs +2 -0
  127. package/dist/esm/api/resources/messages/types/SearchMessageHighlights.d.mts +15 -0
  128. package/dist/esm/api/resources/messages/types/SearchMessageHighlights.mjs +2 -0
  129. package/dist/esm/api/resources/messages/types/SearchMessageItem.d.mts +5 -0
  130. package/dist/esm/api/resources/messages/types/SearchMessageItem.mjs +2 -0
  131. package/dist/esm/api/resources/messages/types/SearchMessagesResponse.d.mts +8 -0
  132. package/dist/esm/api/resources/messages/types/SearchMessagesResponse.mjs +2 -0
  133. package/dist/esm/api/resources/messages/types/index.d.mts +3 -0
  134. package/dist/esm/api/resources/messages/types/index.mjs +3 -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/auth/index.d.mts +1 -0
  160. package/dist/esm/serialization/resources/auth/index.mjs +1 -0
  161. package/dist/esm/serialization/resources/auth/types/Identity.d.mts +16 -0
  162. package/dist/esm/serialization/resources/auth/types/Identity.mjs +12 -0
  163. package/dist/esm/serialization/resources/auth/types/ScopeType.d.mts +7 -0
  164. package/dist/esm/serialization/resources/auth/types/ScopeType.mjs +3 -0
  165. package/dist/esm/serialization/resources/auth/types/index.d.mts +2 -0
  166. package/dist/esm/serialization/resources/auth/types/index.mjs +2 -0
  167. package/dist/esm/serialization/resources/index.d.mts +2 -0
  168. package/dist/esm/serialization/resources/index.mjs +2 -0
  169. package/dist/esm/serialization/resources/messages/types/SearchMessageHighlights.d.mts +12 -0
  170. package/dist/esm/serialization/resources/messages/types/SearchMessageHighlights.mjs +8 -0
  171. package/dist/esm/serialization/resources/messages/types/SearchMessageItem.d.mts +11 -0
  172. package/dist/esm/serialization/resources/messages/types/SearchMessageItem.mjs +9 -0
  173. package/dist/esm/serialization/resources/messages/types/SearchMessagesResponse.d.mts +16 -0
  174. package/dist/esm/serialization/resources/messages/types/SearchMessagesResponse.mjs +12 -0
  175. package/dist/esm/serialization/resources/messages/types/index.d.mts +3 -0
  176. package/dist/esm/serialization/resources/messages/types/index.mjs +3 -0
  177. package/dist/esm/serialization/resources/threads/types/SearchThreadHighlights.d.mts +12 -0
  178. package/dist/esm/serialization/resources/threads/types/SearchThreadHighlights.mjs +8 -0
  179. package/dist/esm/serialization/resources/threads/types/SearchThreadItem.d.mts +11 -0
  180. package/dist/esm/serialization/resources/threads/types/SearchThreadItem.mjs +9 -0
  181. package/dist/esm/serialization/resources/threads/types/SearchThreadsResponse.d.mts +16 -0
  182. package/dist/esm/serialization/resources/threads/types/SearchThreadsResponse.mjs +12 -0
  183. package/dist/esm/serialization/resources/threads/types/index.d.mts +3 -0
  184. package/dist/esm/serialization/resources/threads/types/index.mjs +3 -0
  185. package/dist/esm/serialization/types/Query.d.mts +7 -0
  186. package/dist/esm/serialization/types/Query.mjs +3 -0
  187. package/dist/esm/serialization/types/index.d.mts +1 -0
  188. package/dist/esm/serialization/types/index.mjs +1 -0
  189. package/dist/esm/version.d.mts +1 -1
  190. package/dist/esm/version.mjs +1 -1
  191. package/package.json +12 -1
  192. package/reference.md +380 -0
@@ -0,0 +1,45 @@
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.SearchThreadItem = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ const SearchThreadHighlights_js_1 = require("./SearchThreadHighlights.js");
40
+ const ThreadItem_js_1 = require("./ThreadItem.js");
41
+ exports.SearchThreadItem = core.serialization
42
+ .object({
43
+ highlights: SearchThreadHighlights_js_1.SearchThreadHighlights.optional(),
44
+ })
45
+ .extend(ThreadItem_js_1.ThreadItem);
@@ -0,0 +1,16 @@
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
+ import { Count } from "../../../types/Count.js";
5
+ import { Limit } from "../../../types/Limit.js";
6
+ import { PageToken } from "../../../types/PageToken.js";
7
+ import { SearchThreadItem } from "./SearchThreadItem.js";
8
+ export declare const SearchThreadsResponse: core.serialization.ObjectSchema<serializers.SearchThreadsResponse.Raw, AgentMail.SearchThreadsResponse>;
9
+ export declare namespace SearchThreadsResponse {
10
+ interface Raw {
11
+ count: Count.Raw;
12
+ limit?: Limit.Raw | null;
13
+ next_page_token?: PageToken.Raw | null;
14
+ threads: SearchThreadItem.Raw[];
15
+ }
16
+ }
@@ -0,0 +1,48 @@
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.SearchThreadsResponse = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ const Count_js_1 = require("../../../types/Count.js");
40
+ const Limit_js_1 = require("../../../types/Limit.js");
41
+ const PageToken_js_1 = require("../../../types/PageToken.js");
42
+ const SearchThreadItem_js_1 = require("./SearchThreadItem.js");
43
+ exports.SearchThreadsResponse = core.serialization.object({
44
+ count: Count_js_1.Count,
45
+ limit: Limit_js_1.Limit.optional(),
46
+ nextPageToken: core.serialization.property("next_page_token", PageToken_js_1.PageToken.optional()),
47
+ threads: core.serialization.list(SearchThreadItem_js_1.SearchThreadItem),
48
+ });
@@ -1,4 +1,7 @@
1
1
  export * from "./ListThreadsResponse.js";
2
+ export * from "./SearchThreadHighlights.js";
3
+ export * from "./SearchThreadItem.js";
4
+ export * from "./SearchThreadsResponse.js";
2
5
  export * from "./Thread.js";
3
6
  export * from "./ThreadAttachments.js";
4
7
  export * from "./ThreadCreatedAt.js";
@@ -15,6 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ListThreadsResponse.js"), exports);
18
+ __exportStar(require("./SearchThreadHighlights.js"), exports);
19
+ __exportStar(require("./SearchThreadItem.js"), exports);
20
+ __exportStar(require("./SearchThreadsResponse.js"), exports);
18
21
  __exportStar(require("./Thread.js"), exports);
19
22
  __exportStar(require("./ThreadAttachments.js"), exports);
20
23
  __exportStar(require("./ThreadCreatedAt.js"), exports);
@@ -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 Query: core.serialization.Schema<serializers.Query.Raw, AgentMail.Query>;
5
+ export declare namespace Query {
6
+ type Raw = string;
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.Query = void 0;
38
+ const core = __importStar(require("../../core/index.js"));
39
+ exports.Query = core.serialization.string();
@@ -13,4 +13,5 @@ export * from "./Labels.js";
13
13
  export * from "./Limit.js";
14
14
  export * from "./OrganizationId.js";
15
15
  export * from "./PageToken.js";
16
+ export * from "./Query.js";
16
17
  export * from "./ValidationErrorResponse.js";
@@ -29,4 +29,5 @@ __exportStar(require("./Labels.js"), exports);
29
29
  __exportStar(require("./Limit.js"), exports);
30
30
  __exportStar(require("./OrganizationId.js"), exports);
31
31
  __exportStar(require("./PageToken.js"), exports);
32
+ __exportStar(require("./Query.js"), exports);
32
33
  __exportStar(require("./ValidationErrorResponse.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.5.7";
1
+ export declare const SDK_VERSION = "0.5.9";
@@ -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.5.7";
4
+ exports.SDK_VERSION = "0.5.9";
@@ -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.5.7",
10
- "User-Agent": "agentmail/0.5.7",
9
+ "X-Fern-SDK-Version": "0.5.9",
10
+ "User-Agent": "agentmail/0.5.9",
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,5 +1,6 @@
1
1
  import { AgentClient } from "./api/resources/agent/client/Client.mjs";
2
2
  import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.mjs";
3
+ import { AuthClient } from "./api/resources/auth/client/Client.mjs";
3
4
  import { DomainsClient } from "./api/resources/domains/client/Client.mjs";
4
5
  import { DraftsClient } from "./api/resources/drafts/client/Client.mjs";
5
6
  import { InboxesClient } from "./api/resources/inboxes/client/Client.mjs";
@@ -25,6 +26,7 @@ export declare class AgentMailClient {
25
26
  protected _webhooks: WebhooksClient | undefined;
26
27
  protected _agent: AgentClient | undefined;
27
28
  protected _apiKeys: ApiKeysClient | undefined;
29
+ protected _auth: AuthClient | undefined;
28
30
  protected _domains: DomainsClient | undefined;
29
31
  protected _drafts: DraftsClient | undefined;
30
32
  protected _lists: ListsClient | undefined;
@@ -38,6 +40,7 @@ export declare class AgentMailClient {
38
40
  get webhooks(): WebhooksClient;
39
41
  get agent(): AgentClient;
40
42
  get apiKeys(): ApiKeysClient;
43
+ get auth(): AuthClient;
41
44
  get domains(): DomainsClient;
42
45
  get drafts(): DraftsClient;
43
46
  get lists(): ListsClient;
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  import { AgentClient } from "./api/resources/agent/client/Client.mjs";
12
12
  import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.mjs";
13
+ import { AuthClient } from "./api/resources/auth/client/Client.mjs";
13
14
  import { DomainsClient } from "./api/resources/domains/client/Client.mjs";
14
15
  import { DraftsClient } from "./api/resources/drafts/client/Client.mjs";
15
16
  import { InboxesClient } from "./api/resources/inboxes/client/Client.mjs";
@@ -47,6 +48,10 @@ export class AgentMailClient {
47
48
  var _a;
48
49
  return ((_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new ApiKeysClient(this._options)));
49
50
  }
51
+ get auth() {
52
+ var _a;
53
+ return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new AuthClient(this._options)));
54
+ }
50
55
  get domains() {
51
56
  var _a;
52
57
  return ((_a = this._domains) !== null && _a !== void 0 ? _a : (this._domains = new DomainsClient(this._options)));
@@ -0,0 +1,28 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
+ import * as core from "../../../../core/index.mjs";
4
+ import type * as AgentMail from "../../../index.mjs";
5
+ export declare namespace AuthClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class AuthClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<AuthClient.Options>;
12
+ constructor(options?: AuthClient.Options);
13
+ /**
14
+ * Returns the identity and scope of the authenticated credential. Useful when a client holds a pod-scoped or inbox-scoped API key and needs to discover the parent organization, pod, or inbox without prior knowledge.
15
+ *
16
+ * **CLI:**
17
+ * ```bash
18
+ * agentmail auth me
19
+ * ```
20
+ *
21
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
22
+ *
23
+ * @example
24
+ * await client.auth.me()
25
+ */
26
+ me(requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<AgentMail.Identity>;
27
+ private __me;
28
+ }
@@ -0,0 +1,77 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
+ import { mergeHeaders } from "../../../../core/headers.mjs";
13
+ import * as core from "../../../../core/index.mjs";
14
+ import * as environments from "../../../../environments.mjs";
15
+ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
+ import * as errors from "../../../../errors/index.mjs";
17
+ import * as serializers from "../../../../serialization/index.mjs";
18
+ export class AuthClient {
19
+ constructor(options = {}) {
20
+ this._options = normalizeClientOptionsWithAuth(options);
21
+ }
22
+ /**
23
+ * Returns the identity and scope of the authenticated credential. Useful when a client holds a pod-scoped or inbox-scoped API key and needs to discover the parent organization, pod, or inbox without prior knowledge.
24
+ *
25
+ * **CLI:**
26
+ * ```bash
27
+ * agentmail auth me
28
+ * ```
29
+ *
30
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
31
+ *
32
+ * @example
33
+ * await client.auth.me()
34
+ */
35
+ me(requestOptions) {
36
+ return core.HttpResponsePromise.fromPromise(this.__me(requestOptions));
37
+ }
38
+ __me(requestOptions) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
42
+ 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);
43
+ const _response = yield core.fetcher({
44
+ 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)
45
+ .http, "/v0/auth/me"),
46
+ method: "GET",
47
+ headers: _headers,
48
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
49
+ 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,
50
+ 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,
51
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
52
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
53
+ logging: this._options.logging,
54
+ });
55
+ if (_response.ok) {
56
+ return {
57
+ data: serializers.Identity.parseOrThrow(_response.body, {
58
+ unrecognizedObjectKeys: "passthrough",
59
+ allowUnrecognizedUnionMembers: true,
60
+ allowUnrecognizedEnumValues: true,
61
+ skipValidation: true,
62
+ breadcrumbsPrefix: ["response"],
63
+ }),
64
+ rawResponse: _response.rawResponse,
65
+ };
66
+ }
67
+ if (_response.error.reason === "status-code") {
68
+ throw new errors.AgentMailError({
69
+ statusCode: _response.error.statusCode,
70
+ body: _response.error.body,
71
+ rawResponse: _response.rawResponse,
72
+ });
73
+ }
74
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/auth/me");
75
+ });
76
+ }
77
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { AuthClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { AuthClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -0,0 +1,19 @@
1
+ import type * as AgentMail from "../../../index.mjs";
2
+ /**
3
+ * Identity and scope of the authenticated credential.
4
+ */
5
+ export interface Identity {
6
+ scopeType: AgentMail.ScopeType;
7
+ /**
8
+ * ID of the most specific scope the credential is bound to.
9
+ * Equals inbox_id when scope_type is inbox, pod_id when pod, organization_id when organization.
10
+ */
11
+ scopeId: string;
12
+ organizationId: AgentMail.OrganizationId;
13
+ /** ID of the pod the credential is scoped to. Present when scope_type is pod or inbox. */
14
+ podId?: string;
15
+ /** ID of the inbox the credential is scoped to. Present when scope_type is inbox. */
16
+ inboxId?: string;
17
+ /** ID of the API key used to authenticate. Absent for JWT and proxy credentials. */
18
+ apiKeyId?: string;
19
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ /** The scope tier the authenticated credential is bound to. */
2
+ export declare const ScopeType: {
3
+ readonly Organization: "organization";
4
+ readonly Pod: "pod";
5
+ readonly Inbox: "inbox";
6
+ };
7
+ export type ScopeType = (typeof ScopeType)[keyof typeof ScopeType];
@@ -0,0 +1,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** The scope tier the authenticated credential is bound to. */
3
+ export const ScopeType = {
4
+ Organization: "organization",
5
+ Pod: "pod",
6
+ Inbox: "inbox",
7
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./Identity.mjs";
2
+ export * from "./ScopeType.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./Identity.mjs";
2
+ export * from "./ScopeType.mjs";
@@ -11,6 +11,12 @@ export declare class MessagesClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<MessagesClient.Options>;
12
12
  constructor(options?: MessagesClient.Options);
13
13
  /**
14
+ * Lists messages in the inbox, most recent first. Pass `from`, `to`, 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 sender, recipients, subject, and message body, use
18
+ * `Search Messages`.
19
+ *
14
20
  * **CLI:**
15
21
  * ```bash
16
22
  * agentmail inboxes:messages list --inbox-id <inbox_id>
@@ -27,6 +33,26 @@ export declare class MessagesClient {
27
33
  */
28
34
  list(inbox_id: AgentMail.inboxes.InboxId, request?: AgentMail.inboxes.ListMessagesRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListMessagesResponse>;
29
35
  private __list;
36
+ /**
37
+ * Full-text search across messages in the inbox, ranked by relevance. The
38
+ * query is matched against the sender, recipients, and subject (substring)
39
+ * and the message body (tokenized full text). Spam, trash, blocked, and
40
+ * unauthenticated messages are always excluded. `limit` cannot exceed 100.
41
+ *
42
+ * @param {AgentMail.inboxes.InboxId} inbox_id
43
+ * @param {AgentMail.inboxes.SearchMessagesRequest} request
44
+ * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
45
+ *
46
+ * @throws {@link AgentMail.ValidationError}
47
+ * @throws {@link AgentMail.NotFoundError}
48
+ *
49
+ * @example
50
+ * await client.inboxes.messages.search("inbox_id", {
51
+ * q: "q"
52
+ * })
53
+ */
54
+ search(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.SearchMessagesRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.SearchMessagesResponse>;
55
+ private __search;
30
56
  /**
31
57
  * **CLI:**
32
58
  * ```bash
@@ -22,6 +22,12 @@ export class MessagesClient {
22
22
  this._options = normalizeClientOptionsWithAuth(options);
23
23
  }
24
24
  /**
25
+ * Lists messages in the inbox, most recent first. Pass `from`, `to`, 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 sender, recipients, subject, and message body, use
29
+ * `Search Messages`.
30
+ *
25
31
  * **CLI:**
26
32
  * ```bash
27
33
  * agentmail inboxes:messages list --inbox-id <inbox_id>
@@ -42,7 +48,7 @@ export class MessagesClient {
42
48
  __list(inbox_id_1) {
43
49
  return __awaiter(this, arguments, void 0, function* (inbox_id, request = {}, requestOptions) {
44
50
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
45
- const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeUnauthenticated, includeTrash, } = request;
51
+ const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeUnauthenticated, includeTrash, from: from_, to, subject, } = request;
46
52
  const _queryParams = {
47
53
  limit,
48
54
  page_token: pageToken,
@@ -63,6 +69,9 @@ export class MessagesClient {
63
69
  include_blocked: includeBlocked,
64
70
  include_unauthenticated: includeUnauthenticated,
65
71
  include_trash: includeTrash,
72
+ from: from_ != null ? toJson(from_) : undefined,
73
+ to: to != null ? toJson(to) : undefined,
74
+ subject: subject != null ? toJson(subject) : undefined,
66
75
  };
67
76
  const _authRequest = yield this._options.authProvider.getAuthRequest();
68
77
  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 +120,97 @@ export class MessagesClient {
111
120
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/inboxes/{inbox_id}/messages");
112
121
  });
113
122
  }
123
+ /**
124
+ * Full-text search across messages in the inbox, ranked by relevance. The
125
+ * query is matched against the sender, recipients, and subject (substring)
126
+ * and the message body (tokenized full text). Spam, trash, blocked, and
127
+ * unauthenticated messages are always excluded. `limit` cannot exceed 100.
128
+ *
129
+ * @param {AgentMail.inboxes.InboxId} inbox_id
130
+ * @param {AgentMail.inboxes.SearchMessagesRequest} request
131
+ * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
132
+ *
133
+ * @throws {@link AgentMail.ValidationError}
134
+ * @throws {@link AgentMail.NotFoundError}
135
+ *
136
+ * @example
137
+ * await client.inboxes.messages.search("inbox_id", {
138
+ * q: "q"
139
+ * })
140
+ */
141
+ search(inbox_id, request, requestOptions) {
142
+ return core.HttpResponsePromise.fromPromise(this.__search(inbox_id, request, requestOptions));
143
+ }
144
+ __search(inbox_id, request, requestOptions) {
145
+ return __awaiter(this, void 0, void 0, function* () {
146
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
147
+ const { q, limit, pageToken, before, after } = request;
148
+ const _queryParams = {
149
+ q,
150
+ limit,
151
+ page_token: pageToken,
152
+ before: before != null
153
+ ? serializers.Before.jsonOrThrow(before, { unrecognizedObjectKeys: "strip", omitUndefined: true })
154
+ : undefined,
155
+ after: after != null
156
+ ? serializers.After.jsonOrThrow(after, { unrecognizedObjectKeys: "strip", omitUndefined: true })
157
+ : undefined,
158
+ };
159
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
160
+ 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);
161
+ const _response = yield core.fetcher({
162
+ 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)
163
+ .http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/messages/search`),
164
+ method: "GET",
165
+ headers: _headers,
166
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
167
+ 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,
168
+ 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,
169
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
170
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
171
+ logging: this._options.logging,
172
+ });
173
+ if (_response.ok) {
174
+ return {
175
+ data: serializers.SearchMessagesResponse.parseOrThrow(_response.body, {
176
+ unrecognizedObjectKeys: "passthrough",
177
+ allowUnrecognizedUnionMembers: true,
178
+ allowUnrecognizedEnumValues: true,
179
+ skipValidation: true,
180
+ breadcrumbsPrefix: ["response"],
181
+ }),
182
+ rawResponse: _response.rawResponse,
183
+ };
184
+ }
185
+ if (_response.error.reason === "status-code") {
186
+ switch (_response.error.statusCode) {
187
+ case 400:
188
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
189
+ unrecognizedObjectKeys: "passthrough",
190
+ allowUnrecognizedUnionMembers: true,
191
+ allowUnrecognizedEnumValues: true,
192
+ skipValidation: true,
193
+ breadcrumbsPrefix: ["response"],
194
+ }), _response.rawResponse);
195
+ case 404:
196
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
197
+ unrecognizedObjectKeys: "passthrough",
198
+ allowUnrecognizedUnionMembers: true,
199
+ allowUnrecognizedEnumValues: true,
200
+ skipValidation: true,
201
+ breadcrumbsPrefix: ["response"],
202
+ }), _response.rawResponse);
203
+ default:
204
+ throw new errors.AgentMailError({
205
+ statusCode: _response.error.statusCode,
206
+ body: _response.error.body,
207
+ rawResponse: _response.rawResponse,
208
+ });
209
+ }
210
+ }
211
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/inboxes/{inbox_id}/messages/search");
212
+ });
213
+ }
114
214
  /**
115
215
  * **CLI:**
116
216
  * ```bash
@@ -14,4 +14,10 @@ export interface ListMessagesRequest {
14
14
  includeBlocked?: AgentMail.IncludeBlocked;
15
15
  includeUnauthenticated?: AgentMail.IncludeUnauthenticated;
16
16
  includeTrash?: AgentMail.IncludeTrash;
17
+ /** Filter to messages whose sender contains this value (substring match). Repeatable; all values must match. */
18
+ from?: string[];
19
+ /** Filter to messages whose recipients (to, cc, or bcc) contain this value (substring match). Repeatable; all values must match. */
20
+ to?: string[];
21
+ /** Filter to messages 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 SearchMessagesRequest {
9
+ q: AgentMail.Query;
10
+ limit?: AgentMail.Limit;
11
+ pageToken?: AgentMail.PageToken;
12
+ before?: AgentMail.Before;
13
+ after?: AgentMail.After;
14
+ }