@fhynella/baileys 2.0.5 → 2.1.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 (204) hide show
  1. package/lib/Defaults/connection.js +51 -0
  2. package/lib/Defaults/constants.js +62 -0
  3. package/lib/Defaults/history.js +17 -0
  4. package/lib/Defaults/index.js +36 -142
  5. package/lib/Defaults/media.js +48 -0
  6. package/lib/Defaults/prefix.js +18 -0
  7. package/lib/Signal/Group/group-session-builder.js +10 -42
  8. package/lib/Signal/Group/group_cipher.js +9 -6
  9. package/lib/Signal/Group/index.js +39 -53
  10. package/lib/Signal/Group/keyhelper.js +8 -41
  11. package/lib/Signal/Group/sender-chain-key.js +4 -4
  12. package/lib/Signal/Group/sender-key-distribution-message.js +5 -5
  13. package/lib/Signal/Group/sender-key-message.js +12 -8
  14. package/lib/Signal/Group/sender-key-record.js +7 -7
  15. package/lib/Signal/Group/sender-key-state.js +4 -4
  16. package/lib/Signal/Group/sender-message-key.js +2 -2
  17. package/lib/Signal/libsignal.js +45 -69
  18. package/lib/Signal/lid-mapping.js +15 -11
  19. package/lib/Socket/Client/types.js +2 -2
  20. package/lib/Socket/Client/websocket.js +16 -14
  21. package/lib/Socket/business.js +41 -32
  22. package/lib/Socket/chats.js +123 -98
  23. package/lib/Socket/community.js +50 -40
  24. package/lib/Socket/groups.js +59 -47
  25. package/lib/Socket/index.js +4 -4
  26. package/lib/Socket/messages-recv.js +219 -172
  27. package/lib/Socket/messages-send.js +187 -211
  28. package/lib/Socket/newsletter.js +61 -47
  29. package/lib/Socket/socket.js +133 -90
  30. package/lib/Socket/usync.js +6 -6
  31. package/lib/Store/index.js +27 -11
  32. package/lib/Store/make-cache-manager-store.js +14 -15
  33. package/lib/Store/make-in-memory-store.js +28 -24
  34. package/lib/Types/LabelAssociation.js +2 -2
  35. package/lib/Types/Message.js +6 -6
  36. package/lib/Types/MexUpdates.js +5 -5
  37. package/lib/Types/State.js +4 -4
  38. package/lib/Types/index.js +28 -12
  39. package/lib/Utils/auth-utils.js +28 -26
  40. package/lib/Utils/baileys-event-stream.js +68 -69
  41. package/lib/Utils/business.js +63 -53
  42. package/lib/Utils/chat-utils.js +81 -71
  43. package/lib/Utils/crypto.js +25 -45
  44. package/lib/Utils/decode-wa-message.js +319 -311
  45. package/lib/Utils/event-buffer.js +21 -22
  46. package/lib/Utils/generics.js +52 -75
  47. package/lib/Utils/history.js +21 -21
  48. package/lib/Utils/index.js +27 -13
  49. package/lib/Utils/link-preview.js +7 -30
  50. package/lib/Utils/logger.js +5 -5
  51. package/lib/Utils/lt-hash.js +3 -3
  52. package/lib/Utils/message-retry-manager.js +4 -4
  53. package/lib/Utils/messages-media.js +104 -109
  54. package/lib/Utils/messages.js +203 -171
  55. package/lib/Utils/noise-handler.js +28 -19
  56. package/lib/Utils/process-message.js +111 -96
  57. package/lib/Utils/signal.js +36 -25
  58. package/lib/Utils/use-multi-file-auth-state.js +18 -22
  59. package/lib/Utils/validate-connection.js +52 -45
  60. package/lib/WABinary/decode.js +6 -32
  61. package/lib/WABinary/encode.js +3 -29
  62. package/lib/WABinary/generic-utils.js +4 -4
  63. package/lib/WABinary/index.js +27 -11
  64. package/lib/WAM/encode.js +16 -8
  65. package/lib/WAM/index.js +27 -11
  66. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +20 -16
  67. package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
  68. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +7 -4
  69. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +2 -2
  70. package/lib/WAUSync/Protocols/USyncLIDProtocol.js +0 -2
  71. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +2 -2
  72. package/lib/WAUSync/Protocols/index.js +27 -11
  73. package/lib/WAUSync/USyncQuery.js +17 -10
  74. package/lib/WAUSync/index.js +27 -11
  75. package/lib/index.js +60 -31
  76. package/package.json +15 -6
  77. package/WAProto/AICommon/AICommon.d.ts +0 -11702
  78. package/WAProto/Adv/Adv.d.ts +0 -643
  79. package/WAProto/BotMetadata/BotMetadata.d.ts +0 -5654
  80. package/WAProto/Cert/Cert.d.ts +0 -613
  81. package/WAProto/ChatLockSettings/ChatLockSettings.d.ts +0 -476
  82. package/WAProto/CompanionReg/CompanionReg.d.ts +0 -1361
  83. package/WAProto/DeviceCapabilities/DeviceCapabilities.d.ts +0 -577
  84. package/WAProto/E2E/E2E.d.ts +0 -41724
  85. package/WAProto/Ephemeral/Ephemeral.d.ts +0 -114
  86. package/WAProto/HistorySync/HistorySync.d.ts +0 -51700
  87. package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.d.ts +0 -229
  88. package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.d.ts +0 -583
  89. package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.d.ts +0 -42897
  90. package/WAProto/MmsRetry/MmsRetry.d.ts +0 -243
  91. package/WAProto/Protocol/Protocol.d.ts +0 -270
  92. package/WAProto/Reporting/Reporting.d.ts +0 -371
  93. package/WAProto/ServerSync/ServerSync.d.ts +0 -1285
  94. package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.d.ts +0 -1868
  95. package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.d.ts +0 -767
  96. package/WAProto/StatusAttributions/StatusAttributions.d.ts +0 -1027
  97. package/WAProto/SyncAction/SyncAction.d.ts +0 -11193
  98. package/WAProto/UserPassword/UserPassword.d.ts +0 -363
  99. package/WAProto/VnameCert/VnameCert.d.ts +0 -821
  100. package/WAProto/Wa6/Wa6.d.ts +0 -2128
  101. package/WAProto/Web/Web.d.ts +0 -46383
  102. package/WAProto/index.d.ts +0 -55
  103. package/lib/Defaults/index.d.ts +0 -77
  104. package/lib/Signal/Group/ciphertext-message.d.ts +0 -9
  105. package/lib/Signal/Group/group-session-builder.d.ts +0 -17
  106. package/lib/Signal/Group/group_cipher.d.ts +0 -19
  107. package/lib/Signal/Group/index.d.ts +0 -11
  108. package/lib/Signal/Group/keyhelper.d.ts +0 -16
  109. package/lib/Signal/Group/sender-chain-key.d.ts +0 -14
  110. package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -17
  111. package/lib/Signal/Group/sender-key-message.d.ts +0 -19
  112. package/lib/Signal/Group/sender-key-name.d.ts +0 -19
  113. package/lib/Signal/Group/sender-key-record.d.ts +0 -32
  114. package/lib/Signal/Group/sender-key-state.d.ts +0 -44
  115. package/lib/Signal/Group/sender-message-key.d.ts +0 -11
  116. package/lib/Signal/libsignal.d.ts +0 -8
  117. package/lib/Signal/lid-mapping.d.ts +0 -28
  118. package/lib/Socket/.nomedia +0 -0
  119. package/lib/Socket/Client/index.d.ts +0 -2
  120. package/lib/Socket/Client/types.d.ts +0 -16
  121. package/lib/Socket/Client/websocket.d.ts +0 -13
  122. package/lib/Socket/business.d.ts +0 -187
  123. package/lib/Socket/chats.d.ts +0 -97
  124. package/lib/Socket/community.d.ts +0 -129
  125. package/lib/Socket/groups.d.ts +0 -129
  126. package/lib/Socket/index.d.ts +0 -197
  127. package/lib/Socket/messages-recv.d.ts +0 -180
  128. package/lib/Socket/messages-send.d.ts +0 -169
  129. package/lib/Socket/messages-send.d.ts.bak +0 -165
  130. package/lib/Socket/messages-send.js.bak +0 -1812
  131. package/lib/Socket/newsletter.d.ts +0 -145
  132. package/lib/Socket/socket.d.ts +0 -45
  133. package/lib/Socket/usync.d.ts +0 -37
  134. package/lib/Store/index.d.ts +0 -4
  135. package/lib/Store/make-cache-manager-store.d.ts +0 -14
  136. package/lib/Store/make-in-memory-store.d.ts +0 -123
  137. package/lib/Store/make-ordered-dictionary.d.ts +0 -12
  138. package/lib/Store/object-repository.d.ts +0 -10
  139. package/lib/Types/Auth.d.ts +0 -121
  140. package/lib/Types/Bussiness.d.ts +0 -28
  141. package/lib/Types/Call.d.ts +0 -14
  142. package/lib/Types/Chat.d.ts +0 -143
  143. package/lib/Types/Contact.d.ts +0 -23
  144. package/lib/Types/Events.d.ts +0 -226
  145. package/lib/Types/GroupMetadata.d.ts +0 -66
  146. package/lib/Types/Label.d.ts +0 -48
  147. package/lib/Types/LabelAssociation.d.ts +0 -35
  148. package/lib/Types/Message.d.ts +0 -484
  149. package/lib/Types/MexUpdates.d.ts +0 -9
  150. package/lib/Types/Newsletter.d.ts +0 -109
  151. package/lib/Types/Product.d.ts +0 -92
  152. package/lib/Types/Signal.d.ts +0 -98
  153. package/lib/Types/Socket.d.ts +0 -141
  154. package/lib/Types/State.d.ts +0 -41
  155. package/lib/Types/USync.d.ts +0 -26
  156. package/lib/Types/index.d.ts +0 -80
  157. package/lib/Utils/auth-utils.d.ts +0 -21
  158. package/lib/Utils/baileys-event-stream.d.ts +0 -18
  159. package/lib/Utils/business.d.ts +0 -29
  160. package/lib/Utils/chat-utils.d.ts +0 -82
  161. package/lib/Utils/crypto.d.ts +0 -56
  162. package/lib/Utils/decode-wa-message.d.ts +0 -53
  163. package/lib/Utils/event-buffer.d.ts +0 -39
  164. package/lib/Utils/generics.d.ts +0 -117
  165. package/lib/Utils/history.d.ts +0 -23
  166. package/lib/Utils/index.d.ts +0 -20
  167. package/lib/Utils/link-preview.d.ts +0 -23
  168. package/lib/Utils/logger.d.ts +0 -13
  169. package/lib/Utils/lt-hash.d.ts +0 -14
  170. package/lib/Utils/make-mutex.d.ts +0 -9
  171. package/lib/Utils/message-retry-manager.d.ts +0 -88
  172. package/lib/Utils/messages-media.d.ts +0 -135
  173. package/lib/Utils/messages.d.ts +0 -105
  174. package/lib/Utils/noise-handler.d.ts +0 -20
  175. package/lib/Utils/process-message.d.ts +0 -49
  176. package/lib/Utils/signal.d.ts +0 -42
  177. package/lib/Utils/use-mongo-file-auth-state.d.ts +0 -6
  178. package/lib/Utils/use-mongo-file-auth-state.js +0 -84
  179. package/lib/Utils/use-multi-file-auth-state.d.ts +0 -13
  180. package/lib/Utils/use-single-file-auth-state.d.ts +0 -13
  181. package/lib/Utils/use-single-file-auth-state.js +0 -80
  182. package/lib/Utils/validate-connection.d.ts +0 -13
  183. package/lib/WABinary/constants.d.ts +0 -30
  184. package/lib/WABinary/decode.d.ts +0 -9
  185. package/lib/WABinary/encode.d.ts +0 -3
  186. package/lib/WABinary/generic-utils.d.ts +0 -28
  187. package/lib/WABinary/index.d.ts +0 -5
  188. package/lib/WABinary/jid-utils.d.ts +0 -58
  189. package/lib/WABinary/types.d.ts +0 -22
  190. package/lib/WAM/BinaryInfo.d.ts +0 -16
  191. package/lib/WAM/constants.d.ts +0 -47
  192. package/lib/WAM/encode.d.ts +0 -3
  193. package/lib/WAM/index.d.ts +0 -3
  194. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.d.ts +0 -28
  195. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -10
  196. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -26
  197. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -14
  198. package/lib/WAUSync/Protocols/USyncLIDProtocol.d.ts +0 -10
  199. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -14
  200. package/lib/WAUSync/Protocols/index.d.ts +0 -6
  201. package/lib/WAUSync/USyncQuery.d.ts +0 -31
  202. package/lib/WAUSync/USyncUser.d.ts +0 -12
  203. package/lib/WAUSync/index.d.ts +0 -3
  204. package/lib/index.d.ts +0 -13
