@arcaelas/whatsapp 1.4.0 → 2.1.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/build/cjs/Chat.d.ts +199 -217
- package/build/cjs/Chat.js +151 -274
- package/build/cjs/Chat.js.map +1 -1
- package/build/cjs/Contact.d.ts +455 -148
- package/build/cjs/Contact.js +74 -103
- package/build/cjs/Contact.js.map +1 -1
- package/build/cjs/Message.d.ts +587 -265
- package/build/cjs/Message.js +304 -254
- package/build/cjs/Message.js.map +1 -1
- package/build/cjs/WhatsApp.d.ts +19 -7
- package/build/cjs/WhatsApp.js +88 -80
- package/build/cjs/WhatsApp.js.map +1 -1
- package/build/cjs/index.d.ts +2 -2
- package/build/cjs/store/driver/FileEngine.d.ts +13 -2
- package/build/cjs/store/driver/FileEngine.js +15 -19
- package/build/cjs/store/driver/FileEngine.js.map +1 -1
- package/build/cjs/store/driver/RedisEngine.d.ts +13 -4
- package/build/cjs/store/driver/RedisEngine.js +23 -22
- package/build/cjs/store/driver/RedisEngine.js.map +1 -1
- package/build/cjs/store/engine.d.ts +9 -10
- package/build/esm/Chat.d.ts +199 -217
- package/build/esm/Chat.js +151 -273
- package/build/esm/Chat.js.map +1 -1
- package/build/esm/Contact.d.ts +455 -148
- package/build/esm/Contact.js +74 -102
- package/build/esm/Contact.js.map +1 -1
- package/build/esm/Message.d.ts +587 -265
- package/build/esm/Message.js +305 -254
- package/build/esm/Message.js.map +1 -1
- package/build/esm/WhatsApp.d.ts +19 -7
- package/build/esm/WhatsApp.js +91 -83
- package/build/esm/WhatsApp.js.map +1 -1
- package/build/esm/index.d.ts +2 -2
- package/build/esm/store/driver/FileEngine.d.ts +13 -2
- package/build/esm/store/driver/FileEngine.js +15 -19
- package/build/esm/store/driver/FileEngine.js.map +1 -1
- package/build/esm/store/driver/RedisEngine.d.ts +13 -4
- package/build/esm/store/driver/RedisEngine.js +23 -22
- package/build/esm/store/driver/RedisEngine.js.map +1 -1
- package/build/esm/store/engine.d.ts +9 -10
- package/package.json +2 -2
package/build/esm/Contact.js
CHANGED
|
@@ -3,65 +3,57 @@
|
|
|
3
3
|
* @description Clase Contact para gestión de contactos de WhatsApp
|
|
4
4
|
*/
|
|
5
5
|
import { BufferJSON, jidNormalizedUser } from 'baileys';
|
|
6
|
+
/**
|
|
7
|
+
* @description Construye IContactRaw normalizado.
|
|
8
|
+
* Builds a normalized IContactRaw.
|
|
9
|
+
*/
|
|
10
|
+
function build_contact(raw) {
|
|
11
|
+
return {
|
|
12
|
+
id: raw.id,
|
|
13
|
+
lid: raw.lid ?? null,
|
|
14
|
+
name: raw.name ?? null,
|
|
15
|
+
notify: raw.notify ?? null,
|
|
16
|
+
verifiedName: raw.verifiedName ?? null,
|
|
17
|
+
imgUrl: raw.imgUrl ?? null,
|
|
18
|
+
status: raw.status ?? null,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
6
21
|
/**
|
|
7
22
|
* @description
|
|
8
23
|
* Clase base para representar un contacto de WhatsApp.
|
|
9
|
-
*
|
|
24
|
+
* Base class representing a WhatsApp contact.
|
|
10
25
|
*/
|
|
11
26
|
export class Contact {
|
|
12
|
-
constructor(
|
|
13
|
-
this.raw =
|
|
14
|
-
}
|
|
15
|
-
/** JID único del contacto */
|
|
16
|
-
get id() {
|
|
17
|
-
return this.raw.id;
|
|
18
|
-
}
|
|
19
|
-
/** Nombre del contacto */
|
|
20
|
-
get name() {
|
|
21
|
-
return this.raw.name ?? this.raw.notify ?? this.raw.id.split('@')[0];
|
|
22
|
-
}
|
|
23
|
-
/** URL de la foto de perfil o null */
|
|
24
|
-
get photo() {
|
|
25
|
-
return this.raw.imgUrl ?? null;
|
|
26
|
-
}
|
|
27
|
-
/** Número de teléfono sin formato */
|
|
28
|
-
get phone() {
|
|
29
|
-
return this.raw.id.split('@')[0];
|
|
30
|
-
}
|
|
31
|
-
/** Bio del contacto */
|
|
32
|
-
get content() {
|
|
33
|
-
return this.raw.status ?? '';
|
|
27
|
+
constructor(raw) {
|
|
28
|
+
this.raw = raw;
|
|
34
29
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
photo: raw.imgUrl ?? null,
|
|
46
|
-
phone: raw.id.split('@')[0],
|
|
47
|
-
content: raw.status ?? '',
|
|
48
|
-
raw,
|
|
49
|
-
};
|
|
30
|
+
/** JID único del contacto / Unique contact JID */
|
|
31
|
+
get id() { return this.raw.id; }
|
|
32
|
+
/** Nombre del contacto / Contact name */
|
|
33
|
+
get name() { return this.raw.name ?? this.raw.notify ?? this.raw.id.split('@')[0]; }
|
|
34
|
+
/** URL de la foto de perfil o null / Profile picture URL or null */
|
|
35
|
+
get photo() { return this.raw.imgUrl ?? null; }
|
|
36
|
+
/** Número de teléfono sin formato / Phone number without format */
|
|
37
|
+
get phone() { return this.raw.id.split('@')[0]; }
|
|
38
|
+
/** Bio del contacto / Contact bio */
|
|
39
|
+
get content() { return this.raw.status ?? ''; }
|
|
50
40
|
}
|
|
51
41
|
/**
|
|
52
42
|
* @description Factory que retorna la clase Contact enlazada al contexto.
|
|
43
|
+
* Factory that returns the Contact class bound to context.
|
|
53
44
|
* @param wa Instancia de WhatsApp.
|
|
54
|
-
* @returns Clase _Contact que extiende Contact.
|
|
55
45
|
*/
|
|
56
46
|
export function contact(wa) {
|
|
57
47
|
return class _Contact extends Contact {
|
|
58
48
|
/**
|
|
59
49
|
* @description Obtiene un contacto por su ID.
|
|
60
|
-
*
|
|
61
|
-
* @
|
|
50
|
+
* Retrieves a contact by its ID.
|
|
51
|
+
* @param uid JID del contacto o número de teléfono.
|
|
62
52
|
*/
|
|
63
53
|
static async get(uid) {
|
|
64
|
-
const jid =
|
|
54
|
+
const jid = await wa.resolveJID(uid);
|
|
55
|
+
if (!jid)
|
|
56
|
+
return null;
|
|
65
57
|
const stored = await wa.engine.get(`contact/${jid}/index`);
|
|
66
58
|
if (stored)
|
|
67
59
|
return new _Contact(JSON.parse(stored, BufferJSON.reviver));
|
|
@@ -72,12 +64,10 @@ export function contact(wa) {
|
|
|
72
64
|
return null;
|
|
73
65
|
const id = jidNormalizedUser(found.jid);
|
|
74
66
|
const raw = { id, name: null, notify: null, imgUrl: null, status: null };
|
|
75
|
-
// Obtener foto de perfil
|
|
76
67
|
try {
|
|
77
68
|
raw.imgUrl = (await wa.socket.profilePictureUrl(id, 'image')) ?? null;
|
|
78
69
|
}
|
|
79
70
|
catch { /* profile picture may not exist */ }
|
|
80
|
-
// Obtener estado/bio
|
|
81
71
|
try {
|
|
82
72
|
const result = await wa.socket.fetchStatus(id);
|
|
83
73
|
const status_data = result?.[0];
|
|
@@ -88,92 +78,74 @@ export function contact(wa) {
|
|
|
88
78
|
await wa.engine.set(`contact/${id}/index`, JSON.stringify(data, BufferJSON.replacer));
|
|
89
79
|
return new _Contact(data);
|
|
90
80
|
}
|
|
91
|
-
/**
|
|
92
|
-
* @description Actualiza los datos del perfil desde WhatsApp.
|
|
93
|
-
* @param uid JID del contacto.
|
|
94
|
-
* @returns Contacto actualizado o null.
|
|
95
|
-
*/
|
|
96
|
-
static async refresh(uid) {
|
|
97
|
-
const jid = uid.includes('@') ? uid : `${uid}@s.whatsapp.net`;
|
|
98
|
-
if (!wa.socket)
|
|
99
|
-
return null;
|
|
100
|
-
const stored = await wa.engine.get(`contact/${jid}/index`);
|
|
101
|
-
const data = stored ? JSON.parse(stored, BufferJSON.reviver) : build_contact({ id: jid });
|
|
102
|
-
// Obtener foto de perfil
|
|
103
|
-
try {
|
|
104
|
-
data.raw.imgUrl = (await wa.socket.profilePictureUrl(jid, 'image')) ?? null;
|
|
105
|
-
data.photo = data.raw.imgUrl;
|
|
106
|
-
}
|
|
107
|
-
catch { /* profile picture may not exist */ }
|
|
108
|
-
// Obtener estado/bio
|
|
109
|
-
try {
|
|
110
|
-
const result = await wa.socket.fetchStatus(jid);
|
|
111
|
-
const status_data = result?.[0];
|
|
112
|
-
data.raw.status = status_data?.status?.status ?? null;
|
|
113
|
-
data.content = data.raw.status ?? '';
|
|
114
|
-
}
|
|
115
|
-
catch { /* status fetch may fail */ }
|
|
116
|
-
await wa.engine.set(`contact/${jid}/index`, JSON.stringify(data, BufferJSON.replacer));
|
|
117
|
-
return new _Contact(data);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* @description Cambia el nombre de un contacto.
|
|
121
|
-
* @param uid JID del contacto.
|
|
122
|
-
* @param name Nuevo nombre.
|
|
123
|
-
* @returns true si se guardó correctamente.
|
|
124
|
-
*/
|
|
125
|
-
static async rename(uid, name) {
|
|
126
|
-
const jid = uid.includes('@') ? uid : `${uid}@s.whatsapp.net`;
|
|
127
|
-
const stored = await wa.engine.get(`contact/${jid}/index`);
|
|
128
|
-
if (!stored)
|
|
129
|
-
return false;
|
|
130
|
-
const data = JSON.parse(stored, BufferJSON.reviver);
|
|
131
|
-
data.raw.name = name;
|
|
132
|
-
data.name = name;
|
|
133
|
-
await wa.engine.set(`contact/${jid}/index`, JSON.stringify(data, BufferJSON.replacer));
|
|
134
|
-
return true;
|
|
135
|
-
}
|
|
136
81
|
/**
|
|
137
82
|
* @description Obtiene contactos paginados.
|
|
83
|
+
* Retrieves paginated contacts.
|
|
138
84
|
* @param offset Inicio de paginación.
|
|
139
85
|
* @param limit Cantidad máxima de resultados.
|
|
140
|
-
* @returns Array de contactos.
|
|
141
86
|
*/
|
|
142
|
-
static async
|
|
87
|
+
static async list(offset = 0, limit = 50) {
|
|
143
88
|
const contacts = [];
|
|
144
|
-
for (const key of await wa.engine.list('contact/', offset, limit
|
|
89
|
+
for (const key of await wa.engine.list('contact/', offset, limit)) {
|
|
145
90
|
const stored = await wa.engine.get(key);
|
|
146
91
|
if (stored)
|
|
147
92
|
contacts.push(new _Contact(JSON.parse(stored, BufferJSON.reviver)));
|
|
148
93
|
}
|
|
149
94
|
return contacts;
|
|
150
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* @description Cambia el nombre de un contacto por su ID.
|
|
98
|
+
* Renames a contact by its ID.
|
|
99
|
+
*/
|
|
100
|
+
static async rename(uid, name) {
|
|
101
|
+
const contact = await _Contact.get(uid);
|
|
102
|
+
return contact ? contact.rename(name) : false;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @description Actualiza los datos de un contacto desde WhatsApp por su ID.
|
|
106
|
+
* Refreshes a contact's data from WhatsApp by its ID.
|
|
107
|
+
*/
|
|
108
|
+
static async refresh(uid) {
|
|
109
|
+
const contact = await _Contact.get(uid);
|
|
110
|
+
return contact ? contact.refresh() : null;
|
|
111
|
+
}
|
|
151
112
|
/**
|
|
152
113
|
* @description Cambia el nombre del contacto.
|
|
114
|
+
* Renames the contact.
|
|
153
115
|
* @param name Nuevo nombre.
|
|
154
|
-
* @returns true si se guardó correctamente.
|
|
155
116
|
*/
|
|
156
117
|
async rename(name) {
|
|
157
|
-
const
|
|
158
|
-
if (
|
|
118
|
+
const stored = await wa.engine.get(`contact/${this.id}/index`);
|
|
119
|
+
if (stored) {
|
|
159
120
|
this.raw.name = name;
|
|
160
|
-
|
|
121
|
+
await wa.engine.set(`contact/${this.id}/index`, JSON.stringify(this.raw, BufferJSON.replacer));
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
return false;
|
|
161
125
|
}
|
|
162
126
|
/**
|
|
163
127
|
* @description Actualiza los datos del perfil desde WhatsApp.
|
|
164
|
-
*
|
|
128
|
+
* Refreshes profile data from WhatsApp.
|
|
165
129
|
*/
|
|
166
130
|
async refresh() {
|
|
167
|
-
|
|
168
|
-
if (!updated)
|
|
131
|
+
if (!wa.socket)
|
|
169
132
|
return null;
|
|
170
|
-
|
|
171
|
-
|
|
133
|
+
try {
|
|
134
|
+
this.raw.imgUrl = (await wa.socket.profilePictureUrl(this.id, 'image')) ?? null;
|
|
135
|
+
}
|
|
136
|
+
catch { /* profile picture may not exist */ }
|
|
137
|
+
try {
|
|
138
|
+
const result = await wa.socket.fetchStatus(this.id);
|
|
139
|
+
const status_data = result?.[0];
|
|
140
|
+
this.raw.status = status_data?.status?.status ?? null;
|
|
141
|
+
}
|
|
142
|
+
catch { /* status fetch may fail */ }
|
|
143
|
+
await wa.engine.set(`contact/${this.id}/index`, JSON.stringify(this.raw, BufferJSON.replacer));
|
|
172
144
|
return this;
|
|
173
145
|
}
|
|
174
146
|
/**
|
|
175
147
|
* @description Obtiene o crea el chat con este contacto.
|
|
176
|
-
*
|
|
148
|
+
* Gets or creates the chat with this contact.
|
|
177
149
|
*/
|
|
178
150
|
async chat() {
|
|
179
151
|
return wa.Chat.get(this.id);
|
package/build/esm/Contact.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contact.js","sourceRoot":"","sources":["../../src/Contact.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Contact.js","sourceRoot":"","sources":["../../src/Contact.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAwBxD;;;GAGG;AACH,SAAS,aAAa,CAAC,GAAgB;IACnC,OAAO;QACH,EAAE,EAAE,GAAG,CAAC,EAAE;QACV,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,IAAI;QACpB,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,IAAI;QACtB,MAAM,EAAE,GAAG,CAAC,MAAM,IAAI,IAAI;QAC1B,YAAY,EAAE,GAAG,CAAC,YAAY,IAAI,IAAI;QACtC,MAAM,EAAE,GAAG,CAAC,MAAM,IAAI,IAAI;QAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,IAAI,IAAI;KAC7B,CAAC;AACN,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,OAAO;IAChB,YAAqB,GAAgB;QAA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