@hansaka02/baileys 7.3.2 → 7.3.6

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 (210) hide show
  1. package/lib/Defaults/baileys-version.json +2 -2
  2. package/lib/Defaults/connection.js +51 -0
  3. package/lib/Defaults/constants.js +74 -0
  4. package/lib/Defaults/history.js +19 -0
  5. package/lib/Defaults/index.js +36 -142
  6. package/lib/Defaults/media.js +48 -0
  7. package/lib/Defaults/prefix.js +18 -0
  8. package/lib/Signal/Group/group-session-builder.js +10 -42
  9. package/lib/Signal/Group/group_cipher.js +9 -6
  10. package/lib/Signal/Group/index.js +39 -53
  11. package/lib/Signal/Group/keyhelper.js +8 -41
  12. package/lib/Signal/Group/sender-chain-key.js +5 -18
  13. package/lib/Signal/Group/sender-key-distribution-message.js +7 -7
  14. package/lib/Signal/Group/sender-key-message.js +12 -8
  15. package/lib/Signal/Group/sender-key-record.js +7 -16
  16. package/lib/Signal/Group/sender-key-state.js +15 -61
  17. package/lib/Signal/Group/sender-message-key.js +2 -2
  18. package/lib/Signal/libsignal.js +237 -177
  19. package/lib/Signal/lid-mapping.js +128 -71
  20. package/lib/Socket/Client/types.js +2 -2
  21. package/lib/Socket/Client/websocket.js +25 -16
  22. package/lib/Socket/business.js +46 -33
  23. package/lib/Socket/chats.js +286 -170
  24. package/lib/Socket/community.js +215 -77
  25. package/lib/Socket/groups.js +77 -61
  26. package/lib/Socket/index.js +4 -4
  27. package/lib/Socket/messages-recv.js +629 -457
  28. package/lib/Socket/messages-send.js +645 -656
  29. package/lib/Socket/mex.js +61 -0
  30. package/lib/Socket/newsletter.js +166 -245
  31. package/lib/Socket/socket.js +396 -170
  32. package/lib/Store/index.js +27 -11
  33. package/lib/Store/make-cache-manager-store.js +14 -15
  34. package/lib/Store/make-in-memory-store.js +28 -24
  35. package/lib/Types/LabelAssociation.js +2 -2
  36. package/lib/Types/Message.js +6 -6
  37. package/lib/Types/MexUpdates.js +5 -5
  38. package/lib/Types/Newsletter.js +32 -25
  39. package/lib/Types/State.js +4 -4
  40. package/lib/Types/index.js +28 -12
  41. package/lib/Utils/auth-utils.js +212 -375
  42. package/lib/Utils/baileys-event-stream.js +68 -69
  43. package/lib/Utils/browser-utils.js +43 -0
  44. package/lib/Utils/business.js +63 -53
  45. package/lib/Utils/chat-utils.js +241 -106
  46. package/lib/Utils/crypto.js +25 -45
  47. package/lib/Utils/decode-wa-message.js +361 -311
  48. package/lib/Utils/event-buffer.js +97 -42
  49. package/lib/Utils/generics.js +90 -207
  50. package/lib/Utils/history.js +29 -27
  51. package/lib/Utils/index.js +28 -14
  52. package/lib/Utils/link-preview.js +24 -62
  53. package/lib/Utils/logger.js +5 -5
  54. package/lib/Utils/lt-hash.js +29 -23
  55. package/lib/Utils/make-mutex.js +26 -28
  56. package/lib/Utils/message-retry-manager.js +55 -7
  57. package/lib/Utils/messages-media.js +434 -247
  58. package/lib/Utils/messages.js +963 -917
  59. package/lib/Utils/noise-handler.js +60 -20
  60. package/lib/Utils/pre-key-manager.js +126 -0
  61. package/lib/Utils/process-message.js +216 -141
  62. package/lib/Utils/signal.js +75 -37
  63. package/lib/Utils/use-multi-file-auth-state.js +18 -22
  64. package/lib/Utils/validate-connection.js +96 -66
  65. package/lib/WABinary/constants.js +1268 -1268
  66. package/lib/WABinary/decode.js +62 -34
  67. package/lib/WABinary/encode.js +57 -36
  68. package/lib/WABinary/generic-utils.js +4 -4
  69. package/lib/WABinary/index.js +27 -11
  70. package/lib/WABinary/jid-utils.js +58 -11
  71. package/lib/WAM/constants.js +19064 -11563
  72. package/lib/WAM/encode.js +71 -14
  73. package/lib/WAM/index.js +27 -11
  74. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +20 -16
  75. package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
  76. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +7 -4
  77. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +2 -2
  78. package/lib/WAUSync/Protocols/USyncLIDProtocol.js +0 -2
  79. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +2 -2
  80. package/lib/WAUSync/Protocols/index.js +27 -11
  81. package/lib/WAUSync/USyncQuery.js +51 -28
  82. package/lib/WAUSync/index.js +27 -11
  83. package/lib/index.js +60 -31
  84. package/package.json +12 -17
  85. package/WAProto/AICommon/AICommon.d.ts +0 -11702
  86. package/WAProto/Adv/Adv.d.ts +0 -643
  87. package/WAProto/BotMetadata/BotMetadata.d.ts +0 -5654
  88. package/WAProto/Cert/Cert.d.ts +0 -613
  89. package/WAProto/ChatLockSettings/ChatLockSettings.d.ts +0 -476
  90. package/WAProto/CompanionReg/CompanionReg.d.ts +0 -1361
  91. package/WAProto/DeviceCapabilities/DeviceCapabilities.d.ts +0 -577
  92. package/WAProto/E2E/E2E.d.ts +0 -41724
  93. package/WAProto/Ephemeral/Ephemeral.d.ts +0 -114
  94. package/WAProto/HistorySync/HistorySync.d.ts +0 -51700
  95. package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.d.ts +0 -229
  96. package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.d.ts +0 -583
  97. package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.d.ts +0 -42897
  98. package/WAProto/MmsRetry/MmsRetry.d.ts +0 -243
  99. package/WAProto/Protocol/Protocol.d.ts +0 -270
  100. package/WAProto/Reporting/Reporting.d.ts +0 -371
  101. package/WAProto/ServerSync/ServerSync.d.ts +0 -1285
  102. package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.d.ts +0 -1868
  103. package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.d.ts +0 -767
  104. package/WAProto/StatusAttributions/StatusAttributions.d.ts +0 -1027
  105. package/WAProto/SyncAction/SyncAction.d.ts +0 -11193
  106. package/WAProto/UserPassword/UserPassword.d.ts +0 -363
  107. package/WAProto/VnameCert/VnameCert.d.ts +0 -821
  108. package/WAProto/Wa6/Wa6.d.ts +0 -2128
  109. package/WAProto/Web/Web.d.ts +0 -46383
  110. package/WAProto/index.d.ts +0 -55
  111. package/lib/Defaults/index.d.ts +0 -77
  112. package/lib/Signal/Group/ciphertext-message.d.ts +0 -9
  113. package/lib/Signal/Group/group-session-builder.d.ts +0 -17
  114. package/lib/Signal/Group/group_cipher.d.ts +0 -19
  115. package/lib/Signal/Group/index.d.ts +0 -11
  116. package/lib/Signal/Group/keyhelper.d.ts +0 -16
  117. package/lib/Signal/Group/sender-chain-key.d.ts +0 -14
  118. package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -17
  119. package/lib/Signal/Group/sender-key-message.d.ts +0 -19
  120. package/lib/Signal/Group/sender-key-name.d.ts +0 -19
  121. package/lib/Signal/Group/sender-key-record.d.ts +0 -32
  122. package/lib/Signal/Group/sender-key-state.d.ts +0 -44
  123. package/lib/Signal/Group/sender-message-key.d.ts +0 -11
  124. package/lib/Signal/libsignal.d.ts +0 -8
  125. package/lib/Signal/lid-mapping.d.ts +0 -28
  126. package/lib/Socket/Client/index.d.ts +0 -2
  127. package/lib/Socket/Client/types.d.ts +0 -16
  128. package/lib/Socket/Client/websocket.d.ts +0 -13
  129. package/lib/Socket/business.d.ts +0 -187
  130. package/lib/Socket/chats.d.ts +0 -97
  131. package/lib/Socket/community.d.ts +0 -129
  132. package/lib/Socket/groups.d.ts +0 -129
  133. package/lib/Socket/index.d.ts +0 -191
  134. package/lib/Socket/messages-recv.d.ts +0 -174
  135. package/lib/Socket/messages-send.d.ts +0 -165
  136. package/lib/Socket/newsletter.d.ts +0 -145
  137. package/lib/Socket/socket.d.ts +0 -45
  138. package/lib/Socket/usync.d.ts +0 -37
  139. package/lib/Socket/usync.js +0 -83
  140. package/lib/Store/index.d.ts +0 -4
  141. package/lib/Store/make-cache-manager-store.d.ts +0 -14
  142. package/lib/Store/make-in-memory-store.d.ts +0 -123
  143. package/lib/Store/make-ordered-dictionary.d.ts +0 -12
  144. package/lib/Store/object-repository.d.ts +0 -10
  145. package/lib/Types/Auth.d.ts +0 -121
  146. package/lib/Types/Bussiness.d.ts +0 -28
  147. package/lib/Types/Call.d.ts +0 -14
  148. package/lib/Types/Chat.d.ts +0 -143
  149. package/lib/Types/Contact.d.ts +0 -23
  150. package/lib/Types/Events.d.ts +0 -226
  151. package/lib/Types/GroupMetadata.d.ts +0 -66
  152. package/lib/Types/Label.d.ts +0 -48
  153. package/lib/Types/LabelAssociation.d.ts +0 -35
  154. package/lib/Types/Message.d.ts +0 -484
  155. package/lib/Types/MexUpdates.d.ts +0 -9
  156. package/lib/Types/Newsletter.d.ts +0 -109
  157. package/lib/Types/Product.d.ts +0 -92
  158. package/lib/Types/Signal.d.ts +0 -98
  159. package/lib/Types/Socket.d.ts +0 -141
  160. package/lib/Types/State.d.ts +0 -41
  161. package/lib/Types/USync.d.ts +0 -26
  162. package/lib/Types/index.d.ts +0 -80
  163. package/lib/Utils/auth-utils.d.ts +0 -21
  164. package/lib/Utils/baileys-event-stream.d.ts +0 -18
  165. package/lib/Utils/business.d.ts +0 -29
  166. package/lib/Utils/chat-utils.d.ts +0 -82
  167. package/lib/Utils/crypto.d.ts +0 -56
  168. package/lib/Utils/decode-wa-message.d.ts +0 -53
  169. package/lib/Utils/event-buffer.d.ts +0 -39
  170. package/lib/Utils/generics.d.ts +0 -117
  171. package/lib/Utils/history.d.ts +0 -23
  172. package/lib/Utils/index.d.ts +0 -20
  173. package/lib/Utils/link-preview.d.ts +0 -23
  174. package/lib/Utils/logger.d.ts +0 -13
  175. package/lib/Utils/lt-hash.d.ts +0 -14
  176. package/lib/Utils/make-mutex.d.ts +0 -9
  177. package/lib/Utils/message-retry-manager.d.ts +0 -88
  178. package/lib/Utils/messages-media.d.ts +0 -135
  179. package/lib/Utils/messages.d.ts +0 -105
  180. package/lib/Utils/noise-handler.d.ts +0 -20
  181. package/lib/Utils/process-message.d.ts +0 -49
  182. package/lib/Utils/signal.d.ts +0 -42
  183. package/lib/Utils/use-mongo-file-auth-state.d.ts +0 -6
  184. package/lib/Utils/use-mongo-file-auth-state.js +0 -84
  185. package/lib/Utils/use-multi-file-auth-state.d.ts +0 -13
  186. package/lib/Utils/use-single-file-auth-state.d.ts +0 -13
  187. package/lib/Utils/use-single-file-auth-state.js +0 -80
  188. package/lib/Utils/validate-connection.d.ts +0 -13
  189. package/lib/WABinary/constants.d.ts +0 -30
  190. package/lib/WABinary/decode.d.ts +0 -9
  191. package/lib/WABinary/encode.d.ts +0 -3
  192. package/lib/WABinary/generic-utils.d.ts +0 -28
  193. package/lib/WABinary/index.d.ts +0 -5
  194. package/lib/WABinary/jid-utils.d.ts +0 -58
  195. package/lib/WABinary/types.d.ts +0 -22
  196. package/lib/WAM/BinaryInfo.d.ts +0 -16
  197. package/lib/WAM/constants.d.ts +0 -47
  198. package/lib/WAM/encode.d.ts +0 -3
  199. package/lib/WAM/index.d.ts +0 -3
  200. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.d.ts +0 -28
  201. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -10
  202. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -26
  203. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -14
  204. package/lib/WAUSync/Protocols/USyncLIDProtocol.d.ts +0 -10
  205. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -14
  206. package/lib/WAUSync/Protocols/index.d.ts +0 -6
  207. package/lib/WAUSync/USyncQuery.d.ts +0 -31
  208. package/lib/WAUSync/USyncUser.d.ts +0 -12
  209. package/lib/WAUSync/index.d.ts +0 -3
  210. package/lib/index.d.ts +0 -13