@@ -1,371 +0,0 @@
1
- import * as $protobuf from "protobufjs";
2
- import Long = require("long");
3
- /** Namespace Reporting. */
4
- export namespace Reporting {
5
-
6
- /** Properties of a Field. */
7
- interface IField {
8
-
9
- /** Field minVersion */
10
- minVersion?: (number|null);
11
-
12
- /** Field maxVersion */
13
- maxVersion?: (number|null);
14
-
15
- /** Field notReportableMinVersion */
16
- notReportableMinVersion?: (number|null);
17
-
18
- /** Field isMessage */
19
- isMessage?: (boolean|null);
20
-
21
- /** Field subfield */
22
- subfield?: ({ [k: string]: Reporting.IField }|null);
23
- }
24
-
25
- /** Represents a Field. */
26
- class Field implements IField {
27
-
28
- /**
29
- * Constructs a new Field.
30
- * @param [properties] Properties to set
31
- */
32
- constructor(properties?: Reporting.IField);
33
-
34
- /** Field minVersion. */
35
- public minVersion?: (number|null);
36
-
37
- /** Field maxVersion. */
38
- public maxVersion?: (number|null);
39
-
40
- /** Field notReportableMinVersion. */
41
- public notReportableMinVersion?: (number|null);
42
-
43
- /** Field isMessage. */
44
- public isMessage?: (boolean|null);
45
-
46
- /** Field subfield. */
47
- public subfield: { [k: string]: Reporting.IField };
48
-
49
- /** Field _minVersion. */
50
- public _minVersion?: "minVersion";
51
-
52
- /** Field _maxVersion. */
53
- public _maxVersion?: "maxVersion";
54
-
55
- /** Field _notReportableMinVersion. */
56
- public _notReportableMinVersion?: "notReportableMinVersion";
57
-
58
- /** Field _isMessage. */
59
- public _isMessage?: "isMessage";
60
-
61
- /**
62
- * Creates a new Field instance using the specified properties.
63
- * @param [properties] Properties to set
64
- * @returns Field instance
65
- */
66
- public static create(properties?: Reporting.IField): Reporting.Field;
67
-
68
- /**
69
- * Encodes the specified Field message. Does not implicitly {@link Reporting.Field.verify|verify} messages.
70
- * @param message Field message or plain object to encode
71
- * @param [writer] Writer to encode to
72
- * @returns Writer
73
- */
74
- public static encode(message: Reporting.IField, writer?: $protobuf.Writer): $protobuf.Writer;
75
-
76
- /**
77
- * Encodes the specified Field message, length delimited. Does not implicitly {@link Reporting.Field.verify|verify} messages.
78
- * @param message Field message or plain object to encode
79
- * @param [writer] Writer to encode to
80
- * @returns Writer
81
- */
82
- public static encodeDelimited(message: Reporting.IField, writer?: $protobuf.Writer): $protobuf.Writer;
83
-
84
- /**
85
- * Decodes a Field message from the specified reader or buffer.
86
- * @param reader Reader or buffer to decode from
87
- * @param [length] Message length if known beforehand
88
- * @returns Field
89
- * @throws {Error} If the payload is not a reader or valid buffer
90
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
91
- */
92
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Reporting.Field;
93
-
94
- /**
95
- * Decodes a Field message from the specified reader or buffer, length delimited.
96
- * @param reader Reader or buffer to decode from
97
- * @returns Field
98
- * @throws {Error} If the payload is not a reader or valid buffer
99
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
100
- */
101
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Reporting.Field;
102
-
103
- /**
104
- * Verifies a Field message.
105
- * @param message Plain object to verify
106
- * @returns `null` if valid, otherwise the reason why it is not
107
- */
108
- public static verify(message: { [k: string]: any }): (string|null);
109
-
110
- /**
111
- * Creates a Field message from a plain object. Also converts values to their respective internal types.
112
- * @param object Plain object
113
- * @returns Field
114
- */
115
- public static fromObject(object: { [k: string]: any }): Reporting.Field;
116
-
117
- /**
118
- * Creates a plain object from a Field message. Also converts values to other types if specified.
119
- * @param message Field
120
- * @param [options] Conversion options
121
- * @returns Plain object
122
- */
123
- public static toObject(message: Reporting.Field, options?: $protobuf.IConversionOptions): { [k: string]: any };
124
-
125
- /**
126
- * Converts this Field to JSON.
127
- * @returns JSON object
128
- */
129
- public toJSON(): { [k: string]: any };
130
-
131
- /**
132
- * Gets the default type url for Field
133
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
134
- * @returns The default type url
135
- */
136
- public static getTypeUrl(typeUrlPrefix?: string): string;
137
- }
138
-
139
- /** Properties of a Config. */
140
- interface IConfig {
141
-
142
- /** Config field */
143
- field?: ({ [k: string]: Reporting.IField }|null);
144
-
145
- /** Config version */
146
- version?: (number|null);
147
- }
148
-
149
- /** Represents a Config. */
150
- class Config implements IConfig {
151
-
152
- /**
153
- * Constructs a new Config.
154
- * @param [properties] Properties to set
155
- */
156
- constructor(properties?: Reporting.IConfig);
157
-
158
- /** Config field. */
159
- public field: { [k: string]: Reporting.IField };
160
-
161
- /** Config version. */
162
- public version?: (number|null);
163
-
164
- /** Config _version. */
165
- public _version?: "version";
166
-
167
- /**
168
- * Creates a new Config instance using the specified properties.
169
- * @param [properties] Properties to set
170
- * @returns Config instance
171
- */
172
- public static create(properties?: Reporting.IConfig): Reporting.Config;
173
-
174
- /**
175
- * Encodes the specified Config message. Does not implicitly {@link Reporting.Config.verify|verify} messages.
176
- * @param message Config message or plain object to encode
177
- * @param [writer] Writer to encode to
178
- * @returns Writer
179
- */
180
- public static encode(message: Reporting.IConfig, writer?: $protobuf.Writer): $protobuf.Writer;
181
-
182
- /**
183
- * Encodes the specified Config message, length delimited. Does not implicitly {@link Reporting.Config.verify|verify} messages.
184
- * @param message Config message or plain object to encode
185
- * @param [writer] Writer to encode to
186
- * @returns Writer
187
- */
188
- public static encodeDelimited(message: Reporting.IConfig, writer?: $protobuf.Writer): $protobuf.Writer;
189
-
190
- /**
191
- * Decodes a Config message from the specified reader or buffer.
192
- * @param reader Reader or buffer to decode from
193
- * @param [length] Message length if known beforehand
194
- * @returns Config
195
- * @throws {Error} If the payload is not a reader or valid buffer
196
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
197
- */
198
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Reporting.Config;
199
-
200
- /**
201
- * Decodes a Config message from the specified reader or buffer, length delimited.
202
- * @param reader Reader or buffer to decode from
203
- * @returns Config
204
- * @throws {Error} If the payload is not a reader or valid buffer
205
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
206
- */
207
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Reporting.Config;
208
-
209
- /**
210
- * Verifies a Config message.
211
- * @param message Plain object to verify
212
- * @returns `null` if valid, otherwise the reason why it is not
213
- */
214
- public static verify(message: { [k: string]: any }): (string|null);
215
-
216
- /**
217
- * Creates a Config message from a plain object. Also converts values to their respective internal types.
218
- * @param object Plain object
219
- * @returns Config
220
- */
221
- public static fromObject(object: { [k: string]: any }): Reporting.Config;
222
-
223
- /**
224
- * Creates a plain object from a Config message. Also converts values to other types if specified.
225
- * @param message Config
226
- * @param [options] Conversion options
227
- * @returns Plain object
228
- */
229
- public static toObject(message: Reporting.Config, options?: $protobuf.IConversionOptions): { [k: string]: any };
230
-
231
- /**
232
- * Converts this Config to JSON.
233
- * @returns JSON object
234
- */
235
- public toJSON(): { [k: string]: any };
236
-
237
- /**
238
- * Gets the default type url for Config
239
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
240
- * @returns The default type url
241
- */
242
- public static getTypeUrl(typeUrlPrefix?: string): string;
243
- }
244
-
245
- /** Properties of a Reportable. */
246
- interface IReportable {
247
-
248
- /** Reportable minVersion */
249
- minVersion?: (number|null);
250
-
251
- /** Reportable maxVersion */
252
- maxVersion?: (number|null);
253
-
254
- /** Reportable notReportableMinVersion */
255
- notReportableMinVersion?: (number|null);
256
-
257
- /** Reportable never */
258
- never?: (boolean|null);
259
- }
260
-
261
- /** Represents a Reportable. */
262
- class Reportable implements IReportable {
263
-
264
- /**
265
- * Constructs a new Reportable.
266
- * @param [properties] Properties to set
267
- */
268
- constructor(properties?: Reporting.IReportable);
269
-
270
- /** Reportable minVersion. */
271
- public minVersion?: (number|null);
272
-
273
- /** Reportable maxVersion. */
274
- public maxVersion?: (number|null);
275
-
276
- /** Reportable notReportableMinVersion. */
277
- public notReportableMinVersion?: (number|null);
278
-
279
- /** Reportable never. */
280
- public never?: (boolean|null);
281
-
282
- /** Reportable _minVersion. */
283
- public _minVersion?: "minVersion";
284
-
285
- /** Reportable _maxVersion. */
286
- public _maxVersion?: "maxVersion";
287
-
288
- /** Reportable _notReportableMinVersion. */
289
- public _notReportableMinVersion?: "notReportableMinVersion";
290
-
291
- /** Reportable _never. */
292
- public _never?: "never";
293
-
294
- /**
295
- * Creates a new Reportable instance using the specified properties.
296
- * @param [properties] Properties to set
297
- * @returns Reportable instance
298
- */
299
- public static create(properties?: Reporting.IReportable): Reporting.Reportable;
300
-
301
- /**
302
- * Encodes the specified Reportable message. Does not implicitly {@link Reporting.Reportable.verify|verify} messages.
303
- * @param message Reportable message or plain object to encode
304
- * @param [writer] Writer to encode to
305
- * @returns Writer
306
- */
307
- public static encode(message: Reporting.IReportable, writer?: $protobuf.Writer): $protobuf.Writer;
308
-
309
- /**
310
- * Encodes the specified Reportable message, length delimited. Does not implicitly {@link Reporting.Reportable.verify|verify} messages.
311
- * @param message Reportable message or plain object to encode
312
- * @param [writer] Writer to encode to
313
- * @returns Writer
314
- */
315
- public static encodeDelimited(message: Reporting.IReportable, writer?: $protobuf.Writer): $protobuf.Writer;
316
-
317
- /**
318
- * Decodes a Reportable message from the specified reader or buffer.
319
- * @param reader Reader or buffer to decode from
320
- * @param [length] Message length if known beforehand
321
- * @returns Reportable
322
- * @throws {Error} If the payload is not a reader or valid buffer
323
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
324
- */
325
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Reporting.Reportable;
326
-
327
- /**
328
- * Decodes a Reportable message from the specified reader or buffer, length delimited.
329
- * @param reader Reader or buffer to decode from
330
- * @returns Reportable
331
- * @throws {Error} If the payload is not a reader or valid buffer
332
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
333
- */
334
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Reporting.Reportable;
335
-
336
- /**
337
- * Verifies a Reportable message.
338
- * @param message Plain object to verify
339
- * @returns `null` if valid, otherwise the reason why it is not
340
- */
341
- public static verify(message: { [k: string]: any }): (string|null);
342
-
343
- /**
344
- * Creates a Reportable message from a plain object. Also converts values to their respective internal types.
345
- * @param object Plain object
346
- * @returns Reportable
347
- */
348
- public static fromObject(object: { [k: string]: any }): Reporting.Reportable;
349
-
350
- /**
351
- * Creates a plain object from a Reportable message. Also converts values to other types if specified.
352
- * @param message Reportable
353
- * @param [options] Conversion options
354
- * @returns Plain object
355
- */
356
- public static toObject(message: Reporting.Reportable, options?: $protobuf.IConversionOptions): { [k: string]: any };
357
-
358
- /**
359
- * Converts this Reportable to JSON.
360
- * @returns JSON object
361
- */
362
- public toJSON(): { [k: string]: any };
363
-
364
- /**
365
- * Gets the default type url for Reportable
366
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
367
- * @returns The default type url
368
- */
369
- public static getTypeUrl(typeUrlPrefix?: string): string;
370
- }
371
- }