zaileys 2.1.3 → 2.1.5

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/README.MD CHANGED
@@ -510,18 +510,20 @@ Send one or multiple contacts.
510
510
 
511
511
  ```typescript
512
512
  await wa.send(ctx.roomId, {
513
- title: 'My Contacts',
514
- contacts: [
515
- {
516
- fullname: 'John Doe',
517
- phoneNumber: 6281234567890,
518
- organization: 'Company Inc.',
519
- },
520
- {
521
- fullname: 'Jane Smith',
522
- phoneNumber: 6289876543210,
523
- },
524
- ],
513
+ contacts: {
514
+ title: 'My Contacts',
515
+ contacts: [
516
+ {
517
+ fullname: 'John Doe',
518
+ phoneNumber: 6281234567890,
519
+ organization: 'Company Inc.',
520
+ },
521
+ {
522
+ fullname: 'Jane Smith',
523
+ phoneNumber: 6289876543210,
524
+ },
525
+ ],
526
+ },
525
527
  });
526
528
  ```
527
529
 
package/dist/index.d.mts CHANGED
@@ -1,10 +1,9 @@
1
1
  import * as baileys from 'baileys';
2
2
  import baileys__default, { AuthenticationState, WAMessage, proto, ParticipantAction, WAPrivacyValue, WAPrivacyOnlineValue, WAReadReceiptsValue, WAPrivacyGroupAddValue } from 'baileys';
3
- import * as Stream from 'stream';
4
- import Stream__default from 'stream';
5
3
  import { JetDB } from 'jetdb';
6
4
  export { JetDB, JetDBOptions, createJetDB } from 'jetdb';
7
5
  import z, { z as z$1 } from 'zod';
6
+ import Stream from 'stream';
8
7
  import _ from 'lodash';
9
8
 
10
9
  declare const useAuthState: (folder: string) => Promise<{
@@ -53,13 +52,15 @@ declare const SignalOptionsType: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.Zo
53
52
  footer: z.ZodOptional<z.ZodString>;
54
53
  }, z.core.$strip>>;
