@arcaelas/whatsapp 4.4.0 → 5.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.
Files changed (97) hide show
  1. package/build/cjs/index.d.ts +6 -4
  2. package/build/cjs/index.js +22 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/lib/bot/decorator.d.ts +2 -0
  5. package/build/cjs/lib/bot/decorator.js +6 -0
  6. package/build/cjs/lib/bot/decorator.js.map +1 -1
  7. package/build/cjs/lib/chat/index.d.ts +340 -204
  8. package/build/cjs/lib/chat/index.js +225 -213
  9. package/build/cjs/lib/chat/index.js.map +1 -1
  10. package/build/cjs/lib/contact/index.d.ts +162 -179
  11. package/build/cjs/lib/contact/index.js +96 -190
  12. package/build/cjs/lib/contact/index.js.map +1 -1
  13. package/build/cjs/lib/internal.d.ts +40 -0
  14. package/build/cjs/lib/internal.js +39 -0
  15. package/build/cjs/lib/internal.js.map +1 -0
  16. package/build/cjs/lib/message/index.d.ts +463 -278
  17. package/build/cjs/lib/message/index.js +830 -710
  18. package/build/cjs/lib/message/index.js.map +1 -1
  19. package/build/cjs/lib/status/index.d.ts +60 -70
  20. package/build/cjs/lib/status/index.js +106 -111
  21. package/build/cjs/lib/status/index.js.map +1 -1
  22. package/build/cjs/lib/store/engine/index.d.ts +21 -7
  23. package/build/cjs/lib/store/engine/index.js +6 -3
  24. package/build/cjs/lib/store/engine/index.js.map +1 -1
  25. package/build/cjs/lib/store/engine/lib/file_system/index.d.ts +38 -8
  26. package/build/cjs/lib/store/engine/lib/file_system/index.js +92 -67
  27. package/build/cjs/lib/store/engine/lib/file_system/index.js.map +1 -1
  28. package/build/cjs/lib/store/engine/lib/index.d.ts +112 -0
  29. package/build/cjs/lib/store/engine/lib/index.js +213 -0
  30. package/build/cjs/lib/store/engine/lib/index.js.map +1 -0
  31. package/build/cjs/lib/store/engine/lib/redis/index.d.ts +28 -13
  32. package/build/cjs/lib/store/engine/lib/redis/index.js +56 -42
  33. package/build/cjs/lib/store/engine/lib/redis/index.js.map +1 -1
  34. package/build/cjs/lib/store/engine/lib/s3/index.d.ts +44 -1
  35. package/build/cjs/lib/store/engine/lib/s3/index.js +112 -64
  36. package/build/cjs/lib/store/engine/lib/s3/index.js.map +1 -1
  37. package/build/cjs/lib/store/engine/lib/sqlite/index.d.ts +98 -0
  38. package/build/cjs/lib/store/engine/lib/sqlite/index.js +114 -0
  39. package/build/cjs/lib/store/engine/lib/sqlite/index.js.map +1 -0
  40. package/build/cjs/lib/store/index.d.ts +7 -3
  41. package/build/cjs/lib/store/index.js +14 -4
  42. package/build/cjs/lib/store/index.js.map +1 -1
  43. package/build/cjs/lib/whatsapp/index.d.ts +117 -63
  44. package/build/cjs/lib/whatsapp/index.js +404 -184
  45. package/build/cjs/lib/whatsapp/index.js.map +1 -1
  46. package/build/cjs/test.d.ts +1 -0
  47. package/build/cjs/test.js +72 -0
  48. package/build/cjs/test.js.map +1 -0
  49. package/build/esm/index.d.ts +6 -4
  50. package/build/esm/index.js +5 -2
  51. package/build/esm/index.js.map +1 -1
  52. package/build/esm/lib/bot/decorator.d.ts +2 -0
  53. package/build/esm/lib/bot/decorator.js +6 -0
  54. package/build/esm/lib/bot/decorator.js.map +1 -1
  55. package/build/esm/lib/chat/index.d.ts +340 -204
  56. package/build/esm/lib/chat/index.js +225 -213
  57. package/build/esm/lib/chat/index.js.map +1 -1
  58. package/build/esm/lib/contact/index.d.ts +162 -179
  59. package/build/esm/lib/contact/index.js +96 -189
  60. package/build/esm/lib/contact/index.js.map +1 -1
  61. package/build/esm/lib/internal.d.ts +40 -0
  62. package/build/esm/lib/internal.js +35 -0
  63. package/build/esm/lib/internal.js.map +1 -0
  64. package/build/esm/lib/message/index.d.ts +463 -278
  65. package/build/esm/lib/message/index.js +825 -705
  66. package/build/esm/lib/message/index.js.map +1 -1
  67. package/build/esm/lib/status/index.d.ts +60 -70
  68. package/build/esm/lib/status/index.js +105 -110
  69. package/build/esm/lib/status/index.js.map +1 -1
  70. package/build/esm/lib/store/engine/index.d.ts +21 -7
  71. package/build/esm/lib/store/engine/index.js +4 -2
  72. package/build/esm/lib/store/engine/index.js.map +1 -1
  73. package/build/esm/lib/store/engine/lib/file_system/index.d.ts +38 -8
  74. package/build/esm/lib/store/engine/lib/file_system/index.js +92 -67
  75. package/build/esm/lib/store/engine/lib/file_system/index.js.map +1 -1
  76. package/build/esm/lib/store/engine/lib/index.d.ts +112 -0
  77. package/build/esm/lib/store/engine/lib/index.js +206 -0
  78. package/build/esm/lib/store/engine/lib/index.js.map +1 -0
  79. package/build/esm/lib/store/engine/lib/redis/index.d.ts +28 -13
  80. package/build/esm/lib/store/engine/lib/redis/index.js +54 -40
  81. package/build/esm/lib/store/engine/lib/redis/index.js.map +1 -1
  82. package/build/esm/lib/store/engine/lib/s3/index.d.ts +44 -1
  83. package/build/esm/lib/store/engine/lib/s3/index.js +111 -63
  84. package/build/esm/lib/store/engine/lib/s3/index.js.map +1 -1
  85. package/build/esm/lib/store/engine/lib/sqlite/index.d.ts +98 -0
  86. package/build/esm/lib/store/engine/lib/sqlite/index.js +110 -0
  87. package/build/esm/lib/store/engine/lib/sqlite/index.js.map +1 -0
  88. package/build/esm/lib/store/index.d.ts +7 -3
  89. package/build/esm/lib/store/index.js +13 -4
  90. package/build/esm/lib/store/index.js.map +1 -1
  91. package/build/esm/lib/whatsapp/index.d.ts +117 -63
  92. package/build/esm/lib/whatsapp/index.js +406 -186
  93. package/build/esm/lib/whatsapp/index.js.map +1 -1
  94. package/build/esm/test.d.ts +1 -0
  95. package/build/esm/test.js +67 -0
  96. package/build/esm/test.js.map +1 -0
  97. package/package.json +2 -2
