@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,583 +0,0 @@
1
- import * as $protobuf from "protobufjs";
2
- import Long = require("long");
3
- /** Namespace MdStorageChatRowOpaqueData. */
4
- export namespace MdStorageChatRowOpaqueData {
5
-
6
- /** Properties of a ChatRowOpaqueData. */
7
- interface IChatRowOpaqueData {
8
-
9
- /** ChatRowOpaqueData draftMessage */
10
- draftMessage?: (MdStorageChatRowOpaqueData.ChatRowOpaqueData.IDraftMessage|null);
11
- }
12
-
13
- /** Represents a ChatRowOpaqueData. */
14
- class ChatRowOpaqueData implements IChatRowOpaqueData {
15
-
16
- /**
17
- * Constructs a new ChatRowOpaqueData.
18
- * @param [properties] Properties to set
19
- */
20
- constructor(properties?: MdStorageChatRowOpaqueData.IChatRowOpaqueData);
21
-
22
- /** ChatRowOpaqueData draftMessage. */
23
- public draftMessage?: (MdStorageChatRowOpaqueData.ChatRowOpaqueData.IDraftMessage|null);
24
-
25
- /** ChatRowOpaqueData _draftMessage. */
26
- public _draftMessage?: "draftMessage";
27
-
28
- /**
29
- * Creates a new ChatRowOpaqueData instance using the specified properties.
30
- * @param [properties] Properties to set
31
- * @returns ChatRowOpaqueData instance
32
- */
33
- public static create(properties?: MdStorageChatRowOpaqueData.IChatRowOpaqueData): MdStorageChatRowOpaqueData.ChatRowOpaqueData;
34
-
35
- /**
36
- * Encodes the specified ChatRowOpaqueData message. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.verify|verify} messages.
37
- * @param message ChatRowOpaqueData message or plain object to encode
38
- * @param [writer] Writer to encode to
39
- * @returns Writer
40
- */
41
- public static encode(message: MdStorageChatRowOpaqueData.IChatRowOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer;
42
-
43
- /**
44
- * Encodes the specified ChatRowOpaqueData message, length delimited. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.verify|verify} messages.
45
- * @param message ChatRowOpaqueData message or plain object to encode
46
- * @param [writer] Writer to encode to
47
- * @returns Writer
48
- */
49
- public static encodeDelimited(message: MdStorageChatRowOpaqueData.IChatRowOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer;
50
-
51
- /**
52
- * Decodes a ChatRowOpaqueData 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 ChatRowOpaqueData
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): MdStorageChatRowOpaqueData.ChatRowOpaqueData;
60
-
61
- /**
62
- * Decodes a ChatRowOpaqueData message from the specified reader or buffer, length delimited.
63
- * @param reader Reader or buffer to decode from
64
- * @returns ChatRowOpaqueData
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)): MdStorageChatRowOpaqueData.ChatRowOpaqueData;
69
-
70
- /**
71
- * Verifies a ChatRowOpaqueData 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 ChatRowOpaqueData message from a plain object. Also converts values to their respective internal types.
79
- * @param object Plain object
80
- * @returns ChatRowOpaqueData
81
- */
82
- public static fromObject(object: { [k: string]: any }): MdStorageChatRowOpaqueData.ChatRowOpaqueData;
83
-
84
- /**
85
- * Creates a plain object from a ChatRowOpaqueData message. Also converts values to other types if specified.
86
- * @param message ChatRowOpaqueData
87
- * @param [options] Conversion options
88
- * @returns Plain object
89
- */
90
- public static toObject(message: MdStorageChatRowOpaqueData.ChatRowOpaqueData, options?: $protobuf.IConversionOptions): { [k: string]: any };
91
-
92
- /**
93
- * Converts this ChatRowOpaqueData to JSON.
94
- * @returns JSON object
95
- */
96
- public toJSON(): { [k: string]: any };
97
-
98
- /**
99
- * Gets the default type url for ChatRowOpaqueData
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
- namespace ChatRowOpaqueData {
107
-
108
- /** Properties of a DraftMessage. */
109
- interface IDraftMessage {
110
-
111
- /** DraftMessage text */
112
- text?: (string|null);
113
-
114
- /** DraftMessage omittedUrl */
115
- omittedUrl?: (string|null);
116
-
117
- /** DraftMessage ctwaContextLinkData */
118
- ctwaContextLinkData?: (MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData|null);
119
-
120
- /** DraftMessage ctwaContext */
121
- ctwaContext?: (MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextData|null);
122
-
123
- /** DraftMessage timestamp */
124
- timestamp?: (number|Long|null);
125
- }
126
-
127
- /** Represents a DraftMessage. */
128
- class DraftMessage implements IDraftMessage {
129
-
130
- /**
131
- * Constructs a new DraftMessage.
132
- * @param [properties] Properties to set
133
- */
134
- constructor(properties?: MdStorageChatRowOpaqueData.ChatRowOpaqueData.IDraftMessage);
135
-
136
- /** DraftMessage text. */
137
- public text?: (string|null);
138
-
139
- /** DraftMessage omittedUrl. */
140
- public omittedUrl?: (string|null);
141
-
142
- /** DraftMessage ctwaContextLinkData. */
143
- public ctwaContextLinkData?: (MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData|null);
144
-
145
- /** DraftMessage ctwaContext. */
146
- public ctwaContext?: (MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextData|null);
147
-
148
- /** DraftMessage timestamp. */
149
- public timestamp?: (number|Long|null);
150
-
151
- /** DraftMessage _text. */
152
- public _text?: "text";
153
-
154
- /** DraftMessage _omittedUrl. */
155
- public _omittedUrl?: "omittedUrl";
156
-
157
- /** DraftMessage _ctwaContextLinkData. */
158
- public _ctwaContextLinkData?: "ctwaContextLinkData";
159
-
160
- /** DraftMessage _ctwaContext. */
161
- public _ctwaContext?: "ctwaContext";
162
-
163
- /** DraftMessage _timestamp. */
164
- public _timestamp?: "timestamp";
165
-
166
- /**
167
- * Creates a new DraftMessage instance using the specified properties.
168
- * @param [properties] Properties to set
169
- * @returns DraftMessage instance
170
- */
171
- public static create(properties?: MdStorageChatRowOpaqueData.ChatRowOpaqueData.IDraftMessage): MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage;
172
-
173
- /**
174
- * Encodes the specified DraftMessage message. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.verify|verify} messages.
175
- * @param message DraftMessage message or plain object to encode
176
- * @param [writer] Writer to encode to
177
- * @returns Writer
178
- */
179
- public static encode(message: MdStorageChatRowOpaqueData.ChatRowOpaqueData.IDraftMessage, writer?: $protobuf.Writer): $protobuf.Writer;
180
-
181
- /**
182
- * Encodes the specified DraftMessage message, length delimited. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.verify|verify} messages.
183
- * @param message DraftMessage message or plain object to encode
184
- * @param [writer] Writer to encode to
185
- * @returns Writer
186
- */
187
- public static encodeDelimited(message: MdStorageChatRowOpaqueData.ChatRowOpaqueData.IDraftMessage, writer?: $protobuf.Writer): $protobuf.Writer;
188
-
189
- /**
190
- * Decodes a DraftMessage message from the specified reader or buffer.
191
- * @param reader Reader or buffer to decode from
192
- * @param [length] Message length if known beforehand
193
- * @returns DraftMessage
194
- * @throws {Error} If the payload is not a reader or valid buffer
195
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
196
- */
197
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage;
198
-
199
- /**
200
- * Decodes a DraftMessage message from the specified reader or buffer, length delimited.
201
- * @param reader Reader or buffer to decode from
202
- * @returns DraftMessage
203
- * @throws {Error} If the payload is not a reader or valid buffer
204
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
205
- */
206
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage;
207
-
208
- /**
209
- * Verifies a DraftMessage message.
210
- * @param message Plain object to verify
211
- * @returns `null` if valid, otherwise the reason why it is not
212
- */
213
- public static verify(message: { [k: string]: any }): (string|null);
214
-
215
- /**
216
- * Creates a DraftMessage message from a plain object. Also converts values to their respective internal types.
217
- * @param object Plain object
218
- * @returns DraftMessage
219
- */
220
- public static fromObject(object: { [k: string]: any }): MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage;
221
-
222
- /**
223
- * Creates a plain object from a DraftMessage message. Also converts values to other types if specified.
224
- * @param message DraftMessage
225
- * @param [options] Conversion options
226
- * @returns Plain object
227
- */
228
- public static toObject(message: MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
229
-
230
- /**
231
- * Converts this DraftMessage to JSON.
232
- * @returns JSON object
233
- */
234
- public toJSON(): { [k: string]: any };
235
-
236
- /**
237
- * Gets the default type url for DraftMessage
238
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
239
- * @returns The default type url
240
- */
241
- public static getTypeUrl(typeUrlPrefix?: string): string;
242
- }
243
-
244
- namespace DraftMessage {
245
-
246
- /** Properties of a CtwaContextData. */
247
- interface ICtwaContextData {
248
-
249
- /** CtwaContextData conversionSource */
250
- conversionSource?: (string|null);
251
-
252
- /** CtwaContextData conversionData */
253
- conversionData?: (Uint8Array|null);
254
-
255
- /** CtwaContextData sourceUrl */
256
- sourceUrl?: (string|null);
257
-
258
- /** CtwaContextData sourceId */
259
- sourceId?: (string|null);
260
-
261
- /** CtwaContextData sourceType */
262
- sourceType?: (string|null);
263
-
264
- /** CtwaContextData title */
265
- title?: (string|null);
266
-
267
- /** CtwaContextData description */
268
- description?: (string|null);
269
-
270
- /** CtwaContextData thumbnail */
271
- thumbnail?: (string|null);
272
-
273
- /** CtwaContextData thumbnailUrl */
274
- thumbnailUrl?: (string|null);
275
-
276
- /** CtwaContextData mediaType */
277
- mediaType?: (MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType|null);
278
-
279
- /** CtwaContextData mediaUrl */
280
- mediaUrl?: (string|null);
281
-
282
- /** CtwaContextData isSuspiciousLink */
283
- isSuspiciousLink?: (boolean|null);
284
- }
285
-
286
- /** Represents a CtwaContextData. */
287
- class CtwaContextData implements ICtwaContextData {
288
-
289
- /**
290
- * Constructs a new CtwaContextData.
291
- * @param [properties] Properties to set
292
- */
293
- constructor(properties?: MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextData);
294
-
295
- /** CtwaContextData conversionSource. */
296
- public conversionSource?: (string|null);
297
-
298
- /** CtwaContextData conversionData. */
299
- public conversionData?: (Uint8Array|null);
300
-
301
- /** CtwaContextData sourceUrl. */
302
- public sourceUrl?: (string|null);
303
-
304
- /** CtwaContextData sourceId. */
305
- public sourceId?: (string|null);
306
-
307
- /** CtwaContextData sourceType. */
308
- public sourceType?: (string|null);
309
-
310
- /** CtwaContextData title. */
311
- public title?: (string|null);
312
-
313
- /** CtwaContextData description. */
314
- public description?: (string|null);
315
-
316
- /** CtwaContextData thumbnail. */
317
- public thumbnail?: (string|null);
318
-
319
- /** CtwaContextData thumbnailUrl. */
320
- public thumbnailUrl?: (string|null);
321
-
322
- /** CtwaContextData mediaType. */
323
- public mediaType?: (MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType|null);
324
-
325
- /** CtwaContextData mediaUrl. */
326
- public mediaUrl?: (string|null);
327
-
328
- /** CtwaContextData isSuspiciousLink. */
329
- public isSuspiciousLink?: (boolean|null);
330
-
331
- /** CtwaContextData _conversionSource. */
332
- public _conversionSource?: "conversionSource";
333
-
334
- /** CtwaContextData _conversionData. */
335
- public _conversionData?: "conversionData";
336
-
337
- /** CtwaContextData _sourceUrl. */
338
- public _sourceUrl?: "sourceUrl";
339
-
340
- /** CtwaContextData _sourceId. */
341
- public _sourceId?: "sourceId";
342
-
343
- /** CtwaContextData _sourceType. */
344
- public _sourceType?: "sourceType";
345
-
346
- /** CtwaContextData _title. */
347
- public _title?: "title";
348
-
349
- /** CtwaContextData _description. */
350
- public _description?: "description";
351
-
352
- /** CtwaContextData _thumbnail. */
353
- public _thumbnail?: "thumbnail";
354
-
355
- /** CtwaContextData _thumbnailUrl. */
356
- public _thumbnailUrl?: "thumbnailUrl";
357
-
358
- /** CtwaContextData _mediaType. */
359
- public _mediaType?: "mediaType";
360
-
361
- /** CtwaContextData _mediaUrl. */
362
- public _mediaUrl?: "mediaUrl";
363
-
364
- /** CtwaContextData _isSuspiciousLink. */
365
- public _isSuspiciousLink?: "isSuspiciousLink";
366
-
367
- /**
368
- * Creates a new CtwaContextData instance using the specified properties.
369
- * @param [properties] Properties to set
370
- * @returns CtwaContextData instance
371
- */
372
- public static create(properties?: MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextData): MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData;
373
-
374
- /**
375
- * Encodes the specified CtwaContextData message. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify|verify} messages.
376
- * @param message CtwaContextData message or plain object to encode
377
- * @param [writer] Writer to encode to
378
- * @returns Writer
379
- */
380
- public static encode(message: MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextData, writer?: $protobuf.Writer): $protobuf.Writer;
381
-
382
- /**
383
- * Encodes the specified CtwaContextData message, length delimited. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify|verify} messages.
384
- * @param message CtwaContextData message or plain object to encode
385
- * @param [writer] Writer to encode to
386
- * @returns Writer
387
- */
388
- public static encodeDelimited(message: MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextData, writer?: $protobuf.Writer): $protobuf.Writer;
389
-
390
- /**
391
- * Decodes a CtwaContextData message from the specified reader or buffer.
392
- * @param reader Reader or buffer to decode from
393
- * @param [length] Message length if known beforehand
394
- * @returns CtwaContextData
395
- * @throws {Error} If the payload is not a reader or valid buffer
396
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
397
- */
398
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData;
399
-
400
- /**
401
- * Decodes a CtwaContextData message from the specified reader or buffer, length delimited.
402
- * @param reader Reader or buffer to decode from
403
- * @returns CtwaContextData
404
- * @throws {Error} If the payload is not a reader or valid buffer
405
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
406
- */
407
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData;
408
-
409
- /**
410
- * Verifies a CtwaContextData message.
411
- * @param message Plain object to verify
412
- * @returns `null` if valid, otherwise the reason why it is not
413
- */
414
- public static verify(message: { [k: string]: any }): (string|null);
415
-
416
- /**
417
- * Creates a CtwaContextData message from a plain object. Also converts values to their respective internal types.
418
- * @param object Plain object
419
- * @returns CtwaContextData
420
- */
421
- public static fromObject(object: { [k: string]: any }): MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData;
422
-
423
- /**
424
- * Creates a plain object from a CtwaContextData message. Also converts values to other types if specified.
425
- * @param message CtwaContextData
426
- * @param [options] Conversion options
427
- * @returns Plain object
428
- */
429
- public static toObject(message: MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData, options?: $protobuf.IConversionOptions): { [k: string]: any };
430
-
431
- /**
432
- * Converts this CtwaContextData to JSON.
433
- * @returns JSON object
434
- */
435
- public toJSON(): { [k: string]: any };
436
-
437
- /**
438
- * Gets the default type url for CtwaContextData
439
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
440
- * @returns The default type url
441
- */
442
- public static getTypeUrl(typeUrlPrefix?: string): string;
443
- }
444
-
445
- namespace CtwaContextData {
446
-
447
- /** ContextInfoExternalAdReplyInfoMediaType enum. */
448
- enum ContextInfoExternalAdReplyInfoMediaType {
449
- NONE = 0,
450
- IMAGE = 1,
451
- VIDEO = 2
452
- }
453
- }
454
-
455
- /** Properties of a CtwaContextLinkData. */
456
- interface ICtwaContextLinkData {
457
-
458
- /** CtwaContextLinkData context */
459
- context?: (string|null);
460
-
461
- /** CtwaContextLinkData sourceUrl */
462
- sourceUrl?: (string|null);
463
-
464
- /** CtwaContextLinkData icebreaker */
465
- icebreaker?: (string|null);
466
-
467
- /** CtwaContextLinkData phone */
468
- phone?: (string|null);
469
- }
470
-
471
- /** Represents a CtwaContextLinkData. */
472
- class CtwaContextLinkData implements ICtwaContextLinkData {
473
-
474
- /**
475
- * Constructs a new CtwaContextLinkData.
476
- * @param [properties] Properties to set
477
- */
478
- constructor(properties?: MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData);
479
-
480
- /** CtwaContextLinkData context. */
481
- public context?: (string|null);
482
-
483
- /** CtwaContextLinkData sourceUrl. */
484
- public sourceUrl?: (string|null);
485
-
486
- /** CtwaContextLinkData icebreaker. */
487
- public icebreaker?: (string|null);
488
-
489
- /** CtwaContextLinkData phone. */
490
- public phone?: (string|null);
491
-
492
- /** CtwaContextLinkData _context. */
493
- public _context?: "context";
494
-
495
- /** CtwaContextLinkData _sourceUrl. */
496
- public _sourceUrl?: "sourceUrl";
497
-
498
- /** CtwaContextLinkData _icebreaker. */
499
- public _icebreaker?: "icebreaker";
500
-
501
- /** CtwaContextLinkData _phone. */
502
- public _phone?: "phone";
503
-
504
- /**
505
- * Creates a new CtwaContextLinkData instance using the specified properties.
506
- * @param [properties] Properties to set
507
- * @returns CtwaContextLinkData instance
508
- */
509
- public static create(properties?: MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData): MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData;
510
-
511
- /**
512
- * Encodes the specified CtwaContextLinkData message. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify|verify} messages.
513
- * @param message CtwaContextLinkData message or plain object to encode
514
- * @param [writer] Writer to encode to
515
- * @returns Writer
516
- */
517
- public static encode(message: MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData, writer?: $protobuf.Writer): $protobuf.Writer;
518
-
519
- /**
520
- * Encodes the specified CtwaContextLinkData message, length delimited. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify|verify} messages.
521
- * @param message CtwaContextLinkData message or plain object to encode
522
- * @param [writer] Writer to encode to
523
- * @returns Writer
524
- */
525
- public static encodeDelimited(message: MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData, writer?: $protobuf.Writer): $protobuf.Writer;
526
-
527
- /**
528
- * Decodes a CtwaContextLinkData message from the specified reader or buffer.
529
- * @param reader Reader or buffer to decode from
530
- * @param [length] Message length if known beforehand
531
- * @returns CtwaContextLinkData
532
- * @throws {Error} If the payload is not a reader or valid buffer
533
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
534
- */
535
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData;
536
-
537
- /**
538
- * Decodes a CtwaContextLinkData message from the specified reader or buffer, length delimited.
539
- * @param reader Reader or buffer to decode from
540
- * @returns CtwaContextLinkData
541
- * @throws {Error} If the payload is not a reader or valid buffer
542
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
543
- */
544
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData;
545
-
546
- /**
547
- * Verifies a CtwaContextLinkData message.
548
- * @param message Plain object to verify
549
- * @returns `null` if valid, otherwise the reason why it is not
550
- */
551
- public static verify(message: { [k: string]: any }): (string|null);
552
-
553
- /**
554
- * Creates a CtwaContextLinkData message from a plain object. Also converts values to their respective internal types.
555
- * @param object Plain object
556
- * @returns CtwaContextLinkData
557
- */
558
- public static fromObject(object: { [k: string]: any }): MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData;
559
-
560
- /**
561
- * Creates a plain object from a CtwaContextLinkData message. Also converts values to other types if specified.
562
- * @param message CtwaContextLinkData
563
- * @param [options] Conversion options
564
- * @returns Plain object
565
- */
566
- public static toObject(message: MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData, options?: $protobuf.IConversionOptions): { [k: string]: any };
567
-
568
- /**
569
- * Converts this CtwaContextLinkData to JSON.
570
- * @returns JSON object
571
- */
572
- public toJSON(): { [k: string]: any };
573
-
574
- /**
575
- * Gets the default type url for CtwaContextLinkData
576
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
577
- * @returns The default type url
578
- */
579
- public static getTypeUrl(typeUrlPrefix?: string): string;
580
- }
581
- }
582
- }
583
- }