@unboundcx/sdk 4.10.0 → 4.10.1

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.10.0",
3
+ "version": "4.10.1",
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",
package/services/chat.js CHANGED
@@ -825,7 +825,9 @@ export class ChatService {
825
825
 
826
826
  /**
827
827
  * Admin: get account-level chat settings.
828
- * @returns {Promise<Object>} `{allowReports, reportReasons}`
828
+ * @returns {Promise<Object>} `{allowReports, reportReasons, reportNotifications}`
829
+ * `reportNotifications[]` items are `{channelId, channelName, channelKind, reasons}` —
830
+ * `reasons` is `null` when the rule notifies for every reason.
829
831
  */
830
832
  async adminGetSettings() {
831
833
  return internalRequest(this.sdk, "/chat/admin/settings", "GET");
@@ -836,18 +838,26 @@ export class ChatService {
836
838
  * @param {Object} params
837
839
  * @param {boolean} params.allowReports
838
840
  * @param {string[]} [params.reportReasons]
839
- * @returns {Promise<Object>} `{allowReports, reportReasons}`
841
+ * @param {Object[]} [params.reportNotifications] - Channels to post a
842
+ * "message reported" card to. Each item: `{channelId: string, reasons:
843
+ * string[]|null}` — `reasons` null/empty means "notify for every
844
+ * reason"; channel must be a non-archived public/private channel.
845
+ * @returns {Promise<Object>} `{allowReports, reportReasons, reportNotifications}`
840
846
  */
841
- async adminPutSettings({ allowReports, reportReasons } = {}) {
847
+ async adminPutSettings({ allowReports, reportReasons, reportNotifications } = {}) {
842
848
  this.sdk.validateParams(
843
- { allowReports, reportReasons },
849
+ { allowReports, reportReasons, reportNotifications },
844
850
  {
845
851
  allowReports: { type: "boolean", required: true },
846
852
  reportReasons: { type: "array", required: false },
853
+ reportNotifications: { type: "array", required: false },
847
854
  },
848
855
  );
849
856
  const body = { allowReports };
850
857
  if (reportReasons !== undefined) body.reportReasons = reportReasons;
858
+ if (reportNotifications !== undefined) {
859
+ body.reportNotifications = reportNotifications;
860
+ }
851
861
  return internalRequest(this.sdk, "/chat/admin/settings", "PUT", {
852
862
  body,
853
863
  });
package/services/drive.js CHANGED
@@ -95,6 +95,7 @@ export class DriveService {
95
95
  `/drive/folders/${id}`,
96
96
  'PATCH',
97
97
  { body },
98
+ true,
98
99
  );
99
100
  return result;
100
101
  }
@@ -139,6 +140,7 @@ export class DriveService {
139
140
  `/drive/files/${id}`,
140
141
  'PATCH',
141
142
  { body },
143
+ true,
142
144
  );
143
145
  return result;
144
146
  }
@@ -167,6 +169,7 @@ export class DriveService {
167
169
  '/drive/files/move',
168
170
  'PATCH',
169
171
  { body },
172
+ true,
170
173
  );
171
174
  return result;
172
175
  }
@@ -814,6 +814,7 @@ Response:
814
814
  `/storage/files/${id}`,
815
815
  'PATCH',
816
816
  { body },
817
+ true,
817
818
  );
818
819
  return result;
819
820
  }
@@ -959,6 +960,7 @@ Response:
959
960
  `/storage/folders/${id}`,
960
961
  'PATCH',
961
962
  { body },
963
+ true,
962
964
  );
963
965
  return result;
964
966
  }
@@ -1014,6 +1016,7 @@ Response:
1014
1016
  '/storage/files/move',
1015
1017
  'PATCH',
1016
1018
  { body },
1019
+ true,
1017
1020
  );
1018
1021
  return result;
1019
1022
  }