mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-19 20:19:14 +00:00
Format phone numbers (#650)
* 📦 Declared NumberInfo in store * 📝 Add client.js functionality * 🚨 eslint just admires singlequote strings * 📝 Add shortcuts to using client method * ♿ Adding parity between the ids * ♿ Same method name parity * 🚨 ESLint indentation error. * 🚨 ESLint doublequote string error. * 🎨 Proposed changes * 🎨 Fixed badly done code :v and applied proposed changes. * ⚡ fixed calling the wrong function (sigh) * ⚡ Fixed missing try-catch code. * 🚨 Fixes ESLint indentation errors. * ⚡ fix the documentation issues. * 🏷️ typescript * 🏷️ Typo in function name Co-authored-by: Rajeh Taher <rajeh@reforward.tk>
This commit is contained in:
15
index.d.ts
vendored
15
index.d.ts
vendored
@@ -62,6 +62,12 @@ declare namespace WAWebJS {
|
||||
|
||||
/** Get all current contact instances */
|
||||
getContacts(): Promise<Contact[]>
|
||||
|
||||
/** Get the country code of a WhatsApp ID. (154185968@c.us) => (1) */
|
||||
getCountryCode(number: string): Promise<string>
|
||||
|
||||
/** Get the formatted number of a WhatsApp ID. (12345678901@c.us) => (+1 (234) 5678-901) */
|
||||
getFormattedNumber(number: string): Promise<string>
|
||||
|
||||
/** Get all current Labels */
|
||||
getLabels(): Promise<Label[]>
|
||||
@@ -786,9 +792,16 @@ declare namespace WAWebJS {
|
||||
* Will return null when getting chat for currently logged in user.
|
||||
*/
|
||||
getChat: () => Promise<Chat>,
|
||||
|
||||
|
||||
/** Returns the contact's countrycode, (1541859685@c.us) => (1) */
|
||||
getCountryCode(): Promise<string>,
|
||||
|
||||
/** Returns the contact's formatted phone number, (12345678901@c.us) => (+1 (234) 5678-901) */
|
||||
getFormattedNumber(): Promise<string>,
|
||||
|
||||
/** Blocks this contact from WhatsApp */
|
||||
block: () => Promise<boolean>,
|
||||
|
||||
/** Unlocks this contact from WhatsApp */
|
||||
unblock: () => Promise<boolean>,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user