@@ -1,62 +1,60 @@
1
1
  /**
2
2
  * @file contact/index.ts
3
- * @description Entidad Contact — lectura/escritura documental sobre `wa.engine`.
4
- * Contact entity — documental read/write over `wa.engine`.
3
+ * @description Entidad Contact — una ficha mínima derivada del raw del contacto.
4
+ * Contact entity — a minimal card derived from the raw contact document.
5
5
  */
6
- import { Chat } from '../../lib/chat';
7
6
  import type { WhatsApp } from '../../lib/whatsapp';
8
7
  /**
9
- * Shape persistido del contacto.
10
- * Persisted contact shape.
11
- */
12
- export interface IContactRaw {
13
- id: string;
14
- lid?: string | null;
15
- name?: string | null;
16
- notify?: string | null;
17
- verified_name?: string | null;
18
- img_url?: string | null;
19
- status?: string | null;
20
- }
21
- /**
22
- * Resuelve el nombre mostrado de un contacto con prioridad local → push → teléfono.
23
- * Resolves a contact's display name with priority local → push → phone number.
24
- *
25
- * @param raw - Documento persistido del contacto / Persisted contact document
26
- * @returns Nombre mostrado / Display name
27
- */
28
- export declare function contact_name(raw: IContactRaw): string;
29
- /**
30
- * Clase base del contacto (forma pública, solo lectura).
31
- * Base Contact class (public shape, read-only).
8
+ * Clase base del contacto: recibe el raw de baileys y deriva todo con getters.
9
+ * Base Contact class: receives the baileys raw and derives everything via getters.
32
10
  */
