@unboundcx/sdk 4.5.0 → 4.6.0

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.
@@ -374,4 +374,115 @@ export class PermissionsService {
374
374
  const result = await this.sdk._fetch('/permissions/scope-catalog', 'GET');
375
375
  return result;
376
376
  }
377
+
378
+ /**
379
+ * Catalog of group-settable configuration keys, plus the never-settable list.
380
+ * @returns {Promise<Object>} { groupSettable: [{key,label,type,pillar,...}], neverSettable: [] }
381
+ */
382
+ async getSettingsCatalog() {
383
+ return this.sdk._fetch('/permissions/settings/catalog', 'GET');
384
+ }
385
+
386
+ /**
387
+ * Configuration values set at group level.
388
+ * @param {string|number} groupId - Group ID (required)
389
+ * @returns {Promise<Object>} { results: [{settingKey, value, updatedAt}] }
390
+ */
391
+ async listGroupSettings(groupId) {
392
+ groupId = String(groupId);
393
+ this.sdk.validateParams({ groupId }, { groupId: { type: 'string', required: true } });
394
+ return this.sdk._fetch(`/permissions/groups/${groupId}/settings`, 'GET');
395
+ }
396
+
397
+ /** Set one configuration value on a group. */
398
+ async setGroupSetting(groupId, settingKey, value) {
399
+ groupId = String(groupId);
400
+ settingKey = String(settingKey);
401
+ this.sdk.validateParams(
402
+ { groupId, settingKey },
403
+ {
404
+ groupId: { type: 'string', required: true },
405
+ settingKey: { type: 'string', required: true },
406
+ },
407
+ );
408
+ return this.sdk._fetch(
409
+ `/permissions/groups/${groupId}/settings/${settingKey}`,
410
+ 'PUT',
411
+ { value },
412
+ );
413
+ }
414
+
415
+ /** Unset one configuration value on a group (members revert to the next tier). */
416
+ async deleteGroupSetting(groupId, settingKey) {
417
+ groupId = String(groupId);
418
+ settingKey = String(settingKey);
419
+ this.sdk.validateParams(
420
+ { groupId, settingKey },
421
+ {
422
+ groupId: { type: 'string', required: true },
423
+ settingKey: { type: 'string', required: true },
424
+ },
425
+ );
426
+ return this.sdk._fetch(
427
+ `/permissions/groups/${groupId}/settings/${settingKey}`,
428
+ 'DELETE',
429
+ );
430
+ }
431
+
432
+ /**
433
+ * Rank groups for same-key conflict resolution; first entry wins.
434
+ * @param {Array<string|number>} order - Group IDs, highest priority first
435
+ */
436
+ async setGroupPriority(order) {
437
+ this.sdk.validateParams({ order }, { order: { type: 'array', required: true } });
438
+ return this.sdk._fetch('/permissions/groups/priority', 'PUT', {
439
+ order: order.map(String),
440
+ });
441
+ }
442
+
443
+ /**
444
+ * Resolved configuration for a user: value, where it came from, and any
445
+ * losing group values for the same key.
446
+ * @returns {Promise<Object>} { [key]: { value, source: {tier, groupId, groupName}, conflicts: [] } }
447
+ */
448
+ async getUserSettings(userId) {
449
+ userId = String(userId);
450
+ this.sdk.validateParams({ userId }, { userId: { type: 'string', required: true } });
451
+ return this.sdk._fetch(`/permissions/users/${userId}/settings`, 'GET');
452
+ }
453
+
454
+ /** Override one configuration value for a single user. */
455
+ async setUserSetting(userId, settingKey, value) {
456
+ userId = String(userId);
457
+ settingKey = String(settingKey);
458
+ this.sdk.validateParams(
459
+ { userId, settingKey },
460
+ {
461
+ userId: { type: 'string', required: true },
462
+ settingKey: { type: 'string', required: true },
463
+ },
464
+ );
465
+ return this.sdk._fetch(
466
+ `/permissions/users/${userId}/settings/${settingKey}`,
467
+ 'PUT',
468
+ { value },
469
+ );
470
+ }
471
+
472
+ /** Clear a user's override, reverting to the inherited value. */
473
+ async deleteUserSetting(userId, settingKey) {
474
+ userId = String(userId);
475
+ settingKey = String(settingKey);
476
+ this.sdk.validateParams(
477
+ { userId, settingKey },
478
+ {
479
+ userId: { type: 'string', required: true },
480
+ settingKey: { type: 'string', required: true },
481
+ },
482
+ );
483
+ return this.sdk._fetch(
484
+ `/permissions/users/${userId}/settings/${settingKey}`,
485
+ 'DELETE',
486
+ );
487
+ }
377
488
  }
@@ -463,7 +463,7 @@ Response:
463
463
  * @param {string} [config.convertTo] - Convert uploaded file to this format before storing. Supported: 'pdf', 'tiff'. Input must be PDF, DOC, or DOCX.
464
464
  * @param {Object} [config.convertOptions] - Options for file conversion (used with convertTo)
465
465
  * @param {('fine'|'normal')} [config.convertOptions.resolution='fine'] - Fax resolution: 'fine' (204x196) or 'normal' (204x98)
466
- * @param {('letter'|'a4')} [config.convertOptions.paperSize='letter'] - Paper size for conversion
466
+ * @param {('letter'|'legal'|'a4')} [config.convertOptions.paperSize='letter'] - Paper size for conversion
467
467
  * @param {('g4'|'g3')} [config.convertOptions.compression='g4'] - TIFF compression: 'g4' (default) or 'g3' for older fax machines
468
468
  * @param {Function} [config.onProgress] - Progress callback for browser uploads
469
469
  * @param {Object} [config._options] - Internal options
@@ -1005,7 +1005,7 @@ Response:
1005
1005
  * @param {string} config.convertTo - Target format: 'pdf' or 'tiff' (required)
1006
1006
  * @param {Object} [config.convertOptions] - Options controlling the conversion output
1007
1007
  * @param {('fine'|'normal')} [config.convertOptions.resolution='fine'] - Fax resolution: 'fine' (204x196 DPI) or 'normal' (204x98 DPI)
1008
- * @param {('letter'|'a4')} [config.convertOptions.paperSize='letter'] - Paper size for conversion
1008
+ * @param {('letter'|'legal'|'a4')} [config.convertOptions.paperSize='letter'] - Paper size for conversion
1009
1009
  * @param {('g4'|'g3')} [config.convertOptions.compression='g4'] - TIFF compression: 'g4' (modern, default) or 'g3' (legacy fax machines)
1010
1010
  * @param {string} [config.classification] - Storage classification for the new file. Defaults to source file's classification.
1011
1011
  * @param {string} [config.folder] - Folder path for the new file. Defaults to source file's folder.
@@ -41,6 +41,7 @@ async function testPublicSDKCompleteness() {
41
41
  'phoneNumbers',
42
42
  'recordTypes',
43
43
  'generateId',
44
+ 'documents',
44
45
  ];
45
46
 
46
47
  console.log(`📊 Checking ${publicServices.length} public services...`);