bb-fca 2.0.0

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 (253) hide show
  1. package/LICENSE-MIT +21 -0
  2. package/README.md +0 -0
  3. package/dist/core/client.js +50 -0
  4. package/dist/core/client.js.map +1 -0
  5. package/dist/core/models/buildAPI.js +103 -0
  6. package/dist/core/models/buildAPI.js.map +1 -0
  7. package/dist/core/models/loginHelper.js +209 -0
  8. package/dist/core/models/loginHelper.js.map +1 -0
  9. package/dist/core/models/setOptions.js +47 -0
  10. package/dist/core/models/setOptions.js.map +1 -0
  11. package/dist/deltas/apis/create.js +30 -0
  12. package/dist/deltas/apis/create.js.map +1 -0
  13. package/dist/deltas/apis/extra/addExternalModule.js +23 -0
  14. package/dist/deltas/apis/extra/addExternalModule.js.map +1 -0
  15. package/dist/deltas/apis/extra/getAccess.js +110 -0
  16. package/dist/deltas/apis/extra/getAccess.js.map +1 -0
  17. package/dist/deltas/apis/http/httpGet.js +57 -0
  18. package/dist/deltas/apis/http/httpGet.js.map +1 -0
  19. package/dist/deltas/apis/http/httpPost.js +57 -0
  20. package/dist/deltas/apis/http/httpPost.js.map +1 -0
  21. package/dist/deltas/apis/http/httpPostFormData.js +61 -0
  22. package/dist/deltas/apis/http/httpPostFormData.js.map +1 -0
  23. package/dist/deltas/apis/login/GetBotInfo.js +83 -0
  24. package/dist/deltas/apis/login/GetBotInfo.js.map +1 -0
  25. package/dist/deltas/apis/login/getBotInitialData.js +46 -0
  26. package/dist/deltas/apis/login/getBotInitialData.js.map +1 -0
  27. package/dist/deltas/apis/login/logout.js +54 -0
  28. package/dist/deltas/apis/login/logout.js.map +1 -0
  29. package/dist/deltas/apis/messaging/editMessage.js +64 -0
  30. package/dist/deltas/apis/messaging/editMessage.js.map +1 -0
  31. package/dist/deltas/apis/messaging/emoji.js +120 -0
  32. package/dist/deltas/apis/messaging/emoji.js.map +1 -0
  33. package/dist/deltas/apis/messaging/gcmember.js +164 -0
  34. package/dist/deltas/apis/messaging/gcmember.js.map +1 -0
  35. package/dist/deltas/apis/messaging/gcname.js +119 -0
  36. package/dist/deltas/apis/messaging/gcname.js.map +1 -0
  37. package/dist/deltas/apis/messaging/gcrule.js +144 -0
  38. package/dist/deltas/apis/messaging/gcrule.js.map +1 -0
  39. package/dist/deltas/apis/messaging/markAsDelivered.js +44 -0
  40. package/dist/deltas/apis/messaging/markAsDelivered.js.map +1 -0
  41. package/dist/deltas/apis/messaging/markAsRead.js +84 -0
  42. package/dist/deltas/apis/messaging/markAsRead.js.map +1 -0
  43. package/dist/deltas/apis/messaging/markAsReadAll.js +34 -0
  44. package/dist/deltas/apis/messaging/markAsReadAll.js.map +1 -0
  45. package/dist/deltas/apis/messaging/markAsSeen.js +64 -0
  46. package/dist/deltas/apis/messaging/markAsSeen.js.map +1 -0
  47. package/dist/deltas/apis/messaging/nickname.js +129 -0
  48. package/dist/deltas/apis/messaging/nickname.js.map +1 -0
  49. package/dist/deltas/apis/messaging/notes.js +156 -0
  50. package/dist/deltas/apis/messaging/notes.js.map +1 -0
  51. package/dist/deltas/apis/messaging/resolvePhotoUrl.js +55 -0
  52. package/dist/deltas/apis/messaging/resolvePhotoUrl.js.map +1 -0
  53. package/dist/deltas/apis/messaging/sendMessage.js +239 -0
  54. package/dist/deltas/apis/messaging/sendMessage.js.map +1 -0
  55. package/dist/deltas/apis/messaging/sendTypingIndicator.js +41 -0
  56. package/dist/deltas/apis/messaging/sendTypingIndicator.js.map +1 -0
  57. package/dist/deltas/apis/messaging/setMessageReaction.js +30 -0
  58. package/dist/deltas/apis/messaging/setMessageReaction.js.map +1 -0
  59. package/dist/deltas/apis/messaging/shareContact.js +59 -0
  60. package/dist/deltas/apis/messaging/shareContact.js.map +1 -0
  61. package/dist/deltas/apis/messaging/stickers.js +246 -0
  62. package/dist/deltas/apis/messaging/stickers.js.map +1 -0
  63. package/dist/deltas/apis/messaging/theme.js +227 -0
  64. package/dist/deltas/apis/messaging/theme.js.map +1 -0
  65. package/dist/deltas/apis/messaging/unsendMessage.js +19 -0
  66. package/dist/deltas/apis/messaging/unsendMessage.js.map +1 -0
  67. package/dist/deltas/apis/mqtt/deltas/value.js +193 -0
  68. package/dist/deltas/apis/mqtt/deltas/value.js.map +1 -0
  69. package/dist/deltas/apis/mqtt/listenMqtt.js +306 -0
  70. package/dist/deltas/apis/mqtt/listenMqtt.js.map +1 -0
  71. package/dist/deltas/apis/mqtt/listenSpeed.js +166 -0
  72. package/dist/deltas/apis/mqtt/listenSpeed.js.map +1 -0
  73. package/dist/deltas/apis/mqtt/pinMessage.js +166 -0
  74. package/dist/deltas/apis/mqtt/pinMessage.js.map +1 -0
  75. package/dist/deltas/apis/mqtt/realtime.js +160 -0
  76. package/dist/deltas/apis/mqtt/realtime.js.map +1 -0
  77. package/dist/deltas/apis/mqtt/sendMessageMqtt.js +184 -0
  78. package/dist/deltas/apis/mqtt/sendMessageMqtt.js.map +1 -0
  79. package/dist/deltas/apis/mqtt/setMessageReactionMqtt.js +57 -0
  80. package/dist/deltas/apis/mqtt/setMessageReactionMqtt.js.map +1 -0
  81. package/dist/deltas/apis/posting/comment.js +195 -0
  82. package/dist/deltas/apis/posting/comment.js.map +1 -0
  83. package/dist/deltas/apis/posting/follow.js +82 -0
  84. package/dist/deltas/apis/posting/follow.js.map +1 -0
  85. package/dist/deltas/apis/posting/friend.js +253 -0
  86. package/dist/deltas/apis/posting/friend.js.map +1 -0
  87. package/dist/deltas/apis/posting/post.js +551 -0
  88. package/dist/deltas/apis/posting/post.js.map +1 -0
  89. package/dist/deltas/apis/posting/share.js +59 -0
  90. package/dist/deltas/apis/posting/share.js.map +1 -0
  91. package/dist/deltas/apis/posting/story.js +176 -0
  92. package/dist/deltas/apis/posting/story.js.map +1 -0
  93. package/dist/deltas/apis/threads/getThreadHistory.js +233 -0
  94. package/dist/deltas/apis/threads/getThreadHistory.js.map +1 -0
  95. package/dist/deltas/apis/threads/getThreadInfo.js +197 -0
  96. package/dist/deltas/apis/threads/getThreadInfo.js.map +1 -0
  97. package/dist/deltas/apis/threads/getThreadList.js +201 -0
  98. package/dist/deltas/apis/threads/getThreadList.js.map +1 -0
  99. package/dist/deltas/apis/users/getUserInfo.js +254 -0
  100. package/dist/deltas/apis/users/getUserInfo.js.map +1 -0
  101. package/dist/index.d.ts +696 -0
  102. package/dist/types/core/client.d.ts +2 -0
  103. package/dist/types/core/models/buildAPI.d.ts +13 -0
  104. package/dist/types/core/models/loginHelper.d.ts +15 -0
  105. package/dist/types/core/models/setOptions.d.ts +2 -0
  106. package/dist/types/deltas/apis/create.d.ts +23 -0
  107. package/dist/types/deltas/apis/extra/addExternalModule.d.ts +1 -0
  108. package/dist/types/deltas/apis/extra/getAccess.d.ts +1 -0
  109. package/dist/types/deltas/apis/http/httpGet.d.ts +1 -0
  110. package/dist/types/deltas/apis/http/httpPost.d.ts +1 -0
  111. package/dist/types/deltas/apis/http/httpPostFormData.d.ts +1 -0
  112. package/dist/types/deltas/apis/login/GetBotInfo.d.ts +32 -0
  113. package/dist/types/deltas/apis/login/getBotInitialData.d.ts +1 -0
  114. package/dist/types/deltas/apis/login/logout.d.ts +7 -0
  115. package/dist/types/deltas/apis/messaging/editMessage.d.ts +7 -0
  116. package/dist/types/deltas/apis/messaging/emoji.d.ts +1 -0
  117. package/dist/types/deltas/apis/messaging/gcmember.d.ts +1 -0
  118. package/dist/types/deltas/apis/messaging/gcname.d.ts +1 -0
  119. package/dist/types/deltas/apis/messaging/gcrule.d.ts +1 -0
  120. package/dist/types/deltas/apis/messaging/markAsDelivered.d.ts +7 -0
  121. package/dist/types/deltas/apis/messaging/markAsRead.d.ts +6 -0
  122. package/dist/types/deltas/apis/messaging/markAsReadAll.d.ts +7 -0
  123. package/dist/types/deltas/apis/messaging/markAsSeen.d.ts +6 -0
  124. package/dist/types/deltas/apis/messaging/nickname.d.ts +1 -0
  125. package/dist/types/deltas/apis/messaging/notes.d.ts +14 -0
  126. package/dist/types/deltas/apis/messaging/resolvePhotoUrl.d.ts +9 -0
  127. package/dist/types/deltas/apis/messaging/sendMessage.d.ts +1 -0
  128. package/dist/types/deltas/apis/messaging/sendTypingIndicator.d.ts +6 -0
  129. package/dist/types/deltas/apis/messaging/setMessageReaction.d.ts +1 -0
  130. package/dist/types/deltas/apis/messaging/shareContact.d.ts +8 -0
  131. package/dist/types/deltas/apis/messaging/stickers.d.ts +48 -0
  132. package/dist/types/deltas/apis/messaging/theme.d.ts +1 -0
  133. package/dist/types/deltas/apis/messaging/unsendMessage.d.ts +1 -0
  134. package/dist/types/deltas/apis/mqtt/deltas/value.d.ts +2 -0
  135. package/dist/types/deltas/apis/mqtt/listenMqtt.d.ts +20 -0
  136. package/dist/types/deltas/apis/mqtt/listenSpeed.d.ts +21 -0
  137. package/dist/types/deltas/apis/mqtt/pinMessage.d.ts +1 -0
  138. package/dist/types/deltas/apis/mqtt/realtime.d.ts +1 -0
  139. package/dist/types/deltas/apis/mqtt/sendMessageMqtt.d.ts +1 -0
  140. package/dist/types/deltas/apis/mqtt/setMessageReactionMqtt.d.ts +1 -0
  141. package/dist/types/deltas/apis/posting/comment.d.ts +9 -0
  142. package/dist/types/deltas/apis/posting/follow.d.ts +14 -0
  143. package/dist/types/deltas/apis/posting/friend.d.ts +61 -0
  144. package/dist/types/deltas/apis/posting/post.d.ts +20 -0
  145. package/dist/types/deltas/apis/posting/share.d.ts +1 -0
  146. package/dist/types/deltas/apis/posting/story.d.ts +39 -0
  147. package/dist/types/deltas/apis/threads/getThreadHistory.d.ts +7 -0
  148. package/dist/types/deltas/apis/threads/getThreadInfo.d.ts +7 -0
  149. package/dist/types/deltas/apis/threads/getThreadList.d.ts +7 -0
  150. package/dist/types/deltas/apis/users/getUserInfo.d.ts +1 -0
  151. package/dist/types/utils/axios.d.ts +7 -0
  152. package/dist/types/utils/clients.d.ts +4 -0
  153. package/dist/types/utils/constants.d.ts +24 -0
  154. package/dist/types/utils/formatters/data/formatAttachment.d.ts +2 -0
  155. package/dist/types/utils/formatters/data/formatDelta.d.ts +4 -0
  156. package/dist/types/utils/formatters/index.d.ts +17 -0
  157. package/dist/types/utils/formatters/value/formatCookie.d.ts +8 -0
  158. package/dist/types/utils/formatters/value/formatDate.d.ts +6 -0
  159. package/dist/types/utils/formatters/value/formatID.d.ts +7 -0
  160. package/dist/types/utils/headers.d.ts +2 -0
  161. package/dist/types/utils/index.d.ts +75 -0
  162. package/dist/types/utils/user-agents.d.ts +9 -0
  163. package/dist/utils/axios.js +148 -0
  164. package/dist/utils/axios.js.map +1 -0
  165. package/dist/utils/clients.js +120 -0
  166. package/dist/utils/clients.js.map +1 -0
  167. package/dist/utils/constants.js +249 -0
  168. package/dist/utils/constants.js.map +1 -0
  169. package/dist/utils/formatters/data/formatAttachment.js +61 -0
  170. package/dist/utils/formatters/data/formatAttachment.js.map +1 -0
  171. package/dist/utils/formatters/data/formatDelta.js +67 -0
  172. package/dist/utils/formatters/data/formatDelta.js.map +1 -0
  173. package/dist/utils/formatters/index.js +132 -0
  174. package/dist/utils/formatters/index.js.map +1 -0
  175. package/dist/utils/formatters/value/formatCookie.js +13 -0
  176. package/dist/utils/formatters/value/formatCookie.js.map +1 -0
  177. package/dist/utils/formatters/value/formatDate.js +33 -0
  178. package/dist/utils/formatters/value/formatDate.js.map +1 -0
  179. package/dist/utils/formatters/value/formatID.js +17 -0
  180. package/dist/utils/formatters/value/formatID.js.map +1 -0
  181. package/dist/utils/headers.js +61 -0
  182. package/dist/utils/headers.js.map +1 -0
  183. package/dist/utils/index.js +105 -0
  184. package/dist/utils/index.js.map +1 -0
  185. package/dist/utils/user-agents.js +41 -0
  186. package/dist/utils/user-agents.js.map +1 -0
  187. package/examples/post.example.js +149 -0
  188. package/module/index.js +5 -0
  189. package/package.json +56 -0
  190. package/src/core/client.ts +66 -0
  191. package/src/core/models/buildAPI.ts +131 -0
  192. package/src/core/models/loginHelper.ts +226 -0
  193. package/src/core/models/setOptions.ts +48 -0
  194. package/src/deltas/apis/create.ts +28 -0
  195. package/src/deltas/apis/extra/addExternalModule.ts +23 -0
  196. package/src/deltas/apis/extra/getAccess.ts +141 -0
  197. package/src/deltas/apis/http/httpGet.ts +61 -0
  198. package/src/deltas/apis/http/httpPost.ts +61 -0
  199. package/src/deltas/apis/http/httpPostFormData.ts +67 -0
  200. package/src/deltas/apis/login/GetBotInfo.ts +88 -0
  201. package/src/deltas/apis/login/getBotInitialData.ts +42 -0
  202. package/src/deltas/apis/login/logout.ts +62 -0
  203. package/src/deltas/apis/messaging/editMessage.ts +69 -0
  204. package/src/deltas/apis/messaging/emoji.ts +135 -0
  205. package/src/deltas/apis/messaging/gcmember.ts +175 -0
  206. package/src/deltas/apis/messaging/gcname.ts +136 -0
  207. package/src/deltas/apis/messaging/gcrule.ts +152 -0
  208. package/src/deltas/apis/messaging/markAsDelivered.ts +47 -0
  209. package/src/deltas/apis/messaging/markAsRead.ts +94 -0
  210. package/src/deltas/apis/messaging/markAsReadAll.ts +38 -0
  211. package/src/deltas/apis/messaging/markAsSeen.ts +69 -0
  212. package/src/deltas/apis/messaging/nickname.ts +153 -0
  213. package/src/deltas/apis/messaging/notes.ts +165 -0
  214. package/src/deltas/apis/messaging/resolvePhotoUrl.ts +56 -0
  215. package/src/deltas/apis/messaging/sendMessage.ts +286 -0
  216. package/src/deltas/apis/messaging/sendTypingIndicator.ts +48 -0
  217. package/src/deltas/apis/messaging/setMessageReaction.ts +25 -0
  218. package/src/deltas/apis/messaging/shareContact.ts +63 -0
  219. package/src/deltas/apis/messaging/stickers.ts +255 -0
  220. package/src/deltas/apis/messaging/theme.ts +280 -0
  221. package/src/deltas/apis/messaging/unsendMessage.ts +15 -0
  222. package/src/deltas/apis/mqtt/deltas/value.ts +224 -0
  223. package/src/deltas/apis/mqtt/listenMqtt.ts +332 -0
  224. package/src/deltas/apis/mqtt/listenSpeed.ts +179 -0
  225. package/src/deltas/apis/mqtt/pinMessage.ts +135 -0
  226. package/src/deltas/apis/mqtt/realtime.ts +169 -0
  227. package/src/deltas/apis/mqtt/sendMessageMqtt.ts +206 -0
  228. package/src/deltas/apis/mqtt/setMessageReactionMqtt.ts +61 -0
  229. package/src/deltas/apis/posting/comment.ts +205 -0
  230. package/src/deltas/apis/posting/follow.ts +79 -0
  231. package/src/deltas/apis/posting/friend.ts +241 -0
  232. package/src/deltas/apis/posting/post.ts +599 -0
  233. package/src/deltas/apis/posting/share.ts +60 -0
  234. package/src/deltas/apis/posting/story.ts +207 -0
  235. package/src/deltas/apis/threads/getThreadHistory.ts +237 -0
  236. package/src/deltas/apis/threads/getThreadInfo.ts +210 -0
  237. package/src/deltas/apis/threads/getThreadList.ts +224 -0
  238. package/src/deltas/apis/users/getUserInfo.ts +244 -0
  239. package/src/types/index.d.ts +696 -0
  240. package/src/utils/axios.ts +178 -0
  241. package/src/utils/clients.ts +125 -0
  242. package/src/utils/constants.ts +281 -0
  243. package/src/utils/formatters/data/formatAttachment.ts +58 -0
  244. package/src/utils/formatters/data/formatDelta.ts +45 -0
  245. package/src/utils/formatters/index.ts +82 -0
  246. package/src/utils/formatters/value/formatCookie.ts +13 -0
  247. package/src/utils/formatters/value/formatDate.ts +34 -0
  248. package/src/utils/formatters/value/formatID.ts +14 -0
  249. package/src/utils/formatters.old.ts +1049 -0
  250. package/src/utils/headers.ts +65 -0
  251. package/src/utils/index.ts +65 -0
  252. package/src/utils/user-agents.ts +49 -0
  253. package/tsconfig.json +37 -0
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The main login helper function, orchestrating the login process.
3
+ *
4
+ * @param {object} credentials User credentials or appState.
5
+ * @param {object} globalOptions Global options for the API.
6
+ * @param {function} callback The final callback function.
7
+ * @param {function} setOptionsFunc Reference to the setOptions function from models.
8
+ * @param {function} buildAPIFunc Reference to the buildAPI function from models.
9
+ * @param {object} initialApi The initial API object to extend.
10
+ * @param {function} fbLinkFunc A function to generate Facebook links.
11
+ * @param {string} errorRetrievingMsg The error message for retrieving user ID.
12
+ * @returns {Promise<void>}
13
+ */
14
+ declare function loginHelper(credentials: any, globalOptions: any, callback: any, setOptionsFunc: any, buildAPIFunc: any, initialApi: any, fbLinkFunc: (...args: any[]) => string, errorRetrievingMsg: string): Promise<void>;
15
+ export default loginHelper;
@@ -0,0 +1,2 @@
1
+ declare function setOptions(globalOptions: any, options?: any): Promise<void>;
2
+ export default setOptions;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @namespace api.create
3
+ * @description A collection of functions for creating and managing content on Facebook.
4
+ * @license Ex-it
5
+ */
6
+ export default function (defaultFuncs: any, api: any, ctx: any): {
7
+ /**
8
+ * Creates a new post on Facebook.
9
+ * @param {string|object} options - The post content (string) or options object.
10
+ * @param {string} options.message - The text content of the post.
11
+ * @param {string} [options.privacy="SELF"] - Privacy setting: "EVERYONE", "FRIENDS", or "SELF".
12
+ * @param {Function} [callback] - Optional callback function.
13
+ * @returns {Promise<object>} The server's response containing post details.
14
+ */
15
+ addPost: any;
16
+ /**
17
+ * Deletes a post from Facebook.
18
+ * @param {string} postID - The ID of the post to delete.
19
+ * @param {Function} [callback] - Optional callback function.
20
+ * @returns {Promise<object>} The server's response.
21
+ */
22
+ deletePost: any;
23
+ };
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (moduleObj: any) => void;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (authCode: string, callback: any) => Promise<any>;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (url: any, form: any, customHeader: any, callback: any, notAPI: any) => Promise<any>;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (url: any, form: any, customHeader: any, callback: any, notAPI: any) => Promise<any>;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (url: any, form: any, customHeader: any, callback: any, notAPI: any) => Promise<any>;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @param {Object} defaultFuncs
3
+ * @param {Object} api
4
+ * @param {Object} ctx
5
+ * @returns {function(netData: Array<Object>): Object | null}
6
+ */
7
+ export default function (defaultFuncs: any, api: any, ctx: any): (netData: any) => {
8
+ name: any;
9
+ firstName: any;
10
+ uid: any;
11
+ appID: any;
12
+ dtsgToken: any;
13
+ lsdToken: any;
14
+ dtsgInit: {
15
+ token: any;
16
+ async_get_token: any;
17
+ };
18
+ /**
19
+ * @param {string} key The key of the value to retrieve.
20
+ * @returns {any} The value from the context.
21
+ */
22
+ getCtx: (key: any) => any;
23
+ /**
24
+ * @param {string} key The key of the option to retrieve.
25
+ * @returns {any} The value of the option.
26
+ */
27
+ getOptions: (key: any) => any;
28
+ /**
29
+ * @returns {string | undefined} The current region.
30
+ */
31
+ getRegion: () => any;
32
+ };
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (callback: any) => Promise<any>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @param {Object} defaultFuncs
3
+ * @param {Object} api
4
+ * @param {Object} ctx
5
+ * @returns {function(): Promise<void>}
6
+ */
7
+ export default function (defaultFuncs: any, api: any, ctx: any): () => Promise<void>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A function for editing bot's messages.
3
+ * @param {string} text - The text with which the bot will edit its messages.
4
+ * @param {string} messageID - The message ID of the message the bot will edit.
5
+ * @param {Object} callback - Callback for the function.
6
+ */
7
+ export default function (defaultFuncs: any, api: any, ctx: any): (text: any, messageID: any, callback: any) => void;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (emoji: any, threadID: any, callback: any, initiatorID: any) => any;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (action: any, userIDs: any, threadID: any, callback: any) => Promise<any>;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (newName: any, threadID: any, callback: any, initiatorID: any) => any;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (action: any, userID: any, threadID: any, callback: any) => Promise<any>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @param {Object} defaultFuncs
3
+ * @param {Object} api
4
+ * @param {Object} ctx
5
+ * @returns {function(threadID: string, messageID: string): Promise<void>}
6
+ */
7
+ export default function (defaultFuncs: any, api: any, ctx: any): (threadID: any, messageID: any) => Promise<void>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @param {Object} defaultFuncs
3
+ * @param {Object} api
4
+ * @param {Object} ctx
5
+ */
6
+ export default function (defaultFuncs: any, api: any, ctx: any): (threadID: any, read: any, callback: any) => Promise<any>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @param {Object} defaultFuncs
3
+ * @param {Object} api
4
+ * @param {Object} ctx
5
+ * @returns {function(): Promise<void>}
6
+ */
7
+ export default function (defaultFuncs: any, api: any, ctx: any): () => Promise<void>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @param {Object} defaultFuncs
3
+ * @param {Object} api
4
+ * @param {Object} ctx
5
+ */
6
+ export default function (defaultFuncs: any, api: any, ctx: any): (seen_timestamp: any, callback: any) => Promise<any>;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (nickname: any, threadID: any, participantID: any, callback: any, initiatorID: any) => any;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @ChoruOfficial
3
+ * @description A module for interacting with Facebook Messenger Notes. This is not for creating notes on a user's profile page, but rather the temporary status-like notes in Messenger.
4
+ * @param {Object} defaultFuncs The default functions provided by the API wrapper.
5
+ * @param {Object} api The full API object.
6
+ * @param {Object} ctx The context object containing the user's session state (e.g., userID, jar).
7
+ * @returns {Object} An object containing methods to create, delete, recreate, and check notes.
8
+ */
9
+ export default function (defaultFuncs: any, api: any, ctx: any): {
10
+ create: (text: any, privacy?: string, callback?: any) => void;
11
+ delete: (noteID: any, callback: any) => void;
12
+ recreate: (oldNoteID: any, newText: any, callback: any) => void;
13
+ check: (callback: any) => void;
14
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @module resolvePhotoUrl
3
+ * @description Fetches the direct URL of a Facebook photo using its photo ID.
4
+ * @param {Object} defaultFuncs - An object containing default request functions.
5
+ * @param {Object} api - Facebook API object (unused here but kept for compatibility).
6
+ * @param {Object} ctx - Context object containing cookies (jar) and other session info.
7
+ * @returns {Function} resolvePhotoUrl - A function that takes a photo ID and optional callback, and returns a Promise resolving to the photo URL.
8
+ */
9
+ export default function (defaultFuncs: any, api: any, ctx: any): (photoID: any, callback: any) => Promise<any>;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (msg: any, threadID: any, replyToMessage: any, isSingleUser?: boolean) => Promise<any>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @param {Object} defaultFuncs
3
+ * @param {Object} api
4
+ * @param {Object} ctx
5
+ */
6
+ export default function (defaultFuncs: any, api: any, ctx: any): (sendTyping: any, threadID: any, callback: any) => Promise<void>;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (reaction: any, messageID: any) => Promise<void>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @module shareContact
3
+ * @param {Object} defaultFuncs - The default functions provided by the API.
4
+ * @param {Object} api - The full API object.
5
+ * @param {Object} ctx - The context object.
6
+ * @returns {function(text: string, senderID: string, threadID: string, callback: Function): void} - A function to share a contact.
7
+ */
8
+ export default function (defaultFuncs: any, api: any, ctx: any): (text: any, senderID: any, threadID: any, callback: any) => void;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Sticker API Module
3
+ * Provides access to Facebook's GraphQL-based sticker endpoints.
4
+ * Made by @ChoruOfficial
5
+ */
6
+ export default function (defaultFuncs: any, api: any, ctx: any): {
7
+ /**
8
+ * Search for stickers by keyword
9
+ * @param {string} query - Search term
10
+ * @returns {Promise<Array<Object>>}
11
+ */
12
+ search: (query: any) => Promise<any>;
13
+ /**
14
+ * List user's sticker packs
15
+ * @returns {Promise<Array<Object>>}
16
+ */
17
+ listPacks: () => Promise<any>;
18
+ /**
19
+ * Get all available sticker packs from the store (with pagination)
20
+ * @returns {Promise<Array<Object>>}
21
+ */
22
+ getStorePacks: () => Promise<any[]>;
23
+ /**
24
+ * Merge user's and store sticker packs into one list
25
+ * @returns {Promise<Array<Object>>}
26
+ */
27
+ listAllPacks: () => Promise<any[]>;
28
+ /**
29
+ * Add a sticker pack by ID
30
+ * @param {string} packID - The ID of the sticker pack
31
+ * @returns {Promise<Object>}
32
+ */
33
+ addPack: (packID: any) => Promise<any>;
34
+ /**
35
+ * Get all stickers in a pack
36
+ * @param {string} packID - Sticker pack ID
37
+ * @returns {Promise<Array<Object>>}
38
+ */
39
+ getStickersInPack: (packID: any) => Promise<any>;
40
+ /**
41
+ * Get trending AI-generated stickers
42
+ * @param {{ limit?: number }} options - Options object
43
+ * @returns {Promise<Array<Object>>}
44
+ */
45
+ getAiStickers: ({ limit }?: {
46
+ limit?: number;
47
+ }) => Promise<any>;
48
+ };
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (themeName: any, threadID: any, callback: any, initiatorID: any) => Promise<any>;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (messageID: any) => Promise<any>;
@@ -0,0 +1,2 @@
1
+ declare function parseDelta(defaultFuncs: any, api: any, ctx: any, globalCallback: any, v: any): any;
2
+ export { parseDelta };
@@ -0,0 +1,20 @@
1
+ import { EventEmitter } from 'events';
2
+ export default function (defaultFuncs: any, api: any, ctx: any): (callback: any) => Promise<{
3
+ stop(): void;
4
+ [EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
5
+ addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
6
+ on<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
7
+ once<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
8
+ removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
9
+ off<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
10
+ removeAllListeners(eventName?: string | symbol): /*elided*/ any;
11
+ setMaxListeners(n: number): /*elided*/ any;
12
+ getMaxListeners(): number;
13
+ listeners<K>(eventName: string | symbol): Function[];
14
+ rawListeners<K>(eventName: string | symbol): Function[];
15
+ emit<K>(eventName: string | symbol, ...args: any[]): boolean;
16
+ listenerCount<K>(eventName: string | symbol, listener?: Function): number;
17
+ prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
18
+ prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
19
+ eventNames(): (string | symbol)[];
20
+ }>;
@@ -0,0 +1,21 @@
1
+ import { EventEmitter } from 'events';
2
+ export default function (defaultFuncs: any, api: any, ctx: any): (callback: any) => {
3
+ listener: any;
4
+ stop(): void;
5
+ [EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
6
+ addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
7
+ on<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
8
+ once<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
9
+ removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
10
+ off<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
11
+ removeAllListeners(eventName?: string | symbol): /*elided*/ any;
12
+ setMaxListeners(n: number): /*elided*/ any;
13
+ getMaxListeners(): number;
14
+ listeners<K>(eventName: string | symbol): Function[];
15
+ rawListeners<K>(eventName: string | symbol): Function[];
16
+ emit<K>(eventName: string | symbol, ...args: any[]): boolean;
17
+ listenerCount<K>(eventName: string | symbol, listener?: Function): number;
18
+ prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
19
+ prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
20
+ eventNames(): (string | symbol)[];
21
+ };
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (action: any, threadID: any, messageID: any) => Promise<any>;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): () => any;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (msg: any, threadID: any, replyToMessage: any, callback: any) => Promise<any>;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (reaction: any, messageID: any, threadID: any) => void;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Creates a comment on a Facebook post. Can also reply to an existing comment.
3
+ * @param {string|object} msg - The message to post. Can be a string or an object with `body`, `attachments`, `mentions`, etc.
4
+ * @param {string} postID - The ID of the post to comment on.
5
+ * @param {string} [replyCommentID] - (Optional) The ID of the comment to reply to.
6
+ * @param {function} [callback] - (Optional) A callback function.
7
+ * @returns {Promise<object>} A promise that resolves with the new comment's information.
8
+ */
9
+ export default function (defaultFuncs: any, api: any, ctx: any): (msg: any, postID: any, replyCommentID: any, callback: any) => Promise<any>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Author @YanMaglinte
3
+ * https://github.com/YANDEVA
4
+ * * Example:
5
+ * api.follow("100090794779367", true); // Set true to follow, false if otherwise.
6
+ * jsdocs @ChoruOfficial
7
+ */
8
+ /**
9
+ * @param {object} defaultFuncs The default functions for making API requests.
10
+ * @param {object} api The full API object.
11
+ * @param {object} ctx The context object.
12
+ * @returns {function(senderID: string, boolean: boolean, callback?: (err: any, data?: any) => void): void} The follow function.
13
+ */
14
+ export default function (defaultFuncs: any, api: any, ctx: any): (senderID: any, boolean: any, callback: any) => void;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @ChoruOfficial
3
+ * @description A module for managing friend-related actions like listing friends, handling requests, and getting suggestions.
4
+ * @param {Object} defaultFuncs The default functions provided by the API wrapper.
5
+ * @param {Object} api The full API object.
6
+ * @param {Object} ctx The context object containing the user's session state (e.g., userID, jar, fb_dtsg).
7
+ * @returns {Object} A `friendModule` object with methods for friend interactions.
8
+ */
9
+ export default function (defaultFuncs: any, api: any, ctx: any): {
10
+ /**
11
+ * @namespace api.friend
12
+ * @description A collection of functions for interacting with friends.
13
+ * @license Ex-it
14
+ * @author ChoruOfficial
15
+ */
16
+ /**
17
+ * Fetches the list of incoming friend requests.
18
+ * @async
19
+ * @returns {Promise<Array<Object>>} A promise that resolves to an array of friend request objects.
20
+ * @throws {Error} If the API request fails or returns an error.
21
+ */
22
+ requests: () => Promise<any>;
23
+ /**
24
+ * Accepts a friend request.
25
+ * @async
26
+ * @param {string} identifier The user ID or name of the person whose friend request is to be accepted. If a name is provided, the function will search through pending requests.
27
+ * @returns {Promise<Object>} A promise that resolves to the API response data upon successful acceptance.
28
+ * @throws {Error} If the identifier is missing, the user is not found in requests, or the API call fails.
29
+ */
30
+ accept: (identifier: any) => Promise<any>;
31
+ /**
32
+ * Fetches the friend list for a given user ID.
33
+ * @async
34
+ * @param {string} [userID=ctx.userID] The ID of the user whose friend list to fetch. Defaults to the logged-in user.
35
+ * @returns {Promise<Array<Object>>} A promise that resolves to an array of formatted friend objects.
36
+ * @throws {Error} If the API request fails.
37
+ */
38
+ list: (userID?: any) => Promise<any>;
39
+ /**
40
+ * @namespace api.friend.suggest
41
+ * @description Functions for managing friend suggestions.
42
+ */
43
+ suggest: {
44
+ /**
45
+ * Fetches a list of suggested friends (People You May Know).
46
+ * @async
47
+ * @param {number} [limit=30] The maximum number of suggestions to fetch.
48
+ * @returns {Promise<Array<Object>>} A promise that resolves to an array of suggested friend objects.
49
+ * @throws {Error} If the API request fails.
50
+ */
51
+ list: (limit?: number) => Promise<any>;
52
+ /**
53
+ * Sends a friend request to a user.
54
+ * @async
55
+ * @param {string} userID The ID of the user to send the friend request to.
56
+ * @returns {Promise<Object>} A promise that resolves to the API response data on success.
57
+ * @throws {Error} If the userID is missing or the API request fails.
58
+ */
59
+ request: (userID: any) => Promise<any>;
60
+ };
61
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @namespace api.post
3
+ * @description A collection of functions for creating Facebook posts.
4
+ * @license Ex-it
5
+ */
6
+ export default function (defaultFuncs: any, api: any, ctx: any): {
7
+ create: (options: any, callback: any) => Promise<{
8
+ success: boolean;
9
+ postID: any;
10
+ url: any;
11
+ data: any;
12
+ }>;
13
+ delete: (postID: any, callback: any) => Promise<{
14
+ success: boolean;
15
+ postID: any;
16
+ data: any;
17
+ }>;
18
+ getComments: (postID: any, callback: any) => Promise<any>;
19
+ uploadPhoto: (photoPath: any, callback: any) => Promise<any>;
20
+ };
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (postID: any, callback: any) => Promise<any>;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @namespace api.story
3
+ * @description A collection of functions for interacting with Facebook Stories.
4
+ * @license Ex-it
5
+ * @author Jonell Magallanes, ChoruOfficial
6
+ */
7
+ export default function (defaultFuncs: any, api: any, ctx: any): {
8
+ /**
9
+ * Creates a new text-based story.
10
+ * @param {string} message The text content of the story.
11
+ * @param {string} [fontName="classic"] The font to use (`headline`, `classic`, `fancy`).
12
+ * @param {string} [backgroundName="blue"] The background to use (`orange`, `blue`, `green`, `modern`).
13
+ * @returns {Promise<{success: boolean, storyID: string}>}
14
+ */
15
+ create: (message: any, fontName?: string, backgroundName?: string) => Promise<{
16
+ success: boolean;
17
+ storyID: any;
18
+ }>;
19
+ /**
20
+ * Reacts to a story with a specific emoji.
21
+ * @param {string} storyIdOrUrl The ID or full URL of the story to react to.
22
+ * @param {string} reaction The emoji to react with. Must be one of: ❤️, 👍, 🤗, 😆, 😡, 😢, 😮.
23
+ * @returns {Promise<{success: boolean, result: object}>}
24
+ */
25
+ react: (storyIdOrUrl: any, reaction: any) => Promise<{
26
+ success: boolean;
27
+ result: any;
28
+ }>;
29
+ /**
30
+ * Sends a text message reply to a story.
31
+ * @param {string} storyIdOrUrl The ID or full URL of the story to reply to.
32
+ * @param {string} message The text message to send.
33
+ * @returns {Promise<{success: boolean, result: object}>}
34
+ */
35
+ msg: (storyIdOrUrl: any, message: any) => Promise<{
36
+ success: boolean;
37
+ result: any;
38
+ }>;
39
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @param {Object} defaultFuncs
3
+ * @param {Object} api
4
+ * @param {Object} ctx
5
+ * @returns {function(threadID: string, amount: number, timestamp: number | null): Promise<Array<Object>>}
6
+ */
7
+ export default function (defaultFuncs: any, api: any, ctx: any): (threadID: any, amount: any, timestamp: any) => Promise<any>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @param {Object} defaultFuncs
3
+ * @param {Object} api
4
+ * @param {Object} ctx
5
+ * @returns {function(threadID: string | string[]): Promise<Object>}
6
+ */
7
+ export default function (defaultFuncs: any, api: any, ctx: any): (threadID: any) => Promise<unknown>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @param {Object} defaultFuncs
3
+ * @param {Object} api
4
+ * @param {Object} ctx
5
+ * @returns {function(limit: number, timestamp: number | null, tags: string[]): Promise<Array<Object>>}
6
+ */
7
+ export default function (defaultFuncs: any, api: any, ctx: any): (limit: any, timestamp?: any, tags?: string[]) => Promise<any>;
@@ -0,0 +1 @@
1
+ export default function (defaultFuncs: any, api: any, ctx: any): (id: any, usePayload: any, callback: any, groupFields?: any[]) => Promise<any>;
@@ -0,0 +1,7 @@
1
+ import { CookieJar } from 'tough-cookie';
2
+ export declare function setProxy(proxyUrl?: string): void;
3
+ export declare function cleanGet(url: string): Promise<any>;
4
+ export declare function get(url: string, reqJar: any, qs?: any, options?: any, ctx?: any, customHeader?: any): Promise<any>;
5
+ export declare function post(url: string, reqJar: any, form?: any, options?: any, ctx?: any, customHeader?: any): Promise<any>;
6
+ export declare function postFormData(url: string, reqJar: any, form: any, qs?: any, options?: any, ctx?: any): Promise<any>;
7
+ export declare const getJar: () => CookieJar;
@@ -0,0 +1,4 @@
1
+ export declare function parseAndCheckLogin(ctx: any, http: any, retryCount?: number): (data: any) => Promise<any>;
2
+ export declare function saveCookies(jar: any): (res: any) => any;
3
+ export declare function getAccessFromBusiness(jar: any, Options: any): (res: any) => Promise<[string | null, string | null]>;
4
+ export declare function getAppState(jar: any): any[];
@@ -0,0 +1,24 @@
1
+ declare const NUM_TO_MONTH: string[];
2
+ declare const NUM_TO_DAY: string[];
3
+ declare function getRandom(arr: any): any;
4
+ declare function padZeros(val: any, len?: number): any;
5
+ declare function generateThreadingID(clientID: any): string;
6
+ declare function binaryToDecimal(data: any): string;
7
+ declare function generateOfflineThreadingID(): string;
8
+ declare function presenceEncode(str: any): string;
9
+ declare function presenceDecode(str: any): string;
10
+ declare function generatePresence(userID: any): string;
11
+ declare function generateAccessiblityCookie(): string;
12
+ declare function getGUID(): string;
13
+ declare function getFrom(str: any, startToken: any, endToken: any): any;
14
+ declare function makeParsable(html: any): any;
15
+ declare function arrToForm(form: any): any;
16
+ declare function arrayToObject(arr: any, getKey: any, getValue: any): any;
17
+ declare function getSignatureID(): string;
18
+ declare function generateTimestampRelative(): string;
19
+ declare function getType(obj: any): any;
20
+ declare function logOptions(bool: any): void;
21
+ declare function log(...args: any[]): void;
22
+ declare function error(...args: any[]): void;
23
+ declare function warn(...args: any[]): void;
24
+ export { NUM_TO_DAY, NUM_TO_MONTH, arrToForm, arrayToObject, binaryToDecimal, error, generateAccessiblityCookie, generateOfflineThreadingID, generatePresence, generateThreadingID, generateTimestampRelative, getFrom, getGUID, getRandom, getSignatureID, getType, log, logOptions, makeParsable, padZeros, presenceDecode, presenceEncode, warn, };
@@ -0,0 +1,2 @@
1
+ export declare function _formatAttachment(attachment1: any, attachment2?: any): any;
2
+ export declare function formatAttachment(attachments: any[], attachmentIds?: any[], attachmentMap?: any, shareMap?: any): any[];
@@ -0,0 +1,4 @@
1
+ export declare function getAdminTextMessageType(type: string): string;
2
+ export declare function formatDeltaMessage(m: any): any;
3
+ export declare function formatDeltaEvent(m: any): any;
4
+ export declare function formatDeltaReadReceipt(delta: any): any;
@@ -0,0 +1,17 @@
1
+ import formatID from "./value/formatID";
2
+ import formatDate from "./value/formatDate";
3
+ import formatCookie from "./value/formatCookie";
4
+ import { _formatAttachment, formatAttachment } from "./data/formatAttachment";
5
+ import { formatDeltaMessage, formatDeltaEvent, formatDeltaReadReceipt, getAdminTextMessageType } from "./data/formatDelta";
6
+ export declare function isReadableStream(obj: any): boolean;
7
+ export declare function decodeClientPayload(payload: number[]): any;
8
+ export declare function formatMessage(m: any): any;
9
+ export declare function formatEvent(m: any): any;
10
+ export declare function formatHistoryMessage(m: any): any;
11
+ export declare function formatTyp(event: any): any;
12
+ export declare function formatReadReceipt(event: any): any;
13
+ export declare function formatRead(event: any): any;
14
+ export declare function formatThread(data: any): any;
15
+ export declare function formatPresence(presence: any, userID: string): any;
16
+ export declare function formatProxyPresence(presence: any, userID: string): any | null;
17
+ export { formatID, formatDate, formatCookie, formatAttachment, _formatAttachment, formatDeltaMessage, formatDeltaEvent, formatDeltaReadReceipt, getAdminTextMessageType };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Formats a cookie array into a string for use in a cookie jar.
3
+ * @param {Array<string>} arr - An array containing cookie parts.
4
+ * @param {string} url - The base URL for the cookie domain.
5
+ * @returns {string} The formatted cookie string.
6
+ */
7
+ declare function formatCookie(arr: any, url: any): string;
8
+ export default formatCookie;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Formats a Date object into a GMT string.
3
+ * @param {Date} date The date to format.
4
+ */
5
+ declare function formatDate(date: any): string;
6
+ export default formatDate;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Strips "fbid:" or "id:" prefixes from a Facebook ID string.
3
+ * @param {string} id The ID to format.
4
+ * @returns {string} The formatted ID.
5
+ */
6
+ declare function formatID(id: any): any;
7
+ export default formatID;
@@ -0,0 +1,2 @@
1
+ export declare function getHeaders(url: string, options?: any, ctx?: any, customHeader?: any): Record<string, string>;
2
+ export declare const meta: (prop: string) => RegExp;