33
11
  export declare class Contact {
34
- /** @internal Shape persistido. Uso interno (convención underscore). / Internal persisted shape. */
35
- readonly _raw: IContactRaw;
36
- /** @internal Chat 1:1 asociado ya hidratado. / Internal already-hydrated 1:1 chat. */
37
- readonly _chat: Chat;
38
- constructor(raw: IContactRaw, chat: Chat);
39
- /** JID único. / Unique JID. */
40
- get id(): string;
41
- /** JID (alias). / JID (alias). */
42
- get jid(): string;
43
- /** LID si está disponible. / LID when available. */
44
- get lid(): string | null;
45
- /** Nombre: local push teléfono. / Name: local push phone. */
12
+ readonly _raw: {
13
+ id: string;
14
+ lid?: string | null;
15
+ phone_number?: string | null;
16
+ name?: string | null;
17
+ notify?: string | null;
18
+ verified_name?: string | null;
19
+ img_url?: string | null;
20
+ status?: string | null;
21
+ };
22
+ /**
23
+ * @internal Documento crudo del contacto en snake_case. `id` llega en formato LID o PN
24
+ * según el addressing; `phone_number` es el JID PN cuando baileys lo conoce.
25
+ * Raw contact document in snake_case. `id` arrives in LID or PN format depending on
26
+ * addressing; `phone_number` is the PN JID when baileys knows it.
27
+ */
28
+ constructor(_raw: {
29
+ id: string;
30
+ lid?: string | null;
31
+ phone_number?: string | null;
32
+ name?: string | null;
33
+ notify?: string | null;
34
+ verified_name?: string | null;
35
+ img_url?: string | null;
36
+ status?: string | null;
37
+ });
38
+ /** Nombre: agenda → público → verificado → teléfono. / Name: address book → public → verified → phone. */
46
39
  get name(): string;
47
- /** Número sin formato. / Raw phone number. */
48
- get phone(): string;
49
- /** URL de foto de perfil. / Profile picture URL. */
50
- get photo(): string | null;
51
- /** Bio del contacto. / Contact bio. */
52
- get content(): string;
53
40
  /**
54
- * Chat 1:1 asociado al contacto. Async por coherencia con `Message.chat()` /
55
- * `Message.author()`, aunque la instancia ya está hidratada en memoria.
56
- * 1:1 chat associated with the contact. Async for consistency with
57
- * `Message.chat()` / `Message.author()`, though already hydrated in memory.
41
+ * JID legado (`@s.whatsapp.net`): el reportado por baileys o generado desde el id
42
+ * cuando ya viene en formato PN; null si no es determinable.
43
+ * Legacy JID (`@s.whatsapp.net`): the one baileys reports or generated from the id
44
+ * when it is already PN-formatted; null when not determinable.
58
45
  */
59
- chat(): Promise<Chat>;
46
+ get jid(): string | null;
47
+ /** LID (`@lid`) cuando es definible; null si no. / LID (`@lid`) when definable; null otherwise. */
48
+ get lid(): string | null;
49
+ /**
50
+ * Teléfono del contacto, derivado únicamente del JID PN (nunca del LID);
51
+ * null cuando no hay JID determinable.
52
+ * Contact phone, derived from the PN JID only (never from the LID);
53
+ * null when no JID is determinable.
54
+ */
55
+ get phone(): string | null;
56
+ /** URL de la foto de perfil, o null. / Profile picture URL, or null. */
57
+ get photo(): string | null;
60
58
  }
61
59
  /**
62
60
  * Factoría de Contact ligada al contexto WhatsApp.
@@ -65,162 +63,147 @@ export declare class Contact {
65
63
  * @param wa - Instancia principal / Main WhatsApp instance
66
64
  */
