@pontalabs/baileys 1.0.6 → 1.0.7

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 (185) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +839 -267
  3. package/WAProto/GenerateStatics.sh +4 -3
  4. package/WAProto/WAProto.proto +511 -1215
  5. package/WAProto/index.d.ts +55 -14017
  6. package/WAProto/index.js +29 -97689
  7. package/lib/Defaults/index.d.ts +74 -72
  8. package/lib/Defaults/index.js +108 -94
  9. package/lib/Signal/Group/ciphertext-message.d.ts +7 -8
  10. package/lib/Signal/Group/ciphertext-message.js +16 -9
  11. package/lib/Signal/Group/group-session-builder.d.ts +13 -11
  12. package/lib/Signal/Group/group-session-builder.js +61 -19
  13. package/lib/Signal/Group/group_cipher.d.ts +16 -14
  14. package/lib/Signal/Group/group_cipher.js +70 -41
  15. package/lib/Signal/Group/index.d.ts +11 -12
  16. package/lib/Signal/Group/index.js +61 -12
  17. package/lib/Signal/Group/keyhelper.d.ts +14 -9
  18. package/lib/Signal/Group/keyhelper.js +58 -10
  19. package/lib/Signal/Group/sender-chain-key.d.ts +13 -13
  20. package/lib/Signal/Group/sender-chain-key.js +34 -13
  21. package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -16
  22. package/lib/Signal/Group/sender-key-distribution-message.js +36 -28
  23. package/lib/Signal/Group/sender-key-message.d.ts +18 -18
  24. package/lib/Signal/Group/sender-key-message.js +45 -38
  25. package/lib/Signal/Group/sender-key-name.d.ts +15 -14
  26. package/lib/Signal/Group/sender-key-name.js +31 -20
  27. package/lib/Signal/Group/sender-key-record.d.ts +25 -24
  28. package/lib/Signal/Group/sender-key-record.js +35 -18
  29. package/lib/Signal/Group/sender-key-state.d.ts +34 -29
  30. package/lib/Signal/Group/sender-key-state.js +100 -37
  31. package/lib/Signal/Group/sender-message-key.d.ts +10 -11
  32. package/lib/Signal/Group/sender-message-key.js +22 -15
  33. package/lib/Signal/libsignal.d.ts +8 -5
  34. package/lib/Signal/libsignal.js +142 -288
  35. package/lib/Signal/lid-mapping.d.ts +28 -23
  36. package/lib/Signal/lid-mapping.js +184 -277
  37. package/lib/Socket/Client/index.d.ts +2 -3
  38. package/lib/Socket/Client/index.js +22 -3
  39. package/lib/Socket/Client/types.d.ts +15 -15
  40. package/lib/Socket/Client/types.js +15 -8
  41. package/lib/Socket/Client/websocket.d.ts +12 -12
  42. package/lib/Socket/Client/websocket.js +37 -29
  43. package/lib/Socket/business.d.ts +178 -208
  44. package/lib/Socket/business.js +127 -91
  45. package/lib/Socket/chats.d.ts +93 -120
  46. package/lib/Socket/chats.js +652 -727
  47. package/lib/Socket/community.js +10 -2
  48. package/lib/Socket/groups.d.ts +111 -143
  49. package/lib/Socket/groups.js +186 -165
  50. package/lib/Socket/index.d.ts +183 -252
  51. package/lib/Socket/index.js +18 -38
  52. package/lib/Socket/messages-recv.d.ts +167 -196
  53. package/lib/Socket/messages-recv.js +1567 -1443
  54. package/lib/Socket/messages-send.d.ts +158 -192
  55. package/lib/Socket/messages-send.js +1208 -1102
  56. package/lib/Socket/newsletter.d.ts +138 -163
  57. package/lib/Socket/newsletter.js +249 -153
  58. package/lib/Socket/socket.d.ts +36 -50
  59. package/lib/Socket/socket.js +820 -749
  60. package/lib/Store/index.d.ts +4 -4
  61. package/lib/Store/index.js +24 -4
  62. package/lib/Store/make-in-memory-store.d.ts +104 -44
  63. package/lib/Store/make-in-memory-store.js +213 -199
  64. package/lib/Store/make-ordered-dictionary.d.ts +12 -13
  65. package/lib/Store/make-ordered-dictionary.js +45 -38
  66. package/lib/Store/object-repository.d.ts +10 -11
  67. package/lib/Store/object-repository.js +16 -9
  68. package/lib/Types/Auth.d.ts +97 -93
  69. package/lib/Types/Auth.js +3 -2
  70. package/lib/Types/Bussines.js +3 -2
  71. package/lib/Types/Call.d.ts +13 -14
  72. package/lib/Types/Call.js +3 -2
  73. package/lib/Types/Chat.d.ts +97 -78
  74. package/lib/Types/Chat.js +9 -8
  75. package/lib/Types/Contact.d.ts +9 -12
  76. package/lib/Types/Contact.js +3 -2
  77. package/lib/Types/Events.d.ts +176 -206
  78. package/lib/Types/Events.js +3 -2
  79. package/lib/Types/GroupMetadata.d.ts +48 -53
  80. package/lib/Types/GroupMetadata.js +3 -2
  81. package/lib/Types/Label.d.ts +14 -13
  82. package/lib/Types/Label.js +30 -24
  83. package/lib/Types/LabelAssociation.d.ts +20 -15
  84. package/lib/Types/LabelAssociation.js +12 -6
  85. package/lib/Types/Message.d.ts +412 -248
  86. package/lib/Types/Message.js +19 -17
  87. package/lib/Types/Product.d.ts +71 -58
  88. package/lib/Types/Product.js +3 -2
  89. package/lib/Types/Signal.d.ts +82 -71
  90. package/lib/Types/Signal.js +3 -2
  91. package/lib/Types/Socket.d.ts +81 -76
  92. package/lib/Types/Socket.js +3 -3
  93. package/lib/Types/State.d.ts +19 -75
  94. package/lib/Types/State.js +14 -56
  95. package/lib/Types/USync.d.ts +8 -8
  96. package/lib/Types/USync.js +3 -2
  97. package/lib/Types/index.d.ts +62 -47
  98. package/lib/Types/index.js +50 -26
  99. package/lib/Utils/auth-utils.d.ts +10 -13
  100. package/lib/Utils/auth-utils.js +472 -213
  101. package/lib/Utils/business.d.ts +20 -14
  102. package/lib/Utils/business.js +134 -110
  103. package/lib/Utils/chat-utils.d.ts +70 -88
  104. package/lib/Utils/chat-utils.js +403 -466
  105. package/lib/Utils/crypto.d.ts +46 -27
  106. package/lib/Utils/crypto.js +188 -117
  107. package/lib/Utils/decode-wa-message.d.ts +45 -58
  108. package/lib/Utils/decode-wa-message.js +311 -212
  109. package/lib/Utils/event-buffer.d.ts +17 -14
  110. package/lib/Utils/event-buffer.js +296 -321
  111. package/lib/Utils/generics.d.ts +92 -66
  112. package/lib/Utils/generics.js +436 -270
  113. package/lib/Utils/history.d.ts +23 -24
  114. package/lib/Utils/history.js +76 -106
  115. package/lib/Utils/index.d.ts +21 -24
  116. package/lib/Utils/index.js +41 -24
  117. package/lib/Utils/link-preview.d.ts +14 -12
  118. package/lib/Utils/link-preview.js +75 -40
  119. package/lib/Utils/logger.d.ts +11 -10
  120. package/lib/Utils/logger.js +7 -3
  121. package/lib/Utils/lt-hash.d.ts +14 -8
  122. package/lib/Utils/lt-hash.js +53 -3
  123. package/lib/Utils/make-mutex.d.ts +7 -7
  124. package/lib/Utils/make-mutex.js +44 -28
  125. package/lib/Utils/message-retry-manager.d.ts +88 -115
  126. package/lib/Utils/message-retry-manager.js +160 -265
  127. package/lib/Utils/messages-media.d.ts +107 -105
  128. package/lib/Utils/messages-media.js +619 -548
  129. package/lib/Utils/messages.d.ts +66 -52
  130. package/lib/Utils/messages.js +1558 -1730
  131. package/lib/Utils/noise-handler.d.ts +18 -18
  132. package/lib/Utils/noise-handler.js +130 -176
  133. package/lib/Utils/process-message.d.ts +32 -43
  134. package/lib/Utils/process-message.js +282 -484
  135. package/lib/Utils/rich-message-utils.js +724 -1220
  136. package/lib/Utils/signal.d.ts +32 -37
  137. package/lib/Utils/signal.js +105 -140
  138. package/lib/Utils/use-multi-file-auth-state.d.ts +5 -5
  139. package/lib/Utils/use-multi-file-auth-state.js +120 -70
  140. package/lib/Utils/use-single-file-auth-state.d.ts +13 -11
  141. package/lib/Utils/use-single-file-auth-state.js +66 -92
  142. package/lib/Utils/validate-connection.d.ts +13 -11
  143. package/lib/Utils/validate-connection.js +113 -128
  144. package/lib/WABinary/constants.d.ts +27 -25
  145. package/lib/WABinary/constants.js +1292 -1451
  146. package/lib/WABinary/decode.d.ts +9 -7
  147. package/lib/WABinary/decode.js +189 -163
  148. package/lib/WABinary/encode.d.ts +3 -3
  149. package/lib/WABinary/encode.js +155 -110
  150. package/lib/WABinary/generic-utils.d.ts +27 -14
  151. package/lib/WABinary/generic-utils.js +105 -177
  152. package/lib/WABinary/index.d.ts +5 -6
  153. package/lib/WABinary/index.js +25 -6
  154. package/lib/WABinary/jid-utils.d.ts +54 -41
  155. package/lib/WABinary/jid-utils.js +152 -83
  156. package/lib/WABinary/types.d.ts +13 -10
  157. package/lib/WABinary/types.js +3 -2
  158. package/lib/WAM/BinaryInfo.d.ts +15 -8
  159. package/lib/WAM/BinaryInfo.js +14 -7
  160. package/lib/WAM/constants.d.ts +37 -30
  161. package/lib/WAM/constants.js +11983 -19465
  162. package/lib/WAM/encode.d.ts +3 -3
  163. package/lib/WAM/encode.js +109 -95
  164. package/lib/WAM/index.d.ts +3 -4
  165. package/lib/WAM/index.js +23 -4
  166. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -9
  167. package/lib/WAUSync/Protocols/USyncContactProtocol.js +21 -37
  168. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -19
  169. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +26 -18
  170. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -11
  171. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +20 -12
  172. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -11
  173. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +24 -16
  174. package/lib/WAUSync/Protocols/index.d.ts +6 -6
  175. package/lib/WAUSync/Protocols/index.js +26 -6
  176. package/lib/WAUSync/USyncQuery.d.ts +28 -27
  177. package/lib/WAUSync/USyncQuery.js +62 -68
  178. package/lib/WAUSync/USyncUser.d.ts +10 -15
  179. package/lib/WAUSync/USyncUser.js +19 -20
  180. package/lib/WAUSync/index.d.ts +3 -4
  181. package/lib/WAUSync/index.js +23 -4
  182. package/lib/index.d.ts +12 -11
  183. package/lib/index.js +39 -12
  184. package/package.json +42 -86
  185. package/engine-requirements.js +0 -10
