agentmail 0.4.18 → 0.4.20

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 +13 -0
  15. package/dist/cjs/api/resources/inboxEvents/types/InboxEventType.js +16 -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 +13 -0
  96. package/dist/esm/api/resources/inboxEvents/types/InboxEventType.mjs +13 -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 +1005 -827
  164. package/dist/llms.txt +12 -1
  165. package/package.json +12 -1
  166. package/reference.md +100 -18
@@ -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.4.18",
10
- "User-Agent": "agentmail/0.4.18",
9
+ "X-Fern-SDK-Version": "0.4.20",
10
+ "User-Agent": "agentmail/0.4.20",
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);
@@ -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
@@ -83,7 +83,7 @@ export class DomainsClient {
83
83
  /**
84
84
  * **CLI:**
85
85
  * ```bash
86
- * agentmail domains retrieve --domain-id <domain_id>
86
+ * agentmail domains get --domain-id <domain_id>
87
87
  * ```
88
88
  *
89
89
  * @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
@@ -109,7 +109,7 @@ export class DraftsClient {
109
109
  /**
110
110
  * **CLI:**
111
111
  * ```bash
112
- * agentmail drafts retrieve --draft-id <draft_id>
112
+ * agentmail drafts get --draft-id <draft_id>
113
113
  * ```
114
114
  *
115
115
  * @param {AgentMail.DraftId} draft_id
@@ -0,0 +1 @@
1
+ export * from "./index.mjs";
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export * from "./index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./types/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./types/index.mjs";
@@ -0,0 +1,17 @@
1
+ import type * as AgentMail from "../../../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * ID of event.
3
+ */
4
+ export type InboxEventId = string;
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Type of inbox event. Wire format is dot.case to match the
3
+ * convention used by webhook events (`message.received`,
4
+ * `domain.verified`, etc. in events.yml). Pre-2026-04 these were
5
+ * `label_added`/`label_removed` (snake_case). The Fern enum's `name`
6
+ * field stays uppercase-snake (Fern convention); only the wire
7
+ * `value` changed.
8
+ */
9
+ export declare const InboxEventType: {
10
+ readonly LabelAdded: "label.added";
11
+ readonly LabelRemoved: "label.removed";
12
+ };
13
+ export type InboxEventType = (typeof InboxEventType)[keyof typeof InboxEventType];
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /**
3
+ * Type of inbox event. Wire format is dot.case to match the
4
+ * convention used by webhook events (`message.received`,
5
+ * `domain.verified`, etc. in events.yml). Pre-2026-04 these were
6
+ * `label_added`/`label_removed` (snake_case). The Fern enum's `name`
7
+ * field stays uppercase-snake (Fern convention); only the wire
8
+ * `value` changed.
9
+ */
10
+ export const InboxEventType = {
11
+ LabelAdded: "label.added",
12
+ LabelRemoved: "label.removed",
13
+ };
@@ -0,0 +1,8 @@
1
+ import type * as AgentMail from "../../../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from "./InboxEvent.mjs";
2
+ export * from "./InboxEventId.mjs";
3
+ export * from "./InboxEventType.mjs";
4
+ export * from "./ListInboxEventsResponse.mjs";
@@ -0,0 +1,4 @@
1
+ export * from "./InboxEvent.mjs";
2
+ export * from "./InboxEventId.mjs";
3
+ export * from "./InboxEventType.mjs";
4
+ export * from "./ListInboxEventsResponse.mjs";
@@ -4,6 +4,7 @@ import * as core from "../../../../core/index.mjs";
4
4
  import * as AgentMail from "../../../index.mjs";
5
5
  import { ApiKeysClient } from "../resources/apiKeys/client/Client.mjs";
6
6
  import { DraftsClient } from "../resources/drafts/client/Client.mjs";
7
+ import { EventsClient } from "../resources/events/client/Client.mjs";
7
8
  import { ListsClient } from "../resources/lists/client/Client.mjs";
8
9
  import { MessagesClient } from "../resources/messages/client/Client.mjs";
9
10
  import { MetricsClient } from "../resources/metrics/client/Client.mjs";
@@ -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
@@ -18,6 +18,7 @@ import * as serializers from "../../../../serialization/index.mjs";
18
18
  import * as AgentMail from "../../../index.mjs";
19
19
  import { ApiKeysClient } from "../resources/apiKeys/client/Client.mjs";
20
20
  import { DraftsClient } from "../resources/drafts/client/Client.mjs";
21
+ import { EventsClient } from "../resources/events/client/Client.mjs";
21
22
  import { ListsClient } from "../resources/lists/client/Client.mjs";
22
23
  import { MessagesClient } from "../resources/messages/client/Client.mjs";
23
24
  import { MetricsClient } from "../resources/metrics/client/Client.mjs";
@@ -46,6 +47,10 @@ export class InboxesClient {
46
47
  var _a;
47
48
  return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new MetricsClient(this._options)));
