@unboundcx/sdk 1.8.0 → 2.1.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.
- package/package.json +1 -1
- package/services/objects.js +20 -1
- package/services/phoneNumbers.js +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.0",
|
|
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/objects.js
CHANGED
|
@@ -421,16 +421,20 @@ export class ObjectsService {
|
|
|
421
421
|
columnName = null,
|
|
422
422
|
value = null,
|
|
423
423
|
type = null,
|
|
424
|
+
columnType = null,
|
|
425
|
+
length = null,
|
|
424
426
|
isActive = null,
|
|
425
427
|
}) {
|
|
426
428
|
this.sdk.validateParams(
|
|
427
|
-
{ id, objectName, columnName, value, type, isActive },
|
|
429
|
+
{ id, objectName, columnName, value, type, columnType, length, isActive },
|
|
428
430
|
{
|
|
429
431
|
id: { type: 'string', required: true },
|
|
430
432
|
objectName: { type: 'string', required: false },
|
|
431
433
|
columnName: { type: 'string', required: false },
|
|
432
434
|
value: { type: 'string', required: false },
|
|
433
435
|
type: { type: 'string', required: false },
|
|
436
|
+
columnType: { type: 'string', required: false },
|
|
437
|
+
length: { type: 'string', required: false },
|
|
434
438
|
isActive: { type: 'boolean', required: false },
|
|
435
439
|
},
|
|
436
440
|
);
|
|
@@ -440,6 +444,8 @@ export class ObjectsService {
|
|
|
440
444
|
if (columnName !== null) body.columnName = columnName;
|
|
441
445
|
if (value !== null) body.value = value;
|
|
442
446
|
if (type !== null) body.type = type;
|
|
447
|
+
if (columnType !== null) body.columnType = columnType;
|
|
448
|
+
if (length !== null) body.length = length;
|
|
443
449
|
if (isActive !== null) body.isActive = isActive;
|
|
444
450
|
|
|
445
451
|
const params = { body };
|
|
@@ -554,4 +560,17 @@ export class ObjectsService {
|
|
|
554
560
|
const result = await this.sdk._fetch(`/object/manage/${objectName}/${columnName}`, 'PUT', params);
|
|
555
561
|
return result;
|
|
556
562
|
}
|
|
563
|
+
|
|
564
|
+
async deleteColumn({ objectName, columnName }) {
|
|
565
|
+
this.sdk.validateParams(
|
|
566
|
+
{ objectName, columnName },
|
|
567
|
+
{
|
|
568
|
+
objectName: { type: 'string', required: true },
|
|
569
|
+
columnName: { type: 'string', required: true },
|
|
570
|
+
},
|
|
571
|
+
);
|
|
572
|
+
|
|
573
|
+
const result = await this.sdk._fetch(`/object/manage/${objectName}/${columnName}`, 'DELETE');
|
|
574
|
+
return result;
|
|
575
|
+
}
|
|
557
576
|
}
|
package/services/phoneNumbers.js
CHANGED
|
@@ -186,6 +186,11 @@ export class PhoneNumbersService {
|
|
|
186
186
|
);
|
|
187
187
|
return result;
|
|
188
188
|
}
|
|
189
|
+
|
|
190
|
+
async getRoutingOptions() {
|
|
191
|
+
const result = await this.sdk._fetch('/phoneNumbers/routing-options', 'GET');
|
|
192
|
+
return result;
|
|
193
|
+
}
|
|
189
194
|
}
|
|
190
195
|
|
|
191
196
|
export class PhoneNumberCarrierService {
|