@builderbot/provider-baileys 1.2.7 → 1.2.8-alpha.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"releaseTmp.d.ts","sourceRoot":"","sources":["../src/releaseTmp.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,eAAO,MAAM,UAAU,gBAAuB,MAAM,MAAM,MAAM,KAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CA6BxF,CAAA"}
1
+ {"version":3,"file":"releaseTmp.d.ts","sourceRoot":"","sources":["../src/releaseTmp.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAU,aAAa,MAAM,EAAE,IAAI,MAAM,KAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CA6BxF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,gBAAgB,aAAoB,MAAM,qBAM1C,CAAA;AACN;;;;;GAKG;AACH,QAAA,MAAM,iBAAiB,WAAY,MAAM,SAAQ,OAAO,KAAW,MAOlE,CAAA;AAED;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,WAAkB,MAAM,SAAQ,MAAM,KAAc,OAAO,CAAC,IAAI,CAaxF,CAAA;AAED;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,cAAe,MAAM,KAAG,OAIhD,CAAA;AAED,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,gBAAgB,GAAU,UAAU,MAAM,qBAM1C,CAAA;AACN;;;;;GAKG;AACH,QAAA,MAAM,iBAAiB,GAAI,QAAQ,MAAM,EAAE,OAAM,OAAe,KAAG,MAOlE,CAAA;AAED;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,GAAU,QAAQ,MAAM,EAAE,OAAM,MAAiB,KAAG,OAAO,CAAC,IAAI,CAaxF,CAAA;AAED;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,GAAI,WAAW,MAAM,KAAG,OAIhD,CAAA;AAED,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builderbot/provider-baileys",
3
- "version": "1.2.7",
4
- "description": "Now Im the model of a modern major general / The venerated Virginian veteran whose men are all / Lining up, to put me up on a pedestal / Writin letters to relatives / Embellishin my elegance and eloquence / But the elephant is in the room / The truth is in ya face when ya hear the British cannons go / BOOM",
3
+ "version": "1.2.8-alpha.1",
4
+ "description": "Now I'm the model of a modern major general / The venerated Virginian veteran whose men are all / Lining up, to put me up on a pedestal / Writin' letters to relatives / Embellishin' my elegance and eloquence / But the elephant is in the room / The truth is in ya face when ya hear the British cannons go / BOOM",
5
5
  "keywords": [],
6
6
  "author": "Leifer Mendez <leifer33@gmail.com>",
7
7
  "license": "ISC",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "homepage": "https://github.com/codigoencasa/bot-whatsapp#readme",
32
32
  "devDependencies": {
33
- "@builderbot/bot": "^1.2.7",
33
+ "@builderbot/bot": "^1.2.8-alpha.1",
34
34
  "@hapi/boom": "^10.0.1",
35
35
  "@jest/globals": "^29.7.0",
36
36
  "@rollup/plugin-commonjs": "^25.0.7",
@@ -61,9 +61,10 @@
61
61
  "@adiwajshing/keyed-db": "^0.2.4",
62
62
  "@ffmpeg-installer/ffmpeg": "^1.1.0",
63
63
  "@types/polka": "^0.5.7",
64
- "@whiskeysockets/baileys": "~6.7.16",
64
+ "baileys": "~6.7.16",
65
65
  "fluent-ffmpeg": "^2.1.2",
66
- "fs-extra": "^11.2.0"
66
+ "fs-extra": "^11.2.0",
67
+ "node-cache": "^5.1.2"
67
68
  },
68
- "gitHead": "ea71f0da0c2a6b76b1d67988f05ce91fdda1750e"
69
+ "gitHead": "00f2004ac30bfa6e24438bc167cab16e649ad9c9"
69
70
  }
@@ -1,118 +0,0 @@
1
- import type KeyedDB from '@adiwajshing/keyed-db';
2
- import type { Comparable } from '@adiwajshing/keyed-db/lib/Types';
3
- import { proto } from '@whiskeysockets/baileys';
4
- import type { BaileysEventEmitter, ConnectionState, Contact, GroupMetadata, PresenceData, WAMessageCursor, WAMessageKey, Chat, WAMessage, makeWASocket } from '@whiskeysockets/baileys';
5
- import { ObjectRepository } from '@whiskeysockets/baileys/lib/Store/object-repository';
6
- import type { Label } from '@whiskeysockets/baileys/lib/Types/Label';
7
- import type { LabelAssociation } from '@whiskeysockets/baileys/lib/Types/LabelAssociation';
8
- import type { Logger } from 'pino';
9
- type WASocket = ReturnType<typeof makeWASocket>;
10
- export declare const waChatKey: (pin: boolean) => {
11
- key: (c: Chat) => string;
12
- compare: (k1: string, k2: string) => number;
13
- };
14
- export declare const waMessageID: (m: WAMessage) => string;
15
- export declare const waLabelAssociationKey: Comparable<LabelAssociation, string>;
16
- export type BaileysInMemoryStoreConfig = {
17
- chatKey?: Comparable<Chat, string>;
18
- labelAssociationKey?: Comparable<LabelAssociation, string>;
19
- logger?: Logger;
20
- socket?: WASocket;
21
- };
22
- declare const _default: (config: BaileysInMemoryStoreConfig) => {
23
- chats: KeyedDB<Chat, string>;
24
- contacts: {
25
- [_: string]: Contact;
26
- };
27
- messages: {
28
- [_: string]: {
29
- array: proto.IWebMessageInfo[];
30
- get: (id: string) => proto.IWebMessageInfo;
31
- upsert: (item: proto.IWebMessageInfo, mode: "append" | "prepend") => void;
32
- update: (item: proto.IWebMessageInfo) => boolean;
33
- remove: (item: proto.IWebMessageInfo) => boolean;
34
- updateAssign: (id: string, update: Partial<proto.IWebMessageInfo>) => boolean;
35
- clear: () => void;
36
- filter: (contain: (item: proto.IWebMessageInfo) => boolean) => void;
37
- toJSON: () => proto.IWebMessageInfo[];
38
- fromJSON: (newItems: proto.IWebMessageInfo[]) => void;
39
- };
40
- };
41
- groupMetadata: {
42
- [_: string]: GroupMetadata;
43
- };
44
- state: ConnectionState;
45
- presences: {
46
- [id: string]: {
47
- [participant: string]: PresenceData;
48
- };
49
- };
50
- labels: ObjectRepository<Label>;
51
- labelAssociations: KeyedDB<LabelAssociation, string>;
52
- bind: (ev: BaileysEventEmitter) => void;
53
- /** loads messages from the store, if not found -- uses the legacy connection */
54
- loadMessages: (jid: string, count: number, cursor: WAMessageCursor) => Promise<proto.IWebMessageInfo[]>;
55
- /**
56
- * Get all available labels for profile
57
- *
58
- * Keep in mind that the list is formed from predefined tags and tags
59
- * that were "caught" during their editing.
60
- */
61
- getLabels: () => ObjectRepository<Label>;
62
- /**
63
- * Get labels for chat
64
- *
65
- * @returns Label IDs
66
- **/
67
- getChatLabels: (chatId: string) => LabelAssociation[];
68
- /**
69
- * Get labels for message
70
- *
71
- * @returns Label IDs
72
- **/
73
- getMessageLabels: (messageId: string) => string[];
74
- loadMessage: (jid: string, id: string) => Promise<proto.IWebMessageInfo>;
75
- mostRecentMessage: (jid: string) => Promise<proto.IWebMessageInfo>;
76
- fetchImageUrl: (jid: string, sock: WASocket | undefined) => Promise<string>;
77
- fetchGroupMetadata: (jid: string, sock: WASocket | undefined) => Promise<GroupMetadata>;
78
- fetchMessageReceipts: ({ remoteJid, id }: WAMessageKey) => Promise<proto.IUserReceipt[]>;
79
- toJSON: () => {
80
- chats: KeyedDB<Chat, string>;
81
- contacts: {
82
- [_: string]: Contact;
83
- };
84
- messages: {
85
- [_: string]: {
86
- array: proto.IWebMessageInfo[];
87
- get: (id: string) => proto.IWebMessageInfo;
88
- upsert: (item: proto.IWebMessageInfo, mode: "append" | "prepend") => void;
89
- update: (item: proto.IWebMessageInfo) => boolean;
90
- remove: (item: proto.IWebMessageInfo) => boolean;
91
- updateAssign: (id: string, update: Partial<proto.IWebMessageInfo>) => boolean;
92
- clear: () => void;
93
- filter: (contain: (item: proto.IWebMessageInfo) => boolean) => void;
94
- toJSON: () => proto.IWebMessageInfo[];
95
- fromJSON: (newItems: proto.IWebMessageInfo[]) => void;
96
- };
97
- };
98
- labels: ObjectRepository<Label>;
99
- labelAssociations: KeyedDB<LabelAssociation, string>;
100
- };
101
- fromJSON: (json: {
102
- chats: Chat[];
103
- contacts: {
104
- [id: string]: Contact;
105
- };
106
- messages: {
107
- [id: string]: WAMessage[];
108
- };
109
- labels: {
110
- [labelId: string]: Label;
111
- };
112
- labelAssociations: LabelAssociation[];
113
- }) => void;
114
- writeToFile: (path: string) => void;
115
- readFromFile: (path: string) => void;
116
- };
117
- export default _default;
118
- //# sourceMappingURL=bindStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bindStore.d.ts","sourceRoot":"","sources":["../src/bindStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAAgD,KAAK,EAAY,MAAM,yBAAyB,CAAA;AACvG,OAAO,KAAK,EACR,mBAAmB,EACnB,eAAe,EACf,OAAO,EACP,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,IAAI,EACJ,SAAS,EACT,YAAY,EACf,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAA;AACtF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAA2B,MAAM,oDAAoD,CAAA;AAEnH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAElC,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;AAyF/C,eAAO,MAAM,SAAS,QAAS,OAAO;aACzB,IAAI;kBAKC,MAAM,MAAM,MAAM;CAClC,CAAA;A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