55
54
  }, z.core.$loose>, z.ZodObject<{
56
- title: z.ZodOptional<z.ZodString>;
57
- contacts: z.ZodArray<z.ZodObject<{
58
- fullname: z.ZodString;
59
- phoneNumber: z.ZodNumber;
60
- organization: z.ZodOptional<z.ZodString>;
61
- }, z.core.$strip>>;
62
- }, z.core.$strip>, z.ZodObject<{
55
+ contacts: z.ZodObject<{
56
+ title: z.ZodOptional<z.ZodString>;
57
+ contacts: z.ZodArray<z.ZodObject<{
58
+ fullname: z.ZodString;
59
+ phoneNumber: z.ZodNumber;
60
+ organization: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>>;
62
+ }, z.core.$strip>;
63
+ }, z.core.$loose>, z.ZodObject<{
63
64
  poll: z.ZodObject<{
64
65
  name: z.ZodString;
65
66
  answers: z.ZodArray<z.ZodString>;
@@ -187,7 +188,7 @@ declare class Group {
187
188
  setting(roomId: string, type: 'open' | 'close' | 'locked' | 'unlocked' | 'all_member_add' | 'admin_add'): Promise<void>;
188
189
  leave(roomId: string): Promise<void>;
189
190
  inviteCode(roomId: string, type: 'code' | 'revoke' | 'accept' | 'info'): Promise<string | baileys.GroupMetadata>;
190
- metadata(roomId: string): Promise<baileys.GroupMetadata>;
191
+ metadata(roomId: string): Promise<any>;
191
192
  requestJoin(roomId: string, participants: string[], type: 'approve' | 'reject'): Promise<{
192
193
  status: string;
193
194
  jid: string | undefined;
@@ -450,7 +451,7 @@ declare const BaseMessagesType: z.ZodObject<{
450
451
  citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodBoolean>>>>;
451
452
  media: z.ZodNullable<z.ZodObject<{
452
453
  buffer: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
453
- stream: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream__default, Stream__default>>>;
454
+ stream: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream, Stream>>>;
454
455
  }, z.core.$loose>>;
455
456
  message: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodCustom<WAMessage, WAMessage>>;
456
457
  }, z.core.$strip>;
@@ -551,7 +552,7 @@ declare const ListenerMessagesType: z.ZodObject<{
551
552
  citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodBoolean>>>>;
552
553
  media: z.ZodNullable<z.ZodObject<{
553
554
  buffer: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
554
- stream: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream__default, Stream__default>>>;
555
+ stream: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream, Stream>>>;
555
556
  }, z.core.$loose>>;
556
557
  message: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodCustom<WAMessage, WAMessage>>;
557
558
  replied: z.ZodNullable<z.ZodObject<{
@@ -651,7 +652,7 @@ declare const ListenerMessagesType: z.ZodObject<{
651
652
  citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodBoolean>>>>;
652
653
  media: z.ZodNullable<z.ZodObject<{
653
654
  buffer: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
654
- stream: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream__default, Stream__default>>>;
655
+ stream: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream, Stream>>>;
655
656
  }, z.core.$loose>>;
656
657
  message: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodCustom<WAMessage, WAMessage>>;
657
658
  }, z.core.$strip>>;
@@ -680,9 +681,9 @@ declare const StickerShapeType: z$1.ZodDefault<z$1.ZodEnum<{
680
681
  oval: "oval";
681
682
  }>>;
682
683
  declare const StickerMetadataType: z$1.ZodOptional<z$1.ZodObject<{
683
- packageName: z$1.ZodString;
684
- authorName: z$1.ZodString;
685
- quality: z$1.ZodNumber;
684
+ packageName: z$1.ZodOptional<z$1.ZodString>;
685
+ authorName: z$1.ZodOptional<z$1.ZodString>;
686
+ quality: z$1.ZodOptional<z$1.ZodNumber>;
686
687
  shape: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodEnum<{
687
688
  default: "default";
688
689
  rounded: "rounded";
@@ -720,9 +721,9 @@ declare const ClientBaseType: z$1.ZodObject<{
720
721
  }>, z$1.ZodNumber]>;
721
722
  }, z$1.core.$strip>>;
722
723
  sticker: z$1.ZodOptional<z$1.ZodObject<{
723
- packageName: z$1.ZodString;
724
- authorName: z$1.ZodString;
725
- quality: z$1.ZodNumber;
724
+ packageName: z$1.ZodOptional<z$1.ZodString>;
725
+ authorName: z$1.ZodOptional<z$1.ZodString>;
726
+ quality: z$1.ZodOptional<z$1.ZodNumber>;
726
727
  shape: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodEnum<{
727
728
  default: "default";
728
729
  rounded: "rounded";
@@ -770,9 +771,9 @@ declare const ClientOptionsType: z$1.ZodUnion<readonly [z$1.ZodObject<{
770
771
  }>, z$1.ZodNumber]>;
771
772
  }, z$1.core.$strip>>;
772
773
  sticker: z$1.ZodOptional<z$1.ZodObject<{
773
- packageName: z$1.ZodString;
774
- authorName: z$1.ZodString;
775
- quality: z$1.ZodNumber;
774
+ packageName: z$1.ZodOptional<z$1.ZodString>;
775
+ authorName: z$1.ZodOptional<z$1.ZodString>;
776
+ quality: z$1.ZodOptional<z$1.ZodNumber>;
776
777
  shape: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodEnum<{
777
778
  default: "default";
778
779
  rounded: "rounded";
@@ -811,9 +812,9 @@ declare const ClientOptionsType: z$1.ZodUnion<readonly [z$1.ZodObject<{
811
812
  }>, z$1.ZodNumber]>;
812
813
  }, z$1.core.$strip>>;
813
814
  sticker: z$1.ZodOptional<z$1.ZodObject<{
814
- packageName: z$1.ZodString;
815
- authorName: z$1.ZodString;
816
- quality: z$1.ZodNumber;
815
+ packageName: z$1.ZodOptional<z$1.ZodString>;
816
+ authorName: z$1.ZodOptional<z$1.ZodString>;
817
+ quality: z$1.ZodOptional<z$1.ZodNumber>;
817
818
  shape: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodEnum<{
818
819
  default: "default";
819
820
  rounded: "rounded";
@@ -1061,96 +1062,6 @@ declare class Client {
1061
1062
  on<T extends z.infer<typeof EventEnumType>>(event: T, handler: EventCallbackType[T]): void;
1062
1063
  use<T>(handler: MiddlewareHandler<T>): this;
1063
1064
  get socket(): ReturnType<typeof baileys__default>;
1064
- getMessageByChatId(chatId: string, media?: proto.IMessage): Promise<Partial<{
1065
- channelId: string;
1066
- uniqueId: string;
1067
- chatId: string;
1068
- chatType: "text" | "album" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contacts" | "highlyStructured" | "sendPayment" | "requestPayment" | "groupStatusMention" | "statusMention" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "product" | "deviceSent" | "lists" | "viewOnce" | "order" | "ephemeral" | "invoice" | "buttons" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1069
- receiverId: string;
1070
- receiverName: string;
1071
- roomId: string;
1072
- roomName: string;
1073
- senderLid: string;
1074
- senderId: string;
1075
- senderName: string;
1076
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1077
- timestamp: number;
1078
- mentions: string[];
1079
- links: string[];
1080
- isBot: boolean;
1081
- isFromMe: boolean;
1082
- isPrefix: boolean;
1083
- isSpam: boolean;
1084
- isTagMe: boolean;
1085
- isStatusMention: boolean;
1086
- isGroupStatusMention: boolean;
1087
- isHideTags: boolean;
1088
- isGroup: boolean;
1089
- isNewsletter: boolean;
1090
- isQuestion: boolean;
1091
- isStory: boolean;
1092
- isViewOnce: boolean;
1093
- isEdited: boolean;
1094
- isDeleted: boolean;
1095
- isPinned: boolean;
1096
- isUnPinned: boolean;
1097
- isBroadcast: boolean;
1098
- isEphemeral: boolean;
1099
- isForwarded: boolean;
1100
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodCustom<baileys.WAMessage, baileys.WAMessage>>;
1101
- text?: string;
1102
- citation?: Record<string, z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodBoolean>>>;
1103
- media?: {
1104
- [x: string]: unknown;
1105
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1106
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream, Stream>>>;
1107
- };
1108
- replied?: {
1109
- channelId: string;
1110
- uniqueId: string;
1111
- chatId: string;
1112
- chatType: "text" | "album" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contacts" | "highlyStructured" | "sendPayment" | "requestPayment" | "groupStatusMention" | "statusMention" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "product" | "deviceSent" | "lists" | "viewOnce" | "order" | "ephemeral" | "invoice" | "buttons" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1113
- receiverId: string;
1114
- receiverName: string;
1115
- roomId: string;
1116
- roomName: string;
1117
- senderLid: string;
1118
- senderId: string;
1119
- senderName: string;
1120
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1121
- timestamp: number;
1122
- mentions: string[];
1123
- links: string[];
1124
- isBot: boolean;
1125
- isFromMe: boolean;
1126
- isPrefix: boolean;
1127
- isSpam: boolean;
1128
- isTagMe: boolean;
1129
- isStatusMention: boolean;
1130
- isGroupStatusMention: boolean;
1131
- isHideTags: boolean;
1132
- isGroup: boolean;
1133
- isNewsletter: boolean;
1134
- isQuestion: boolean;
1135
- isStory: boolean;
1136
- isViewOnce: boolean;
1137
- isEdited: boolean;
1138
- isDeleted: boolean;
1139
- isPinned: boolean;
1140
- isUnPinned: boolean;
1141
- isBroadcast: boolean;
1142
- isEphemeral: boolean;
1143
- isForwarded: boolean;
1144
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodCustom<baileys.WAMessage, baileys.WAMessage>>;
1145
- text?: string;
1146
- citation?: Record<string, z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodBoolean>>>;
1147
- media?: {
1148
- [x: string]: unknown;
1149
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1150
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream, Stream>>>;
1151
- };
1152
- };
1153
- }>>;
1154
1065
  getRoomName(roomId: string): Promise<string>;
1155
1066
  getLabelName(roomId: string): Promise<string>;
1156
1067
  cleanupMessages(days?: number): Promise<void>;
@@ -1198,6 +1109,7 @@ declare class VideoProcessor {
1198
1109
  declare class ImageProcessor {
1199
1110
  static getThumbnail(buffer: Buffer): Promise<string>;
1200
1111
  static resizeForSticker(buffer: Buffer, quality: number, shape?: string): Promise<Buffer>;
1112
+ static getWaImage(input: MediaInput): Promise<Buffer>;
1201
1113
  }
1202
1114
  declare class MediaProcessor {
1203
1115
  static getThumbnail(input: MediaInput): Promise<string>;
@@ -1218,6 +1130,7 @@ declare class DocumentProcessor {
1218
1130
  }
1219
1131
  declare const toBuffer: any;
1220
1132
  declare const getWaAudio: any;
1133
+ declare const getWaImage: any;
1221
1134
  declare const getVideoThumbnail: any;
1222
1135
  declare const getVideoDuration: any;
1223
1136
  declare const getMediaThumbnail: any;
@@ -1234,4 +1147,4 @@ declare const cleanupSocket: (socket: WASocket) => void;
1234
1147
  declare const repairSessionKeys: (session: string) => Promise<void>;
1235
1148
  declare const getExistingSocket: () => WASocket | null;
1236
1149
 
1237
- export { AudioProcessor, type AudioType, BaseMessagesType, ButtonInteractiveCallType, ButtonInteractiveCopyType, ButtonInteractiveReplyType, ButtonInteractiveSingleSelectType, ButtonInteractiveType, ButtonInteractiveUrlType, ButtonSimpleType, ButtonType, type CallsContext, CitationType, Client, ClientAuthPairingType, ClientAuthQRType, ClientBaseType, ClientOptionsType, type ConnectionContext, DEVICE_ENUM_TYPES, DocumentProcessor, type EventCallbackType, EventEnumType, FakeReplyType, ImageProcessor, LimiterType, ListenerCallsType, ListenerConnectionType, ListenerMessagesType, MESSAGE_ENUM_TYPES, MediaProcessor, type MessagesContext, type PluginDefinition, Plugins, type PluginsConfigType, type PluginsHandlerType, StickerMetadataType, StickerProcessor, StickerShapeType, VideoProcessor, cleanJid, cleanMediaObject, cleanupSocket, configureFFmpeg, definePlugins, extractJids, extractUrls, findGlobalWord, findNestedByKeys, generateId, getDeepContent, getExistingSocket, getLatestLibVersion, getMediaThumbnail, getUsersMentions, getVideoDuration, getVideoThumbnail, getWaAudio, getWaDocument, getWaSticker, ignoreLint, logColor, modifyFn, normalizeText, numbersToJids, pickKeysFromArray, randomize, registerAuthCreds, removeAuthCreds, repairSessionKeys, shuffleString, toBuffer, toJson, toString, useAuthState };
1150
+ export { AudioProcessor, type AudioType, BaseMessagesType, ButtonInteractiveCallType, ButtonInteractiveCopyType, ButtonInteractiveReplyType, ButtonInteractiveSingleSelectType, ButtonInteractiveType, ButtonInteractiveUrlType, ButtonSimpleType, ButtonType, type CallsContext, CitationType, Client, ClientAuthPairingType, ClientAuthQRType, ClientBaseType, ClientOptionsType, type ConnectionContext, DEVICE_ENUM_TYPES, DocumentProcessor, type EventCallbackType, EventEnumType, FakeReplyType, ImageProcessor, LimiterType, ListenerCallsType, ListenerConnectionType, ListenerMessagesType, MESSAGE_ENUM_TYPES, MediaProcessor, type MessagesContext, type PluginDefinition, Plugins, type PluginsConfigType, type PluginsHandlerType, StickerMetadataType, StickerProcessor, StickerShapeType, VideoProcessor, cleanJid, cleanMediaObject, cleanupSocket, configureFFmpeg, definePlugins, extractJids, extractUrls, findGlobalWord, findNestedByKeys, generateId, getDeepContent, getExistingSocket, getLatestLibVersion, getMediaThumbnail, getUsersMentions, getVideoDuration, getVideoThumbnail, getWaAudio, getWaDocument, getWaImage, getWaSticker, ignoreLint, logColor, modifyFn, normalizeText, numbersToJids, pickKeysFromArray, randomize, registerAuthCreds, removeAuthCreds, repairSessionKeys, shuffleString, toBuffer, toJson, toString, useAuthState };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  import * as baileys from 'baileys';
2
2
  import baileys__default, { AuthenticationState, WAMessage, proto, ParticipantAction, WAPrivacyValue, WAPrivacyOnlineValue, WAReadReceiptsValue, WAPrivacyGroupAddValue } from 'baileys';
3
- import * as Stream from 'stream';
4
- import Stream__default from 'stream';
5
3
  import { JetDB } from 'jetdb';
6
4
  export { JetDB, JetDBOptions, createJetDB } from 'jetdb';
7
5
  import z, { z as z$1 } from 'zod';
6
+ import Stream from 'stream';
8
7
  import _ from 'lodash';
9
8
 
10
9
  declare const useAuthState: (folder: string) => Promise<{
@@ -53,13 +52,15 @@ declare const SignalOptionsType: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.Zo
53
52
  footer: z.ZodOptional<z.ZodString>;
54
53
  }, z.core.$strip>>;
55
54
  }, z.core.$loose>, z.ZodObject<{
56
- title: z.ZodOptional<z.ZodString>;
57
- contacts: z.ZodArray<z.ZodObject<{
58
- fullname: z.ZodString;
59
- phoneNumber: z.ZodNumber;
60
- organization: z.ZodOptional<z.ZodString>;
61
- }, z.core.$strip>>;
62
- }, z.core.$strip>, z.ZodObject<{
55
+ contacts: z.ZodObject<{
56
+ title: z.ZodOptional<z.ZodString>;
57
+ contacts: z.ZodArray<z.ZodObject<{
58
+ fullname: z.ZodString;
59
+ phoneNumber: z.ZodNumber;
60
+ organization: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>>;
62
+ }, z.core.$strip>;
63
+ }, z.core.$loose>, z.ZodObject<{
63
64
  poll: z.ZodObject<{
64
65
  name: z.ZodString;
65
66
  answers: z.ZodArray<z.ZodString>;
@@ -187,7 +188,7 @@ declare class Group {
187
188
  setting(roomId: string, type: 'open' | 'close' | 'locked' | 'unlocked' | 'all_member_add' | 'admin_add'): Promise<void>;
188
189
  leave(roomId: string): Promise<void>;
189
190
  inviteCode(roomId: string, type: 'code' | 'revoke' | 'accept' | 'info'): Promise<string | baileys.GroupMetadata>;
190
- metadata(roomId: string): Promise<baileys.GroupMetadata>;
191
+ metadata(roomId: string): Promise<any>;
191
192
  requestJoin(roomId: string, participants: string[], type: 'approve' | 'reject'): Promise<{
192
193
  status: string;
193
194
  jid: string | undefined;
@@ -450,7 +451,7 @@ declare const BaseMessagesType: z.ZodObject<{
450
451
  citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodBoolean>>>>;
451
452
  media: z.ZodNullable<z.ZodObject<{
452
453
  buffer: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
453
- stream: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream__default, Stream__default>>>;
454
+ stream: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream, Stream>>>;
454
455
  }, z.core.$loose>>;
455
456
  message: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodCustom<WAMessage, WAMessage>>;
456
457
  }, z.core.$strip>;
@@ -551,7 +552,7 @@ declare const ListenerMessagesType: z.ZodObject<{
551
552
  citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodBoolean>>>>;
552
553
  media: z.ZodNullable<z.ZodObject<{
553
554
  buffer: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
554
- stream: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream__default, Stream__default>>>;
555
+ stream: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream, Stream>>>;
555
556
  }, z.core.$loose>>;
556
557
  message: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodCustom<WAMessage, WAMessage>>;
557
558
  replied: z.ZodNullable<z.ZodObject<{
@@ -651,7 +652,7 @@ declare const ListenerMessagesType: z.ZodObject<{
651
652
  citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodBoolean>>>>;
652
653
  media: z.ZodNullable<z.ZodObject<{
653
654
  buffer: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
654
- stream: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream__default, Stream__default>>>;
655
+ stream: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream, Stream>>>;
655
656
  }, z.core.$loose>>;
656
657
  message: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodCustom<WAMessage, WAMessage>>;
657
658
  }, z.core.$strip>>;
@@ -680,9 +681,9 @@ declare const StickerShapeType: z$1.ZodDefault<z$1.ZodEnum<{
680
681
  oval: "oval";
681
682
  }>>;
682
683
  declare const StickerMetadataType: z$1.ZodOptional<z$1.ZodObject<{
683
- packageName: z$1.ZodString;
684
- authorName: z$1.ZodString;
685
- quality: z$1.ZodNumber;
684
+ packageName: z$1.ZodOptional<z$1.ZodString>;
685
+ authorName: z$1.ZodOptional<z$1.ZodString>;
686
+ quality: z$1.ZodOptional<z$1.ZodNumber>;
686
687
  shape: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodEnum<{
687
688
  default: "default";
688
689
  rounded: "rounded";
@@ -720,9 +721,9 @@ declare const ClientBaseType: z$1.ZodObject<{
720
721
  }>, z$1.ZodNumber]>;
721
722
  }, z$1.core.$strip>>;
722
723
  sticker: z$1.ZodOptional<z$1.ZodObject<{
723
- packageName: z$1.ZodString;
724
- authorName: z$1.ZodString;
725
- quality: z$1.ZodNumber;
724
+ packageName: z$1.ZodOptional<z$1.ZodString>;
725
+ authorName: z$1.ZodOptional<z$1.ZodString>;
726
+ quality: z$1.ZodOptional<z$1.ZodNumber>;
726
727
  shape: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodEnum<{
727
728
  default: "default";
728
729
  rounded: "rounded";
@@ -770,9 +771,9 @@ declare const ClientOptionsType: z$1.ZodUnion<readonly [z$1.ZodObject<{
770
771
  }>, z$1.ZodNumber]>;
771
772
  }, z$1.core.$strip>>;
772
773
  sticker: z$1.ZodOptional<z$1.ZodObject<{
773
- packageName: z$1.ZodString;
774
- authorName: z$1.ZodString;
775
- quality: z$1.ZodNumber;
774
+ packageName: z$1.ZodOptional<z$1.ZodString>;
775
+ authorName: z$1.ZodOptional<z$1.ZodString>;
776
+ quality: z$1.ZodOptional<z$1.ZodNumber>;
776
777
  shape: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodEnum<{
777
778
  default: "default";
778
779
  rounded: "rounded";
@@ -811,9 +812,9 @@ declare const ClientOptionsType: z$1.ZodUnion<readonly [z$1.ZodObject<{
811
812
  }>, z$1.ZodNumber]>;
812
813
  }, z$1.core.$strip>>;
813
814
  sticker: z$1.ZodOptional<z$1.ZodObject<{
814
- packageName: z$1.ZodString;
815
- authorName: z$1.ZodString;
816
- quality: z$1.ZodNumber;
815
+ packageName: z$1.ZodOptional<z$1.ZodString>;
816
+ authorName: z$1.ZodOptional<z$1.ZodString>;
817
+ quality: z$1.ZodOptional<z$1.ZodNumber>;
817
818
  shape: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodEnum<{
818
819
  default: "default";
819
820
  rounded: "rounded";
@@ -1061,96 +1062,6 @@ declare class Client {
1061
1062
  on<T extends z.infer<typeof EventEnumType>>(event: T, handler: EventCallbackType[T]): void;
1062
1063
  use<T>(handler: MiddlewareHandler<T>): this;
1063
1064
  get socket(): ReturnType<typeof baileys__default>;
1064
- getMessageByChatId(chatId: string, media?: proto.IMessage): Promise<Partial<{
1065
- channelId: string;
1066
- uniqueId: string;
1067
- chatId: string;
1068
- chatType: "text" | "album" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contacts" | "highlyStructured" | "sendPayment" | "requestPayment" | "groupStatusMention" | "statusMention" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "product" | "deviceSent" | "lists" | "viewOnce" | "order" | "ephemeral" | "invoice" | "buttons" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1069
- receiverId: string;
1070
- receiverName: string;
1071
- roomId: string;
1072
- roomName: string;
1073
- senderLid: string;
1074
- senderId: string;
1075
- senderName: string;
1076
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1077
- timestamp: number;
1078
- mentions: string[];
1079
- links: string[];
1080
- isBot: boolean;
1081
- isFromMe: boolean;
1082
- isPrefix: boolean;
1083
- isSpam: boolean;
1084
- isTagMe: boolean;
1085
- isStatusMention: boolean;
1086
- isGroupStatusMention: boolean;
1087
- isHideTags: boolean;
1088
- isGroup: boolean;
1089
- isNewsletter: boolean;
1090
- isQuestion: boolean;
1091
- isStory: boolean;
1092
- isViewOnce: boolean;
1093
- isEdited: boolean;
1094
- isDeleted: boolean;
1095
- isPinned: boolean;
1096
- isUnPinned: boolean;
1097
- isBroadcast: boolean;
1098
- isEphemeral: boolean;
1099
- isForwarded: boolean;
1100
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodCustom<baileys.WAMessage, baileys.WAMessage>>;
1101
- text?: string;
1102
- citation?: Record<string, z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodBoolean>>>;
1103
- media?: {
1104
- [x: string]: unknown;
1105
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1106
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream, Stream>>>;
1107
- };
1108
- replied?: {
1109
- channelId: string;
1110
- uniqueId: string;
1111
- chatId: string;
1112
- chatType: "text" | "album" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contacts" | "highlyStructured" | "sendPayment" | "requestPayment" | "groupStatusMention" | "statusMention" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "product" | "deviceSent" | "lists" | "viewOnce" | "order" | "ephemeral" | "invoice" | "buttons" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1113
- receiverId: string;
1114
- receiverName: string;
1115
- roomId: string;
1116
- roomName: string;
1117
- senderLid: string;
1118
- senderId: string;
1119
- senderName: string;
1120
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1121
- timestamp: number;
1122
- mentions: string[];
1123
- links: string[];
1124
- isBot: boolean;
1125
- isFromMe: boolean;
1126
- isPrefix: boolean;
1127
- isSpam: boolean;
1128
- isTagMe: boolean;
1129
- isStatusMention: boolean;
1130
- isGroupStatusMention: boolean;
1131
- isHideTags: boolean;
1132
- isGroup: boolean;
1133
- isNewsletter: boolean;
1134
- isQuestion: boolean;
1135
- isStory: boolean;
1136
- isViewOnce: boolean;
1137
- isEdited: boolean;
1138
- isDeleted: boolean;
1139
- isPinned: boolean;
1140
- isUnPinned: boolean;
1141
- isBroadcast: boolean;
1142
- isEphemeral: boolean;
1143
- isForwarded: boolean;
1144
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodCustom<baileys.WAMessage, baileys.WAMessage>>;
1145
- text?: string;
1146
- citation?: Record<string, z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodBoolean>>>;
1147
- media?: {
1148
- [x: string]: unknown;
1149
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1150
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodCustom<Stream, Stream>>>;
1151
- };
1152
- };
1153
- }>>;
1154
1065
  getRoomName(roomId: string): Promise<string>;
1155
1066
  getLabelName(roomId: string): Promise<string>;
1156
1067
  cleanupMessages(days?: number): Promise<void>;
@@ -1198,6 +1109,7 @@ declare class VideoProcessor {
1198
1109
  declare class ImageProcessor {
1199
1110
  static getThumbnail(buffer: Buffer): Promise<string>;
1200
1111
  static resizeForSticker(buffer: Buffer, quality: number, shape?: string): Promise<Buffer>;
1112
+ static getWaImage(input: MediaInput): Promise<Buffer>;
1201
1113
  }
1202
1114
  declare class MediaProcessor {
1203
1115
  static getThumbnail(input: MediaInput): Promise<string>;
@@ -1218,6 +1130,7 @@ declare class DocumentProcessor {
1218
1130
  }
1219
1131
  declare const toBuffer: any;
1220
1132
  declare const getWaAudio: any;
1133
+ declare const getWaImage: any;
1221
1134
  declare const getVideoThumbnail: any;
1222
1135
  declare const getVideoDuration: any;
1223
1136
  declare const getMediaThumbnail: any;
@@ -1234,4 +1147,4 @@ declare const cleanupSocket: (socket: WASocket) => void;
1234
1147
  declare const repairSessionKeys: (session: string) => Promise<void>;
1235
1148
  declare const getExistingSocket: () => WASocket | null;
1236
1149
 
1237
- export { AudioProcessor, type AudioType, BaseMessagesType, ButtonInteractiveCallType, ButtonInteractiveCopyType, ButtonInteractiveReplyType, ButtonInteractiveSingleSelectType, ButtonInteractiveType, ButtonInteractiveUrlType, ButtonSimpleType, ButtonType, type CallsContext, CitationType, Client, ClientAuthPairingType, ClientAuthQRType, ClientBaseType, ClientOptionsType, type ConnectionContext, DEVICE_ENUM_TYPES, DocumentProcessor, type EventCallbackType, EventEnumType, FakeReplyType, ImageProcessor, LimiterType, ListenerCallsType, ListenerConnectionType, ListenerMessagesType, MESSAGE_ENUM_TYPES, MediaProcessor, type MessagesContext, type PluginDefinition, Plugins, type PluginsConfigType, type PluginsHandlerType, StickerMetadataType, StickerProcessor, StickerShapeType, VideoProcessor, cleanJid, cleanMediaObject, cleanupSocket, configureFFmpeg, definePlugins, extractJids, extractUrls, findGlobalWord, findNestedByKeys, generateId, getDeepContent, getExistingSocket, getLatestLibVersion, getMediaThumbnail, getUsersMentions, getVideoDuration, getVideoThumbnail, getWaAudio, getWaDocument, getWaSticker, ignoreLint, logColor, modifyFn, normalizeText, numbersToJids, pickKeysFromArray, randomize, registerAuthCreds, removeAuthCreds, repairSessionKeys, shuffleString, toBuffer, toJson, toString, useAuthState };
1150
+ export { AudioProcessor, type AudioType, BaseMessagesType, ButtonInteractiveCallType, ButtonInteractiveCopyType, ButtonInteractiveReplyType, ButtonInteractiveSingleSelectType, ButtonInteractiveType, ButtonInteractiveUrlType, ButtonSimpleType, ButtonType, type CallsContext, CitationType, Client, ClientAuthPairingType, ClientAuthQRType, ClientBaseType, ClientOptionsType, type ConnectionContext, DEVICE_ENUM_TYPES, DocumentProcessor, type EventCallbackType, EventEnumType, FakeReplyType, ImageProcessor, LimiterType, ListenerCallsType, ListenerConnectionType, ListenerMessagesType, MESSAGE_ENUM_TYPES, MediaProcessor, type MessagesContext, type PluginDefinition, Plugins, type PluginsConfigType, type PluginsHandlerType, StickerMetadataType, StickerProcessor, StickerShapeType, VideoProcessor, cleanJid, cleanMediaObject, cleanupSocket, configureFFmpeg, definePlugins, extractJids, extractUrls, findGlobalWord, findNestedByKeys, generateId, getDeepContent, getExistingSocket, getLatestLibVersion, getMediaThumbnail, getUsersMentions, getVideoDuration, getVideoThumbnail, getWaAudio, getWaDocument, getWaImage, getWaSticker, ignoreLint, logColor, modifyFn, normalizeText, numbersToJids, pickKeysFromArray, randomize, registerAuthCreds, removeAuthCreds, repairSessionKeys, shuffleString, toBuffer, toJson, toString, useAuthState };