67
65
  export declare function contact(wa: WhatsApp): {
68
- new (raw: IContactRaw, chat: InstanceType<typeof wa.Chat>): {
69
- /** @internal Chat 1:1 hidratado como subclase enriquecida. / Internal hydrated 1:1 chat as enriched subclass. */
70
- readonly _chat: InstanceType<typeof wa.Chat>;
71
- /** Chat 1:1 asociado (subclase enriquecida). / Associated 1:1 chat (enriched subclass). */
72
- chat(): Promise<InstanceType<typeof wa.Chat>>;
73
- /** true si la instancia representa la cuenta autenticada. / true if this instance is the authenticated account. */
74
- get me(): boolean;
66
+ new (_raw: {
67
+ id: string;
68
+ lid?: string | null;
69
+ phone_number?: string | null;
70
+ name?: string | null;
71
+ notify?: string | null;
72
+ verified_name?: string | null;
73
+ img_url?: string | null;
74
+ status?: string | null;
75
+ }): {
75
76
  /**
76
- * Renombra el contacto localmente (solo agenda del dispositivo).
77
- * Renames the contact locally (device address book only).
77
+ * Chat 1:1 del contacto: el persistido en el engine, o una instancia mínima.
78
+ * The contact's 1:1 chat: the engine-persisted one, or a minimal instance.
79
+ *
80
+ * @returns Instancia de Chat / Chat instance
78
81
  */
79
- rename(name: string): Promise<boolean>;
82
+ chat(): Promise<InstanceType<typeof wa.Chat>>;
83
+ readonly _raw: {
84
+ id: string;
85
+ lid?: string | null;
86
+ phone_number?: string | null;
87
+ name?: string | null;
88
+ notify?: string | null;
89
+ verified_name?: string | null;
90
+ img_url?: string | null;
91
+ status?: string | null;
92
+ };
93
+ /** Nombre: agenda → público → verificado → teléfono. / Name: address book → public → verified → phone. */
94
+ get name(): string;
80
95
  /**
81
- * Re-hidrata foto y bio desde el socket.
82
- * Re-hydrates profile picture and bio from the socket.
96
+ * JID legado (`@s.whatsapp.net`): el reportado por baileys o generado desde el id
97
+ * cuando ya viene en formato PN; null si no es determinable.
98
+ * Legacy JID (`@s.whatsapp.net`): the one baileys reports or generated from the id
99
+ * when it is already PN-formatted; null when not determinable.
83
100
  */
84
- refresh(): Promise</*elided*/ any | null>;
85
- /** @internal Shape persistido. Uso interno (convención underscore). / Internal persisted shape. */
86
- readonly _raw: IContactRaw;
87
- /** JID único. / Unique JID. */
88
- get id(): string;
89
- /** JID (alias). / JID (alias). */
90
- get jid(): string;
91
- /** LID si está disponible. / LID when available. */
101
+ get jid(): string | null;
102
+ /** LID (`@lid`) cuando es definible; null si no. / LID (`@lid`) when definable; null otherwise. */
92
103
  get lid(): string | null;
93
- /** Nombre: local → push → teléfono. / Name: local → push → phone. */
94
- get name(): string;
95
- /** Número sin formato. / Raw phone number. */
96
- get phone(): string;
97
- /** URL de foto de perfil. / Profile picture URL. */
104
+ /**
105
+ * Teléfono del contacto, derivado únicamente del JID PN (nunca del LID);
106
+ * null cuando no hay JID determinable.
107
+ * Contact phone, derived from the PN JID only (never from the LID);
108
+ * null when no JID is determinable.
109
+ */
110
+ get phone(): string | null;
111
+ /** URL de la foto de perfil, o null. / Profile picture URL, or null. */
98
112
  get photo(): string | null;
99
- /** Bio del contacto. / Contact bio. */
100
- get content(): string;
101
113
  };
102
114
  /**
103
- * Obtiene un contacto. Dispatch inteligente:
104
- * - Si `uid` contiene `@` → se interpreta como JID (`@s.whatsapp.net` / `@g.us`) o LID (`@lid`) y se resuelve con el mapping.
105
- * - Si no contiene `@` se limpian los dígitos y se consulta `socket.onWhatsApp(phone)` para obtener el JID canónico.
115
+ * Carga un contacto por teléfono, JID o LID: primero el engine; si no está
116
+ * persistido lo descubre por red (`onWhatsApp` + foto + bio) y lo materializa.
117
+ * Loads a contact by phone, JID or LID: engine first; when not persisted it
118
+ * discovers it over the network (`onWhatsApp` + photo + bio) and materializes it.
106
119
  *
107
- * Retrieves a contact. Smart dispatch:
108
- * - If `uid` contains `@` treated as JID or LID, resolved via mapping.
109
- * - If `uid` lacks `@` → digits are extracted and `socket.onWhatsApp(phone)` resolves the canonical JID.
120
+ * @param uid - Teléfono, JID o LID / Phone, JID or LID
121
+ * @returns Contacto o null si no existe en WhatsApp / Contact or null when not on WhatsApp
110
122
  */
111
- get(uid: string): Promise<{
112
- /** @internal Chat 1:1 hidratado como subclase enriquecida. / Internal hydrated 1:1 chat as enriched subclass. */
113
- readonly _chat: InstanceType<typeof wa.Chat>;
114
- /** Chat 1:1 asociado (subclase enriquecida). / Associated 1:1 chat (enriched subclass). */
115
- chat(): Promise<InstanceType<typeof wa.Chat>>;
116
- /** true si la instancia representa la cuenta autenticada. / true if this instance is the authenticated account. */
117
- get me(): boolean;
123
+ get(uid: string | number): Promise<{
118
124
  /**
119
- * Renombra el contacto localmente (solo agenda del dispositivo).
120
- * Renames the contact locally (device address book only).
125
+ * Chat 1:1 del contacto: el persistido en el engine, o una instancia mínima.
126
+ * The contact's 1:1 chat: the engine-persisted one, or a minimal instance.
127
+ *
128
+ * @returns Instancia de Chat / Chat instance
121
129
  */
122
- rename(name: string): Promise<boolean>;
130
+ chat(): Promise<InstanceType<typeof wa.Chat>>;
131
+ readonly _raw: {
132
+ id: string;
133
+ lid?: string | null;
134
+ phone_number?: string | null;
135
+ name?: string | null;
136
+ notify?: string | null;
137
+ verified_name?: string | null;
138
+ img_url?: string | null;
139
+ status?: string | null;
140
+ };
141
+ /** Nombre: agenda → público → verificado → teléfono. / Name: address book → public → verified → phone. */
142
+ get name(): string;
123
143
  /**
124
- * Re-hidrata foto y bio desde el socket.
125
- * Re-hydrates profile picture and bio from the socket.
144
+ * JID legado (`@s.whatsapp.net`): el reportado por baileys o generado desde el id
145
+ * cuando ya viene en formato PN; null si no es determinable.
146
+ * Legacy JID (`@s.whatsapp.net`): the one baileys reports or generated from the id
147
+ * when it is already PN-formatted; null when not determinable.
126
148
  */
127
- refresh(): Promise</*elided*/ any | null>;
128
- /** @internal Shape persistido. Uso interno (convención underscore). / Internal persisted shape. */
129
- readonly _raw: IContactRaw;
130
- /** JID único. / Unique JID. */
131
- get id(): string;
132
- /** JID (alias). / JID (alias). */
133
- get jid(): string;
134
- /** LID si está disponible. / LID when available. */
149
+ get jid(): string | null;
150
+ /** LID (`@lid`) cuando es definible; null si no. / LID (`@lid`) when definable; null otherwise. */
135
151
  get lid(): string | null;
136
- /** Nombre: local → push → teléfono. / Name: local → push → phone. */
137
- get name(): string;
138
- /** Número sin formato. / Raw phone number. */
139
- get phone(): string;
140
- /** URL de foto de perfil. / Profile picture URL. */
152
+ /**
153
+ * Teléfono del contacto, derivado únicamente del JID PN (nunca del LID);
154
+ * null cuando no hay JID determinable.
155
+ * Contact phone, derived from the PN JID only (never from the LID);
156
+ * null when no JID is determinable.
157
+ */
158
+ get phone(): string | null;
159
+ /** URL de la foto de perfil, o null. / Profile picture URL, or null. */
141
160
  get photo(): string | null;
142
- /** Bio del contacto. / Contact bio. */
143
- get content(): string;
144
161
  } | null>;
145
162
  /**
146
- * Pagina los contactos persistidos por mtime DESC, pre-cargando el chat de cada uno.
147
- * Paginates persisted contacts by mtime DESC, pre-loading the chat of each one.
163
+ * Pagina los contactos persistidos.
164
+ * Paginates persisted contacts.
165
+ *
166
+ * @param offset - Desplazamiento / Offset
167
+ * @param limit - Tamaño de página / Page size
168
+ * @returns Página de contactos / Contact page
148
169
  */
149
170
  list(offset?: number, limit?: number): Promise<{
150
- /** @internal Chat 1:1 hidratado como subclase enriquecida. / Internal hydrated 1:1 chat as enriched subclass. */
151
- readonly _chat: InstanceType<typeof wa.Chat>;
152
- /** Chat 1:1 asociado (subclase enriquecida). / Associated 1:1 chat (enriched subclass). */
153
- chat(): Promise<InstanceType<typeof wa.Chat>>;
154
- /** true si la instancia representa la cuenta autenticada. / true if this instance is the authenticated account. */
155
- get me(): boolean;
156
171
  /**
157
- * Renombra el contacto localmente (solo agenda del dispositivo).
158
- * Renames the contact locally (device address book only).
172
+ * Chat 1:1 del contacto: el persistido en el engine, o una instancia mínima.
173
+ * The contact's 1:1 chat: the engine-persisted one, or a minimal instance.
174
+ *
175
+ * @returns Instancia de Chat / Chat instance
159
176
  */
160
- rename(name: string): Promise<boolean>;
161
- /**
162
- * Re-hidrata foto y bio desde el socket.
163
- * Re-hydrates profile picture and bio from the socket.
164
- */
165
- refresh(): Promise</*elided*/ any | null>;
166
- /** @internal Shape persistido. Uso interno (convención underscore). / Internal persisted shape. */
167
- readonly _raw: IContactRaw;
168
- /** JID único. / Unique JID. */
169
- get id(): string;
170
- /** JID (alias). / JID (alias). */
171
- get jid(): string;
172
- /** LID si está disponible. / LID when available. */
173
- get lid(): string | null;
174
- /** Nombre: local → push → teléfono. / Name: local → push → phone. */
175
- get name(): string;
176
- /** Número sin formato. / Raw phone number. */
177
- get phone(): string;
178
- /** URL de foto de perfil. / Profile picture URL. */
179
- get photo(): string | null;
180
- /** Bio del contacto. / Contact bio. */
181
- get content(): string;
182
- }[]>;
183
- /**
184
- * Renombra localmente un contacto por id.
185
- * Renames a contact locally by id.
186
- */
187
- rename(uid: string, name: string): Promise<boolean>;
188
- /**
189
- * Re-hidrata los datos del contacto por id desde el socket.
190
- * Re-hydrates contact data from the socket by id.
191
- */
192
- refresh(uid: string): Promise<{
193
- /** @internal Chat 1:1 hidratado como subclase enriquecida. / Internal hydrated 1:1 chat as enriched subclass. */
194
- readonly _chat: InstanceType<typeof wa.Chat>;
195
- /** Chat 1:1 asociado (subclase enriquecida). / Associated 1:1 chat (enriched subclass). */
196
177
  chat(): Promise<InstanceType<typeof wa.Chat>>;
197
- /** true si la instancia representa la cuenta autenticada. / true if this instance is the authenticated account. */
198
- get me(): boolean;
178
+ readonly _raw: {
179
+ id: string;
180
+ lid?: string | null;
181
+ phone_number?: string | null;
182
+ name?: string | null;
183
+ notify?: string | null;
184
+ verified_name?: string | null;
185
+ img_url?: string | null;
186
+ status?: string | null;
187
+ };
188
+ /** Nombre: agenda → público → verificado → teléfono. / Name: address book → public → verified → phone. */
189
+ get name(): string;
199
190
  /**
200
- * Renombra el contacto localmente (solo agenda del dispositivo).
201
- * Renames the contact locally (device address book only).
191
+ * JID legado (`@s.whatsapp.net`): el reportado por baileys o generado desde el id
192
+ * cuando ya viene en formato PN; null si no es determinable.
193
+ * Legacy JID (`@s.whatsapp.net`): the one baileys reports or generated from the id
194
+ * when it is already PN-formatted; null when not determinable.
202
195
  */
203
- rename(name: string): Promise<boolean>;
196
+ get jid(): string | null;
197
+ /** LID (`@lid`) cuando es definible; null si no. / LID (`@lid`) when definable; null otherwise. */
198
+ get lid(): string | null;
204
199
  /**
205
- * Re-hidrata foto y bio desde el socket.
206
- * Re-hydrates profile picture and bio from the socket.
200
+ * Teléfono del contacto, derivado únicamente del JID PN (nunca del LID);
201
+ * null cuando no hay JID determinable.
202
+ * Contact phone, derived from the PN JID only (never from the LID);
203
+ * null when no JID is determinable.
207
204
  */
208
- refresh(): Promise</*elided*/ any | null>;
209
- /** @internal Shape persistido. Uso interno (convención underscore). / Internal persisted shape. */
210
- readonly _raw: IContactRaw;
211
- /** JID único. / Unique JID. */
212
- get id(): string;
213
- /** JID (alias). / JID (alias). */
214
- get jid(): string;
215
- /** LID si está disponible. / LID when available. */
216
- get lid(): string | null;
217
- /** Nombre: local → push → teléfono. / Name: local → push → phone. */
218
- get name(): string;
219
- /** Número sin formato. / Raw phone number. */
220
- get phone(): string;
221
- /** URL de foto de perfil. / Profile picture URL. */
205
+ get phone(): string | null;
206
+ /** URL de la foto de perfil, o null. / Profile picture URL, or null. */
222
207
  get photo(): string | null;
223
- /** Bio del contacto. / Contact bio. */
224
- get content(): string;
225
- } | null>;
208
+ }[]>;
226
209
  };