bb-fca 2.0.0 → 2.0.1
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.
- package/dist/deltas/apis/posting/friend.js +319 -52
- package/dist/deltas/apis/posting/friend.js.map +1 -1
- package/dist/index.d.ts +41 -2
- package/dist/types/deltas/apis/posting/friend.d.ts +12 -3
- package/package.json +1 -1
- package/src/deltas/apis/posting/friend.ts +518 -158
- package/src/types/index.d.ts +41 -2
|
@@ -14,12 +14,12 @@ export default function (defaultFuncs: any, api: any, ctx: any): {
|
|
|
14
14
|
* @author ChoruOfficial
|
|
15
15
|
*/
|
|
16
16
|
/**
|
|
17
|
-
* Fetches the list of incoming friend requests.
|
|
17
|
+
* Fetches the list of incoming friend requests by parsing the /friends/requests page.
|
|
18
18
|
* @async
|
|
19
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
|
|
20
|
+
* @throws {Error} If the API request fails or HTML parsing fails.
|
|
21
21
|
*/
|
|
22
|
-
requests: () => Promise<any>;
|
|
22
|
+
requests: () => Promise<any[]>;
|
|
23
23
|
/**
|
|
24
24
|
* Accepts a friend request.
|
|
25
25
|
* @async
|
|
@@ -28,6 +28,14 @@ export default function (defaultFuncs: any, api: any, ctx: any): {
|
|
|
28
28
|
* @throws {Error} If the identifier is missing, the user is not found in requests, or the API call fails.
|
|
29
29
|
*/
|
|
30
30
|
accept: (identifier: any) => Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Deletes/rejects a friend request.
|
|
33
|
+
* @async
|
|
34
|
+
* @param {string} identifier The user ID or name of the person whose friend request is to be deleted. If a name is provided, the function will search through pending requests.
|
|
35
|
+
* @returns {Promise<Object>} A promise that resolves to the API response data upon successful deletion.
|
|
36
|
+
* @throws {Error} If the identifier is missing, the user is not found in requests, or the API call fails.
|
|
37
|
+
*/
|
|
38
|
+
delete: (identifier: any) => Promise<any>;
|
|
31
39
|
/**
|
|
32
40
|
* Fetches the friend list for a given user ID.
|
|
33
41
|
* @async
|
|
@@ -40,6 +48,7 @@ export default function (defaultFuncs: any, api: any, ctx: any): {
|
|
|
40
48
|
* @namespace api.friend.suggest
|
|
41
49
|
* @description Functions for managing friend suggestions.
|
|
42
50
|
*/
|
|
51
|
+
getCurrentFriends: (callback?: any) => Promise<any>;
|
|
43
52
|
suggest: {
|
|
44
53
|
/**
|
|
45
54
|
* Fetches a list of suggested friends (People You May Know).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bb-fca",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "BB-FCA is a powerful and user-friendly Facebook Chat API wrapper for Node.js, designed to simplify the process of creating chatbots and automating interactions on Facebook Messenger. With BB-FCA, developers can easily send messages, manage conversations, and interact with the Facebook Messenger platform using a simple and intuitive API.",
|
|
5
5
|
"main": "dist/core/client.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|