@sendly/node 3.9.0 → 3.10.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/dist/index.d.mts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +28 -0
- package/dist/index.mjs +28 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1791,6 +1791,20 @@ declare class VerifyResource {
|
|
|
1791
1791
|
* ```
|
|
1792
1792
|
*/
|
|
1793
1793
|
send(request: SendVerificationRequest): Promise<SendVerificationResponse>;
|
|
1794
|
+
/**
|
|
1795
|
+
* Resend an OTP verification code
|
|
1796
|
+
*
|
|
1797
|
+
* @param id - Verification ID
|
|
1798
|
+
* @returns Updated verification with new expiry
|
|
1799
|
+
*
|
|
1800
|
+
* @example
|
|
1801
|
+
* ```typescript
|
|
1802
|
+
* // Resend when delivery failed or code expired
|
|
1803
|
+
* const result = await sendly.verify.resend('ver_xxx');
|
|
1804
|
+
* console.log('New code expires at:', result.expiresAt);
|
|
1805
|
+
* ```
|
|
1806
|
+
*/
|
|
1807
|
+
resend(id: string): Promise<SendVerificationResponse>;
|
|
1794
1808
|
/**
|
|
1795
1809
|
* Check/verify an OTP code
|
|
1796
1810
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1791,6 +1791,20 @@ declare class VerifyResource {
|
|
|
1791
1791
|
* ```
|
|
1792
1792
|
*/
|
|
1793
1793
|
send(request: SendVerificationRequest): Promise<SendVerificationResponse>;
|
|
1794
|
+
/**
|
|
1795
|
+
* Resend an OTP verification code
|
|
1796
|
+
*
|
|
1797
|
+
* @param id - Verification ID
|
|
1798
|
+
* @returns Updated verification with new expiry
|
|
1799
|
+
*
|
|
1800
|
+
* @example
|
|
1801
|
+
* ```typescript
|
|
1802
|
+
* // Resend when delivery failed or code expired
|
|
1803
|
+
* const result = await sendly.verify.resend('ver_xxx');
|
|
1804
|
+
* console.log('New code expires at:', result.expiresAt);
|
|
1805
|
+
* ```
|
|
1806
|
+
*/
|
|
1807
|
+
resend(id: string): Promise<SendVerificationResponse>;
|
|
1794
1808
|
/**
|
|
1795
1809
|
* Check/verify an OTP code
|
|
1796
1810
|
*
|
package/dist/index.js
CHANGED
|
@@ -1579,6 +1579,34 @@ var VerifyResource = class {
|
|
|
1579
1579
|
message: response.message
|
|
1580
1580
|
};
|
|
1581
1581
|
}
|
|
1582
|
+
/**
|
|
1583
|
+
* Resend an OTP verification code
|
|
1584
|
+
*
|
|
1585
|
+
* @param id - Verification ID
|
|
1586
|
+
* @returns Updated verification with new expiry
|
|
1587
|
+
*
|
|
1588
|
+
* @example
|
|
1589
|
+
* ```typescript
|
|
1590
|
+
* // Resend when delivery failed or code expired
|
|
1591
|
+
* const result = await sendly.verify.resend('ver_xxx');
|
|
1592
|
+
* console.log('New code expires at:', result.expiresAt);
|
|
1593
|
+
* ```
|
|
1594
|
+
*/
|
|
1595
|
+
async resend(id) {
|
|
1596
|
+
const response = await this.http.request({
|
|
1597
|
+
method: "POST",
|
|
1598
|
+
path: `/verify/${id}/resend`
|
|
1599
|
+
});
|
|
1600
|
+
return {
|
|
1601
|
+
id: response.id,
|
|
1602
|
+
status: response.status,
|
|
1603
|
+
phone: response.phone,
|
|
1604
|
+
expiresAt: response.expires_at,
|
|
1605
|
+
sandbox: response.sandbox,
|
|
1606
|
+
sandboxCode: response.sandbox_code,
|
|
1607
|
+
message: response.message
|
|
1608
|
+
};
|
|
1609
|
+
}
|
|
1582
1610
|
/**
|
|
1583
1611
|
* Check/verify an OTP code
|
|
1584
1612
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -1519,6 +1519,34 @@ var VerifyResource = class {
|
|
|
1519
1519
|
message: response.message
|
|
1520
1520
|
};
|
|
1521
1521
|
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Resend an OTP verification code
|
|
1524
|
+
*
|
|
1525
|
+
* @param id - Verification ID
|
|
1526
|
+
* @returns Updated verification with new expiry
|
|
1527
|
+
*
|
|
1528
|
+
* @example
|
|
1529
|
+
* ```typescript
|
|
1530
|
+
* // Resend when delivery failed or code expired
|
|
1531
|
+
* const result = await sendly.verify.resend('ver_xxx');
|
|
1532
|
+
* console.log('New code expires at:', result.expiresAt);
|
|
1533
|
+
* ```
|
|
1534
|
+
*/
|
|
1535
|
+
async resend(id) {
|
|
1536
|
+
const response = await this.http.request({
|
|
1537
|
+
method: "POST",
|
|
1538
|
+
path: `/verify/${id}/resend`
|
|
1539
|
+
});
|
|
1540
|
+
return {
|
|
1541
|
+
id: response.id,
|
|
1542
|
+
status: response.status,
|
|
1543
|
+
phone: response.phone,
|
|
1544
|
+
expiresAt: response.expires_at,
|
|
1545
|
+
sandbox: response.sandbox,
|
|
1546
|
+
sandboxCode: response.sandbox_code,
|
|
1547
|
+
message: response.message
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1522
1550
|
/**
|
|
1523
1551
|
* Check/verify an OTP code
|
|
1524
1552
|
*
|