@unboundcx/sdk 2.6.8 → 2.6.9

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": "2.6.8",
3
+ "version": "2.6.9",
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",
@@ -321,29 +321,30 @@ export class PhoneNumbersService {
321
321
 
322
322
  async getPortingOrders({
323
323
  page,
324
- includePhoneNumbers = true,
325
324
  status,
326
325
  customerReference,
327
326
  sort,
328
327
  limit,
328
+ id,
329
+ operatorType = 'contains',
329
330
  } = {}) {
330
- const params = new URLSearchParams();
331
+ const query = {
332
+ page,
333
+ status,
334
+ customerReference,
335
+ id,
336
+ operatorType,
337
+ sort,
338
+ limit,
339
+ };
331
340
 
332
- if (page) params.append('page', page);
333
- if (includePhoneNumbers !== undefined)
334
- params.append('includePhoneNumbers', includePhoneNumbers);
335
- if (status) params.append('status', status);
336
- if (customerReference)
337
- params.append('customerReference', customerReference);
338
- if (sort) params.append('sort', sort);
339
- if (limit) params.append('limit', limit);
341
+ const url = '/phoneNumbers/porting/orders';
340
342
 
341
- const queryString = params.toString();
342
- const url = queryString
343
- ? `/phoneNumbers/porting/orders?${queryString}`
344
- : '/phoneNumbers/porting/orders';
343
+ const params = {
344
+ query,
345
+ };
345
346
 
346
- const result = await this.sdk._fetch(url, 'GET');
347
+ const result = await this.sdk._fetch(url, 'GET', params);
347
348
  return result;
348
349
  }
349
350
 
@@ -695,10 +696,10 @@ export class PhoneNumbersService {
695
696
  * @example
696
697
  * // Get all comments
697
698
  * const allComments = await sdk.phoneNumbers.getPortingComments("port_123...");
698
- *
699
+ *
699
700
  * // Get only public comments
700
701
  * const publicComments = await sdk.phoneNumbers.getPortingComments("port_123...", { includeInternal: 'false' });
701
- *
702
+ *
702
703
  * // Get only internal comments
703
704
  * const internalComments = await sdk.phoneNumbers.getPortingComments("port_123...", { includeInternal: 'only' });
704
705
  */
@@ -716,7 +717,9 @@ export class PhoneNumbersService {
716
717
  }
717
718
 
718
719
  const queryString = params.toString();
719
- const url = `/phoneNumbers/porting/orders/${id}/comments${queryString ? '?' + queryString : ''}`;
720
+ const url = `/phoneNumbers/porting/orders/${id}/comments${
721
+ queryString ? '?' + queryString : ''
722
+ }`;
720
723
 
721
724
  const result = await this.sdk._fetch(url, 'GET');
722
725
  return result;
@@ -735,7 +738,7 @@ export class PhoneNumbersService {
735
738
  * comment: "Please expedite this port request",
736
739
  * isInternal: false
737
740
  * });
738
- *
741
+ *
739
742
  * // Post an internal comment (team use only)
740
743
  * const internalComment = await sdk.phoneNumbers.postPortingComment("port_123...", {
741
744
  * comment: "Customer called - they need this ASAP",
@@ -764,11 +767,11 @@ export class PhoneNumbersService {
764
767
 
765
768
  /**
766
769
  * Auto-create porting orders by grouping phone numbers by carrier
767
- *
770
+ *
768
771
  * Analyzes phone numbers using internal LRN lookup, groups them by carrier,
769
- * and either previews the groupings (dry run) or creates separate porting
772
+ * and either previews the groupings (dry run) or creates separate porting
770
773
  * orders for each carrier group.
771
- *
774
+ *
772
775
  * @param {Object} params
773
776
  * @param {string[]} params.phoneNumbers - Array of +E.164 formatted phone numbers (max 100)
774
777
  * @param {string} params.name - Base name for orders (will be appended with carrier names)
@@ -782,7 +785,7 @@ export class PhoneNumbersService {
782
785
  * dryRun: true
783
786
  * });
784
787
  * // Returns carrier groups with proposed order names
785
- *
788
+ *
786
789
  * // Create orders for each carrier
787
790
  * const result = await sdk.phoneNumbers.autoCreateOrders({
788
791
  * phoneNumbers: ['+15551234567', '+15551234568', '+15551234569'],