zaileys 4.1.0 → 4.1.2
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.cjs +13 -13
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +13 -13
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -172,6 +172,7 @@ type BuilderInternalState = {
|
|
|
172
172
|
mentionAll?: boolean;
|
|
173
173
|
disappearingSeconds?: number;
|
|
174
174
|
resolveRecipient?: (raw: string) => Promise<string>;
|
|
175
|
+
recordSent?: (message: WAMessage) => void;
|
|
175
176
|
};
|
|
176
177
|
|
|
177
178
|
interface BuilderSocketLike {
|
|
@@ -180,6 +181,7 @@ interface BuilderSocketLike {
|
|
|
180
181
|
messageId: string;
|
|
181
182
|
additionalNodes?: unknown[];
|
|
182
183
|
}): Promise<string>;
|
|
184
|
+
chatModify?(mod: unknown, jid: string): Promise<void>;
|
|
183
185
|
user?: {
|
|
184
186
|
id?: string | null;
|
|
185
187
|
} | null;
|
|
@@ -193,7 +195,7 @@ declare class MessageBuilder<State extends BuilderState> {
|
|
|
193
195
|
protected readonly socket: BuilderSocketLike;
|
|
194
196
|
protected readonly internal: BuilderInternalState;
|
|
195
197
|
constructor(socket: BuilderSocketLike, internal: BuilderInternalState);
|
|
196
|
-
static create(socket: BuilderSocketLike, recipient: string, resolveRecipient?: (raw: string) => Promise<string
|
|
198
|
+
static create(socket: BuilderSocketLike, recipient: string, resolveRecipient?: (raw: string) => Promise<string>, recordSent?: (message: WAMessage) => void): MessageBuilder<'init'>;
|
|
197
199
|
to(this: MessageBuilder<'init'>, recipient: string): MessageBuilder<'init'>;
|
|
198
200
|
text(this: MessageBuilder<'init'>, content: string, opts?: TextOptions): MessageBuilder<'content-set'>;
|
|
199
201
|
image(this: MessageBuilder<'init'>, src: MediaSource, opts?: ImageOptions): MessageBuilder<'content-set'>;
|
|
@@ -1240,6 +1242,7 @@ declare class Client extends TypedEventEmitter<ClientEventMap> {
|
|
|
1240
1242
|
private handleQrUpdate;
|
|
1241
1243
|
private handleAuthExhausted;
|
|
1242
1244
|
private handleOpen;
|
|
1245
|
+
private resolveMessageForResend;
|
|
1243
1246
|
private lookupQuoted;
|
|
1244
1247
|
private handleClose;
|
|
1245
1248
|
private rejectPendingConnect;
|
|
@@ -1360,8 +1363,6 @@ interface CacheableAuthStoreOptions {
|
|
|
1360
1363
|
warn?: (msg: unknown) => void;
|
|
1361
1364
|
error?: (msg: unknown) => void;
|
|
1362
1365
|
};
|
|
1363
|
-
cacheSize?: number;
|
|
1364
|
-
cacheTtlSeconds?: number;
|
|
1365
1366
|
}
|
|
1366
1367
|
declare function makeCacheableAuthStore(bundle: AuthStoreBundle, options?: CacheableAuthStoreOptions): AuthStoreBundle;
|
|
1367
1368
|
|
package/dist/index.d.ts
CHANGED
|
@@ -172,6 +172,7 @@ type BuilderInternalState = {
|
|
|
172
172
|
mentionAll?: boolean;
|
|
173
173
|
disappearingSeconds?: number;
|
|
174
174
|
resolveRecipient?: (raw: string) => Promise<string>;
|
|
175
|
+
recordSent?: (message: WAMessage) => void;
|
|
175
176
|
};
|
|
176
177
|
|
|
177
178
|
interface BuilderSocketLike {
|
|
@@ -180,6 +181,7 @@ interface BuilderSocketLike {
|
|
|
180
181
|
messageId: string;
|
|
181
182
|
additionalNodes?: unknown[];
|
|
182
183
|
}): Promise<string>;
|
|
184
|
+
chatModify?(mod: unknown, jid: string): Promise<void>;
|
|
183
185
|
user?: {
|
|
184
186
|
id?: string | null;
|
|
185
187
|
} | null;
|
|
@@ -193,7 +195,7 @@ declare class MessageBuilder<State extends BuilderState> {
|
|
|
193
195
|
protected readonly socket: BuilderSocketLike;
|
|
194
196
|
protected readonly internal: BuilderInternalState;
|
|
195
197
|
constructor(socket: BuilderSocketLike, internal: BuilderInternalState);
|
|
196
|
-
static create(socket: BuilderSocketLike, recipient: string, resolveRecipient?: (raw: string) => Promise<string
|
|
198
|
+
static create(socket: BuilderSocketLike, recipient: string, resolveRecipient?: (raw: string) => Promise<string>, recordSent?: (message: WAMessage) => void): MessageBuilder<'init'>;
|
|
197
199
|
to(this: MessageBuilder<'init'>, recipient: string): MessageBuilder<'init'>;
|
|
198
200
|
text(this: MessageBuilder<'init'>, content: string, opts?: TextOptions): MessageBuilder<'content-set'>;
|
|
199
201
|
image(this: MessageBuilder<'init'>, src: MediaSource, opts?: ImageOptions): MessageBuilder<'content-set'>;
|
|
@@ -1240,6 +1242,7 @@ declare class Client extends TypedEventEmitter<ClientEventMap> {
|
|
|
1240
1242
|
private handleQrUpdate;
|
|
1241
1243
|
private handleAuthExhausted;
|
|
1242
1244
|
private handleOpen;
|
|
1245
|
+
private resolveMessageForResend;
|
|
1243
1246
|
private lookupQuoted;
|
|
1244
1247
|
private handleClose;
|
|
1245
1248
|
private rejectPendingConnect;
|
|
@@ -1360,8 +1363,6 @@ interface CacheableAuthStoreOptions {
|
|
|
1360
1363
|
warn?: (msg: unknown) => void;
|
|
1361
1364
|
error?: (msg: unknown) => void;
|
|
1362
1365
|
};
|
|
1363
|
-
cacheSize?: number;
|
|
1364
|
-
cacheTtlSeconds?: number;
|
|
1365
1366
|
}
|
|
1366
1367
|
declare function makeCacheableAuthStore(bundle: AuthStoreBundle, options?: CacheableAuthStoreOptions): AuthStoreBundle;
|
|
1367
1368
|
|