@sendly/node
Advanced tools
+28
-0
@@ -1583,2 +1583,30 @@ "use strict"; | ||
| /** | ||
| * Resend an OTP verification code | ||
| * | ||
| * @param id - Verification ID | ||
| * @returns Updated verification with new expiry | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * // Resend when delivery failed or code expired | ||
| * const result = await sendly.verify.resend('ver_xxx'); | ||
| * console.log('New code expires at:', result.expiresAt); | ||
| * ``` | ||
| */ | ||
| async resend(id) { | ||
| const response = await this.http.request({ | ||
| method: "POST", | ||
| path: `/verify/${id}/resend` | ||
| }); | ||
| return { | ||
| id: response.id, | ||
| status: response.status, | ||
| phone: response.phone, | ||
| expiresAt: response.expires_at, | ||
| sandbox: response.sandbox, | ||
| sandboxCode: response.sandbox_code, | ||
| message: response.message | ||
| }; | ||
| } | ||
| /** | ||
| * Check/verify an OTP code | ||
@@ -1585,0 +1613,0 @@ * |
+28
-0
@@ -1523,2 +1523,30 @@ // src/errors.ts | ||
| /** | ||
| * Resend an OTP verification code | ||
| * | ||
| * @param id - Verification ID | ||
| * @returns Updated verification with new expiry | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * // Resend when delivery failed or code expired | ||
| * const result = await sendly.verify.resend('ver_xxx'); | ||
| * console.log('New code expires at:', result.expiresAt); | ||
| * ``` | ||
| */ | ||
| async resend(id) { | ||
| const response = await this.http.request({ | ||
| method: "POST", | ||
| path: `/verify/${id}/resend` | ||
| }); | ||
| return { | ||
| id: response.id, | ||
| status: response.status, | ||
| phone: response.phone, | ||
| expiresAt: response.expires_at, | ||
| sandbox: response.sandbox, | ||
| sandboxCode: response.sandbox_code, | ||
| message: response.message | ||
| }; | ||
| } | ||
| /** | ||
| * Check/verify an OTP code | ||
@@ -1525,0 +1553,0 @@ * |
+1
-1
| { | ||
| "name": "@sendly/node", | ||
| "version": "3.9.0", | ||
| "version": "3.10.0", | ||
| "description": "Official Sendly Node.js SDK for SMS messaging", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
279853
0.85%7069
1%