nodejs-insta-private-api-mqt 1.3.70

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 (240) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3677 -0
  3. package/dist/constants/constants.js +342 -0
  4. package/dist/constants/index.js +58 -0
  5. package/dist/core/client.js +419 -0
  6. package/dist/core/nav-chain.js +282 -0
  7. package/dist/core/repository.js +7 -0
  8. package/dist/core/request.js +390 -0
  9. package/dist/core/state.js +1473 -0
  10. package/dist/core/utils.js +786 -0
  11. package/dist/downloadMedia.js +381 -0
  12. package/dist/errors/index.d.ts +16 -0
  13. package/dist/errors/index.js +38 -0
  14. package/dist/errors/index.js.map +1 -0
  15. package/dist/extend.js +167 -0
  16. package/dist/fbns/fbns.client.d.ts +32 -0
  17. package/dist/fbns/fbns.client.events.d.ts +41 -0
  18. package/dist/fbns/fbns.client.events.js +3 -0
  19. package/dist/fbns/fbns.client.events.js.map +1 -0
  20. package/dist/fbns/fbns.client.js +252 -0
  21. package/dist/fbns/fbns.client.js.map +1 -0
  22. package/dist/fbns/fbns.device-auth.d.ts +17 -0
  23. package/dist/fbns/fbns.device-auth.js +54 -0
  24. package/dist/fbns/fbns.device-auth.js.map +1 -0
  25. package/dist/fbns/fbns.types.d.ts +83 -0
  26. package/dist/fbns/fbns.types.js +3 -0
  27. package/dist/fbns/fbns.types.js.map +1 -0
  28. package/dist/fbns/fbns.utilities.d.ts +2 -0
  29. package/dist/fbns/fbns.utilities.js +79 -0
  30. package/dist/fbns/fbns.utilities.js.map +1 -0
  31. package/dist/fbns/index.d.ts +4 -0
  32. package/dist/fbns/index.js +21 -0
  33. package/dist/fbns/index.js.map +1 -0
  34. package/dist/index.js +139 -0
  35. package/dist/mqtt-shim.d.ts +96 -0
  36. package/dist/mqtt-shim.js +15 -0
  37. package/dist/mqttot/index.d.ts +4 -0
  38. package/dist/mqttot/index.js +21 -0
  39. package/dist/mqttot/index.js.map +1 -0
  40. package/dist/mqttot/mqttot.client.d.ts +39 -0
  41. package/dist/mqttot/mqttot.client.js +318 -0
  42. package/dist/mqttot/mqttot.client.js.map +1 -0
  43. package/dist/mqttot/mqttot.connect.request.packet.d.ts +7 -0
  44. package/dist/mqttot/mqttot.connect.request.packet.js +9 -0
  45. package/dist/mqttot/mqttot.connect.request.packet.js.map +1 -0
  46. package/dist/mqttot/mqttot.connect.response.packet.d.ts +7 -0
  47. package/dist/mqttot/mqttot.connect.response.packet.js +24 -0
  48. package/dist/mqttot/mqttot.connect.response.packet.js.map +1 -0
  49. package/dist/mqttot/mqttot.connection.d.ts +57 -0
  50. package/dist/mqttot/mqttot.connection.js +79 -0
  51. package/dist/mqttot/mqttot.connection.js.map +1 -0
  52. package/dist/package.json +59 -0
  53. package/dist/realtime/commands/commands.d.ts +15 -0
  54. package/dist/realtime/commands/commands.js +71 -0
  55. package/dist/realtime/commands/commands.js.map +1 -0
  56. package/dist/realtime/commands/direct.commands.d.ts +75 -0
  57. package/dist/realtime/commands/direct.commands.js +417 -0
  58. package/dist/realtime/commands/direct.commands.js.map +1 -0
  59. package/dist/realtime/commands/enhanced.direct.commands.js +1731 -0
  60. package/dist/realtime/commands/enhanced.direct.commands.js.bak +967 -0
  61. package/dist/realtime/commands/index.d.ts +2 -0
  62. package/dist/realtime/commands/index.js +20 -0
  63. package/dist/realtime/commands/index.js.map +1 -0
  64. package/dist/realtime/delta-sync.manager.js +293 -0
  65. package/dist/realtime/features/dm-sender.js +88 -0
  66. package/dist/realtime/features/error-handler.js +185 -0
  67. package/dist/realtime/features/gap-handler.js +61 -0
  68. package/dist/realtime/features/persistent-logger.js +186 -0
  69. package/dist/realtime/features/presence.manager.js +66 -0
  70. package/dist/realtime/features/session-health-monitor.js +345 -0
  71. package/dist/realtime/index.js +30 -0
  72. package/dist/realtime/messages/app-presence.event.d.ts +9 -0
  73. package/dist/realtime/messages/app-presence.event.js +3 -0
  74. package/dist/realtime/messages/app-presence.event.js.map +1 -0
  75. package/dist/realtime/messages/index.d.ts +3 -0
  76. package/dist/realtime/messages/index.js +20 -0
  77. package/dist/realtime/messages/index.js.map +1 -0
  78. package/dist/realtime/messages/message-sync.message.d.ts +222 -0
  79. package/dist/realtime/messages/message-sync.message.js +43 -0
  80. package/dist/realtime/messages/message-sync.message.js.map +1 -0
  81. package/dist/realtime/messages/realtime-sub.direct.data.d.ts +11 -0
  82. package/dist/realtime/messages/realtime-sub.direct.data.js +3 -0
  83. package/dist/realtime/messages/realtime-sub.direct.data.js.map +1 -0
  84. package/dist/realtime/messages/thread-update.message.d.ts +68 -0
  85. package/dist/realtime/messages/thread-update.message.js +3 -0
  86. package/dist/realtime/messages/thread-update.message.js.map +1 -0
  87. package/dist/realtime/mixins/index.d.ts +3 -0
  88. package/dist/realtime/mixins/index.js +20 -0
  89. package/dist/realtime/mixins/index.js.map +1 -0
  90. package/dist/realtime/mixins/message-sync.mixin.d.ts +8 -0
  91. package/dist/realtime/mixins/message-sync.mixin.js +596 -0
  92. package/dist/realtime/mixins/message-sync.mixin.js.map +1 -0
  93. package/dist/realtime/mixins/mixin.d.ts +19 -0
  94. package/dist/realtime/mixins/mixin.js +41 -0
  95. package/dist/realtime/mixins/mixin.js.map +1 -0
  96. package/dist/realtime/mixins/presence-typing.mixin.js +33 -0
  97. package/dist/realtime/mixins/realtime-sub.mixin.d.ts +8 -0
  98. package/dist/realtime/mixins/realtime-sub.mixin.js +181 -0
  99. package/dist/realtime/mixins/realtime-sub.mixin.js.map +1 -0
  100. package/dist/realtime/parsers/graphql-parser.js +43 -0
  101. package/dist/realtime/parsers/graphql.parser.d.ts +15 -0
  102. package/dist/realtime/parsers/graphql.parser.js +22 -0
  103. package/dist/realtime/parsers/graphql.parser.js.map +1 -0
  104. package/dist/realtime/parsers/index.d.ts +6 -0
  105. package/dist/realtime/parsers/index.js +23 -0
  106. package/dist/realtime/parsers/index.js.map +1 -0
  107. package/dist/realtime/parsers/iris-parser.js +43 -0
  108. package/dist/realtime/parsers/iris.parser.d.ts +17 -0
  109. package/dist/realtime/parsers/iris.parser.js +10 -0
  110. package/dist/realtime/parsers/iris.parser.js.map +1 -0
  111. package/dist/realtime/parsers/json-parser.js +43 -0
  112. package/dist/realtime/parsers/json.parser.d.ts +6 -0
  113. package/dist/realtime/parsers/json.parser.js +10 -0
  114. package/dist/realtime/parsers/json.parser.js.map +1 -0
  115. package/dist/realtime/parsers/parser.d.ts +9 -0
  116. package/dist/realtime/parsers/parser.js +3 -0
  117. package/dist/realtime/parsers/parser.js.map +1 -0
  118. package/dist/realtime/parsers/region-hint-parser.js +43 -0
  119. package/dist/realtime/parsers/region-hint.parser.d.ts +12 -0
  120. package/dist/realtime/parsers/region-hint.parser.js +15 -0
  121. package/dist/realtime/parsers/region-hint.parser.js.map +1 -0
  122. package/dist/realtime/parsers/skywalker-parser.js +43 -0
  123. package/dist/realtime/parsers/skywalker.parser.d.ts +12 -0
  124. package/dist/realtime/parsers/skywalker.parser.js +15 -0
  125. package/dist/realtime/parsers/skywalker.parser.js.map +1 -0
  126. package/dist/realtime/parsers-advanced.js +158 -0
  127. package/dist/realtime/proto/common.proto +38 -0
  128. package/dist/realtime/proto/direct.proto +65 -0
  129. package/dist/realtime/proto/ig-messages.proto +83 -0
  130. package/dist/realtime/proto/iris.proto +188 -0
  131. package/dist/realtime/proto-parser.js +195 -0
  132. package/dist/realtime/protocols/iris.handshake.js +74 -0
  133. package/dist/realtime/protocols/proto-definitions.js +80 -0
  134. package/dist/realtime/protocols/skywalker.protocol.js +91 -0
  135. package/dist/realtime/realtime.client.events.js +3 -0
  136. package/dist/realtime/realtime.client.js +1915 -0
  137. package/dist/realtime/realtime.service.js +462 -0
  138. package/dist/realtime/reconnect.manager.js +88 -0
  139. package/dist/realtime/session.manager.js +121 -0
  140. package/dist/realtime/subscriptions/graphql.subscription.d.ts +47 -0
  141. package/dist/realtime/subscriptions/graphql.subscription.js +99 -0
  142. package/dist/realtime/subscriptions/graphql.subscription.js.map +1 -0
  143. package/dist/realtime/subscriptions/index.d.ts +2 -0
  144. package/dist/realtime/subscriptions/index.js +19 -0
  145. package/dist/realtime/subscriptions/index.js.map +1 -0
  146. package/dist/realtime/subscriptions/skywalker.subscription.d.ts +4 -0
  147. package/dist/realtime/subscriptions/skywalker.subscription.js +13 -0
  148. package/dist/realtime/subscriptions/skywalker.subscription.js.map +1 -0
  149. package/dist/realtime/topic-map.js +71 -0
  150. package/dist/realtime/topic.js +80 -0
  151. package/dist/repositories/account.repository.js +575 -0
  152. package/dist/repositories/bloks.repository.js +70 -0
  153. package/dist/repositories/captcha.repository.js +44 -0
  154. package/dist/repositories/challenge.repository.js +120 -0
  155. package/dist/repositories/clip.repository.js +165 -0
  156. package/dist/repositories/close-friends.repository.js +46 -0
  157. package/dist/repositories/collection.repository.js +68 -0
  158. package/dist/repositories/direct-thread.repository.js +446 -0
  159. package/dist/repositories/direct.repository.js +232 -0
  160. package/dist/repositories/explore.repository.js +70 -0
  161. package/dist/repositories/fbsearch.repository.js +140 -0
  162. package/dist/repositories/feed.repository.js +245 -0
  163. package/dist/repositories/friendship.repository.js +296 -0
  164. package/dist/repositories/fundraiser.repository.js +49 -0
  165. package/dist/repositories/hashtag.repository.js +99 -0
  166. package/dist/repositories/highlights.repository.js +121 -0
  167. package/dist/repositories/insights.repository.js +82 -0
  168. package/dist/repositories/location.repository.js +84 -0
  169. package/dist/repositories/media.repository.js +395 -0
  170. package/dist/repositories/multiple-accounts.repository.js +41 -0
  171. package/dist/repositories/news.repository.js +35 -0
  172. package/dist/repositories/note.repository.js +57 -0
  173. package/dist/repositories/notification.repository.js +79 -0
  174. package/dist/repositories/share.repository.js +35 -0
  175. package/dist/repositories/signup.repository.js +218 -0
  176. package/dist/repositories/story.repository.js +290 -0
  177. package/dist/repositories/timeline.repository.js +60 -0
  178. package/dist/repositories/totp.repository.js +139 -0
  179. package/dist/repositories/track.repository.js +53 -0
  180. package/dist/repositories/upload.repository.js +204 -0
  181. package/dist/repositories/user.repository.js +360 -0
  182. package/dist/sendmedia/index.js +27 -0
  183. package/dist/sendmedia/sendFile.js +72 -0
  184. package/dist/sendmedia/sendPhoto.js +142 -0
  185. package/dist/sendmedia/sendRavenPhoto.js +153 -0
  186. package/dist/sendmedia/sendRavenVideo.js +158 -0
  187. package/dist/sendmedia/uploadPhoto.js +107 -0
  188. package/dist/sendmedia/uploadfFile.js +130 -0
  189. package/dist/services/live.service.js +139 -0
  190. package/dist/services/search.service.js +115 -0
  191. package/dist/shared/index.js +96 -0
  192. package/dist/shared/shared.js +86 -0
  193. package/dist/thrift/index.d.ts +3 -0
  194. package/dist/thrift/index.js +20 -0
  195. package/dist/thrift/index.js.map +1 -0
  196. package/dist/thrift/thrift.d.ts +59 -0
  197. package/dist/thrift/thrift.js +101 -0
  198. package/dist/thrift/thrift.js.map +1 -0
  199. package/dist/thrift/thrift.reading.d.ts +41 -0
  200. package/dist/thrift/thrift.reading.js +327 -0
  201. package/dist/thrift/thrift.reading.js.map +1 -0
  202. package/dist/thrift/thrift.writing.d.ts +44 -0
  203. package/dist/thrift/thrift.writing.js +342 -0
  204. package/dist/thrift/thrift.writing.js.map +1 -0
  205. package/dist/types/index.js +285 -0
  206. package/dist/useMultiFileAuthState.js +1768 -0
  207. package/dist/utils/helper-1.js +1 -0
  208. package/dist/utils/helper-10.js +1 -0
  209. package/dist/utils/helper-11.js +1 -0
  210. package/dist/utils/helper-12.js +1 -0
  211. package/dist/utils/helper-13.js +1 -0
  212. package/dist/utils/helper-14.js +1 -0
  213. package/dist/utils/helper-15.js +1 -0
  214. package/dist/utils/helper-16.js +1 -0
  215. package/dist/utils/helper-17.js +1 -0
  216. package/dist/utils/helper-18.js +1 -0
  217. package/dist/utils/helper-19.js +1 -0
  218. package/dist/utils/helper-2.js +1 -0
  219. package/dist/utils/helper-20.js +1 -0
  220. package/dist/utils/helper-21.js +1 -0
  221. package/dist/utils/helper-22.js +1 -0
  222. package/dist/utils/helper-23.js +1 -0
  223. package/dist/utils/helper-24.js +1 -0
  224. package/dist/utils/helper-25.js +1 -0
  225. package/dist/utils/helper-26.js +1 -0
  226. package/dist/utils/helper-27.js +1 -0
  227. package/dist/utils/helper-28.js +1 -0
  228. package/dist/utils/helper-29.js +1 -0
  229. package/dist/utils/helper-3.js +1 -0
  230. package/dist/utils/helper-30.js +1 -0
  231. package/dist/utils/helper-4.js +1 -0
  232. package/dist/utils/helper-5.js +1 -0
  233. package/dist/utils/helper-6.js +1 -0
  234. package/dist/utils/helper-7.js +1 -0
  235. package/dist/utils/helper-8.js +1 -0
  236. package/dist/utils/helper-9.js +1 -0
  237. package/dist/utils/index.js +280 -0
  238. package/dist/utils/insta-mqtt-helper.js +128 -0
  239. package/examples/listen-to-messages.js +86 -0
  240. package/package.json +82 -0
