@unboundcx/sdk 2.5.1 → 2.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.
- package/package.json +1 -1
- package/services/phoneNumbers.js +32 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.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/phoneNumbers.js
CHANGED
|
@@ -545,6 +545,38 @@ export class PhoneNumbersService {
|
|
|
545
545
|
return result;
|
|
546
546
|
}
|
|
547
547
|
|
|
548
|
+
/**
|
|
549
|
+
* Generate Letter of Authorization (LOA) for a porting order
|
|
550
|
+
*
|
|
551
|
+
* Automatically generates a PDF LOA document using template data from the porting order,
|
|
552
|
+
* uploads it to storage, and attaches it to the order as an LOA document.
|
|
553
|
+
*
|
|
554
|
+
* @param {Object} params
|
|
555
|
+
* @param {string} params.portingOrderId - Porting order ID to generate LOA for
|
|
556
|
+
* @param {string} params.signerName - Full name of person signing the LOA
|
|
557
|
+
* @param {string} params.signerTitle - Job title of person signing the LOA
|
|
558
|
+
* @returns {Promise<Object>} Generation result with document ID and storage information
|
|
559
|
+
*/
|
|
560
|
+
async generateLoa({ portingOrderId, signerName, signerTitle }) {
|
|
561
|
+
this.sdk.validateParams(
|
|
562
|
+
{ portingOrderId, signerName, signerTitle },
|
|
563
|
+
{
|
|
564
|
+
portingOrderId: { type: 'string', required: true },
|
|
565
|
+
signerName: { type: 'string', required: true },
|
|
566
|
+
signerTitle: { type: 'string', required: true },
|
|
567
|
+
},
|
|
568
|
+
);
|
|
569
|
+
|
|
570
|
+
const result = await this.sdk._fetch(
|
|
571
|
+
`/phoneNumbers/porting/orders/${encodeURIComponent(portingOrderId)}/generate-loa`,
|
|
572
|
+
'POST',
|
|
573
|
+
{
|
|
574
|
+
body: { signerName, signerTitle },
|
|
575
|
+
},
|
|
576
|
+
);
|
|
577
|
+
return result;
|
|
578
|
+
}
|
|
579
|
+
|
|
548
580
|
async getPortingEvents(id, { page, limit } = {}) {
|
|
549
581
|
this.sdk.validateParams(
|
|
550
582
|
{ id },
|