@unboundcx/sdk 4.13.179 → 4.13.180

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.179",
3
+ "version": "4.13.180",
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",
@@ -36,13 +36,20 @@ export class EmailAccountSettingsService {
36
36
  autoCreateUserMailbox,
37
37
  userMailboxAddressTemplate,
38
38
  defaultEmailDomainId,
39
+ imapSmtpEnabled,
39
40
  } = {}) {
40
41
  this.sdk.validateParams(
41
- { autoCreateUserMailbox, userMailboxAddressTemplate, defaultEmailDomainId },
42
+ {
43
+ autoCreateUserMailbox,
44
+ userMailboxAddressTemplate,
45
+ defaultEmailDomainId,
46
+ imapSmtpEnabled,
47
+ },
42
48
  {
43
49
  autoCreateUserMailbox: { type: 'boolean', required: false },
44
50
  userMailboxAddressTemplate: { type: 'string', required: false },
45
51
  defaultEmailDomainId: { type: 'string', required: false },
52
+ imapSmtpEnabled: { type: 'boolean', required: false },
46
53
  },
47
54
  );
48
55
  const body = {};
@@ -52,6 +59,7 @@ export class EmailAccountSettingsService {
52
59
  body.userMailboxAddressTemplate = userMailboxAddressTemplate;
53
60
  if (defaultEmailDomainId !== undefined)
54
61
  body.defaultEmailDomainId = defaultEmailDomainId;
62
+ if (imapSmtpEnabled !== undefined) body.imapSmtpEnabled = imapSmtpEnabled;
55
63
 
56
64
  return internalRequest(this.sdk, '/messaging/email/settings', 'PUT', {
57
65
  body,
@@ -0,0 +1,50 @@
1
+ import { internalRequest } from '../../base.js';
2
+
3
+ export class EmailMailboxAppPasswordsService {
4
+ constructor(sdk) {
5
+ this.sdk = sdk;
6
+ }
7
+
8
+ async list(mailboxId) {
9
+ this.sdk.validateParams(
10
+ { mailboxId },
11
+ { mailboxId: { type: 'string', required: true } },
12
+ );
13
+ return internalRequest(
14
+ this.sdk,
15
+ `/messaging/email/mailbox/${mailboxId}/app-passwords`,
16
+ 'GET',
17
+ );
18
+ }
19
+
20
+ async create(mailboxId, { label, scopes, expiresAt } = {}) {
21
+ this.sdk.validateParams(
22
+ { mailboxId, label },
23
+ {
24
+ mailboxId: { type: 'string', required: true },
25
+ label: { type: 'string', required: false },
26
+ },
27
+ );
28
+ return internalRequest(
29
+ this.sdk,
30
+ `/messaging/email/mailbox/${mailboxId}/app-passwords`,
31
+ 'POST',
32
+ { body: { label, scopes, expiresAt } },
33
+ );
34
+ }
35
+
36
+ async revoke(mailboxId, passwordId) {
37
+ this.sdk.validateParams(
38
+ { mailboxId, passwordId },
39
+ {
40
+ mailboxId: { type: 'string', required: true },
41
+ passwordId: { type: 'string', required: true },
42
+ },
43
+ );
44
+ return internalRequest(
45
+ this.sdk,
46
+ `/messaging/email/mailbox/${mailboxId}/app-passwords/${passwordId}`,
47
+ 'DELETE',
48
+ );
49
+ }
50
+ }
@@ -3,6 +3,7 @@ import { EmailMailboxAccessService } from './EmailMailboxAccessService.js';
3
3
  import { EmailMailboxUserService } from './EmailMailboxUserService.js';
4
4
  import { EmailMailboxGroupAccessService } from './EmailMailboxGroupAccessService.js';
5
5
  import { EmailAliasSuggestService } from './EmailAliasSuggestService.js';
6
+ import { EmailMailboxAppPasswordsService } from './EmailMailboxAppPasswordsService.js';
6
7
 
7
8
  export class EmailMailboxesService {
8
9
  constructor(sdk) {
@@ -14,6 +15,7 @@ export class EmailMailboxesService {
14
15
  // Shared mailboxes granted to a group — plan §3.2/§4/§6.
15
16
  this.groupAccess = new EmailMailboxGroupAccessService(sdk);
16
17
  this._aliasSuggestService = new EmailAliasSuggestService(sdk);
18
+ this.appPasswords = new EmailMailboxAppPasswordsService(sdk);
17
19
  }
18
20
 
19
21
  /**