@unboundcx/sdk 4.13.7 → 4.13.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unboundcx/sdk",
3
- "version": "4.13.7",
3
+ "version": "4.13.8",
4
4
  "description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -53,4 +53,24 @@ export class EmailMailboxUserService {
53
53
  { body },
54
54
  );
55
55
  }
56
+
57
+ /**
58
+ * List every OTHER mailbox a user can reach — via a direct grant or via a
59
+ * group they belong to — excluding their own dedicated mailbox.
60
+ * @param {string} userId - User ID
61
+ * @returns {Promise<Object>} { mailboxes: [{ id, name, mailbox, type, systemAddress?, role, via: 'user'|'group', groupId?, groupName?, notifyMode, notifyPush, notifyBadge, notifySound }] }
62
+ * @example
63
+ * const { mailboxes } = await sdk.messaging.email.mailboxes.forUser.listAccess('user123');
64
+ */
65
+ async listAccess(userId) {
66
+ this.sdk.validateParams(
67
+ { userId },
68
+ { userId: { type: 'string', required: true } },
69
+ );
70
+ return internalRequest(
71
+ this.sdk,
72
+ `/messaging/email/mailbox/for-user/${userId}/access`,
73
+ 'GET',
74
+ );
75
+ }
56
76
  }
@@ -532,6 +532,17 @@ export class EmailMailboxesService {
532
532
  );
533
533
  }
534
534
 
535
+ /**
536
+ * Unread counts across every mailbox the caller can access, for the nav
537
+ * bar badge.
538
+ * @returns {Promise<Object>} { count, mailboxes: [{ mailboxId, unread }] }
539
+ * @example
540
+ * const { count } = await sdk.messaging.email.mailboxes.badge();
541
+ */
542
+ async badge() {
543
+ return internalRequest(this.sdk, '/messaging/email/mailbox/badge', 'GET');
544
+ }
545
+
535
546
  async deleteFolder(mailboxId, { name } = {}) {
536
547
  this.sdk.validateParams(
537
548
  { mailboxId, name },