@metamask-previews/social-controllers 0.0.0-preview-10a8a74 → 0.0.0-preview-bfb4d9f5a
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/CHANGELOG.md +8 -1
- package/dist/SocialController-method-action-types.cjs +7 -0
- package/dist/SocialController-method-action-types.cjs.map +1 -0
- package/dist/SocialController-method-action-types.d.cts +56 -0
- package/dist/SocialController-method-action-types.d.cts.map +1 -0
- package/dist/SocialController-method-action-types.d.mts +56 -0
- package/dist/SocialController-method-action-types.d.mts.map +1 -0
- package/dist/SocialController-method-action-types.mjs +6 -0
- package/dist/SocialController-method-action-types.mjs.map +1 -0
- package/dist/SocialController.cjs +127 -0
- package/dist/SocialController.cjs.map +1 -0
- package/dist/SocialController.d.cts +71 -0
- package/dist/SocialController.d.cts.map +1 -0
- package/dist/SocialController.d.mts +71 -0
- package/dist/SocialController.d.mts.map +1 -0
- package/dist/SocialController.mjs +122 -0
- package/dist/SocialController.mjs.map +1 -0
- package/dist/SocialService-method-action-types.cjs +7 -0
- package/dist/SocialService-method-action-types.cjs.map +1 -0
- package/dist/SocialService-method-action-types.d.cts +125 -0
- package/dist/SocialService-method-action-types.d.cts.map +1 -0
- package/dist/SocialService-method-action-types.d.mts +125 -0
- package/dist/SocialService-method-action-types.d.mts.map +1 -0
- package/dist/SocialService-method-action-types.mjs +6 -0
- package/dist/SocialService-method-action-types.mjs.map +1 -0
- package/dist/SocialService.cjs +430 -0
- package/dist/SocialService.cjs.map +1 -0
- package/dist/SocialService.d.cts +113 -0
- package/dist/SocialService.d.cts.map +1 -0
- package/dist/SocialService.d.mts +113 -0
- package/dist/SocialService.d.mts.map +1 -0
- package/dist/SocialService.mjs +426 -0
- package/dist/SocialService.mjs.map +1 -0
- package/dist/index.cjs +9 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -7
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +8 -7
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -9
- package/dist/index.mjs.map +1 -1
- package/dist/social-constants.cjs +24 -0
- package/dist/social-constants.cjs.map +1 -0
- package/dist/social-constants.d.cts +21 -0
- package/dist/social-constants.d.cts.map +1 -0
- package/dist/social-constants.d.mts +21 -0
- package/dist/social-constants.d.mts.map +1 -0
- package/dist/social-constants.mjs +21 -0
- package/dist/social-constants.mjs.map +1 -0
- package/dist/social-types.cjs +6 -0
- package/dist/social-types.cjs.map +1 -0
- package/dist/social-types.d.cts +206 -0
- package/dist/social-types.d.cts.map +1 -0
- package/dist/social-types.d.mts +206 -0
- package/dist/social-types.d.mts.map +1 -0
- package/dist/social-types.mjs +5 -0
- package/dist/social-types.mjs.map +1 -0
- package/package.json +8 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto generated.
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
*/
|
|
5
|
+
import type { SocialService } from "./SocialService.cjs";
|
|
6
|
+
/**
|
|
7
|
+
* Fetches the leaderboard of top traders.
|
|
8
|
+
*
|
|
9
|
+
* Calls `GET ${baseUrl}/leaderboard`.
|
|
10
|
+
*
|
|
11
|
+
* @param options - Optional query parameters for sorting, chain filtering, and limit.
|
|
12
|
+
* @returns The leaderboard response with ranked traders.
|
|
13
|
+
*/
|
|
14
|
+
export type SocialServiceFetchLeaderboardAction = {
|
|
15
|
+
type: `SocialService:fetchLeaderboard`;
|
|
16
|
+
handler: SocialService['fetchLeaderboard'];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Fetches a trader's profile by address or profile ID.
|
|
20
|
+
*
|
|
21
|
+
* Calls `GET ${baseUrl}/traders/${addressOrId}/profile`.
|
|
22
|
+
*
|
|
23
|
+
* @param options - Options bag.
|
|
24
|
+
* @param options.addressOrId - Wallet address or Clicker profile ID.
|
|
25
|
+
* @returns The trader profile response.
|
|
26
|
+
*/
|
|
27
|
+
export type SocialServiceFetchTraderProfileAction = {
|
|
28
|
+
type: `SocialService:fetchTraderProfile`;
|
|
29
|
+
handler: SocialService['fetchTraderProfile'];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Fetches a trader's open positions.
|
|
33
|
+
*
|
|
34
|
+
* Calls `GET ${baseUrl}/traders/${addressOrId}/positions/open`.
|
|
35
|
+
*
|
|
36
|
+
* @param options - Options bag.
|
|
37
|
+
* @param options.addressOrId - Wallet address or Clicker profile ID.
|
|
38
|
+
* @param options.chain - Filter by chain.
|
|
39
|
+
* @param options.sort - Sort by 'value' or 'latest'.
|
|
40
|
+
* @param options.limit - Number of results per page.
|
|
41
|
+
* @param options.page - Page number (1-based).
|
|
42
|
+
* @returns The positions response.
|
|
43
|
+
*/
|
|
44
|
+
export type SocialServiceFetchOpenPositionsAction = {
|
|
45
|
+
type: `SocialService:fetchOpenPositions`;
|
|
46
|
+
handler: SocialService['fetchOpenPositions'];
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Fetches a trader's closed positions.
|
|
50
|
+
*
|
|
51
|
+
* Calls `GET ${baseUrl}/traders/${addressOrId}/positions/closed`.
|
|
52
|
+
*
|
|
53
|
+
* @param options - Options bag.
|
|
54
|
+
* @param options.addressOrId - Wallet address or Clicker profile ID.
|
|
55
|
+
* @param options.chain - Filter by chain.
|
|
56
|
+
* @param options.sort - Sort by 'value' or 'latest'.
|
|
57
|
+
* @param options.limit - Number of results per page.
|
|
58
|
+
* @param options.page - Page number (1-based).
|
|
59
|
+
* @returns The positions response.
|
|
60
|
+
*/
|
|
61
|
+
export type SocialServiceFetchClosedPositionsAction = {
|
|
62
|
+
type: `SocialService:fetchClosedPositions`;
|
|
63
|
+
handler: SocialService['fetchClosedPositions'];
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Fetches a trader's MetaMask followers.
|
|
67
|
+
*
|
|
68
|
+
* Calls `GET ${baseUrl}/traders/${addressOrId}/followers`.
|
|
69
|
+
*
|
|
70
|
+
* @param options - Options bag.
|
|
71
|
+
* @param options.addressOrId - Wallet address or Clicker profile ID.
|
|
72
|
+
* @returns The followers response.
|
|
73
|
+
*/
|
|
74
|
+
export type SocialServiceFetchFollowersAction = {
|
|
75
|
+
type: `SocialService:fetchFollowers`;
|
|
76
|
+
handler: SocialService['fetchFollowers'];
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Fetches the list of traders a user is following.
|
|
80
|
+
*
|
|
81
|
+
* Calls `GET ${baseUrl}/users/${addressOrUid}/following`.
|
|
82
|
+
*
|
|
83
|
+
* @param options - Options bag.
|
|
84
|
+
* @param options.addressOrUid - Wallet address or Clicker profile ID.
|
|
85
|
+
* @returns The following response.
|
|
86
|
+
*/
|
|
87
|
+
export type SocialServiceFetchFollowingAction = {
|
|
88
|
+
type: `SocialService:fetchFollowing`;
|
|
89
|
+
handler: SocialService['fetchFollowing'];
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Follows one or more traders.
|
|
93
|
+
*
|
|
94
|
+
* Calls `PUT ${baseUrl}/users/${addressOrUid}/follows`.
|
|
95
|
+
*
|
|
96
|
+
* @param options - Options bag.
|
|
97
|
+
* @param options.addressOrUid - Wallet address or Clicker profile ID of the user.
|
|
98
|
+
* @param options.targets - Array of wallet addresses or profile IDs to follow.
|
|
99
|
+
* @returns The follow response with confirmed follows.
|
|
100
|
+
*/
|
|
101
|
+
export type SocialServiceFollowAction = {
|
|
102
|
+
type: `SocialService:follow`;
|
|
103
|
+
handler: SocialService['follow'];
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Unfollows one or more traders.
|
|
107
|
+
*
|
|
108
|
+
* Calls `DELETE ${baseUrl}/users/${addressOrUid}/follows?targets=...`.
|
|
109
|
+
* Targets are sent as query params because Fastify does not parse
|
|
110
|
+
* request bodies on DELETE requests per RFC 9110.
|
|
111
|
+
*
|
|
112
|
+
* @param options - Options bag.
|
|
113
|
+
* @param options.addressOrUid - Wallet address or Clicker profile ID of the user.
|
|
114
|
+
* @param options.targets - Array of wallet addresses or profile IDs to unfollow.
|
|
115
|
+
* @returns The unfollow response with confirmed unfollows.
|
|
116
|
+
*/
|
|
117
|
+
export type SocialServiceUnfollowAction = {
|
|
118
|
+
type: `SocialService:unfollow`;
|
|
119
|
+
handler: SocialService['unfollow'];
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Union of all SocialService action types.
|
|
123
|
+
*/
|
|
124
|
+
export type SocialServiceMethodActions = SocialServiceFetchLeaderboardAction | SocialServiceFetchTraderProfileAction | SocialServiceFetchOpenPositionsAction | SocialServiceFetchClosedPositionsAction | SocialServiceFetchFollowersAction | SocialServiceFetchFollowingAction | SocialServiceFollowAction | SocialServiceUnfollowAction;
|
|
125
|
+
//# sourceMappingURL=SocialService-method-action-types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocialService-method-action-types.d.cts","sourceRoot":"","sources":["../src/SocialService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAwB;AAErD;;;;;;;GAOG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uCAAuC,GAAG;IACpD,IAAI,EAAE,oCAAoC,CAAC;IAC3C,OAAO,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;CAChD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;CAClC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAClC,mCAAmC,GACnC,qCAAqC,GACrC,qCAAqC,GACrC,uCAAuC,GACvC,iCAAiC,GACjC,iCAAiC,GACjC,yBAAyB,GACzB,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto generated.
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
*/
|
|
5
|
+
import type { SocialService } from "./SocialService.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Fetches the leaderboard of top traders.
|
|
8
|
+
*
|
|
9
|
+
* Calls `GET ${baseUrl}/leaderboard`.
|
|
10
|
+
*
|
|
11
|
+
* @param options - Optional query parameters for sorting, chain filtering, and limit.
|
|
12
|
+
* @returns The leaderboard response with ranked traders.
|
|
13
|
+
*/
|
|
14
|
+
export type SocialServiceFetchLeaderboardAction = {
|
|
15
|
+
type: `SocialService:fetchLeaderboard`;
|
|
16
|
+
handler: SocialService['fetchLeaderboard'];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Fetches a trader's profile by address or profile ID.
|
|
20
|
+
*
|
|
21
|
+
* Calls `GET ${baseUrl}/traders/${addressOrId}/profile`.
|
|
22
|
+
*
|
|
23
|
+
* @param options - Options bag.
|
|
24
|
+
* @param options.addressOrId - Wallet address or Clicker profile ID.
|
|
25
|
+
* @returns The trader profile response.
|
|
26
|
+
*/
|
|
27
|
+
export type SocialServiceFetchTraderProfileAction = {
|
|
28
|
+
type: `SocialService:fetchTraderProfile`;
|
|
29
|
+
handler: SocialService['fetchTraderProfile'];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Fetches a trader's open positions.
|
|
33
|
+
*
|
|
34
|
+
* Calls `GET ${baseUrl}/traders/${addressOrId}/positions/open`.
|
|
35
|
+
*
|
|
36
|
+
* @param options - Options bag.
|
|
37
|
+
* @param options.addressOrId - Wallet address or Clicker profile ID.
|
|
38
|
+
* @param options.chain - Filter by chain.
|
|
39
|
+
* @param options.sort - Sort by 'value' or 'latest'.
|
|
40
|
+
* @param options.limit - Number of results per page.
|
|
41
|
+
* @param options.page - Page number (1-based).
|
|
42
|
+
* @returns The positions response.
|
|
43
|
+
*/
|
|
44
|
+
export type SocialServiceFetchOpenPositionsAction = {
|
|
45
|
+
type: `SocialService:fetchOpenPositions`;
|
|
46
|
+
handler: SocialService['fetchOpenPositions'];
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Fetches a trader's closed positions.
|
|
50
|
+
*
|
|
51
|
+
* Calls `GET ${baseUrl}/traders/${addressOrId}/positions/closed`.
|
|
52
|
+
*
|
|
53
|
+
* @param options - Options bag.
|
|
54
|
+
* @param options.addressOrId - Wallet address or Clicker profile ID.
|
|
55
|
+
* @param options.chain - Filter by chain.
|
|
56
|
+
* @param options.sort - Sort by 'value' or 'latest'.
|
|
57
|
+
* @param options.limit - Number of results per page.
|
|
58
|
+
* @param options.page - Page number (1-based).
|
|
59
|
+
* @returns The positions response.
|
|
60
|
+
*/
|
|
61
|
+
export type SocialServiceFetchClosedPositionsAction = {
|
|
62
|
+
type: `SocialService:fetchClosedPositions`;
|
|
63
|
+
handler: SocialService['fetchClosedPositions'];
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Fetches a trader's MetaMask followers.
|
|
67
|
+
*
|
|
68
|
+
* Calls `GET ${baseUrl}/traders/${addressOrId}/followers`.
|
|
69
|
+
*
|
|
70
|
+
* @param options - Options bag.
|
|
71
|
+
* @param options.addressOrId - Wallet address or Clicker profile ID.
|
|
72
|
+
* @returns The followers response.
|
|
73
|
+
*/
|
|
74
|
+
export type SocialServiceFetchFollowersAction = {
|
|
75
|
+
type: `SocialService:fetchFollowers`;
|
|
76
|
+
handler: SocialService['fetchFollowers'];
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Fetches the list of traders a user is following.
|
|
80
|
+
*
|
|
81
|
+
* Calls `GET ${baseUrl}/users/${addressOrUid}/following`.
|
|
82
|
+
*
|
|
83
|
+
* @param options - Options bag.
|
|
84
|
+
* @param options.addressOrUid - Wallet address or Clicker profile ID.
|
|
85
|
+
* @returns The following response.
|
|
86
|
+
*/
|
|
87
|
+
export type SocialServiceFetchFollowingAction = {
|
|
88
|
+
type: `SocialService:fetchFollowing`;
|
|
89
|
+
handler: SocialService['fetchFollowing'];
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Follows one or more traders.
|
|
93
|
+
*
|
|
94
|
+
* Calls `PUT ${baseUrl}/users/${addressOrUid}/follows`.
|
|
95
|
+
*
|
|
96
|
+
* @param options - Options bag.
|
|
97
|
+
* @param options.addressOrUid - Wallet address or Clicker profile ID of the user.
|
|
98
|
+
* @param options.targets - Array of wallet addresses or profile IDs to follow.
|
|
99
|
+
* @returns The follow response with confirmed follows.
|
|
100
|
+
*/
|
|
101
|
+
export type SocialServiceFollowAction = {
|
|
102
|
+
type: `SocialService:follow`;
|
|
103
|
+
handler: SocialService['follow'];
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Unfollows one or more traders.
|
|
107
|
+
*
|
|
108
|
+
* Calls `DELETE ${baseUrl}/users/${addressOrUid}/follows?targets=...`.
|
|
109
|
+
* Targets are sent as query params because Fastify does not parse
|
|
110
|
+
* request bodies on DELETE requests per RFC 9110.
|
|
111
|
+
*
|
|
112
|
+
* @param options - Options bag.
|
|
113
|
+
* @param options.addressOrUid - Wallet address or Clicker profile ID of the user.
|
|
114
|
+
* @param options.targets - Array of wallet addresses or profile IDs to unfollow.
|
|
115
|
+
* @returns The unfollow response with confirmed unfollows.
|
|
116
|
+
*/
|
|
117
|
+
export type SocialServiceUnfollowAction = {
|
|
118
|
+
type: `SocialService:unfollow`;
|
|
119
|
+
handler: SocialService['unfollow'];
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Union of all SocialService action types.
|
|
123
|
+
*/
|
|
124
|
+
export type SocialServiceMethodActions = SocialServiceFetchLeaderboardAction | SocialServiceFetchTraderProfileAction | SocialServiceFetchOpenPositionsAction | SocialServiceFetchClosedPositionsAction | SocialServiceFetchFollowersAction | SocialServiceFetchFollowingAction | SocialServiceFollowAction | SocialServiceUnfollowAction;
|
|
125
|
+
//# sourceMappingURL=SocialService-method-action-types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocialService-method-action-types.d.mts","sourceRoot":"","sources":["../src/SocialService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAwB;AAErD;;;;;;;GAOG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uCAAuC,GAAG;IACpD,IAAI,EAAE,oCAAoC,CAAC;IAC3C,OAAO,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;CAChD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;CAClC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAClC,mCAAmC,GACnC,qCAAqC,GACrC,qCAAqC,GACrC,uCAAuC,GACvC,iCAAiC,GACjC,iCAAiC,GACjC,yBAAyB,GACzB,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocialService-method-action-types.mjs","sourceRoot":"","sources":["../src/SocialService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { SocialService } from './SocialService';\n\n/**\n * Fetches the leaderboard of top traders.\n *\n * Calls `GET ${baseUrl}/leaderboard`.\n *\n * @param options - Optional query parameters for sorting, chain filtering, and limit.\n * @returns The leaderboard response with ranked traders.\n */\nexport type SocialServiceFetchLeaderboardAction = {\n type: `SocialService:fetchLeaderboard`;\n handler: SocialService['fetchLeaderboard'];\n};\n\n/**\n * Fetches a trader's profile by address or profile ID.\n *\n * Calls `GET ${baseUrl}/traders/${addressOrId}/profile`.\n *\n * @param options - Options bag.\n * @param options.addressOrId - Wallet address or Clicker profile ID.\n * @returns The trader profile response.\n */\nexport type SocialServiceFetchTraderProfileAction = {\n type: `SocialService:fetchTraderProfile`;\n handler: SocialService['fetchTraderProfile'];\n};\n\n/**\n * Fetches a trader's open positions.\n *\n * Calls `GET ${baseUrl}/traders/${addressOrId}/positions/open`.\n *\n * @param options - Options bag.\n * @param options.addressOrId - Wallet address or Clicker profile ID.\n * @param options.chain - Filter by chain.\n * @param options.sort - Sort by 'value' or 'latest'.\n * @param options.limit - Number of results per page.\n * @param options.page - Page number (1-based).\n * @returns The positions response.\n */\nexport type SocialServiceFetchOpenPositionsAction = {\n type: `SocialService:fetchOpenPositions`;\n handler: SocialService['fetchOpenPositions'];\n};\n\n/**\n * Fetches a trader's closed positions.\n *\n * Calls `GET ${baseUrl}/traders/${addressOrId}/positions/closed`.\n *\n * @param options - Options bag.\n * @param options.addressOrId - Wallet address or Clicker profile ID.\n * @param options.chain - Filter by chain.\n * @param options.sort - Sort by 'value' or 'latest'.\n * @param options.limit - Number of results per page.\n * @param options.page - Page number (1-based).\n * @returns The positions response.\n */\nexport type SocialServiceFetchClosedPositionsAction = {\n type: `SocialService:fetchClosedPositions`;\n handler: SocialService['fetchClosedPositions'];\n};\n\n/**\n * Fetches a trader's MetaMask followers.\n *\n * Calls `GET ${baseUrl}/traders/${addressOrId}/followers`.\n *\n * @param options - Options bag.\n * @param options.addressOrId - Wallet address or Clicker profile ID.\n * @returns The followers response.\n */\nexport type SocialServiceFetchFollowersAction = {\n type: `SocialService:fetchFollowers`;\n handler: SocialService['fetchFollowers'];\n};\n\n/**\n * Fetches the list of traders a user is following.\n *\n * Calls `GET ${baseUrl}/users/${addressOrUid}/following`.\n *\n * @param options - Options bag.\n * @param options.addressOrUid - Wallet address or Clicker profile ID.\n * @returns The following response.\n */\nexport type SocialServiceFetchFollowingAction = {\n type: `SocialService:fetchFollowing`;\n handler: SocialService['fetchFollowing'];\n};\n\n/**\n * Follows one or more traders.\n *\n * Calls `PUT ${baseUrl}/users/${addressOrUid}/follows`.\n *\n * @param options - Options bag.\n * @param options.addressOrUid - Wallet address or Clicker profile ID of the user.\n * @param options.targets - Array of wallet addresses or profile IDs to follow.\n * @returns The follow response with confirmed follows.\n */\nexport type SocialServiceFollowAction = {\n type: `SocialService:follow`;\n handler: SocialService['follow'];\n};\n\n/**\n * Unfollows one or more traders.\n *\n * Calls `DELETE ${baseUrl}/users/${addressOrUid}/follows?targets=...`.\n * Targets are sent as query params because Fastify does not parse\n * request bodies on DELETE requests per RFC 9110.\n *\n * @param options - Options bag.\n * @param options.addressOrUid - Wallet address or Clicker profile ID of the user.\n * @param options.targets - Array of wallet addresses or profile IDs to unfollow.\n * @returns The unfollow response with confirmed unfollows.\n */\nexport type SocialServiceUnfollowAction = {\n type: `SocialService:unfollow`;\n handler: SocialService['unfollow'];\n};\n\n/**\n * Union of all SocialService action types.\n */\nexport type SocialServiceMethodActions =\n | SocialServiceFetchLeaderboardAction\n | SocialServiceFetchTraderProfileAction\n | SocialServiceFetchOpenPositionsAction\n | SocialServiceFetchClosedPositionsAction\n | SocialServiceFetchFollowersAction\n | SocialServiceFetchFollowingAction\n | SocialServiceFollowAction\n | SocialServiceUnfollowAction;\n"]}
|