@unboundcx/sdk 4.13.171 → 4.13.173

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.171",
3
+ "version": "4.13.173",
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",
@@ -280,4 +280,56 @@ export class EmailDomainsService {
280
280
  );
281
281
  return result;
282
282
  }
283
+
284
+ /**
285
+ * Update account settings for a verified domain.
286
+ * Pass catchAllMailboxId null or '' to clear the catch-all.
287
+ * @param {Object} params
288
+ * @param {string} params.domain - Domain name (required)
289
+ * @param {string} [params.portalId]
290
+ * @param {string|null} [params.catchAllMailboxId]
291
+ */
292
+ async updateSettings({ domain, portalId, catchAllMailboxId } = {}) {
293
+ this.sdk.validateParams(
294
+ { domain, portalId, catchAllMailboxId },
295
+ {
296
+ domain: { type: 'string', required: true },
297
+ portalId: { type: 'string', required: false },
298
+ catchAllMailboxId: { type: 'string', required: false },
299
+ },
300
+ );
301
+
302
+ const body = {};
303
+ if (portalId) body.portalId = portalId;
304
+ if (catchAllMailboxId !== undefined) {
305
+ body.catchAllMailboxId = catchAllMailboxId || null;
306
+ }
307
+
308
+ return internalRequest(
309
+ this.sdk,
310
+ `/messaging/email/validate/domain?domain=${encodeURIComponent(domain)}`,
311
+ 'PUT',
312
+ { body },
313
+ );
314
+ }
315
+
316
+ /**
317
+ * Re-save the account sending link for a verified domain.
318
+ * @param {string} domainId
319
+ * @returns {Promise<{id: string, domain: string, sendingStatus: string}>}
320
+ */
321
+ async enableSending(domainId) {
322
+ this.sdk.validateParams(
323
+ { domainId },
324
+ {
325
+ domainId: { type: 'string', required: true },
326
+ },
327
+ );
328
+
329
+ return internalRequest(
330
+ this.sdk,
331
+ `/messaging/email/validate/domain/${encodeURIComponent(domainId)}/sending`,
332
+ 'POST',
333
+ );
334
+ }
283
335
  }
@@ -23,7 +23,8 @@ const RANGE_RULES = {
23
23
  // task_router (on the Standard User allow list like reporting:surveys:read).
24
24
  // Every method takes ISO `from`/`to` plus optional `timeZone` and the
25
25
  // website filters (country, utmSource, utmMedium, utmCampaign, landingPage,
26
- // page, device). Responses never contain raw IPs.
26
+ // page, device). List and summary responses never contain raw IPs.
27
+ // visitorDetail is the exception: the visitor-details modal.
27
28
  export class ReportingMarketingService {
28
29
  constructor(sdk) {
29
30
  this.sdk = sdk;
@@ -67,6 +68,16 @@ export class ReportingMarketingService {
67
68
  return this._get('website/sessions', params);
68
69
  }
69
70
 
71
+ /**
72
+ * One visitor in the report range: identity, each session (IP, provider,
73
+ * geo), and the events under those sessions.
74
+ * @param {Object} params - { from, to, visitor, timeZone? }
75
+ * @returns {Promise<Object>} { visitorKey, person, company, sessions, truncated }
76
+ */
77
+ async visitorDetail(params = {}) {
78
+ return this._get('website/visitors', params);
79
+ }
80
+
70
81
  /**
71
82
  * Ordered event timeline for one session.
72
83
  * @returns {Promise<Object>} { events: [{ at, eventType, url, title, durationSec }] }