agentmail 0.5.3 → 0.5.4

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 (64) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/agent/client/Client.d.ts +1 -1
  3. package/dist/cjs/api/resources/agent/client/Client.js +1 -1
  4. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +2 -3
  5. package/dist/cjs/api/resources/inboxes/client/Client.js +10 -3
  6. package/dist/cjs/api/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
  7. package/dist/cjs/api/resources/inboxes/types/Inbox.d.ts +2 -0
  8. package/dist/cjs/api/resources/inboxes/types/Metadata.d.ts +6 -0
  9. package/dist/cjs/api/resources/inboxes/types/Metadata.js +3 -0
  10. package/dist/cjs/api/resources/inboxes/types/MetadataValue.d.ts +4 -0
  11. package/dist/cjs/api/resources/inboxes/types/MetadataValue.js +3 -0
  12. package/dist/cjs/api/resources/inboxes/types/UpdateInboxRequest.d.ts +8 -1
  13. package/dist/cjs/api/resources/inboxes/types/index.d.ts +2 -0
  14. package/dist/cjs/api/resources/inboxes/types/index.js +2 -0
  15. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +1 -3
  16. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +1 -3
  17. package/dist/cjs/serialization/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
  18. package/dist/cjs/serialization/resources/inboxes/types/CreateInboxRequest.js +2 -0
  19. package/dist/cjs/serialization/resources/inboxes/types/Inbox.d.ts +2 -0
  20. package/dist/cjs/serialization/resources/inboxes/types/Inbox.js +2 -0
  21. package/dist/cjs/serialization/resources/inboxes/types/Metadata.d.ts +8 -0
  22. package/dist/cjs/serialization/resources/inboxes/types/Metadata.js +40 -0
  23. package/dist/cjs/serialization/resources/inboxes/types/MetadataValue.d.ts +7 -0
  24. package/dist/cjs/serialization/resources/inboxes/types/MetadataValue.js +43 -0
  25. package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.d.ts +3 -1
  26. package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.js +3 -1
  27. package/dist/cjs/serialization/resources/inboxes/types/index.d.ts +2 -0
  28. package/dist/cjs/serialization/resources/inboxes/types/index.js +2 -0
  29. package/dist/cjs/version.d.ts +1 -1
  30. package/dist/cjs/version.js +1 -1
  31. package/dist/esm/BaseClient.mjs +2 -2
  32. package/dist/esm/api/resources/agent/client/Client.d.mts +1 -1
  33. package/dist/esm/api/resources/agent/client/Client.mjs +1 -1
  34. package/dist/esm/api/resources/inboxes/client/Client.d.mts +2 -3
  35. package/dist/esm/api/resources/inboxes/client/Client.mjs +10 -3
  36. package/dist/esm/api/resources/inboxes/types/CreateInboxRequest.d.mts +2 -0
  37. package/dist/esm/api/resources/inboxes/types/Inbox.d.mts +2 -0
  38. package/dist/esm/api/resources/inboxes/types/Metadata.d.mts +6 -0
  39. package/dist/esm/api/resources/inboxes/types/Metadata.mjs +2 -0
  40. package/dist/esm/api/resources/inboxes/types/MetadataValue.d.mts +4 -0
  41. package/dist/esm/api/resources/inboxes/types/MetadataValue.mjs +2 -0
  42. package/dist/esm/api/resources/inboxes/types/UpdateInboxRequest.d.mts +8 -1
  43. package/dist/esm/api/resources/inboxes/types/index.d.mts +2 -0
  44. package/dist/esm/api/resources/inboxes/types/index.mjs +2 -0
  45. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +1 -3
  46. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +1 -3
  47. package/dist/esm/serialization/resources/inboxes/types/CreateInboxRequest.d.mts +2 -0
  48. package/dist/esm/serialization/resources/inboxes/types/CreateInboxRequest.mjs +2 -0
  49. package/dist/esm/serialization/resources/inboxes/types/Inbox.d.mts +2 -0
  50. package/dist/esm/serialization/resources/inboxes/types/Inbox.mjs +2 -0
  51. package/dist/esm/serialization/resources/inboxes/types/Metadata.d.mts +8 -0
  52. package/dist/esm/serialization/resources/inboxes/types/Metadata.mjs +4 -0
  53. package/dist/esm/serialization/resources/inboxes/types/MetadataValue.d.mts +7 -0
  54. package/dist/esm/serialization/resources/inboxes/types/MetadataValue.mjs +7 -0
  55. package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.d.mts +3 -1
  56. package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.mjs +3 -1
  57. package/dist/esm/serialization/resources/inboxes/types/index.d.mts +2 -0
  58. package/dist/esm/serialization/resources/inboxes/types/index.mjs +2 -0
  59. package/dist/esm/version.d.mts +1 -1
  60. package/dist/esm/version.mjs +1 -1
  61. package/dist/llms-full.txt +65 -24
  62. package/dist/llms.txt +184 -184
  63. package/package.json +1 -1
  64. package/reference.md +3 -7