@@ -1,243 +0,0 @@
1
- import * as $protobuf from "protobufjs";
2
- import Long = require("long");
3
- /** Namespace MmsRetry. */
4
- export namespace MmsRetry {
5
-
6
- /** Properties of a ServerErrorReceipt. */
7
- interface IServerErrorReceipt {
8
-
9
- /** ServerErrorReceipt stanzaId */
10
- stanzaId?: (string|null);
11
- }
12
-
13
- /** Represents a ServerErrorReceipt. */
14
- class ServerErrorReceipt implements IServerErrorReceipt {
15
-
16
- /**
17
- * Constructs a new ServerErrorReceipt.
18
- * @param [properties] Properties to set
19
- */
20
- constructor(properties?: MmsRetry.IServerErrorReceipt);
21
-
22
- /** ServerErrorReceipt stanzaId. */
23
- public stanzaId?: (string|null);
24
-
25
- /** ServerErrorReceipt _stanzaId. */
26
- public _stanzaId?: "stanzaId";
27
-
28
- /**
29
- * Creates a new ServerErrorReceipt instance using the specified properties.
30
- * @param [properties] Properties to set
31
- * @returns ServerErrorReceipt instance
32
- */
33
- public static create(properties?: MmsRetry.IServerErrorReceipt): MmsRetry.ServerErrorReceipt;
34
-
35
- /**
36
- * Encodes the specified ServerErrorReceipt message. Does not implicitly {@link MmsRetry.ServerErrorReceipt.verify|verify} messages.
37
- * @param message ServerErrorReceipt message or plain object to encode
38
- * @param [writer] Writer to encode to
39
- * @returns Writer
40
- */
41
- public static encode(message: MmsRetry.IServerErrorReceipt, writer?: $protobuf.Writer): $protobuf.Writer;
42
-
43
- /**
44
- * Encodes the specified ServerErrorReceipt message, length delimited. Does not implicitly {@link MmsRetry.ServerErrorReceipt.verify|verify} messages.
45
- * @param message ServerErrorReceipt message or plain object to encode
46
- * @param [writer] Writer to encode to
47
- * @returns Writer
48
- */
49
- public static encodeDelimited(message: MmsRetry.IServerErrorReceipt, writer?: $protobuf.Writer): $protobuf.Writer;
50
-
51
- /**
52
- * Decodes a ServerErrorReceipt message from the specified reader or buffer.
53
- * @param reader Reader or buffer to decode from
54
- * @param [length] Message length if known beforehand
55
- * @returns ServerErrorReceipt
56
- * @throws {Error} If the payload is not a reader or valid buffer
57
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
58
- */
59
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MmsRetry.ServerErrorReceipt;
60
-
61
- /**
62
- * Decodes a ServerErrorReceipt message from the specified reader or buffer, length delimited.
63
- * @param reader Reader or buffer to decode from
64
- * @returns ServerErrorReceipt
65
- * @throws {Error} If the payload is not a reader or valid buffer
66
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
67
- */
68
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): MmsRetry.ServerErrorReceipt;
69
-
70
- /**
71
- * Verifies a ServerErrorReceipt message.
72
- * @param message Plain object to verify
73
- * @returns `null` if valid, otherwise the reason why it is not
74
- */
75
- public static verify(message: { [k: string]: any }): (string|null);
76
-
77
- /**
78
- * Creates a ServerErrorReceipt message from a plain object. Also converts values to their respective internal types.
79
- * @param object Plain object
80
- * @returns ServerErrorReceipt
81
- */
82
- public static fromObject(object: { [k: string]: any }): MmsRetry.ServerErrorReceipt;
83
-
84
- /**
85
- * Creates a plain object from a ServerErrorReceipt message. Also converts values to other types if specified.
86
- * @param message ServerErrorReceipt
87
- * @param [options] Conversion options
88
- * @returns Plain object
89
- */
90
- public static toObject(message: MmsRetry.ServerErrorReceipt, options?: $protobuf.IConversionOptions): { [k: string]: any };
91
-
92
- /**
93
- * Converts this ServerErrorReceipt to JSON.
94
- * @returns JSON object
95
- */
96
- public toJSON(): { [k: string]: any };
97
-
98
- /**
99
- * Gets the default type url for ServerErrorReceipt
100
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
101
- * @returns The default type url
102
- */
103
- public static getTypeUrl(typeUrlPrefix?: string): string;
104
- }
105
-
106
- /** Properties of a MediaRetryNotification. */
107
- interface IMediaRetryNotification {
108
-
109
- /** MediaRetryNotification stanzaId */
110
- stanzaId?: (string|null);
111
-
112
- /** MediaRetryNotification directPath */
113
- directPath?: (string|null);
114
-
115
- /** MediaRetryNotification result */
116
- result?: (MmsRetry.MediaRetryNotification.ResultType|null);
117
-
118
- /** MediaRetryNotification messageSecret */
119
- messageSecret?: (Uint8Array|null);
120
- }
121
-
122
- /** Represents a MediaRetryNotification. */
123
- class MediaRetryNotification implements IMediaRetryNotification {
124
-
125
- /**
126
- * Constructs a new MediaRetryNotification.
127
- * @param [properties] Properties to set
128
- */
129
- constructor(properties?: MmsRetry.IMediaRetryNotification);
130
-
131
- /** MediaRetryNotification stanzaId. */
132
- public stanzaId?: (string|null);
133
-
134
- /** MediaRetryNotification directPath. */
135
- public directPath?: (string|null);
136
-
137
- /** MediaRetryNotification result. */
138
- public result?: (MmsRetry.MediaRetryNotification.ResultType|null);
139
-
140
- /** MediaRetryNotification messageSecret. */
141
- public messageSecret?: (Uint8Array|null);
142
-
143
- /** MediaRetryNotification _stanzaId. */
144
- public _stanzaId?: "stanzaId";
145
-
146
- /** MediaRetryNotification _directPath. */
147
- public _directPath?: "directPath";
148
-
149
- /** MediaRetryNotification _result. */
150
- public _result?: "result";
151
-
152
- /** MediaRetryNotification _messageSecret. */
153
- public _messageSecret?: "messageSecret";
154
-
155
- /**
156
- * Creates a new MediaRetryNotification instance using the specified properties.
157
- * @param [properties] Properties to set
158
- * @returns MediaRetryNotification instance
159
- */
160
- public static create(properties?: MmsRetry.IMediaRetryNotification): MmsRetry.MediaRetryNotification;
161
-
162
- /**
163
- * Encodes the specified MediaRetryNotification message. Does not implicitly {@link MmsRetry.MediaRetryNotification.verify|verify} messages.
164
- * @param message MediaRetryNotification message or plain object to encode
165
- * @param [writer] Writer to encode to
166
- * @returns Writer
167
- */
168
- public static encode(message: MmsRetry.IMediaRetryNotification, writer?: $protobuf.Writer): $protobuf.Writer;
169
-
170
- /**
171
- * Encodes the specified MediaRetryNotification message, length delimited. Does not implicitly {@link MmsRetry.MediaRetryNotification.verify|verify} messages.
172
- * @param message MediaRetryNotification message or plain object to encode
173
- * @param [writer] Writer to encode to
174
- * @returns Writer
175
- */
176
- public static encodeDelimited(message: MmsRetry.IMediaRetryNotification, writer?: $protobuf.Writer): $protobuf.Writer;
177
-
178
- /**
179
- * Decodes a MediaRetryNotification message from the specified reader or buffer.
180
- * @param reader Reader or buffer to decode from
181
- * @param [length] Message length if known beforehand
182
- * @returns MediaRetryNotification
183
- * @throws {Error} If the payload is not a reader or valid buffer
184
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
185
- */
186
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MmsRetry.MediaRetryNotification;
187
-
188
- /**
189
- * Decodes a MediaRetryNotification message from the specified reader or buffer, length delimited.
190
- * @param reader Reader or buffer to decode from
191
- * @returns MediaRetryNotification
192
- * @throws {Error} If the payload is not a reader or valid buffer
193
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
194
- */
195
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): MmsRetry.MediaRetryNotification;
196
-
197
- /**
198
- * Verifies a MediaRetryNotification message.
199
- * @param message Plain object to verify
200
- * @returns `null` if valid, otherwise the reason why it is not
201
- */
202
- public static verify(message: { [k: string]: any }): (string|null);
203
-
204
- /**
205
- * Creates a MediaRetryNotification message from a plain object. Also converts values to their respective internal types.
206
- * @param object Plain object
207
- * @returns MediaRetryNotification
208
- */
209
- public static fromObject(object: { [k: string]: any }): MmsRetry.MediaRetryNotification;
210
-
211
- /**
212
- * Creates a plain object from a MediaRetryNotification message. Also converts values to other types if specified.
213
- * @param message MediaRetryNotification
214
- * @param [options] Conversion options
215
- * @returns Plain object
216
- */
217
- public static toObject(message: MmsRetry.MediaRetryNotification, options?: $protobuf.IConversionOptions): { [k: string]: any };
218
-
219
- /**
220
- * Converts this MediaRetryNotification to JSON.
221
- * @returns JSON object
222
- */
223
- public toJSON(): { [k: string]: any };
224
-
225
- /**
226
- * Gets the default type url for MediaRetryNotification
227
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
228
- * @returns The default type url
229
- */
230
- public static getTypeUrl(typeUrlPrefix?: string): string;
231
- }
232
-
233
- namespace MediaRetryNotification {
234
-
235
- /** ResultType enum. */
236
- enum ResultType {
237
- GENERAL_ERROR = 0,
238
- SUCCESS = 1,
239
- NOT_FOUND = 2,
240
- DECRYPTION_ERROR = 3
241
- }
242
- }
243
- }
@@ -1,270 +0,0 @@
1
- import * as $protobuf from "protobufjs";
2
- import Long = require("long");
3
- /** Namespace Protocol. */
4
- export namespace Protocol {
5
-
6
- /** Properties of a LimitSharing. */
7
- interface ILimitSharing {
8
-
9
- /** LimitSharing sharingLimited */
10
- sharingLimited?: (boolean|null);
11
-
12
- /** LimitSharing trigger */
13
- trigger?: (Protocol.LimitSharing.TriggerType|null);
14
-
15
- /** LimitSharing limitSharingSettingTimestamp */
16
- limitSharingSettingTimestamp?: (number|Long|null);
17
-
18
- /** LimitSharing initiatedByMe */
19
- initiatedByMe?: (boolean|null);
20
- }
21
-
22
- /** Represents a LimitSharing. */
23
- class LimitSharing implements ILimitSharing {
24
-
25
- /**
26
- * Constructs a new LimitSharing.
27
- * @param [properties] Properties to set
28
- */
29
- constructor(properties?: Protocol.ILimitSharing);
30
-
31
- /** LimitSharing sharingLimited. */
32
- public sharingLimited?: (boolean|null);
33
-
34
- /** LimitSharing trigger. */
35
- public trigger?: (Protocol.LimitSharing.TriggerType|null);
36
-
37
- /** LimitSharing limitSharingSettingTimestamp. */
38
- public limitSharingSettingTimestamp?: (number|Long|null);
39
-
40
- /** LimitSharing initiatedByMe. */
41
- public initiatedByMe?: (boolean|null);
42
-
43
- /** LimitSharing _sharingLimited. */
44
- public _sharingLimited?: "sharingLimited";
45
-
46
- /** LimitSharing _trigger. */
47
- public _trigger?: "trigger";
48
-
49
- /** LimitSharing _limitSharingSettingTimestamp. */
50
- public _limitSharingSettingTimestamp?: "limitSharingSettingTimestamp";
51
-
52
- /** LimitSharing _initiatedByMe. */
53
- public _initiatedByMe?: "initiatedByMe";
54
-
55
- /**
56
- * Creates a new LimitSharing instance using the specified properties.
57
- * @param [properties] Properties to set
58
- * @returns LimitSharing instance
59
- */
60
- public static create(properties?: Protocol.ILimitSharing): Protocol.LimitSharing;
61
-
62
- /**
63
- * Encodes the specified LimitSharing message. Does not implicitly {@link Protocol.LimitSharing.verify|verify} messages.
64
- * @param message LimitSharing message or plain object to encode
65
- * @param [writer] Writer to encode to
66
- * @returns Writer
67
- */
68
- public static encode(message: Protocol.ILimitSharing, writer?: $protobuf.Writer): $protobuf.Writer;
69
-
70
- /**
71
- * Encodes the specified LimitSharing message, length delimited. Does not implicitly {@link Protocol.LimitSharing.verify|verify} messages.
72
- * @param message LimitSharing message or plain object to encode
73
- * @param [writer] Writer to encode to
74
- * @returns Writer
75
- */
76
- public static encodeDelimited(message: Protocol.ILimitSharing, writer?: $protobuf.Writer): $protobuf.Writer;
77
-
78
- /**
79
- * Decodes a LimitSharing message from the specified reader or buffer.
80
- * @param reader Reader or buffer to decode from
81
- * @param [length] Message length if known beforehand
82
- * @returns LimitSharing
83
- * @throws {Error} If the payload is not a reader or valid buffer
84
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
85
- */
86
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Protocol.LimitSharing;
87
-
88
- /**
89
- * Decodes a LimitSharing message from the specified reader or buffer, length delimited.
90
- * @param reader Reader or buffer to decode from
91
- * @returns LimitSharing
92
- * @throws {Error} If the payload is not a reader or valid buffer
93
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
94
- */
95
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Protocol.LimitSharing;
96
-
97
- /**
98
- * Verifies a LimitSharing message.
99
- * @param message Plain object to verify
100
- * @returns `null` if valid, otherwise the reason why it is not
101
- */
102
- public static verify(message: { [k: string]: any }): (string|null);
103
-
104
- /**
105
- * Creates a LimitSharing message from a plain object. Also converts values to their respective internal types.
106
- * @param object Plain object
107
- * @returns LimitSharing
108
- */
109
- public static fromObject(object: { [k: string]: any }): Protocol.LimitSharing;
110
-
111
- /**
112
- * Creates a plain object from a LimitSharing message. Also converts values to other types if specified.
113
- * @param message LimitSharing
114
- * @param [options] Conversion options
115
- * @returns Plain object
116
- */
117
- public static toObject(message: Protocol.LimitSharing, options?: $protobuf.IConversionOptions): { [k: string]: any };
118
-
119
- /**
120
- * Converts this LimitSharing to JSON.
121
- * @returns JSON object
122
- */
123
- public toJSON(): { [k: string]: any };
124
-
125
- /**
126
- * Gets the default type url for LimitSharing
127
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
128
- * @returns The default type url
129
- */
130
- public static getTypeUrl(typeUrlPrefix?: string): string;
131
- }
132
-
133
- namespace LimitSharing {
134
-
135
- /** TriggerType enum. */
136
- enum TriggerType {
137
- UNKNOWN = 0,
138
- CHAT_SETTING = 1,
139
- BIZ_SUPPORTS_FB_HOSTING = 2,
140
- UNKNOWN_GROUP = 3
141
- }
142
- }
143
-
144
- /** Properties of a MessageKey. */
145
- interface IMessageKey {
146
-
147
- /** MessageKey remoteJid */
148
- remoteJid?: (string|null);
149
-
150
- /** MessageKey fromMe */
151
- fromMe?: (boolean|null);
152
-
153
- /** MessageKey id */
154
- id?: (string|null);
155
-
156
- /** MessageKey participant */
157
- participant?: (string|null);
158
- }
159
-
160
- /** Represents a MessageKey. */
161
- class MessageKey implements IMessageKey {
162
-
163
- /**
164
- * Constructs a new MessageKey.
165
- * @param [properties] Properties to set
166
- */
167
- constructor(properties?: Protocol.IMessageKey);
168
-
169
- /** MessageKey remoteJid. */
170
- public remoteJid?: (string|null);
171
-
172
- /** MessageKey fromMe. */
173
- public fromMe?: (boolean|null);
174
-
175
- /** MessageKey id. */
176
- public id?: (string|null);
177
-
178
- /** MessageKey participant. */
179
- public participant?: (string|null);
180
-
181
- /** MessageKey _remoteJid. */
182
- public _remoteJid?: "remoteJid";
183
-
184
- /** MessageKey _fromMe. */
185
- public _fromMe?: "fromMe";
186
-
187
- /** MessageKey _id. */
188
- public _id?: "id";
189
-
190
- /** MessageKey _participant. */
191
- public _participant?: "participant";
192
-
193
- /**
194
- * Creates a new MessageKey instance using the specified properties.
195
- * @param [properties] Properties to set
196
- * @returns MessageKey instance
197
- */
198
- public static create(properties?: Protocol.IMessageKey): Protocol.MessageKey;
199
-
200
- /**
201
- * Encodes the specified MessageKey message. Does not implicitly {@link Protocol.MessageKey.verify|verify} messages.
202
- * @param message MessageKey message or plain object to encode
203
- * @param [writer] Writer to encode to
204
- * @returns Writer
205
- */
206
- public static encode(message: Protocol.IMessageKey, writer?: $protobuf.Writer): $protobuf.Writer;
207
-
208
- /**
209
- * Encodes the specified MessageKey message, length delimited. Does not implicitly {@link Protocol.MessageKey.verify|verify} messages.
210
- * @param message MessageKey message or plain object to encode
211
- * @param [writer] Writer to encode to
212
- * @returns Writer
213
- */
214
- public static encodeDelimited(message: Protocol.IMessageKey, writer?: $protobuf.Writer): $protobuf.Writer;
215
-
216
- /**
217
- * Decodes a MessageKey message from the specified reader or buffer.
218
- * @param reader Reader or buffer to decode from
219
- * @param [length] Message length if known beforehand
220
- * @returns MessageKey
221
- * @throws {Error} If the payload is not a reader or valid buffer
222
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
223
- */
224
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Protocol.MessageKey;
225
-
226
- /**
227
- * Decodes a MessageKey message from the specified reader or buffer, length delimited.
228
- * @param reader Reader or buffer to decode from
229
- * @returns MessageKey
230
- * @throws {Error} If the payload is not a reader or valid buffer
231
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
232
- */
233
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Protocol.MessageKey;
234
-
235
- /**
236
- * Verifies a MessageKey message.
237
- * @param message Plain object to verify
238
- * @returns `null` if valid, otherwise the reason why it is not
239
- */
240
- public static verify(message: { [k: string]: any }): (string|null);
241
-
242
- /**
243
- * Creates a MessageKey message from a plain object. Also converts values to their respective internal types.
244
- * @param object Plain object
245
- * @returns MessageKey
246
- */
247
- public static fromObject(object: { [k: string]: any }): Protocol.MessageKey;
248
-
249
- /**
250
- * Creates a plain object from a MessageKey message. Also converts values to other types if specified.
251
- * @param message MessageKey
252
- * @param [options] Conversion options
253
- * @returns Plain object
254
- */
255
- public static toObject(message: Protocol.MessageKey, options?: $protobuf.IConversionOptions): { [k: string]: any };
256
-
257
- /**
258
- * Converts this MessageKey to JSON.
259
- * @returns JSON object
260
- */
261
- public toJSON(): { [k: string]: any };
262
-
263
- /**
264
- * Gets the default type url for MessageKey
265
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
266
- * @returns The default type url
267
- */
268
- public static getTypeUrl(typeUrlPrefix?: string): string;
269
- }
270
- }