@unboundcx/sdk 2.3.0 → 2.3.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 +1 -1
- package/services/phoneNumbers.js +18 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.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/phoneNumbers.js
CHANGED
|
@@ -324,7 +324,20 @@ export class PhoneNumbersService {
|
|
|
324
324
|
return result;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
|
|
327
|
+
/**
|
|
328
|
+
* Get a porting order with optional related data
|
|
329
|
+
* @param {string} id - Porting order ID
|
|
330
|
+
* @param {Object} [options]
|
|
331
|
+
* @param {boolean} [options.includePhoneNumbers=true] - Include phone numbers array
|
|
332
|
+
* @param {boolean} [options.includeExceptions=true] - Include exceptions array
|
|
333
|
+
* @param {boolean} [options.includeDocuments=true] - Include documents array with upload status
|
|
334
|
+
* @returns {Promise<Object>} Porting order with requested related data
|
|
335
|
+
*/
|
|
336
|
+
async getPortingOrder(id, {
|
|
337
|
+
includePhoneNumbers = true,
|
|
338
|
+
includeExceptions = true,
|
|
339
|
+
includeDocuments = true
|
|
340
|
+
} = {}) {
|
|
328
341
|
this.sdk.validateParams(
|
|
329
342
|
{ id },
|
|
330
343
|
{
|
|
@@ -335,6 +348,10 @@ export class PhoneNumbersService {
|
|
|
335
348
|
const params = new URLSearchParams();
|
|
336
349
|
if (includePhoneNumbers !== undefined)
|
|
337
350
|
params.append('includePhoneNumbers', includePhoneNumbers);
|
|
351
|
+
if (includeExceptions !== undefined)
|
|
352
|
+
params.append('includeExceptions', includeExceptions);
|
|
353
|
+
if (includeDocuments !== undefined)
|
|
354
|
+
params.append('includeDocuments', includeDocuments);
|
|
338
355
|
|
|
339
356
|
const queryString = params.toString();
|
|
340
357
|
const url = queryString
|