@@ -0,0 +1,967 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EnhancedDirectCommands = void 0;
4
+ const shared_1 = require("../../shared");
5
+ const uuid_1 = require("uuid");
6
+ const constants_1 = require("../../constants");
7
+ const thrift_1 = require("../../thrift");
8
+
9
+ /**
10
+ * Enhanced Direct Commands - sends MQTT directly with proper payload formatting
11
+ * Fixed to match instagram_mqtt library format for proper functionality
12
+ */
13
+ class EnhancedDirectCommands {
14
+ constructor(client) {
15
+ this.realtimeClient = client;
16
+ this.enhancedDebug = (0, shared_1.debugChannel)('realtime', 'enhanced-commands');
17
+
18
+ // Foreground state config for Thrift encoding (matching instagram_mqtt)
19
+ this.foregroundStateConfig = [
20
+ thrift_1.ThriftDescriptors.boolean('inForegroundApp', 1),
21
+ thrift_1.ThriftDescriptors.boolean('inForegroundDevice', 2),
22
+ thrift_1.ThriftDescriptors.int32('keepAliveTimeout', 3),
23
+ thrift_1.ThriftDescriptors.listOfBinary('subscribeTopics', 4),
24
+ thrift_1.ThriftDescriptors.listOfBinary('subscribeGenericTopics', 5),
25
+ thrift_1.ThriftDescriptors.listOfBinary('unsubscribeTopics', 6),
26
+ thrift_1.ThriftDescriptors.listOfBinary('unsubscribeGenericTopics', 7),
27
+ thrift_1.ThriftDescriptors.int64('requestId', 8),
28
+ ];
29
+ }
30
+
31
+ /**
32
+ * Get MQTT client from realtime client
33
+ */
34
+ getMqtt() {
35
+ const mqtt = this.realtimeClient.mqtt || this.realtimeClient._mqtt || this.realtimeClient.client;
36
+ if (!mqtt || typeof mqtt.publish !== 'function') {
37
+ throw new Error('MQTT client not available');
38
+ }
39
+ return mqtt;
40
+ }
41
+
42
+ /**
43
+ * Send foreground state via MQTT with Thrift encoding (matching instagram_mqtt)
44
+ */
45
+ async sendForegroundState(state) {
46
+ this.enhancedDebug(`Updated foreground state: ${JSON.stringify(state)}`);
47
+
48
+ try {
49
+ const mqtt = this.getMqtt();
50
+
51
+ const payload = await (0, shared_1.compressDeflate)(
52
+ Buffer.concat([
53
+ Buffer.alloc(1, 0),
54
+ (0, thrift_1.thriftWriteFromObject)(state, this.foregroundStateConfig)
55
+ ])
56
+ );
57
+
58
+ const result = await mqtt.publish({
59
+ topic: constants_1.Topics.FOREGROUND_STATE.id,
60
+ payload: payload,
61
+ qosLevel: 1,
62
+ });
63
+
64
+ // Update keepAlive if provided
65
+ if ((0, shared_1.notUndefined)(state.keepAliveTimeout)) {
66
+ mqtt.keepAlive = state.keepAliveTimeout;
67
+ }
68
+
69
+ this.enhancedDebug(`✅ Foreground state updated via MQTT!`);
70
+ return result;
71
+ } catch (err) {
72
+ this.enhancedDebug(`Foreground state failed: ${err.message}`);
73
+ throw err;
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Base command sender (matching instagram_mqtt format)
79
+ */
80
+ async sendCommand({ action, data, threadId, clientContext }) {
81
+ try {
82
+ const mqtt = this.getMqtt();
83
+
84
+ if (clientContext) {
85
+ data.client_context = clientContext;
86
+ }
87
+
88
+ const json = JSON.stringify({
89
+ action,
90
+ thread_id: threadId,
91
+ ...data,
92
+ });
93
+
94
+ const payload = await (0, shared_1.compressDeflate)(json);
95
+
96
+ return mqtt.publish({
97
+ topic: constants_1.Topics.SEND_MESSAGE.id,
98
+ qosLevel: 1,
99
+ payload: payload,
100
+ });
101
+ } catch (err) {
102
+ this.enhancedDebug(`sendCommand failed: ${err.message}`);
103
+ throw err;
104
+ }
105
+ }
106
+
107
+ /**
108
+ * Base item sender (matching instagram_mqtt format)
109
+ */
110
+ async sendItem({ threadId, itemType, data, clientContext }) {
111
+ return this.sendCommand({
112
+ action: 'send_item',
113
+ threadId,
114
+ clientContext: clientContext || (0, uuid_1.v4)(),
115
+ data: {
116
+ item_type: itemType,
117
+ ...data,
118
+ },
119
+ });
120
+ }
121
+
122
+ /**
123
+ * Send text via MQTT (matching instagram_mqtt format)
124
+ */
125
+ async sendText({ text, clientContext, threadId }) {
126
+ this.enhancedDebug(`Sending text to ${threadId}: "${text}"`);
127
+
128
+ const result = await this.sendItem({
129
+ itemType: 'text',
130
+ threadId,
131
+ clientContext,
132
+ data: {
133
+ text,
134
+ },
135
+ });
136
+
137
+ this.enhancedDebug(`✅ Text sent via MQTT!`);
138
+ return result;
139
+ }
140
+
141
+ /**
142
+ * Alias for sendText
143
+ */
144
+ async sendTextViaRealtime(threadId, text, clientContext) {
145
+ return this.sendText({
146
+ text,
147
+ threadId,
148
+ clientContext,
149
+ });
150
+ }
151
+
152
+ /**
153
+ * Send hashtag via MQTT (matching instagram_mqtt format)
154
+ */
155
+ async sendHashtag({ text, threadId, hashtag, clientContext }) {
156
+ this.enhancedDebug(`Sending hashtag #${hashtag} to ${threadId}`);
157
+
158
+ const result = await this.sendItem({
159
+ itemType: 'hashtag',
160
+ threadId,
161
+ clientContext,
162
+ data: {
163
+ text: text || '',
164
+ hashtag,
165
+ item_id: hashtag,
166
+ },
167
+ });
168
+
169
+ this.enhancedDebug(`✅ Hashtag sent via MQTT!`);
170
+ return result;
171
+ }
172
+
173
+ /**
174
+ * Send like via MQTT (matching instagram_mqtt format)
175
+ */
176
+ async sendLike({ threadId, clientContext }) {
177
+ this.enhancedDebug(`Sending like in thread ${threadId}`);
178
+
179
+ const result = await this.sendItem({
180
+ itemType: 'like',
181
+ threadId,
182
+ clientContext,
183
+ data: {},
184
+ });
185
+
186
+ this.enhancedDebug(`✅ Like sent via MQTT!`);
187
+ return result;
188
+ }
189
+
190
+ /**
191
+ * Send location via MQTT (matching instagram_mqtt format)
192
+ */
193
+ async sendLocation({ text, locationId, threadId, clientContext }) {
194
+ this.enhancedDebug(`Sending location ${locationId} to ${threadId}`);
195
+
196
+ const result = await this.sendItem({
197
+ itemType: 'location',
198
+ threadId,
199
+ clientContext,
200
+ data: {
201
+ text: text || '',
202
+ venue_id: locationId,
203
+ item_id: locationId,
204
+ },
205
+ });
206
+
207
+ this.enhancedDebug(`✅ Location sent via MQTT!`);
208
+ return result;
209
+ }
210
+
211
+ /**
212
+ * Send media via MQTT (matching instagram_mqtt format - media_share)
213
+ */
214
+ async sendMedia({ text, mediaId, threadId, clientContext }) {
215
+ this.enhancedDebug(`Sending media ${mediaId} to ${threadId}`);
216
+
217
+ const result = await this.sendItem({
218
+ itemType: 'media_share',
219
+ threadId,
220
+ clientContext,
221
+ data: {
222
+ text: text || '',
223
+ media_id: mediaId,
224
+ },
225
+ });
226
+
227
+ this.enhancedDebug(`✅ Media sent via MQTT!`);
228
+ return result;
229
+ }
230
+
231
+ /**
232
+ * Send profile via MQTT (matching instagram_mqtt format)
233
+ */
234
+ async sendProfile({ text, userId, threadId, clientContext }) {
235
+ this.enhancedDebug(`Sending profile ${userId} to ${threadId}`);
236
+
237
+ const result = await this.sendItem({
238
+ itemType: 'profile',
239
+ threadId,
240
+ clientContext,
241
+ data: {
242
+ text: text || '',
243
+ profile_user_id: userId,
244
+ item_id: userId,
245
+ },
246
+ });
247
+
248
+ this.enhancedDebug(`✅ Profile sent via MQTT!`);
249
+ return result;
250
+ }
251
+
252
+ /**
253
+ * Send reaction via MQTT (matching instagram_mqtt format)
254
+ */
255
+ async sendReaction({ itemId, reactionType, clientContext, threadId, reactionStatus, targetItemType, emoji }) {
256
+ this.enhancedDebug(`Sending ${reactionType || 'like'} reaction to message ${itemId}`);
257
+
258
+ const result = await this.sendItem({
259
+ itemType: 'reaction',
260
+ threadId,
261
+ clientContext,
262
+ data: {
263
+ item_id: itemId,
264
+ node_type: 'item',
265
+ reaction_type: reactionType || 'like',
266
+ reaction_status: reactionStatus || 'created',
267
+ target_item_type: targetItemType,
268
+ emoji: emoji || '',
269
+ },
270
+ });
271
+
272
+ this.enhancedDebug(`✅ Reaction sent via MQTT!`);
273
+ return result;
274
+ }
275
+
276
+ /**
277
+ * Send user story via MQTT (matching instagram_mqtt format - reel_share)
278
+ */
279
+ async sendUserStory({ text, storyId, threadId, clientContext }) {
280
+ this.enhancedDebug(`Sending story ${storyId} to ${threadId}`);
281
+
282
+ const result = await this.sendItem({
283
+ itemType: 'reel_share',
284
+ threadId,
285
+ clientContext,
286
+ data: {
287
+ text: text || '',
288
+ item_id: storyId,
289
+ media_id: storyId,
290
+ },
291
+ });
292
+
293
+ this.enhancedDebug(`✅ Story sent via MQTT!`);
294
+ return result;
295
+ }
296
+
297
+ /**
298
+ * Mark as seen via MQTT (matching instagram_mqtt format - mark_seen action)
299
+ */
300
+ async markAsSeen({ threadId, itemId }) {
301
+ this.enhancedDebug(`Marking message ${itemId} as seen in thread ${threadId}`);
302
+
303
+ const result = await this.sendCommand({
304
+ action: 'mark_seen',
305
+ threadId,
306
+ data: {
307
+ item_id: itemId,
308
+ },
309
+ });
310
+
311
+ this.enhancedDebug(`✅ Message marked as seen via MQTT!`);
312
+ return result;
313
+ }
314
+
315
+ /**
316
+ * Indicate activity (typing) via MQTT (matching instagram_mqtt format - activity_status)
317
+ */
318
+ async indicateActivity({ threadId, isActive, clientContext }) {
319
+ const active = typeof isActive === 'undefined' ? true : isActive;
320
+ this.enhancedDebug(`Indicating ${active ? 'typing' : 'stopped'} in thread ${threadId}`);
321
+
322
+ const result = await this.sendCommand({
323
+ action: 'indicate_activity',
324
+ threadId,
325
+ clientContext: clientContext || (0, uuid_1.v4)(),
326
+ data: {
327
+ activity_status: active ? '1' : '0',
328
+ },
329
+ });
330
+
331
+ this.enhancedDebug(`✅ Activity indicator sent via MQTT!`);
332
+ return result;
333
+ }
334
+
335
+ /**
336
+ * Delete message via MQTT
337
+ */
338
+ async deleteMessage(threadId, itemId) {
339
+ this.enhancedDebug(`Deleting message ${itemId} from thread ${threadId}`);
340
+
341
+ const result = await this.sendCommand({
342
+ action: 'delete_item',
343
+ threadId,
344
+ clientContext: (0, uuid_1.v4)(),
345
+ data: {
346
+ item_id: itemId,
347
+ },
348
+ });
349
+
350
+ this.enhancedDebug(`✅ Message deleted via MQTT!`);
351
+ return result;
352
+ }
353
+
354
+ /**
355
+ * Edit message via MQTT
356
+ */
357
+ async editMessage(threadId, itemId, newText) {
358
+ this.enhancedDebug(`Editing message ${itemId}: "${newText}"`);
359
+
360
+ const result = await this.sendCommand({
361
+ action: 'edit_item',
362
+ threadId,
363
+ clientContext: (0, uuid_1.v4)(),
364
+ data: {
365
+ item_id: itemId,
366
+ text: newText,
367
+ },
368
+ });
369
+
370
+ this.enhancedDebug(`✅ Message edited via MQTT!`);
371
+ return result;
372
+ }
373
+
374
+ /**
375
+ * Reply to message via MQTT (Quote Reply)
376
+ */
377
+ async replyToMessage(threadId, messageId, replyText) {
378
+ this.enhancedDebug(`Replying to ${messageId} in thread ${threadId}: "${replyText}"`);
379
+
380
+ const result = await this.sendItem({
381
+ itemType: 'text',
382
+ threadId,
383
+ clientContext: (0, uuid_1.v4)(),
384
+ data: {
385
+ text: replyText,
386
+ replied_to_item_id: messageId,
387
+ },
388
+ });
389
+
390
+ this.enhancedDebug(`✅ Reply sent via MQTT!`);
391
+ return result;
392
+ }
393
+
394
+ /**
395
+ * Add member to thread via MQTT
396
+ */
397
+ async addMemberToThread(threadId, userId) {
398
+ this.enhancedDebug(`Adding user ${userId} to thread ${threadId}`);
399
+
400
+ const result = await this.sendCommand({
401
+ action: 'add_users',
402
+ threadId,
403
+ clientContext: (0, uuid_1.v4)(),
404
+ data: {
405
+ user_ids: Array.isArray(userId) ? userId : [userId],
406
+ },
407
+ });
408
+
409
+ this.enhancedDebug(`✅ Member added to thread via MQTT!`);
410
+ return result;
411
+ }
412
+
413
+ /**
414
+ * Remove member from thread via MQTT
415
+ */
416
+ async removeMemberFromThread(threadId, userId) {
417
+ this.enhancedDebug(`Removing user ${userId} from thread ${threadId}`);
418
+
419
+ const result = await this.sendCommand({
420
+ action: 'remove_users',
421
+ threadId,
422
+ clientContext: (0, uuid_1.v4)(),
423
+ data: {
424
+ user_ids: Array.isArray(userId) ? userId : [userId],
425
+ },
426
+ });
427
+
428
+ this.enhancedDebug(`✅ Member removed from thread via MQTT!`);
429
+ return result;
430
+ }
431
+
432
+ /**
433
+ * Leave thread via MQTT
434
+ */
435
+ async leaveThread(threadId) {
436
+ this.enhancedDebug(`Leaving thread ${threadId}`);
437
+
438
+ const result = await this.sendCommand({
439
+ action: 'leave',
440
+ threadId,
441
+ clientContext: (0, uuid_1.v4)(),
442
+ data: {},
443
+ });
444
+
445
+ this.enhancedDebug(`✅ Left thread via MQTT!`);
446
+ return result;
447
+ }
448
+
449
+ /**
450
+ * Mute thread via MQTT
451
+ */
452
+ async muteThread(threadId, muteUntil = null) {
453
+ this.enhancedDebug(`Muting thread ${threadId}`);
454
+
455
+ const result = await this.sendCommand({
456
+ action: 'mute',
457
+ threadId,
458
+ clientContext: (0, uuid_1.v4)(),
459
+ data: {
460
+ mute_until: muteUntil,
461
+ },
462
+ });
463
+
464
+ this.enhancedDebug(`✅ Thread muted via MQTT!`);
465
+ return result;
466
+ }
467
+
468
+ /**
469
+ * Unmute thread via MQTT
470
+ */
471
+ async unmuteThread(threadId) {
472
+ this.enhancedDebug(`Unmuting thread ${threadId}`);
473
+
474
+ const result = await this.sendCommand({
475
+ action: 'unmute',
476
+ threadId,
477
+ clientContext: (0, uuid_1.v4)(),
478
+ data: {},
479
+ });
480
+
481
+ this.enhancedDebug(`✅ Thread unmuted via MQTT!`);
482
+ return result;
483
+ }
484
+
485
+ /**
486
+ * Update thread title via MQTT
487
+ */
488
+ async updateThreadTitle(threadId, title) {
489
+ this.enhancedDebug(`Updating thread ${threadId} title to: "${title}"`);
490
+
491
+ const result = await this.sendCommand({
492
+ action: 'update_title',
493
+ threadId,
494
+ clientContext: (0, uuid_1.v4)(),
495
+ data: {
496
+ title: title,
497
+ },
498
+ });
499
+
500
+ this.enhancedDebug(`✅ Thread title updated via MQTT!`);
501
+ return result;
502
+ }
503
+
504
+ /**
505
+ * Send link via MQTT
506
+ */
507
+ async sendLink({ link, text, threadId, clientContext }) {
508
+ this.enhancedDebug(`Sending link ${link} to ${threadId}`);
509
+
510
+ const result = await this.sendItem({
511
+ itemType: 'link',
512
+ threadId,
513
+ clientContext,
514
+ data: {
515
+ link_text: text || '',
516
+ link_urls: JSON.stringify([link]),
517
+ },
518
+ });
519
+
520
+ this.enhancedDebug(`✅ Link sent via MQTT!`);
521
+ return result;
522
+ }
523
+
524
+ /**
525
+ * Send animated media (GIF/sticker) via MQTT
526
+ */
527
+ async sendAnimatedMedia({ id, isSticker, threadId, clientContext }) {
528
+ this.enhancedDebug(`Sending animated media ${id} to ${threadId}`);
529
+
530
+ const result = await this.sendItem({
531
+ itemType: 'animated_media',
532
+ threadId,
533
+ clientContext,
534
+ data: {
535
+ id: id,
536
+ is_sticker: isSticker || false,
537
+ },
538
+ });
539
+
540
+ this.enhancedDebug(`✅ Animated media sent via MQTT!`);
541
+ return result;
542
+ }
543
+
544
+ /**
545
+ * Send voice message via MQTT (after upload)
546
+ */
547
+ async sendVoice({ uploadId, waveform, waveformSamplingFrequencyHz, threadId, clientContext }) {
548
+ this.enhancedDebug(`Sending voice ${uploadId} to ${threadId}`);
549
+
550
+ const result = await this.sendItem({
551
+ itemType: 'voice_media',
552
+ threadId,
553
+ clientContext,
554
+ data: {
555
+ upload_id: uploadId,
556
+ waveform: waveform,
557
+ waveform_sampling_frequency_hz: waveformSamplingFrequencyHz || 10,
558
+ },
559
+ });
560
+
561
+ this.enhancedDebug(`✅ Voice sent via MQTT!`);
562
+ return result;
563
+ }
564
+
565
+ /**
566
+ * Send photo via Realtime (Upload + Broadcast)
567
+ */
568
+ async sendPhotoViaRealtime({ photoBuffer, threadId, caption = '', mimeType = 'image/jpeg', clientContext }) {
569
+ this.enhancedDebug(`Sending photo to thread ${threadId} via Realtime`);
570
+
571
+ try {
572
+ if (!photoBuffer || !Buffer.isBuffer(photoBuffer) || photoBuffer.length === 0) {
573
+ throw new Error('photoBuffer must be a non-empty Buffer');
574
+ }
575
+ if (!threadId) {
576
+ throw new Error('threadId is required');
577
+ }
578
+
579
+ const ig = this.realtimeClient.ig;
580
+ if (!ig || !ig.request) {
581
+ throw new Error('Instagram client not available. Make sure you are logged in.');
582
+ }
583
+
584
+ this.enhancedDebug(`Step 1: Uploading photo (${photoBuffer.length} bytes)...`);
585
+
586
+ const uploadId = Date.now().toString();
587
+ const objectName = `${(0, uuid_1.v4)()}.${mimeType === 'image/png' ? 'png' : 'jpg'}`;
588
+
589
+ const isJpeg = mimeType === 'image/jpeg' || mimeType === 'image/jpg';
590
+ const compression = isJpeg
591
+ ? '{"lib_name":"moz","lib_version":"3.1.m","quality":"80"}'
592
+ : '{"lib_name":"png","lib_version":"1.0","quality":"100"}';
593
+
594
+ const ruploadParams = {
595
+ upload_id: uploadId,
596
+ media_type: 1,
597
+ image_compression: compression,
598
+ xsharing_user_ids: JSON.stringify([]),
599
+ is_clips_media: false,
600
+ };
601
+
602
+ const uploadHeaders = {
603
+ 'X-Instagram-Rupload-Params': JSON.stringify(ruploadParams),
604
+ 'Content-Type': mimeType,
605
+ 'X_FB_PHOTO_WATERFALL_ID': (0, uuid_1.v4)(),
606
+ 'X-Entity-Type': mimeType,
607
+ 'X-Entity-Length': String(photoBuffer.length),
608
+ 'Content-Length': String(photoBuffer.length),
609
+ };
610
+
611
+ const uploadUrl = `/rupload_igphoto/${objectName}`;
612
+
613
+ let serverUploadId = uploadId;
614
+ try {
615
+ const uploadResponse = await ig.request.send({
616
+ url: uploadUrl,
617
+ method: 'POST',
618
+ headers: uploadHeaders,
619
+ body: photoBuffer,
620
+ });
621
+
622
+ if (uploadResponse && typeof uploadResponse === 'object' && uploadResponse.upload_id) {
623
+ serverUploadId = uploadResponse.upload_id;
624
+ }
625
+ this.enhancedDebug(`✅ Photo uploaded! upload_id: ${serverUploadId}`);
626
+ } catch (uploadErr) {
627
+ this.enhancedDebug(`Upload error: ${uploadErr.message}`);
628
+ throw new Error(`Photo upload failed: ${uploadErr.message}`);
629
+ }
630
+
631
+ this.enhancedDebug(`Step 2: Broadcasting photo to thread ${threadId}...`);
632
+
633
+ const broadcastForm = {
634
+ upload_id: serverUploadId,
635
+ action: 'send_item',
636
+ thread_ids: JSON.stringify([String(threadId)]),
637
+ };
638
+
639
+ if (caption) {
640
+ broadcastForm.caption = caption;
641
+ }
642
+
643
+ try {
644
+ const broadcastResponse = await ig.request.send({
645
+ url: '/direct_v2/threads/broadcast/upload_photo/',
646
+ method: 'POST',
647
+ form: broadcastForm,
648
+ });
649
+
650
+ this.enhancedDebug(`✅ Photo sent successfully to thread ${threadId}!`);
651
+ return broadcastResponse;
652
+ } catch (broadcastErr) {
653
+ this.enhancedDebug(`Broadcast error: ${broadcastErr.message}`);
654
+ throw new Error(`Photo broadcast failed: ${broadcastErr.message}`);
655
+ }
656
+
657
+ } catch (err) {
658
+ this.enhancedDebug(`sendPhotoViaRealtime failed: ${err.message}`);
659
+ throw err;
660
+ }
661
+ }
662
+
663
+ /**
664
+ * Alias for sendPhotoViaRealtime
665
+ */
666
+ async sendPhoto(options) {
667
+ return this.sendPhotoViaRealtime(options);
668
+ }
669
+
670
+ /**
671
+ * Send video via Realtime (Upload + Broadcast)
672
+ */
673
+ async sendVideoViaRealtime({ videoBuffer, threadId, caption = '', duration = 0, width = 720, height = 1280, clientContext }) {
674
+ this.enhancedDebug(`Sending video to thread ${threadId} via Realtime`);
675
+
676
+ try {
677
+ if (!videoBuffer || !Buffer.isBuffer(videoBuffer) || videoBuffer.length === 0) {
678
+ throw new Error('videoBuffer must be a non-empty Buffer');
679
+ }
680
+ if (!threadId) {
681
+ throw new Error('threadId is required');
682
+ }
683
+
684
+ const ig = this.realtimeClient.ig;
685
+ if (!ig || !ig.request) {
686
+ throw new Error('Instagram client not available. Make sure you are logged in.');
687
+ }
688
+
689
+ this.enhancedDebug(`Step 1: Uploading video (${videoBuffer.length} bytes)...`);
690
+
691
+ const uploadId = Date.now().toString();
692
+ const objectName = `${(0, uuid_1.v4)()}.mp4`;
693
+
694
+ const ruploadParams = {
695
+ upload_id: uploadId,
696
+ media_type: 2,
697
+ xsharing_user_ids: JSON.stringify([]),
698
+ upload_media_duration_ms: Math.round(duration * 1000),
699
+ upload_media_width: width,
700
+ upload_media_height: height,
701
+ };
702
+
703
+ const uploadHeaders = {
704
+ 'X-Instagram-Rupload-Params': JSON.stringify(ruploadParams),
705
+ 'Content-Type': 'video/mp4',
706
+ 'X_FB_VIDEO_WATERFALL_ID': (0, uuid_1.v4)(),
707
+ 'X-Entity-Type': 'video/mp4',
708
+ 'X-Entity-Length': String(videoBuffer.length),
709
+ 'Content-Length': String(videoBuffer.length),
710
+ 'Offset': '0',
711
+ };
712
+
713
+ const uploadUrl = `/rupload_igvideo/${objectName}`;
714
+
715
+ let serverUploadId = uploadId;
716
+ try {
717
+ const uploadResponse = await ig.request.send({
718
+ url: uploadUrl,
719
+ method: 'POST',
720
+ headers: uploadHeaders,
721
+ body: videoBuffer,
722
+ });
723
+
724
+ if (uploadResponse && typeof uploadResponse === 'object' && uploadResponse.upload_id) {
725
+ serverUploadId = uploadResponse.upload_id;
726
+ }
727
+ this.enhancedDebug(`✅ Video uploaded! upload_id: ${serverUploadId}`);
728
+ } catch (uploadErr) {
729
+ this.enhancedDebug(`Video upload error: ${uploadErr.message}`);
730
+ throw new Error(`Video upload failed: ${uploadErr.message}`);
731
+ }
732
+
733
+ this.enhancedDebug(`Step 2: Broadcasting video to thread ${threadId}...`);
734
+
735
+ const broadcastForm = {
736
+ upload_id: serverUploadId,
737
+ action: 'send_item',
738
+ thread_ids: JSON.stringify([String(threadId)]),
739
+ video_result: '',
740
+ };
741
+
742
+ if (caption) {
743
+ broadcastForm.caption = caption;
744
+ }
745
+
746
+ try {
747
+ const broadcastResponse = await ig.request.send({
748
+ url: '/direct_v2/threads/broadcast/upload_video/',
749
+ method: 'POST',
750
+ form: broadcastForm,
751
+ });
752
+
753
+ this.enhancedDebug(`✅ Video sent successfully to thread ${threadId}!`);
754
+ return broadcastResponse;
755
+ } catch (broadcastErr) {
756
+ this.enhancedDebug(`Video broadcast error: ${broadcastErr.message}`);
757
+ throw new Error(`Video broadcast failed: ${broadcastErr.message}`);
758
+ }
759
+
760
+ } catch (err) {
761
+ this.enhancedDebug(`sendVideoViaRealtime failed: ${err.message}`);
762
+ throw err;
763
+ }
764
+ }
765
+
766
+ /**
767
+ * Alias for sendVideoViaRealtime
768
+ */
769
+ async sendVideo(options) {
770
+ return this.sendVideoViaRealtime(options);
771
+ }
772
+
773
+ /**
774
+ * Approve pending thread via MQTT
775
+ */
776
+ async approveThread(threadId) {
777
+ this.enhancedDebug(`Approving thread ${threadId}`);
778
+
779
+ const result = await this.sendCommand({
780
+ action: 'approve',
781
+ threadId,
782
+ clientContext: (0, uuid_1.v4)(),
783
+ data: {},
784
+ });
785
+
786
+ this.enhancedDebug(`✅ Thread approved via MQTT!`);
787
+ return result;
788
+ }
789
+
790
+ /**
791
+ * Decline pending thread via MQTT
792
+ */
793
+ async declineThread(threadId) {
794
+ this.enhancedDebug(`Declining thread ${threadId}`);
795
+
796
+ const result = await this.sendCommand({
797
+ action: 'decline',
798
+ threadId,
799
+ clientContext: (0, uuid_1.v4)(),
800
+ data: {},
801
+ });
802
+
803
+ this.enhancedDebug(`✅ Thread declined via MQTT!`);
804
+ return result;
805
+ }
806
+
807
+ /**
808
+ * Block user in thread via MQTT
809
+ */
810
+ async blockUserInThread(threadId, userId) {
811
+ this.enhancedDebug(`Blocking user ${userId} in thread ${threadId}`);
812
+
813
+ const result = await this.sendCommand({
814
+ action: 'block',
815
+ threadId,
816
+ clientContext: (0, uuid_1.v4)(),
817
+ data: {
818
+ user_id: userId,
819
+ },
820
+ });
821
+
822
+ this.enhancedDebug(`✅ User blocked in thread via MQTT!`);
823
+ return result;
824
+ }
825
+
826
+ /**
827
+ * Report thread via MQTT
828
+ */
829
+ async reportThread(threadId, reason) {
830
+ this.enhancedDebug(`Reporting thread ${threadId}`);
831
+
832
+ const result = await this.sendCommand({
833
+ action: 'report',
834
+ threadId,
835
+ clientContext: (0, uuid_1.v4)(),
836
+ data: {
837
+ reason: reason || 'spam',
838
+ },
839
+ });
840
+
841
+ this.enhancedDebug(`✅ Thread reported via MQTT!`);
842
+ return result;
843
+ }
844
+
845
+ /**
846
+ * Remove reaction via MQTT
847
+ */
848
+ async removeReaction({ itemId, threadId, clientContext }) {
849
+ this.enhancedDebug(`Removing reaction from message ${itemId}`);
850
+
851
+ const result = await this.sendItem({
852
+ itemType: 'reaction',
853
+ threadId,
854
+ clientContext,
855
+ data: {
856
+ item_id: itemId,
857
+ node_type: 'item',
858
+ reaction_type: 'like',
859
+ reaction_status: 'deleted',
860
+ },
861
+ });
862
+
863
+ this.enhancedDebug(`✅ Reaction removed via MQTT!`);
864
+ return result;
865
+ }
866
+
867
+ /**
868
+ * Send disappearing photo via MQTT
869
+ */
870
+ async sendDisappearingPhoto({ uploadId, threadId, viewMode = 'once', clientContext }) {
871
+ this.enhancedDebug(`Sending disappearing photo to ${threadId}`);
872
+
873
+ const result = await this.sendItem({
874
+ itemType: 'expiring_media_message',
875
+ threadId,
876
+ clientContext,
877
+ data: {
878
+ upload_id: uploadId,
879
+ view_mode: viewMode,
880
+ allow_replay: viewMode === 'replayable',
881
+ },
882
+ });
883
+
884
+ this.enhancedDebug(`✅ Disappearing photo sent via MQTT!`);
885
+ return result;
886
+ }
887
+
888
+ /**
889
+ * Send disappearing video via MQTT
890
+ */
891
+ async sendDisappearingVideo({ uploadId, threadId, viewMode = 'once', clientContext }) {
892
+ this.enhancedDebug(`Sending disappearing video to ${threadId}`);
893
+
894
+ const result = await this.sendItem({
895
+ itemType: 'expiring_media_message',
896
+ threadId,
897
+ clientContext,
898
+ data: {
899
+ upload_id: uploadId,
900
+ view_mode: viewMode,
901
+ allow_replay: viewMode === 'replayable',
902
+ media_type: 2,
903
+ },
904
+ });
905
+
906
+ this.enhancedDebug(`✅ Disappearing video sent via MQTT!`);
907
+ return result;
908
+ }
909
+
910
+ /**
911
+ * Mark visual message as seen via MQTT
912
+ */
913
+ async markVisualMessageSeen({ threadId, itemId, clientContext }) {
914
+ this.enhancedDebug(`Marking visual message ${itemId} as seen`);
915
+
916
+ const result = await this.sendCommand({
917
+ action: 'mark_visual_item_seen',
918
+ threadId,
919
+ clientContext: clientContext || (0, uuid_1.v4)(),
920
+ data: {
921
+ item_id: itemId,
922
+ },
923
+ });
924
+
925
+ this.enhancedDebug(`✅ Visual message marked as seen via MQTT!`);
926
+ return result;
927
+ }
928
+
929
+ /**
930
+ * Screenshot notification via MQTT
931
+ */
932
+ async sendScreenshotNotification({ threadId, itemId, clientContext }) {
933
+ this.enhancedDebug(`Sending screenshot notification for ${itemId}`);
934
+
935
+ const result = await this.sendCommand({
936
+ action: 'screenshot_notification',
937
+ threadId,
938
+ clientContext: clientContext || (0, uuid_1.v4)(),
939
+ data: {
940
+ item_id: itemId,
941
+ },
942
+ });
943
+
944
+ this.enhancedDebug(`✅ Screenshot notification sent via MQTT!`);
945
+ return result;
946
+ }
947
+
948
+ /**
949
+ * Replay notification via MQTT
950
+ */
951
+ async sendReplayNotification({ threadId, itemId, clientContext }) {
952
+ this.enhancedDebug(`Sending replay notification for ${itemId}`);
953
+
954
+ const result = await this.sendCommand({
955
+ action: 'replay_notification',
956
+ threadId,
957
+ clientContext: clientContext || (0, uuid_1.v4)(),
958
+ data: {
959
+ item_id: itemId,
960
+ },
961
+ });
962
+
963
+ this.enhancedDebug(`✅ Replay notification sent via MQTT!`);
964
+ return result;
965
+ }
966
+ }
967
+ exports.EnhancedDirectCommands = EnhancedDirectCommands;