@unboundcx/sdk 4.13.21 → 4.13.22

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.21",
3
+ "version": "4.13.22",
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",
@@ -17,6 +17,8 @@ export class SmsService {
17
17
  * @param {Object} [params.variables] - Template variables
18
18
  * @param {Array<string>} [params.mediaUrls] - Media URLs for MMS
19
19
  * @param {string} [params.webhookUrl] - Webhook URL for delivery status
20
+ * @param {string} [params.relatedId] - Task/engagement (or other record) id
21
+ * to attach this message to, so it surfaces on that record's feed
20
22
  * @returns {Promise<Object>} Message details
21
23
  */
22
24
  async send({
@@ -27,6 +29,7 @@ export class SmsService {
27
29
  variables,
28
30
  mediaUrls,
29
31
  webhookUrl,
32
+ relatedId,
30
33
  }) {
31
34
  const messageData = {};
32
35
  if (from) messageData.from = from;
@@ -35,6 +38,7 @@ export class SmsService {
35
38
  if (variables) messageData.variables = variables;
36
39
  if (mediaUrls) messageData.mediaUrls = mediaUrls;
37
40
  if (webhookUrl) messageData.webhookUrl = webhookUrl;
41
+ if (relatedId) messageData.relatedId = relatedId;
38
42
 
39
43
  this.sdk.validateParams(
40
44
  { to, ...messageData },
@@ -46,6 +50,7 @@ export class SmsService {
46
50
  variables: { type: 'object', required: false },
47
51
  mediaUrls: { type: 'array', required: false },
48
52
  webhookUrl: { type: 'string', required: false },
53
+ relatedId: { type: 'string', required: false },
49
54
  },
50
55
  );
51
56
 
@@ -73,4 +78,26 @@ export class SmsService {
73
78
  const result = await internalRequest(this.sdk, `/messaging/sms/${id}`, 'GET');
74
79
  return result;
75
80
  }
81
+
82
+ /**
83
+ * List SMS/MMS messages tied to a task/engagement (or other record) id —
84
+ * feed read path for the contact-center interaction timeline.
85
+ * @param {string} relatedId - Related record id
86
+ * @returns {Promise<Object>} { messages: [...] }
87
+ */
88
+ async getByRelated(relatedId) {
89
+ this.sdk.validateParams(
90
+ { relatedId },
91
+ {
92
+ relatedId: { type: 'string', required: true },
93
+ },
94
+ );
95
+
96
+ const result = await internalRequest(
97
+ this.sdk,
98
+ `/messaging/sms/related/${relatedId}`,
99
+ 'GET',
100
+ );
101
+ return result;
102
+ }
76
103
  }
@@ -86,6 +86,26 @@ export class PortalsService {
86
86
  * @param {string} [updates.name] - New display name for the portal.
87
87
  * @param {string} [updates.domain] - New custom domain for the portal.
88
88
  * @param {object} [updates.settings] - Updated portal configuration settings.
89
+ * @param {object} [updates.settings.profile] - P11.2: visitor-editable
90
+ * profile fields. `{ people: { enabled, fields: [{ name, editable }] },
91
+ * company: { enabled, fields: [{ name, editable }], editorMode,
92
+ * editorFilter } }`. `fields` (max 40 each) is the allowlist of
93
+ * people/company columns exposed on the portal's `GET /portal-profile` —
94
+ * never system columns (id/*At/*By/isDeleted/recordTypeId), foreign
95
+ * keys, or encrypted fields (the API 400s on save otherwise).
96
+ * `company.editorMode` is `'none'|'all'|'rules'` — whether a signed-in
97
+ * visitor may edit their OWN company record: nobody / everyone signed
98
+ * in / only people matching `editorFilter` (same `{'<field>::<op>':
99
+ * value}` AND-map as `settings.peopleFilter`, ≥1 rule required for
100
+ * `'rules'`). A per-person override (people custom field
101
+ * `portalCompanyEdit__c`, `'allow'|'deny'`, set via `sdk.objects.update`)
102
+ * wins over `editorMode`/`editorFilter` when present.
103
+ * @param {string} [updates.settings.companyTicketsMode] - `'none'|'all'|'rules'`
104
+ * — successor to the legacy `settings.companyTickets` boolean
105
+ * (`true`→`'all'`, `false`→`'none'`); same 3-way shape as
106
+ * `settings.profile.company.editorMode` above, paired with
107
+ * `settings.companyTicketsFilter`. Prefer this over the boolean going
108
+ * forward — both may be sent, `companyTicketsMode` wins.
89
109
  * @param {boolean} [updates.isPublic] - Updated public accessibility flag.
90
110
  * @param {string} [updates.customCss] - Updated custom CSS for the portal.
91
111
  * @param {string} [updates.customJs] - Updated custom JavaScript for the portal.