@unboundcx/sdk 4.13.8 → 4.13.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": "4.13.
|
|
3
|
+
"version": "4.13.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",
|
|
@@ -709,10 +709,40 @@ export class EmailService {
|
|
|
709
709
|
},
|
|
710
710
|
);
|
|
711
711
|
|
|
712
|
-
const result = await internalRequest(this.sdk,
|
|
712
|
+
const result = await internalRequest(this.sdk,
|
|
713
713
|
`/messaging/email/message/${emailId}`,
|
|
714
714
|
'DELETE',
|
|
715
715
|
);
|
|
716
716
|
return result;
|
|
717
717
|
}
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Re-queue an email that failed to send (Errored folder) for another send attempt
|
|
721
|
+
* @param {string} messageId - Email message ID
|
|
722
|
+
* @returns {Promise<Object>} { id, folder, isError, message }
|
|
723
|
+
* @example
|
|
724
|
+
* await sdk.messaging.email.retry('emailId123');
|
|
725
|
+
*/
|
|
726
|
+
async retry(messageId) {
|
|
727
|
+
this.sdk.validateParams(
|
|
728
|
+
{ messageId },
|
|
729
|
+
{ messageId: { type: 'string', required: true } },
|
|
730
|
+
);
|
|
731
|
+
return internalRequest(this.sdk, `/messaging/email/${messageId}/retry`, 'POST');
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Cancel a queued/retrying outbound email send, moving it back to Drafts
|
|
736
|
+
* @param {string} messageId - Email message ID
|
|
737
|
+
* @returns {Promise<Object>} { id, folder: 'drafts' }
|
|
738
|
+
* @example
|
|
739
|
+
* await sdk.messaging.email.cancel('emailId123');
|
|
740
|
+
*/
|
|
741
|
+
async cancel(messageId) {
|
|
742
|
+
this.sdk.validateParams(
|
|
743
|
+
{ messageId },
|
|
744
|
+
{ messageId: { type: 'string', required: true } },
|
|
745
|
+
);
|
|
746
|
+
return internalRequest(this.sdk, `/messaging/email/${messageId}/cancel`, 'POST');
|
|
747
|
+
}
|
|
718
748
|
}
|