@@ -1,41 +1,45 @@
1
- export function makeOrderedDictionary(idGetter) {
2
- const array = [];
3
- const dict = {};
4
- const get = (id) => dict[id];
1
+ "use strict"
2
+
3
+ Object.defineProperty(exports, "__esModule", { value: true })
4
+
5
+ function makeOrderedDictionary(idGetter) {
6
+ const array = []
7
+ const dict = {}
8
+ const get = (id) => dict[id]
5
9
  const update = (item) => {
6
- const id = idGetter(item);
7
- const idx = array.findIndex(i => idGetter(i) === id);
10
+ const id = idGetter(item)
11
+ const idx = array.findIndex(i => idGetter(i) === id)
8
12
  if (idx >= 0) {
9
- array[idx] = item;
10
- dict[id] = item;
13
+ array[idx] = item
14
+ dict[id] = item
11
15
  }
12
- return false;
13
- };
16
+ return false
17
+ }
14
18
  const upsert = (item, mode) => {
15
- const id = idGetter(item);
19
+ const id = idGetter(item)
16
20
  if (get(id)) {
17
- update(item);
21
+ update(item)
18
22
  }
19
23
  else {
20
24
  if (mode === 'append') {
21
- array.push(item);
25
+ array.push(item)
22
26
  }
23
27
  else {
24
- array.splice(0, 0, item);
28
+ array.splice(0, 0, item)
25
29
  }
26
- dict[id] = item;
30
+ dict[id] = item
27
31
  }
28
- };
32
+ }
29
33
  const remove = (item) => {
30
- const id = idGetter(item);
31
- const idx = array.findIndex(i => idGetter(i) === id);
34
+ const id = idGetter(item)
35
+ const idx = array.findIndex(i => idGetter(i) === id)
32
36
  if (idx >= 0) {
33
- array.splice(idx, 1);
34
- delete dict[id];
35
- return true;
37
+ array.splice(idx, 1)
38
+ delete dict[id]
39
+ return true
36
40
  }
37
- return false;
38
- };
41
+ return false
42
+ }
39
43
  return {
40
44
  array,
41
45
  get,
@@ -43,37 +47,40 @@ export function makeOrderedDictionary(idGetter) {
43
47
  update,
44
48
  remove,
45
49
  updateAssign: (id, update) => {
46
- const item = get(id);
50
+ const item = get(id)
47
51
  if (item) {
48
- Object.assign(item, update);
49
- delete dict[id];
50
- dict[idGetter(item)] = item;
51
- return true;
52
+ Object.assign(item, update)
53
+ delete dict[id]
54
+ dict[idGetter(item)] = item
55
+ return true
52
56
  }
53
- return false;
57
+ return false
54
58
  },
55
59
  clear: () => {
56
- array.splice(0, array.length);
60
+ array.splice(0, array.length)
57
61
  for (const key of Object.keys(dict)) {
58
- delete dict[key];
62
+ delete dict[key]
59
63
  }
60
64
  },
61
65
  filter: (contain) => {
62
- let i = 0;
66
+ let i = 0
63
67
  while (i < array.length) {
64
68
  if (!contain(array[i])) {
65
- delete dict[idGetter(array[i])];
66
- array.splice(i, 1);
69
+ delete dict[idGetter(array[i])]
70
+ array.splice(i, 1)
67
71
  }
68
72
  else {
69
- i += 1;
73
+ i += 1
70
74
  }
71
75
  }
72
76
  },
73
77
  toJSON: () => array,
74
78
  fromJSON: (newItems) => {
75
- array.splice(0, array.length, ...newItems);
79
+ array.splice(0, array.length, ...newItems)
76
80
  }
77
- };
81
+ }
78
82
  }