48
49
  }
50
+ get events() {
51
+ var _a;
52
+ return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new EventsClient(this._options)));
53
+ }
49
54
  get apiKeys() {
50
55
  var _a;
51
56
  return ((_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new ApiKeysClient(this._options)));
@@ -113,7 +118,7 @@ export class InboxesClient {
113
118
  /**
114
119
  * **CLI:**
115
120
  * ```bash
116
- * agentmail inboxes retrieve --inbox-id <inbox_id>
121
+ * agentmail inboxes get --inbox-id <inbox_id>
117
122
  * ```
118
123
  *
119
124
  * @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
@@ -110,7 +110,7 @@ export class DraftsClient {
110
110
  /**
111
111
  * **CLI:**
112
112
  * ```bash
113
- * agentmail inboxes:drafts retrieve --inbox-id <inbox_id> --draft-id <draft_id>
113
+ * agentmail inboxes:drafts get --inbox-id <inbox_id> --draft-id <draft_id>
114
114
  * ```
115
115
  *
116
116
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -0,0 +1,32 @@
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 * as AgentMail from "../../../../../index.mjs";
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,99 @@
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
+ import * as AgentMail from "../../../../../index.mjs";
19
+ export class EventsClient {
20
+ constructor(options = {}) {
21
+ this._options = normalizeClientOptionsWithAuth(options);
22
+ }
23
+ /**
24
+ * List label change events for an inbox. Returns events in reverse chronological order by default. Use for IMAP UID projection or audit logging.
25
+ *
26
+ * **CLI:**
27
+ * ```bash
28
+ * agentmail inboxes:events list --inbox-id <inbox_id>
29
+ * ```
30
+ *
31
+ * @param {AgentMail.inboxes.InboxId} inbox_id
32
+ * @param {AgentMail.inboxes.ListInboxEventsRequest} request
33
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
34
+ *
35
+ * @throws {@link AgentMail.NotFoundError}
36
+ *
37
+ * @example
38
+ * await client.inboxes.events.list("inbox_id")
39
+ */
40
+ list(inbox_id, request = {}, requestOptions) {
41
+ return core.HttpResponsePromise.fromPromise(this.__list(inbox_id, request, requestOptions));
42
+ }
43
+ __list(inbox_id_1) {
44
+ return __awaiter(this, arguments, void 0, function* (inbox_id, request = {}, requestOptions) {
45
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
46
+ const { limit, pageToken, ascending } = request;
47
+ const _queryParams = {
48
+ limit,
49
+ page_token: pageToken,
50
+ ascending,
51
+ };
52
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
53
+ 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);
54
+ const _response = yield core.fetcher({
55
+ 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)
56
+ .http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/events`),
57
+ method: "GET",
58
+ headers: _headers,
59
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
60
+ 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,
61
+ 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,
62
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
63
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
64
+ logging: this._options.logging,
65
+ });
66
+ if (_response.ok) {
67
+ return {
68
+ data: serializers.ListInboxEventsResponse.parseOrThrow(_response.body, {
69
+ unrecognizedObjectKeys: "passthrough",
70
+ allowUnrecognizedUnionMembers: true,
71
+ allowUnrecognizedEnumValues: true,
72
+ skipValidation: true,
73
+ breadcrumbsPrefix: ["response"],
74
+ }),
75
+ rawResponse: _response.rawResponse,
76
+ };
77
+ }
78
+ if (_response.error.reason === "status-code") {
79
+ switch (_response.error.statusCode) {
80
+ case 404:
81
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
82
+ unrecognizedObjectKeys: "passthrough",
83
+ allowUnrecognizedUnionMembers: true,
84
+ allowUnrecognizedEnumValues: true,
85
+ skipValidation: true,
86
+ breadcrumbsPrefix: ["response"],
87
+ }), _response.rawResponse);
88
+ default:
89
+ throw new errors.AgentMailError({
90
+ statusCode: _response.error.statusCode,
91
+ body: _response.error.body,
92
+ rawResponse: _response.rawResponse,
93
+ });
94
+ }
95
+ }
96
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/inboxes/{inbox_id}/events");
97
+ });
98
+ }
99
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,10 @@
1
+ import type * as AgentMail from "../../../../../../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { ListInboxEventsRequest } from "./ListInboxEventsRequest.mjs";
@@ -0,0 +1,2 @@
1
+ export { EventsClient } 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 { EventsClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -2,6 +2,8 @@ export * from "./apiKeys/client/requests/index.mjs";
2
2
  export * as apiKeys from "./apiKeys/index.mjs";
3
3
  export * from "./drafts/client/requests/index.mjs";
4
4
  export * as drafts from "./drafts/index.mjs";
5
+ export * from "./events/client/requests/index.mjs";
6
+ export * as events from "./events/index.mjs";
5
7
  export * from "./lists/client/requests/index.mjs";
6
8
  export * as lists from "./lists/index.mjs";
7
9
  export * from "./messages/client/requests/index.mjs";
@@ -2,6 +2,8 @@ export * from "./apiKeys/client/requests/index.mjs";
2
2
  export * as apiKeys from "./apiKeys/index.mjs";
3
3
  export * from "./drafts/client/requests/index.mjs";
4
4
  export * as drafts from "./drafts/index.mjs";
5
+ export * from "./events/client/requests/index.mjs";
6
+ export * as events from "./events/index.mjs";
5
7
  export * from "./lists/client/requests/index.mjs";
6
8
  export * as lists from "./lists/index.mjs";
7
9
  export * from "./messages/client/requests/index.mjs";
@@ -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
@@ -85,7 +85,7 @@ export class ListsClient {
85
85
  /**
86
86
  * **CLI:**
87
87
  * ```bash
88
- * agentmail inboxes:lists retrieve --inbox-id <inbox_id> --direction <direction> --type <type> --entry <entry>
88
+ * agentmail inboxes:lists get --inbox-id <inbox_id> --direction <direction> --type <type> --entry <entry>
89
89
  * ```
90
90
  *
91
91
  * @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
@@ -113,7 +113,7 @@ export class MessagesClient {
113
113
  /**
114
114
  * **CLI:**
115
115
  * ```bash
116
- * agentmail inboxes:messages retrieve --inbox-id <inbox_id> --message-id <message_id>
116
+ * agentmail inboxes:messages get --inbox-id <inbox_id> --message-id <message_id>
117
117
  * ```
118
118
  *
119
119
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -30,7 +30,7 @@ export declare class ThreadsClient {
30
30
  /**
31
31
  * **CLI:**
32
32
  * ```bash
33
- * agentmail inboxes:threads retrieve --inbox-id <inbox_id> --thread-id <thread_id>
33
+ * agentmail inboxes:threads get --inbox-id <inbox_id> --thread-id <thread_id>
34
34
  * ```
35
35
  *
36
36
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -113,7 +113,7 @@ export class ThreadsClient {
113
113
  /**
114
114
  * **CLI:**
115
115
  * ```bash
116
- * agentmail inboxes:threads retrieve --inbox-id <inbox_id> --thread-id <thread_id>
116
+ * agentmail inboxes:threads get --inbox-id <inbox_id> --thread-id <thread_id>
117
117
  * ```
118
118
  *
119
119
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -13,6 +13,8 @@ export * as drafts from "./drafts/index.mjs";
13
13
  export * from "./drafts/types/index.mjs";
14
14
  export * as events from "./events/index.mjs";
15
15
  export * from "./events/types/index.mjs";
16
+ export * as inboxEvents from "./inboxEvents/index.mjs";
17
+ export * from "./inboxEvents/types/index.mjs";
16
18
  export * as inboxes from "./inboxes/index.mjs";
17
19
  export * from "./lists/client/requests/index.mjs";
18
20
  export * as lists from "./lists/index.mjs";
@@ -13,6 +13,8 @@ export * as drafts from "./drafts/index.mjs";
13
13
  export * from "./drafts/types/index.mjs";
14
14
  export * as events from "./events/index.mjs";
15
15
  export * from "./events/types/index.mjs";
16
+ export * as inboxEvents from "./inboxEvents/index.mjs";
17
+ export * from "./inboxEvents/types/index.mjs";
16
18
  export * as inboxes from "./inboxes/index.mjs";
17
19
  export * from "./lists/client/requests/index.mjs";
18
20
  export * as lists from "./lists/index.mjs";
@@ -29,7 +29,7 @@ export declare class ListsClient {
29
29
  /**
30
30
  * **CLI:**
31
31
  * ```bash
32
- * agentmail lists retrieve --direction <direction> --type <type> --entry <entry>
32
+ * agentmail lists get --direction <direction> --type <type> --entry <entry>
33
33
  * ```
34
34
  *
35
35
  * @param {AgentMail.Direction} direction
@@ -84,7 +84,7 @@ export class ListsClient {
84
84
  /**
85
85
  * **CLI:**
86
86
  * ```bash
87
- * agentmail lists retrieve --direction <direction> --type <type> --entry <entry>
87
+ * agentmail lists get --direction <direction> --type <type> --entry <entry>
88
88
  * ```
89
89
  *
90
90
  * @param {AgentMail.Direction} direction
@@ -11,7 +11,12 @@ export declare class OrganizationsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<OrganizationsClient.Options>;
12
12
  constructor(options?: OrganizationsClient.Options);
13
13
  /**
14
- * Get the current organization.
14
+ * Returns the organization for the authenticated API key (usage limits, counts, and billing metadata).
15
+ *
16
+ * **CLI:**
17
+ * ```bash
18
+ * agentmail organizations get
19
+ * ```
15
20
  *
16
21
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
17
22
  *
@@ -20,7 +20,12 @@ export class OrganizationsClient {
20
20
  this._options = normalizeClientOptionsWithAuth(options);
21
21
  }
22
22
  /**
23
- * Get the current organization.
23
+ * Returns the organization for the authenticated API key (usage limits, counts, and billing metadata).
24
+ *
25
+ * **CLI:**
26
+ * ```bash
27
+ * agentmail organizations get
28
+ * ```
24
29
  *
25
30
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
26
31
  *
@@ -48,7 +48,7 @@ export declare class PodsClient {
48
48
  /**
49
49
  * **CLI:**
50
50
  * ```bash
51
- * agentmail pods retrieve --pod-id <pod_id>
51
+ * agentmail pods get --pod-id <pod_id>
52
52
  * ```
53
53
  *
54
54
  * @param {AgentMail.pods.PodId} pod_id
@@ -118,7 +118,7 @@ export class PodsClient {
118
118
  /**
119
119
  * **CLI:**
120
120
  * ```bash
121
- * agentmail pods retrieve --pod-id <pod_id>
121
+ * agentmail pods get --pod-id <pod_id>
122
122
  * ```
123
123
  *
124
124
  * @param {AgentMail.pods.PodId} pod_id
@@ -30,7 +30,7 @@ export declare class DomainsClient {
30
30
  /**
31
31
  * **CLI:**
32
32
  * ```bash
33
- * agentmail pods:domains retrieve --pod-id <pod_id> --domain-id <domain_id>
33
+ * agentmail pods:domains get --pod-id <pod_id> --domain-id <domain_id>
34
34
  * ```
35
35
  *
36
36
  * @param {AgentMail.pods.PodId} pod_id
@@ -97,7 +97,7 @@ export class DomainsClient {
97
97
  /**
98
98
  * **CLI:**
99
99
  * ```bash
100
- * agentmail pods:domains retrieve --pod-id <pod_id> --domain-id <domain_id>
100
+ * agentmail pods:domains get --pod-id <pod_id> --domain-id <domain_id>
101
101
  * ```
102
102
  *
103
103
  * @param {AgentMail.pods.PodId} pod_id
@@ -30,7 +30,7 @@ export declare class DraftsClient {
30
30
  /**
31
31
  * **CLI:**
32
32
  * ```bash
33
- * agentmail pods:drafts retrieve --pod-id <pod_id> --draft-id <draft_id>
33
+ * agentmail pods:drafts get --pod-id <pod_id> --draft-id <draft_id>
34
34
  * ```
35
35
  *
36
36
  * @param {AgentMail.pods.PodId} pod_id