@@ -5,12 +5,14 @@ import { ClientId } from "./ClientId.mjs";
5
5
  import { DisplayName } from "./DisplayName.mjs";
6
6
  import { Email } from "./Email.mjs";
7
7
  import { InboxId } from "./InboxId.mjs";
8
+ import { Metadata } from "./Metadata.mjs";
8
9
  export const Inbox = core.serialization.object({
9
10
  podId: core.serialization.property("pod_id", PodId),
10
11
  inboxId: core.serialization.property("inbox_id", InboxId),
11
12
  email: Email,
12
13
  displayName: core.serialization.property("display_name", DisplayName.optional()),
13
14
  clientId: core.serialization.property("client_id", ClientId.optional()),
15
+ metadata: Metadata.optional(),
14
16
  updatedAt: core.serialization.property("updated_at", core.serialization.date()),
15
17
  createdAt: core.serialization.property("created_at", core.serialization.date()),
16
18
  });
@@ -0,0 +1,8 @@
1
+ import type * as AgentMail from "../../../../api/index.mjs";
2
+ import * as core from "../../../../core/index.mjs";
3
+ import type * as serializers from "../../../index.mjs";
4
+ import { MetadataValue } from "./MetadataValue.mjs";
5
+ export declare const Metadata: core.serialization.Schema<serializers.inboxes.Metadata.Raw, AgentMail.inboxes.Metadata>;
6
+ export declare namespace Metadata {
7
+ type Raw = Record<string, MetadataValue.Raw>;
8
+ }
@@ -0,0 +1,4 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../../../core/index.mjs";
3
+ import { MetadataValue } from "./MetadataValue.mjs";
4
+ export const Metadata = core.serialization.record(core.serialization.string(), MetadataValue);
@@ -0,0 +1,7 @@
1
+ import type * as AgentMail from "../../../../api/index.mjs";
2
+ import * as core from "../../../../core/index.mjs";
3
+ import type * as serializers from "../../../index.mjs";
4
+ export declare const MetadataValue: core.serialization.Schema<serializers.inboxes.MetadataValue.Raw, AgentMail.inboxes.MetadataValue>;
5
+ export declare namespace MetadataValue {
6
+ type Raw = string | number | boolean;
7
+ }
@@ -0,0 +1,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../../../core/index.mjs";
3
+ export const MetadataValue = core.serialization.undiscriminatedUnion([
4
+ core.serialization.string(),
5
+ core.serialization.number(),
6
+ core.serialization.boolean(),
7
+ ]);
@@ -2,9 +2,11 @@ import type * as AgentMail from "../../../../api/index.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  import { DisplayName } from "./DisplayName.mjs";
5
+ import { Metadata } from "./Metadata.mjs";
5
6
  export declare const UpdateInboxRequest: core.serialization.ObjectSchema<serializers.inboxes.UpdateInboxRequest.Raw, AgentMail.inboxes.UpdateInboxRequest>;
6
7
  export declare namespace UpdateInboxRequest {
7
8
  interface Raw {
8
- display_name: DisplayName.Raw;
9
+ display_name?: DisplayName.Raw | null;
10
+ metadata?: Metadata.Raw | null;
9
11
  }
10
12
  }