79
- //# sourceMappingURL=make-ordered-dictionary.js.map
83
+
84
+ module.exports = {
85
+ makeOrderedDictionary
86
+ }
@@ -1,11 +1,10 @@
1
- export class ObjectRepository {
2
- constructor(entities?: {});
3
- entityMap: Map<string, any>;
4
- findById(id: any): any;
5
- findAll(): any[];
6
- upsertById(id: any, entity: any): Map<string, any>;
7
- deleteById(id: any): boolean;
8
- count(): number;
9
- toJSON(): any[];
10
- }
11
- //# sourceMappingURL=object-repository.d.ts.map
1
+ export declare class ObjectRepository<T extends object> {
2
+ readonly entityMap: Map<string, T>
3
+ constructor(entities?: Record<string, T>)
4
+ findById(id: string): T | undefined
5
+ findAll(): T[]
6
+ upsertById(id: string, entity: T): Map<string, T>
7
+ deleteById(id: string): boolean
8
+ count(): number
9
+ toJSON(): T[]
10
+ }
@@ -1,24 +1,31 @@
1
- export class ObjectRepository {
1
+ "use strict"
2
+
3
+ Object.defineProperty(exports, "__esModule", { value: true })
4
+
5
+ class ObjectRepository {
2
6
  constructor(entities = {}) {
3
- this.entityMap = new Map(Object.entries(entities));
7
+ this.entityMap = new Map(Object.entries(entities))
4
8
  }
5
9
  findById(id) {
6
- return this.entityMap.get(id);
10
+ return this.entityMap.get(id)
7
11
  }
8
12
  findAll() {
9
- return Array.from(this.entityMap.values());
13
+ return Array.from(this.entityMap.values())
10
14
  }
11
15
  upsertById(id, entity) {
12
- return this.entityMap.set(id, { ...entity });
16
+ return this.entityMap.set(id, { ...entity })
13
17
  }
14
18
  deleteById(id) {
15
- return this.entityMap.delete(id);
19
+ return this.entityMap.delete(id)
16
20
  }
17
21
  count() {
18
- return this.entityMap.size;
22
+ return this.entityMap.size
19
23
  }
20
24
  toJSON() {
21
- return this.findAll();
25
+ return this.findAll()
22
26
  }
23
27
  }
24
- //# sourceMappingURL=object-repository.js.map
28
+
29
+ module.exports = {
30
+ ObjectRepository
31
+ }
@@ -1,117 +1,121 @@
1
- import type { proto } from '../../WAProto/index.js';
2
- import type { Contact } from './Contact.js';
3
- import type { MinimalMessage } from './Message.js';
1
+ import type { proto } from '../../WAProto'
2
+ import type { Contact } from './Contact'
3
+ import type { MinimalMessage } from './Message'
4
+
4
5
  export type KeyPair = {
5
- public: Uint8Array;
6
- private: Uint8Array;
7
- };
6
+ public: Uint8Array
7
+ private: Uint8Array
8
+ }
9
+
8
10
  export type SignedKeyPair = {
9
- keyPair: KeyPair;
10
- signature: Uint8Array;
11
- keyId: number;
12
- timestampS?: number;
13
- };
11
+ keyPair: KeyPair
12
+ signature: Uint8Array
13
+ keyId: number
14
+ timestampS?: number
15
+ }
16
+
14
17
  export type ProtocolAddress = {
15
- name: string;
16
- deviceId: number;
17
- };
18
+ name: string
19
+ deviceId: number
20
+ }
21
+
18
22
  export type SignalIdentity = {
19
- identifier: ProtocolAddress;
20
- identifierKey: Uint8Array;
21
- };
22
- export type LIDMapping = {
23
- pn: string;
24
- lid: string;
25
- };
23
+ identifier: ProtocolAddress
24
+ identifierKey: Uint8Array
25
+ }
26
+
26
27
  export type LTHashState = {
27
- version: number;
28
- hash: Buffer;
28
+ version: number
29
+ hash: Buffer
29
30
  indexValueMap: {
30
31
  [indexMacBase64: string]: {
31
- valueMac: Uint8Array | Buffer;
32
- };
33
- };
34
- };
32
+ valueMac: Uint8Array | Buffer
33
+ }
34
+ }
35
+ }
36
+
35
37
  export type SignalCreds = {
36
- readonly signedIdentityKey: KeyPair;
37
- readonly signedPreKey: SignedKeyPair;
38
- readonly registrationId: number;
39
- };
38
+ readonly signedIdentityKey: KeyPair
39
+ readonly signedPreKey: SignedKeyPair
40
+ readonly registrationId: number
41
+ }
42
+
40
43
  export type AccountSettings = {
41
44
  /** unarchive chats when a new message is received */
42
- unarchiveChats: boolean;
45
+ unarchiveChats: boolean
43
46
  /** the default mode to start new conversations with */
44
- defaultDisappearingMode?: Pick<proto.IConversation, 'ephemeralExpiration' | 'ephemeralSettingTimestamp'>;
45
- };
47
+ defaultDisappearingMode?: Pick<proto.IConversation, 'ephemeralExpiration' | 'ephemeralSettingTimestamp'>
48
+ }
49
+
46
50
  export type AuthenticationCreds = SignalCreds & {
47
- readonly noiseKey: KeyPair;
48
- readonly pairingEphemeralKeyPair: KeyPair;
49
- advSecretKey: string;
50
- me?: Contact;
51
- account?: proto.IADVSignedDeviceIdentity;
52
- signalIdentities?: SignalIdentity[];
53
- myAppStateKeyId?: string;
54
- firstUnuploadedPreKeyId: number;
55
- nextPreKeyId: number;
56
- lastAccountSyncTimestamp?: number;
57
- platform?: string;
58
- processedHistoryMessages: MinimalMessage[];
51
+ readonly noiseKey: KeyPair
52
+ readonly pairingEphemeralKeyPair: KeyPair
53
+ advSecretKey: string
54
+ me?: Contact
55
+ account?: proto.IADVSignedDeviceIdentity
56
+ signalIdentities?: SignalIdentity[]
57
+ myAppStateKeyId?: string
58
+ firstUnuploadedPreKeyId: number
59
+ nextPreKeyId: number
60
+ lastAccountSyncTimestamp?: number
61
+ platform?: string
62
+ processedHistoryMessages: MinimalMessage[]
59
63
  /** number of times history & app state has been synced */
60
- accountSyncCounter: number;
61
- accountSettings: AccountSettings;
62
- registered: boolean;
63
- pairingCode: string | undefined;
64
- lastPropHash: string | undefined;
65
- routingInfo: Buffer | undefined;
66
- additionalData?: any | undefined;
67
- };
64
+ accountSyncCounter: number
65
+ accountSettings: AccountSettings
66
+ registered: boolean
67
+ pairingCode: string | undefined
68
+ lastPropHash: string | undefined
69
+ routingInfo: Buffer | undefined
70
+ }
71
+
68
72
  export type SignalDataTypeMap = {
69
- 'pre-key': KeyPair;
70
- session: Uint8Array;
71
- 'sender-key': Uint8Array;
73
+ 'pre-key': KeyPair
74
+ 'session': Uint8Array
75
+ 'sender-key': Uint8Array
72
76
  'sender-key-memory': {
73
- [jid: string]: boolean;
74
- };
75
- 'app-state-sync-key': proto.Message.IAppStateSyncKeyData;
76
- 'app-state-sync-version': LTHashState;
77
- 'lid-mapping': string;
78
- 'device-list': string[];
79
- tctoken: {
80
- token: Buffer;
81
- timestamp?: string;
82
- senderTimestamp?: number;
83
- };
84
- 'identity-key': Uint8Array;
85
- };
77
+ [jid: string]: boolean
78
+ }
79
+ 'app-state-sync-key': proto.Message.IAppStateSyncKeyData
80
+ 'app-state-sync-version': LTHashState
81
+ 'lid-mapping': string
82
+ }
83
+
86
84
  export type SignalDataSet = {
87
85
  [T in keyof SignalDataTypeMap]?: {
88
- [id: string]: SignalDataTypeMap[T] | null;
89
- };
90
- };
91
- type Awaitable<T> = T | Promise<T>;
86
+ [id: string]: SignalDataTypeMap[T] | null
87
+ }
88
+ }
89
+
90
+ type Awaitable<T> = T | Promise<T>
91
+
92
92
  export type SignalKeyStore = {
93
93
  get<T extends keyof SignalDataTypeMap>(type: T, ids: string[]): Awaitable<{
94
- [id: string]: SignalDataTypeMap[T];
95
- }>;
96
- set(data: SignalDataSet): Awaitable<void>;
94
+ [id: string]: SignalDataTypeMap[T]
95
+ }>
96
+ set(data: SignalDataSet): Awaitable<void>
97
97
  /** clear all the data in the store */
