@unboundcx/sdk 4.13.146-security.2 → 4.13.146-security.3

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.146-security.2",
3
+ "version": "4.13.146-security.3",
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",
@@ -302,6 +302,33 @@ export class PermissionsService {
302
302
  return result;
303
303
  }
304
304
 
305
+ /**
306
+ * Direct holders of a permission set — for the Setup -> Permission Sets
307
+ * Members panel. A user who only has the set via group membership is
308
+ * NOT included in `users` here; look up that group's `members` (from
309
+ * listGroups()) to show them nested under the group instead.
310
+ * @param {string} setId - Permission set ID
311
+ * @returns {Promise<Object>} { users: [{userId, name, email, grantType}], groups: [{groupId, name, grantType}] }
312
+ * @example
313
+ * const { users, groups } = await sdk.permissions.listSetAssignments('set-123');
314
+ */
315
+ async listSetAssignments(setId) {
316
+ setId = String(setId);
317
+ this.sdk.validateParams(
318
+ { setId },
319
+ {
320
+ setId: { type: 'string', required: true },
321
+ },
322
+ );
323
+
324
+ const result = await internalRequest(
325
+ this.sdk,
326
+ `/permissions/sets/${setId}/assignments`,
327
+ 'GET',
328
+ );
329
+ return result;
330
+ }
331
+
305
332
  /**
306
333
  * Assign a permission set to a principal (user or group)
307
334
  * @param {Object} assignment - Assignment configuration