@@ -1,6 +1,8 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import { DisplayName } from "./DisplayName.mjs";
4
+ import { Metadata } from "./Metadata.mjs";
4
5
  export const UpdateInboxRequest = core.serialization.object({
5
- displayName: core.serialization.property("display_name", DisplayName),
6
+ displayName: core.serialization.property("display_name", DisplayName.optional()),
7
+ metadata: Metadata.optional(),
6
8
  });
@@ -5,4 +5,6 @@ export * from "./Email.mjs";
5
5
  export * from "./Inbox.mjs";
6
6
  export * from "./InboxId.mjs";
7
7
  export * from "./ListInboxesResponse.mjs";
8
+ export * from "./Metadata.mjs";
9
+ export * from "./MetadataValue.mjs";
8
10
  export * from "./UpdateInboxRequest.mjs";
@@ -5,4 +5,6 @@ export * from "./Email.mjs";
5
5
  export * from "./Inbox.mjs";
6
6
  export * from "./InboxId.mjs";
7
7
  export * from "./ListInboxesResponse.mjs";
8
+ export * from "./Metadata.mjs";
9
+ export * from "./MetadataValue.mjs";
8
10
  export * from "./UpdateInboxRequest.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.5.3";
1
+ export declare const SDK_VERSION = "0.5.4";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.5.3";
1
+ export const SDK_VERSION = "0.5.4";
@@ -5157,8 +5157,6 @@ For more details on scheduled sending—including how to cancel, reschedule, lis
5157
5157
 
5158
5158
  > Configure IMAP and SMTP to access your AgentMail inboxes using email clients or programmatic access.
5159
5159
 
5160
- IMAP support is currently under development and will be available in the coming weeks. The documentation below describes the planned functionality. SMTP is fully available today.
5161
-
5162
5160
  AgentMail supports standard IMAP and SMTP protocols, allowing you to connect using traditional email clients or integrate with existing systems that rely on these protocols.
5163
5161
 
5164
5162
  ## What are IMAP and SMTP?
@@ -5202,9 +5200,15 @@ be rejected. Make sure to enable SSL/TLS in your email client settings.
5202
5200
  | **Password** | Your API key |
5203
5201
  | **SSL/TLS** | **Required** (must be enabled) |
5204
5202
 
5205
- Currently, only the **INBOX** folder is accessible via IMAP. Other folders
5206
- (Sent, Drafts, Trash) are not available through IMAP. Use the [AgentMail
5207
- API](/introduction) for full folder access.
5203
+ IMAP exposes the following folders: **INBOX**, **Sent**, **Trash**, and
5204
+ **Spam**. A **Drafts** folder is also listed for client compatibility but
5205
+ always appears empty — use the [AgentMail API](/introduction) to create
5206
+ and manage drafts.
5207
+
5208
+ The IMAP server supports the `IDLE` extension (RFC 2177), so modern
5209
+ clients (Thunderbird, Outlook, Apple Mail) receive new messages
5210
+ push-style without polling. Clients negotiate `IDLE` automatically when
5211
+ supported — no extra configuration needed.
5208
5212
 
5209
5213
  ### Python IMAP Example
5210
5214
 
@@ -5224,7 +5228,7 @@ try:
5224
5228
  # Authenticate using inbox email as username
5225
5229
  imap.login(inbox_email, api_key)
5226
5230
 
5227
- # Select INBOX (only supported folder)
5231
+ # Select a folder (INBOX, Sent, Trash, or Spam)
5228
5232
  imap.select("INBOX")
5229
5233
 
5230
5234
  # Search for all messages
@@ -5278,16 +5282,18 @@ imap.connect();
5278
5282
 
5279
5283
  Use SMTP to send emails from your AgentMail inbox.
5280
5284
 
5281
- SSL/TLS is **required** for all SMTP connections. Connections without SSL will
5282
- be rejected. Make sure to enable SSL/TLS in your email client settings.
5285
+ Encryption is **required** for all SMTP connections. Connect using **port 465
5286
+ with implicit TLS** (SSL on connect) or **port 587 with STARTTLS** (upgrade
5287
+ in-band). On port 587, attempting to authenticate before issuing `STARTTLS`
5288
+ is rejected with a `538` error.
5283
5289
 