98
- clear?(): Awaitable<void>;
99
- };
98
+ clear?(): Awaitable<void>
99
+ }
100
+
100
101
  export type SignalKeyStoreWithTransaction = SignalKeyStore & {
101
- isInTransaction: () => boolean;
102
- transaction<T>(exec: () => Promise<T>, key: string): Promise<T>;
103
- };
102
+ isInTransaction: () => boolean
103
+ transaction<T>(exec: () => Promise<T>, key: string): Promise<T>
104
+ }
105
+
104
106
  export type TransactionCapabilityOptions = {
105
- maxCommitRetries: number;
106
- delayBetweenTriesMs: number;
107
- };
107
+ maxCommitRetries: number
108
+ delayBetweenTriesMs: number
109
+ }
110
+
108
111
  export type SignalAuthState = {
109
- creds: SignalCreds;
110
- keys: SignalKeyStore | SignalKeyStoreWithTransaction;
111
- };
112
+ creds: SignalCreds
113
+ keys: SignalKeyStore | SignalKeyStoreWithTransaction
114
+ }
115
+
112
116
  export type AuthenticationState = {
113
- creds: AuthenticationCreds;
114
- keys: SignalKeyStore;
115
- };
116
- export {};
117
- //# sourceMappingURL=Auth.d.ts.map
117
+ creds: AuthenticationCreds
118
+ keys: SignalKeyStore
119
+ }
120
+
121
+ export {}
package/lib/Types/Auth.js CHANGED
@@ -1,2 +1,3 @@
1
- export {};
2
- //# sourceMappingURL=Auth.js.map
1
+ "use strict"
2
+
3
+ Object.defineProperty(exports, "__esModule", { value: true })
@@ -1,2 +1,3 @@
1
- export {};
2
- //# sourceMappingURL=Bussines.js.map
1
+ "use strict"
2
+
3
+ Object.defineProperty(exports, "__esModule", { value: true })
@@ -1,15 +1,14 @@
1
- export type WACallUpdateType = 'offer' | 'ringing' | 'preaccept' | 'transport' | 'relaylatency' | 'timeout' | 'reject' | 'accept' | 'terminate';
1
+ export type WACallUpdateType = 'offer' | 'ringing' | 'timeout' | 'reject' | 'accept' | 'terminate'
2
+
2
3
  export type WACallEvent = {
3
- chatId: string;
4
- from: string;
5
- callerPn?: string;
6
- isGroup?: boolean;
7
- groupJid?: string;
8
- id: string;
9
- date: Date;
10
- isVideo?: boolean;
11
- status: WACallUpdateType;
12
- offline: boolean;
13
- latencyMs?: number;
14
- };
15
- //# sourceMappingURL=Call.d.ts.map
4
+ chatId: string
5
+ from: string
6
+ isGroup?: boolean
7
+ groupJid?: string
8
+ id: string
9
+ date: Date
10
+ isVideo?: boolean
11
+ status: WACallUpdateType
12
+ offline: boolean
13
+ latencyMs?: number
14
+ }
package/lib/Types/Call.js CHANGED
@@ -1,2 +1,3 @@
1
- export {};
2
- //# sourceMappingURL=Call.js.map
1
+ "use strict"
2
+
3
+ Object.defineProperty(exports, "__esModule", { value: true })