agentmail 0.4.18 → 0.4.19

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 (166) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/domains/client/Client.d.ts +1 -1
  3. package/dist/cjs/api/resources/domains/client/Client.js +1 -1
  4. package/dist/cjs/api/resources/drafts/client/Client.d.ts +1 -1
  5. package/dist/cjs/api/resources/drafts/client/Client.js +1 -1
  6. package/dist/cjs/api/resources/inboxEvents/exports.d.ts +1 -0
  7. package/dist/cjs/api/resources/inboxEvents/exports.js +18 -0
  8. package/dist/cjs/api/resources/inboxEvents/index.d.ts +1 -0
  9. package/dist/cjs/api/resources/inboxEvents/index.js +17 -0
  10. package/dist/cjs/api/resources/inboxEvents/types/InboxEvent.d.ts +17 -0
  11. package/dist/cjs/api/resources/inboxEvents/types/InboxEvent.js +3 -0
  12. package/dist/cjs/api/resources/inboxEvents/types/InboxEventId.d.ts +4 -0
  13. package/dist/cjs/api/resources/inboxEvents/types/InboxEventId.js +3 -0
  14. package/dist/cjs/api/resources/inboxEvents/types/InboxEventType.d.ts +6 -0
  15. package/dist/cjs/api/resources/inboxEvents/types/InboxEventType.js +9 -0
  16. package/dist/cjs/api/resources/inboxEvents/types/ListInboxEventsResponse.d.ts +8 -0
  17. package/dist/cjs/api/resources/inboxEvents/types/ListInboxEventsResponse.js +3 -0
  18. package/dist/cjs/api/resources/inboxEvents/types/index.d.ts +4 -0
  19. package/dist/cjs/api/resources/inboxEvents/types/index.js +20 -0
  20. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +4 -1
  21. package/dist/cjs/api/resources/inboxes/client/Client.js +14 -9
  22. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +1 -1
  23. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +1 -1
  24. package/dist/cjs/api/resources/inboxes/resources/events/client/Client.d.ts +32 -0
  25. package/dist/cjs/api/resources/inboxes/resources/events/client/Client.js +136 -0
  26. package/dist/cjs/api/resources/inboxes/resources/events/client/index.d.ts +1 -0
  27. package/dist/cjs/api/resources/inboxes/resources/events/client/index.js +17 -0
  28. package/dist/cjs/api/resources/inboxes/resources/events/client/requests/ListInboxEventsRequest.d.ts +10 -0
  29. package/dist/cjs/api/resources/inboxes/resources/events/client/requests/ListInboxEventsRequest.js +3 -0
  30. package/dist/cjs/api/resources/inboxes/resources/events/client/requests/index.d.ts +1 -0
  31. package/dist/cjs/api/resources/inboxes/resources/events/client/requests/index.js +2 -0
  32. package/dist/cjs/api/resources/inboxes/resources/events/exports.d.ts +2 -0
  33. package/dist/cjs/api/resources/inboxes/resources/events/exports.js +21 -0
  34. package/dist/cjs/api/resources/inboxes/resources/events/index.d.ts +1 -0
  35. package/dist/cjs/api/resources/inboxes/resources/events/index.js +17 -0
  36. package/dist/cjs/api/resources/inboxes/resources/index.d.ts +2 -0
  37. package/dist/cjs/api/resources/inboxes/resources/index.js +3 -1
  38. package/dist/cjs/api/resources/inboxes/resources/lists/client/Client.d.ts +1 -1
  39. package/dist/cjs/api/resources/inboxes/resources/lists/client/Client.js +1 -1
  40. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +1 -1
  41. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +1 -1
  42. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +1 -1
  43. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +1 -1
  44. package/dist/cjs/api/resources/index.d.ts +2 -0
  45. package/dist/cjs/api/resources/index.js +3 -1
  46. package/dist/cjs/api/resources/lists/client/Client.d.ts +1 -1
  47. package/dist/cjs/api/resources/lists/client/Client.js +1 -1
  48. package/dist/cjs/api/resources/organizations/client/Client.d.ts +6 -1
  49. package/dist/cjs/api/resources/organizations/client/Client.js +6 -1
  50. package/dist/cjs/api/resources/pods/client/Client.d.ts +1 -1
  51. package/dist/cjs/api/resources/pods/client/Client.js +1 -1
  52. package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +1 -1
  53. package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +1 -1
  54. package/dist/cjs/api/resources/pods/resources/drafts/client/Client.d.ts +1 -1
  55. package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +1 -1
  56. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +1 -1
  57. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +1 -1
  58. package/dist/cjs/api/resources/pods/resources/lists/client/Client.d.ts +1 -1
  59. package/dist/cjs/api/resources/pods/resources/lists/client/Client.js +1 -1
  60. package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +1 -1
  61. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +1 -1
  62. package/dist/cjs/api/resources/threads/client/Client.d.ts +2 -2
  63. package/dist/cjs/api/resources/threads/client/Client.js +2 -2
  64. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +1 -1
  65. package/dist/cjs/api/resources/webhooks/client/Client.js +1 -1
  66. package/dist/cjs/serialization/resources/inboxEvents/index.d.ts +1 -0
  67. package/dist/cjs/serialization/resources/inboxEvents/index.js +17 -0
  68. package/dist/cjs/serialization/resources/inboxEvents/types/InboxEvent.d.ts +21 -0
  69. package/dist/cjs/serialization/resources/inboxEvents/types/InboxEvent.js +53 -0
  70. package/dist/cjs/serialization/resources/inboxEvents/types/InboxEventId.d.ts +7 -0
  71. package/dist/cjs/serialization/resources/inboxEvents/types/InboxEventId.js +39 -0
  72. package/dist/cjs/serialization/resources/inboxEvents/types/InboxEventType.d.ts +7 -0
  73. package/dist/cjs/serialization/resources/inboxEvents/types/InboxEventType.js +39 -0
  74. package/dist/cjs/serialization/resources/inboxEvents/types/ListInboxEventsResponse.d.ts +16 -0
  75. package/dist/cjs/serialization/resources/inboxEvents/types/ListInboxEventsResponse.js +48 -0
  76. package/dist/cjs/serialization/resources/inboxEvents/types/index.d.ts +4 -0
  77. package/dist/cjs/serialization/resources/inboxEvents/types/index.js +20 -0
  78. package/dist/cjs/serialization/resources/index.d.ts +2 -0
  79. package/dist/cjs/serialization/resources/index.js +3 -1
  80. package/dist/cjs/version.d.ts +1 -1
  81. package/dist/cjs/version.js +1 -1
  82. package/dist/esm/BaseClient.mjs +2 -2
  83. package/dist/esm/api/resources/domains/client/Client.d.mts +1 -1
  84. package/dist/esm/api/resources/domains/client/Client.mjs +1 -1
  85. package/dist/esm/api/resources/drafts/client/Client.d.mts +1 -1
  86. package/dist/esm/api/resources/drafts/client/Client.mjs +1 -1
  87. package/dist/esm/api/resources/inboxEvents/exports.d.mts +1 -0
  88. package/dist/esm/api/resources/inboxEvents/exports.mjs +2 -0
  89. package/dist/esm/api/resources/inboxEvents/index.d.mts +1 -0
  90. package/dist/esm/api/resources/inboxEvents/index.mjs +1 -0
  91. package/dist/esm/api/resources/inboxEvents/types/InboxEvent.d.mts +17 -0
  92. package/dist/esm/api/resources/inboxEvents/types/InboxEvent.mjs +2 -0
  93. package/dist/esm/api/resources/inboxEvents/types/InboxEventId.d.mts +4 -0
  94. package/dist/esm/api/resources/inboxEvents/types/InboxEventId.mjs +2 -0
  95. package/dist/esm/api/resources/inboxEvents/types/InboxEventType.d.mts +6 -0
  96. package/dist/esm/api/resources/inboxEvents/types/InboxEventType.mjs +6 -0
  97. package/dist/esm/api/resources/inboxEvents/types/ListInboxEventsResponse.d.mts +8 -0
  98. package/dist/esm/api/resources/inboxEvents/types/ListInboxEventsResponse.mjs +2 -0
  99. package/dist/esm/api/resources/inboxEvents/types/index.d.mts +4 -0
  100. package/dist/esm/api/resources/inboxEvents/types/index.mjs +4 -0
  101. package/dist/esm/api/resources/inboxes/client/Client.d.mts +4 -1
  102. package/dist/esm/api/resources/inboxes/client/Client.mjs +6 -1
  103. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +1 -1
  104. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +1 -1
  105. package/dist/esm/api/resources/inboxes/resources/events/client/Client.d.mts +32 -0
  106. package/dist/esm/api/resources/inboxes/resources/events/client/Client.mjs +99 -0
  107. package/dist/esm/api/resources/inboxes/resources/events/client/index.d.mts +1 -0
  108. package/dist/esm/api/resources/inboxes/resources/events/client/index.mjs +1 -0
  109. package/dist/esm/api/resources/inboxes/resources/events/client/requests/ListInboxEventsRequest.d.mts +10 -0
  110. package/dist/esm/api/resources/inboxes/resources/events/client/requests/ListInboxEventsRequest.mjs +2 -0
  111. package/dist/esm/api/resources/inboxes/resources/events/client/requests/index.d.mts +1 -0
  112. package/dist/esm/api/resources/inboxes/resources/events/client/requests/index.mjs +1 -0
  113. package/dist/esm/api/resources/inboxes/resources/events/exports.d.mts +2 -0
  114. package/dist/esm/api/resources/inboxes/resources/events/exports.mjs +3 -0
  115. package/dist/esm/api/resources/inboxes/resources/events/index.d.mts +1 -0
  116. package/dist/esm/api/resources/inboxes/resources/events/index.mjs +1 -0
  117. package/dist/esm/api/resources/inboxes/resources/index.d.mts +2 -0
  118. package/dist/esm/api/resources/inboxes/resources/index.mjs +2 -0
  119. package/dist/esm/api/resources/inboxes/resources/lists/client/Client.d.mts +1 -1
  120. package/dist/esm/api/resources/inboxes/resources/lists/client/Client.mjs +1 -1
  121. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +1 -1
  122. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +1 -1
  123. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +1 -1
  124. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +1 -1
  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/lists/client/Client.d.mts +1 -1
  128. package/dist/esm/api/resources/lists/client/Client.mjs +1 -1
  129. package/dist/esm/api/resources/organizations/client/Client.d.mts +6 -1
  130. package/dist/esm/api/resources/organizations/client/Client.mjs +6 -1
  131. package/dist/esm/api/resources/pods/client/Client.d.mts +1 -1
  132. package/dist/esm/api/resources/pods/client/Client.mjs +1 -1
  133. package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +1 -1
  134. package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +1 -1
  135. package/dist/esm/api/resources/pods/resources/drafts/client/Client.d.mts +1 -1
  136. package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +1 -1
  137. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +1 -1
  138. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +1 -1
  139. package/dist/esm/api/resources/pods/resources/lists/client/Client.d.mts +1 -1
  140. package/dist/esm/api/resources/pods/resources/lists/client/Client.mjs +1 -1
  141. package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +1 -1
  142. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +1 -1
  143. package/dist/esm/api/resources/threads/client/Client.d.mts +2 -2
  144. package/dist/esm/api/resources/threads/client/Client.mjs +2 -2
  145. package/dist/esm/api/resources/webhooks/client/Client.d.mts +1 -1
  146. package/dist/esm/api/resources/webhooks/client/Client.mjs +1 -1
  147. package/dist/esm/serialization/resources/inboxEvents/index.d.mts +1 -0
  148. package/dist/esm/serialization/resources/inboxEvents/index.mjs +1 -0
  149. package/dist/esm/serialization/resources/inboxEvents/types/InboxEvent.d.mts +21 -0
  150. package/dist/esm/serialization/resources/inboxEvents/types/InboxEvent.mjs +17 -0
  151. package/dist/esm/serialization/resources/inboxEvents/types/InboxEventId.d.mts +7 -0
  152. package/dist/esm/serialization/resources/inboxEvents/types/InboxEventId.mjs +3 -0
  153. package/dist/esm/serialization/resources/inboxEvents/types/InboxEventType.d.mts +7 -0
  154. package/dist/esm/serialization/resources/inboxEvents/types/InboxEventType.mjs +3 -0
  155. package/dist/esm/serialization/resources/inboxEvents/types/ListInboxEventsResponse.d.mts +16 -0
  156. package/dist/esm/serialization/resources/inboxEvents/types/ListInboxEventsResponse.mjs +12 -0
  157. package/dist/esm/serialization/resources/inboxEvents/types/index.d.mts +4 -0
  158. package/dist/esm/serialization/resources/inboxEvents/types/index.mjs +4 -0
  159. package/dist/esm/serialization/resources/index.d.mts +2 -0
  160. package/dist/esm/serialization/resources/index.mjs +2 -0
  161. package/dist/esm/version.d.mts +1 -1
  162. package/dist/esm/version.mjs +1 -1
  163. package/dist/llms-full.txt +912 -362
  164. package/dist/llms.txt +9 -1
  165. package/package.json +12 -1
  166. package/reference.md +100 -18
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "agentmail",
46
- "X-Fern-SDK-Version": "0.4.18",
47
- "User-Agent": "agentmail/0.4.18",
46
+ "X-Fern-SDK-Version": "0.4.19",
47
+ "User-Agent": "agentmail/0.4.19",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -27,7 +27,7 @@ export declare class DomainsClient {
27
27
  /**
28
28
  * **CLI:**
29
29
  * ```bash
30
- * agentmail domains retrieve --domain-id <domain_id>
30
+ * agentmail domains get --domain-id <domain_id>
31
31
  * ```
32
32
  *
33
33
  * @param {AgentMail.DomainId} domain_id
@@ -119,7 +119,7 @@ class DomainsClient {
119
119
  /**
120
120
  * **CLI:**
121
121
  * ```bash
122
- * agentmail domains retrieve --domain-id <domain_id>
122
+ * agentmail domains get --domain-id <domain_id>
123
123
  * ```
124
124
  *
125
125
  * @param {AgentMail.DomainId} domain_id
@@ -29,7 +29,7 @@ export declare class DraftsClient {
29
29
  /**
30
30
  * **CLI:**
31
31
  * ```bash
32
- * agentmail drafts retrieve --draft-id <draft_id>
32
+ * agentmail drafts get --draft-id <draft_id>
33
33
  * ```
34
34
  *
35
35
  * @param {AgentMail.DraftId} draft_id
@@ -145,7 +145,7 @@ class DraftsClient {
145
145
  /**
146
146
  * **CLI:**
147
147
  * ```bash
148
- * agentmail drafts retrieve --draft-id <draft_id>
148
+ * agentmail drafts get --draft-id <draft_id>
149
149
  * ```
150
150
  *
151
151
  * @param {AgentMail.DraftId} draft_id
@@ -0,0 +1 @@
1
+ export * from "./index.js";
@@ -0,0 +1,18 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ __exportStar(require("./index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./types/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,17 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ export interface InboxEvent {
3
+ organizationId: AgentMail.OrganizationId;
4
+ /** ID of pod. */
5
+ podId: string;
6
+ inboxId: AgentMail.inboxes.InboxId;
7
+ eventId: AgentMail.InboxEventId;
8
+ eventType: AgentMail.InboxEventType;
9
+ /** ID of message. */
10
+ messageId: string;
11
+ /** Label added or removed. */
12
+ label: string;
13
+ /** Time at which the event occurred. */
14
+ eventAt: Date;
15
+ /** Time at which the event was recorded. */
16
+ createdAt: Date;
17
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ /**
2
+ * ID of event.
3
+ */
4
+ export type InboxEventId = string;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /** Type of inbox event. */
2
+ export declare const InboxEventType: {
3
+ readonly LabelAdded: "label_added";
4
+ readonly LabelRemoved: "label_removed";
5
+ };
6
+ export type InboxEventType = (typeof InboxEventType)[keyof typeof InboxEventType];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.InboxEventType = void 0;
5
+ /** Type of inbox event. */
6
+ exports.InboxEventType = {
7
+ LabelAdded: "label_added",
8
+ LabelRemoved: "label_removed",
9
+ };
@@ -0,0 +1,8 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ export interface ListInboxEventsResponse {
3
+ count: AgentMail.Count;
4
+ limit?: AgentMail.Limit;
5
+ nextPageToken?: AgentMail.PageToken;
6
+ /** Ordered by `event_id` descending. */
7
+ events: AgentMail.InboxEvent[];
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export * from "./InboxEvent.js";
2
+ export * from "./InboxEventId.js";
3
+ export * from "./InboxEventType.js";
4
+ export * from "./ListInboxEventsResponse.js";
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./InboxEvent.js"), exports);
18
+ __exportStar(require("./InboxEventId.js"), exports);
19
+ __exportStar(require("./InboxEventType.js"), exports);
20
+ __exportStar(require("./ListInboxEventsResponse.js"), exports);
@@ -4,6 +4,7 @@ import * as core from "../../../../core/index.js";
4
4
  import * as AgentMail from "../../../index.js";
5
5
  import { ApiKeysClient } from "../resources/apiKeys/client/Client.js";
6
6
  import { DraftsClient } from "../resources/drafts/client/Client.js";
7
+ import { EventsClient } from "../resources/events/client/Client.js";
7
8
  import { ListsClient } from "../resources/lists/client/Client.js";
8
9
  import { MessagesClient } from "../resources/messages/client/Client.js";
9
10
  import { MetricsClient } from "../resources/metrics/client/Client.js";
@@ -20,6 +21,7 @@ export declare class InboxesClient {
20
21
  protected _drafts: DraftsClient | undefined;
21
22
  protected _lists: ListsClient | undefined;
22
23
  protected _metrics: MetricsClient | undefined;
24
+ protected _events: EventsClient | undefined;
23
25
  protected _apiKeys: ApiKeysClient | undefined;
24
26
  constructor(options?: InboxesClient.Options);
25
27
  get threads(): ThreadsClient;
@@ -27,6 +29,7 @@ export declare class InboxesClient {
27
29
  get drafts(): DraftsClient;
28
30
  get lists(): ListsClient;
29
31
  get metrics(): MetricsClient;
32
+ get events(): EventsClient;
30
33
  get apiKeys(): ApiKeysClient;
31
34
  /**
32
35
  * **CLI:**
@@ -45,7 +48,7 @@ export declare class InboxesClient {
45
48
  /**
46
49
  * **CLI:**
47
50
  * ```bash
48
- * agentmail inboxes retrieve --inbox-id <inbox_id>
51
+ * agentmail inboxes get --inbox-id <inbox_id>
49
52
  * ```
50
53
  *
51
54
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -54,21 +54,22 @@ const serializers = __importStar(require("../../../../serialization/index.js"));
54
54
  const AgentMail = __importStar(require("../../../index.js"));
55
55
  const Client_js_1 = require("../resources/apiKeys/client/Client.js");
56
56
  const Client_js_2 = require("../resources/drafts/client/Client.js");
57
- const Client_js_3 = require("../resources/lists/client/Client.js");
58
- const Client_js_4 = require("../resources/messages/client/Client.js");
59
- const Client_js_5 = require("../resources/metrics/client/Client.js");
60
- const Client_js_6 = require("../resources/threads/client/Client.js");
57
+ const Client_js_3 = require("../resources/events/client/Client.js");
58
+ const Client_js_4 = require("../resources/lists/client/Client.js");
59
+ const Client_js_5 = require("../resources/messages/client/Client.js");
60
+ const Client_js_6 = require("../resources/metrics/client/Client.js");
61
+ const Client_js_7 = require("../resources/threads/client/Client.js");
61
62
  class InboxesClient {
62
63
  constructor(options = {}) {
63
64
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
64
65
  }
65
66
  get threads() {
66
67
  var _a;
67
- return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new Client_js_6.ThreadsClient(this._options)));
68
+ return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new Client_js_7.ThreadsClient(this._options)));
68
69
  }
69
70
  get messages() {
70
71
  var _a;
71
- return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_js_4.MessagesClient(this._options)));
72
+ return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_js_5.MessagesClient(this._options)));
72
73
  }
73
74
  get drafts() {
74
75
  var _a;
@@ -76,11 +77,15 @@ class InboxesClient {
76
77
  }
77
78
  get lists() {
78
79
  var _a;
79
- return ((_a = this._lists) !== null && _a !== void 0 ? _a : (this._lists = new Client_js_3.ListsClient(this._options)));
80
+ return ((_a = this._lists) !== null && _a !== void 0 ? _a : (this._lists = new Client_js_4.ListsClient(this._options)));
80
81
  }
81
82
  get metrics() {
82
83
  var _a;
83
- return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new Client_js_5.MetricsClient(this._options)));
84
+ return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new Client_js_6.MetricsClient(this._options)));
85
+ }
86
+ get events() {
87
+ var _a;
88
+ return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_js_3.EventsClient(this._options)));
84
89
  }
85
90
  get apiKeys() {
86
91
  var _a;
@@ -149,7 +154,7 @@ class InboxesClient {
149
154
  /**
150
155
  * **CLI:**
151
156
  * ```bash
152
- * agentmail inboxes retrieve --inbox-id <inbox_id>
157
+ * agentmail inboxes get --inbox-id <inbox_id>
153
158
  * ```
154
159
  *
155
160
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -30,7 +30,7 @@ export declare class DraftsClient {
30
30
  /**
31
31
  * **CLI:**
32
32
  * ```bash
33
- * agentmail inboxes:drafts retrieve --inbox-id <inbox_id> --draft-id <draft_id>
33
+ * agentmail inboxes:drafts get --inbox-id <inbox_id> --draft-id <draft_id>
34
34
  * ```
35
35
  *
36
36
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -146,7 +146,7 @@ class DraftsClient {
146
146
  /**
147
147
  * **CLI:**
148
148
  * ```bash
149
- * agentmail inboxes:drafts retrieve --inbox-id <inbox_id> --draft-id <draft_id>
149
+ * agentmail inboxes:drafts get --inbox-id <inbox_id> --draft-id <draft_id>
150
150
  * ```
151
151
  *
152
152
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -0,0 +1,32 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
+ import * as core from "../../../../../../core/index.js";
4
+ import * as AgentMail from "../../../../../index.js";
5
+ export declare namespace EventsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class EventsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<EventsClient.Options>;
12
+ constructor(options?: EventsClient.Options);
13
+ /**
14
+ * List label change events for an inbox. Returns events in reverse chronological order by default. Use for IMAP UID projection or audit logging.
15
+ *
16
+ * **CLI:**
17
+ * ```bash
18
+ * agentmail inboxes:events list --inbox-id <inbox_id>
19
+ * ```
20
+ *
21
+ * @param {AgentMail.inboxes.InboxId} inbox_id
22
+ * @param {AgentMail.inboxes.ListInboxEventsRequest} request
23
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
24
+ *
25
+ * @throws {@link AgentMail.NotFoundError}
26
+ *
27
+ * @example
28
+ * await client.inboxes.events.list("inbox_id")
29
+ */
30
+ list(inbox_id: AgentMail.inboxes.InboxId, request?: AgentMail.inboxes.ListInboxEventsRequest, requestOptions?: EventsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListInboxEventsResponse>;
31
+ private __list;
32
+ }
@@ -0,0 +1,136 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.EventsClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../../../errors/index.js"));
53
+ const serializers = __importStar(require("../../../../../../serialization/index.js"));
54
+ const AgentMail = __importStar(require("../../../../../index.js"));
55
+ class EventsClient {
56
+ constructor(options = {}) {
57
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
58
+ }
59
+ /**
60
+ * List label change events for an inbox. Returns events in reverse chronological order by default. Use for IMAP UID projection or audit logging.
61
+ *
62
+ * **CLI:**
63
+ * ```bash
64
+ * agentmail inboxes:events list --inbox-id <inbox_id>
65
+ * ```
66
+ *
67
+ * @param {AgentMail.inboxes.InboxId} inbox_id
68
+ * @param {AgentMail.inboxes.ListInboxEventsRequest} request
69
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
70
+ *
71
+ * @throws {@link AgentMail.NotFoundError}
72
+ *
73
+ * @example
74
+ * await client.inboxes.events.list("inbox_id")
75
+ */
76
+ list(inbox_id, request = {}, requestOptions) {
77
+ return core.HttpResponsePromise.fromPromise(this.__list(inbox_id, request, requestOptions));
78
+ }
79
+ __list(inbox_id_1) {
80
+ return __awaiter(this, arguments, void 0, function* (inbox_id, request = {}, requestOptions) {
81
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
82
+ const { limit, pageToken, ascending } = request;
83
+ const _queryParams = {
84
+ limit,
85
+ page_token: pageToken,
86
+ ascending,
87
+ };
88
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
89
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
90
+ const _response = yield core.fetcher({
91
+ 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)
92
+ .http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/events`),
93
+ method: "GET",
94
+ headers: _headers,
95
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
96
+ 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,
97
+ 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,
98
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
99
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
100
+ logging: this._options.logging,
101
+ });
102
+ if (_response.ok) {
103
+ return {
104
+ data: serializers.ListInboxEventsResponse.parseOrThrow(_response.body, {
105
+ unrecognizedObjectKeys: "passthrough",
106
+ allowUnrecognizedUnionMembers: true,
107
+ allowUnrecognizedEnumValues: true,
108
+ skipValidation: true,
109
+ breadcrumbsPrefix: ["response"],
110
+ }),
111
+ rawResponse: _response.rawResponse,
112
+ };
113
+ }
114
+ if (_response.error.reason === "status-code") {
115
+ switch (_response.error.statusCode) {
116
+ case 404:
117
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
118
+ unrecognizedObjectKeys: "passthrough",
119
+ allowUnrecognizedUnionMembers: true,
120
+ allowUnrecognizedEnumValues: true,
121
+ skipValidation: true,
122
+ breadcrumbsPrefix: ["response"],
123
+ }), _response.rawResponse);
124
+ default:
125
+ throw new errors.AgentMailError({
126
+ statusCode: _response.error.statusCode,
127
+ body: _response.error.body,
128
+ rawResponse: _response.rawResponse,
129
+ });
130
+ }
131
+ }
132
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/inboxes/{inbox_id}/events");
133
+ });
134
+ }
135
+ }
136
+ exports.EventsClient = EventsClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,10 @@
1
+ import type * as AgentMail from "../../../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface ListInboxEventsRequest {
7
+ limit?: AgentMail.Limit;
8
+ pageToken?: AgentMail.PageToken;
9
+ ascending?: AgentMail.Ascending;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type { ListInboxEventsRequest } from "./ListInboxEventsRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { EventsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.EventsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "EventsClient", { enumerable: true, get: function () { return Client_js_1.EventsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -2,6 +2,8 @@ export * from "./apiKeys/client/requests/index.js";
2
2
  export * as apiKeys from "./apiKeys/index.js";
3
3
  export * from "./drafts/client/requests/index.js";
4
4
  export * as drafts from "./drafts/index.js";
5
+ export * from "./events/client/requests/index.js";
6
+ export * as events from "./events/index.js";
5
7
  export * from "./lists/client/requests/index.js";
6
8
  export * as lists from "./lists/index.js";
7
9
  export * from "./messages/client/requests/index.js";
@@ -36,11 +36,13 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.threads = exports.metrics = exports.messages = exports.lists = exports.drafts = exports.apiKeys = void 0;
39
+ exports.threads = exports.metrics = exports.messages = exports.lists = exports.events = exports.drafts = exports.apiKeys = void 0;
40
40
  __exportStar(require("./apiKeys/client/requests/index.js"), exports);
41
41
  exports.apiKeys = __importStar(require("./apiKeys/index.js"));
42
42
  __exportStar(require("./drafts/client/requests/index.js"), exports);
43
43
  exports.drafts = __importStar(require("./drafts/index.js"));
44
+ __exportStar(require("./events/client/requests/index.js"), exports);
45
+ exports.events = __importStar(require("./events/index.js"));
44
46
  __exportStar(require("./lists/client/requests/index.js"), exports);
45
47
  exports.lists = __importStar(require("./lists/index.js"));
46
48
  __exportStar(require("./messages/client/requests/index.js"), exports);
@@ -30,7 +30,7 @@ export declare class ListsClient {
30
30
  /**
31
31
  * **CLI:**
32
32
  * ```bash
33
- * agentmail inboxes:lists retrieve --inbox-id <inbox_id> --direction <direction> --type <type> --entry <entry>
33
+ * agentmail inboxes:lists get --inbox-id <inbox_id> --direction <direction> --type <type> --entry <entry>
34
34
  * ```
35
35
  *
36
36
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -121,7 +121,7 @@ class ListsClient {
121
121
  /**
122
122
  * **CLI:**
123
123
  * ```bash
124
- * agentmail inboxes:lists retrieve --inbox-id <inbox_id> --direction <direction> --type <type> --entry <entry>
124
+ * agentmail inboxes:lists get --inbox-id <inbox_id> --direction <direction> --type <type> --entry <entry>
125
125
  * ```
126
126
  *
127
127
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -30,7 +30,7 @@ export declare class MessagesClient {
30
30
  /**
31
31
  * **CLI:**
32
32
  * ```bash
33
- * agentmail inboxes:messages retrieve --inbox-id <inbox_id> --message-id <message_id>
33
+ * agentmail inboxes:messages get --inbox-id <inbox_id> --message-id <message_id>
34
34
  * ```
35
35
  *
36
36
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -149,7 +149,7 @@ class MessagesClient {
149
149
  /**
150
150
  * **CLI:**
151
151
  * ```bash
152
- * agentmail inboxes:messages retrieve --inbox-id <inbox_id> --message-id <message_id>
152
+ * agentmail inboxes:messages get --inbox-id <inbox_id> --message-id <message_id>
153
153
  * ```
154
154
  *
155
155
  * @param {AgentMail.inboxes.InboxId} inbox_id