5284
- | Setting | Value |
5285
- | ------------ | ------------------------------ |
5286
- | **Host** | `smtp.agentmail.to` |
5287
- | **Port** | `465` |
5288
- | **Username** | agentmail |
5289
- | **Password** | Your API key |
5290
- | **SSL/TLS** | **Required** (must be enabled) |
5290
+ | Setting | Value |
5291
+ | -------------- | ----------------------------------------------------- |
5292
+ | **Host** | `smtp.agentmail.to` |
5293
+ | **Port** | `465` (implicit TLS) or `587` (STARTTLS) |
5294
+ | **Username** | Your inbox email (e.g., `myinbox@agentmail.to`) |
5295
+ | **Password** | Your API key |
5296
+ | **Encryption** | Port `465`: SSL/TLS on connect · Port `587`: STARTTLS |
5291
5297
 
5292
5298
  The "From" address in your email should match the email address of your inbox
5293
5299
  (e.g., `myinbox@agentmail.to`). Using a different From address may result in
@@ -5318,11 +5324,17 @@ msg["From"] = inbox_email # Use your inbox email as the From address
5318
5324
  msg["To"] = "recipient@example.com"
5319
5325
  msg.attach(MIMEText("This is a test email sent via SMTP.", "plain"))
5320
5326
 
5321
- # Connect with SSL (required) and send
5327
+ # Connect with implicit TLS on port 465 and send
5322
5328
  with smtplib.SMTP_SSL("smtp.agentmail.to", 465) as server:
5323
5329
  server.login(inbox_email, api_key)
5324
5330
  server.send_message(msg)
5325
5331
  print("Email sent successfully!")
5332
+
5333
+ # Alternatively, use STARTTLS on port 587:
5334
+ # with smtplib.SMTP("smtp.agentmail.to", 587) as server:
5335
+ # server.starttls()
5336
+ # server.login(inbox_email, api_key)
5337
+ # server.send_message(msg)
5326
5338
  ```
5327
5339
 
5328
5340
  ### TypeScript SMTP Example
@@ -5337,7 +5349,8 @@ const apiKey = process.env.AGENTMAIL_API_KEY!; // From Dashboard → API Keys
5337
5349
  const transporter = nodemailer.createTransport({
5338
5350
  host: "smtp.agentmail.to",
5339
5351
  port: 465,
5340
- secure: true, // SSL required
5352
+ secure: true, // implicit TLS on port 465
5353
+ // For STARTTLS on port 587 instead, use: port: 587, secure: false
5341
5354
  auth: {
5342
5355
  user: inboxEmail,
5343
5356
  pass: apiKey,
@@ -5359,13 +5372,14 @@ sendEmail().catch(console.error);
5359
5372
 
5360
5373
  ## Troubleshooting
5361
5374
 
5362
- | Error | Cause | Solution |
5363
- | ----------------------- | ----------------------- | ------------------------------------------------------ |
5364
- | "Authentication failed" | Invalid credentials | Verify your inbox email and API key from the console |
5365
- | "Connection refused" | SSL not enabled | Enable SSL/TLS in your client settings |
5366
- | "Connection timeout" | Firewall blocking ports | Ensure ports 993 (IMAP) and 465/587 (SMTP) are open |
5367
- | "Sender not authorized" | Wrong From address | Use your inbox's email address as the From address |
5368
- | "Folder not found" | Non-INBOX folder | Only INBOX is supported; use the API for other folders |
5375
+ | Error | Cause | Solution |
5376
+ | ------------------------------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
5377
+ | "Authentication failed" | Invalid credentials | Verify your inbox email and API key from the console |
5378
+ | "Connection refused" / handshake error | Wrong encryption mode for the port | Use SSL/TLS on connect for port `465`, or STARTTLS for port `587` |
5379
+ | `538` "Must issue a STARTTLS command first" | Plaintext AUTH on port `587` | Enable STARTTLS on port `587` (or use implicit TLS on `465`) before authenticating |
5380
+ | "Connection timeout" | Firewall blocking ports | Ensure ports 993 (IMAP) and 465/587 (SMTP) are open |
5381
+ | "Sender not authorized" | Wrong From address | Use your inbox's email address as the From address |
5382
+ | "Folder not found" | Folder name typo or unsupported folder | IMAP exposes `INBOX`, `Sent`, `Trash`, and `Spam`. Folder names other than `INBOX` are case-sensitive. Use the [API](/introduction) to manage drafts. |
5369
5383
 
5370
5384
  ## When to Use IMAP/SMTP vs API
5371
5385
 
@@ -22561,6 +22575,9 @@ components:
22561
22575
  type: string
22562
22576
  format: date-time
22563
22577
  description: Time at which entry was created.
22578
+ read_only:
22579
+ type: boolean
22580
+ description: Whether the entry is read-only and cannot be deleted via the API.
22564
22581
  pod_id:
22565
22582
  type: string
22566
22583
  description: ID of pod.
@@ -22865,6 +22882,9 @@ components:
22865
22882
  type: string
22866
22883
  format: date-time
22867
22884
  description: Time at which entry was created.
22885
+ read_only:
22886
+ type: boolean
22887
+ description: Whether the entry is read-only and cannot be deleted via the API.
22868
22888
  pod_id:
22869
22889
  type: string
22870
22890
  description: ID of pod.
@@ -23183,6 +23203,9 @@ components:
23183
23203
  type: string
23184
23204
  format: date-time
23185
23205
  description: Time at which entry was created.
23206
+ read_only:
23207
+ type: boolean
23208
+ description: Whether the entry is read-only and cannot be deleted via the API.
23186
23209
  pod_id:
23187
23210
  type: string
23188
23211
  description: ID of pod.
@@ -34327,6 +34350,9 @@ components:
34327
34350
  type: string
34328
34351
  format: date-time
34329
34352
  description: Time at which entry was created.
34353
+ read_only:
34354
+ type: boolean
34355
+ description: Whether the entry is read-only and cannot be deleted via the API.
34330
34356
  required:
34331
34357
  - entry
34332
34358
  - organization_id
@@ -34614,6 +34640,9 @@ components:
34614
34640
  type: string
34615
34641
  format: date-time
34616
34642
  description: Time at which entry was created.
34643
+ read_only:
34644
+ type: boolean
34645
+ description: Whether the entry is read-only and cannot be deleted via the API.
34617
34646
  required:
34618
34647
  - entry
34619
34648
  - organization_id
@@ -34915,6 +34944,9 @@ components:
34915
34944
  type: string
34916
34945
  format: date-time
34917
34946
  description: Time at which entry was created.
34947
+ read_only:
34948
+ type: boolean
34949
+ description: Whether the entry is read-only and cannot be deleted via the API.
34918
34950
  required:
34919
34951
  - entry
34920
34952
  - organization_id
@@ -44405,6 +44437,9 @@ components:
44405
44437
  type: string
44406
44438
  format: date-time
44407
44439
  description: Time at which entry was created.
44440
+ read_only:
44441
+ type: boolean
44442
+ description: Whether the entry is read-only and cannot be deleted via the API.
44408
44443
  pod_id:
44409
44444
  type: string
44410
44445
  description: ID of pod.
@@ -44709,6 +44744,9 @@ components:
44709
44744
  type: string
44710
44745
  format: date-time
44711
44746
  description: Time at which entry was created.
44747
+ read_only:
44748
+ type: boolean
44749
+ description: Whether the entry is read-only and cannot be deleted via the API.
44712
44750
  pod_id:
44713
44751
  type: string
44714
44752
  description: ID of pod.
@@ -45027,6 +45065,9 @@ components:
45027
45065
  type: string
45028
45066
  format: date-time
45029
45067
  description: Time at which entry was created.
45068
+ read_only:
45069
+ type: boolean
45070
+ description: Whether the entry is read-only and cannot be deleted via the API.
45030
45071
  pod_id:
45031
45072
  type: string
45032
45073
  description: ID of pod.