@metamask-previews/social-controllers 2.8.0-preview-4f4c98e → 2.8.0-preview-eb263b0ee

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 (74) hide show
  1. package/CHANGELOG.md +0 -1
  2. package/dist/SocialController-method-action-types.cjs +7 -0
  3. package/dist/SocialController-method-action-types.cjs.map +1 -0
  4. package/dist/{SocialController-method-action-types.d.ts → SocialController-method-action-types.d.cts} +2 -2
  5. package/dist/SocialController-method-action-types.d.cts.map +1 -0
  6. package/dist/SocialController-method-action-types.d.mts +71 -0
  7. package/dist/SocialController-method-action-types.d.mts.map +1 -0
  8. package/dist/{SocialController-method-action-types.js → SocialController-method-action-types.mjs} +1 -1
  9. package/dist/SocialController-method-action-types.mjs.map +1 -0
  10. package/dist/SocialController.cjs +160 -0
  11. package/dist/SocialController.cjs.map +1 -0
  12. package/dist/{SocialController.d.ts → SocialController.d.cts} +8 -8
  13. package/dist/SocialController.d.cts.map +1 -0
  14. package/dist/SocialController.d.mts +80 -0
  15. package/dist/SocialController.d.mts.map +1 -0
  16. package/dist/{SocialController.js → SocialController.mjs} +3 -3
  17. package/dist/SocialController.mjs.map +1 -0
  18. package/dist/SocialService-method-action-types.cjs +7 -0
  19. package/dist/SocialService-method-action-types.cjs.map +1 -0
  20. package/dist/{SocialService-method-action-types.d.ts → SocialService-method-action-types.d.cts} +2 -2
  21. package/dist/SocialService-method-action-types.d.cts.map +1 -0
  22. package/dist/SocialService-method-action-types.d.mts +194 -0
  23. package/dist/SocialService-method-action-types.d.mts.map +1 -0
  24. package/dist/{SocialService-method-action-types.js → SocialService-method-action-types.mjs} +1 -1
  25. package/dist/SocialService-method-action-types.mjs.map +1 -0
  26. package/dist/SocialService.cjs +635 -0
  27. package/dist/SocialService.cjs.map +1 -0
  28. package/dist/{SocialService.d.ts → SocialService.d.cts} +9 -9
  29. package/dist/SocialService.d.cts.map +1 -0
  30. package/dist/SocialService.d.mts +171 -0
  31. package/dist/SocialService.d.mts.map +1 -0
  32. package/dist/{SocialService.js → SocialService.mjs} +6 -6
  33. package/dist/SocialService.mjs.map +1 -0
  34. package/dist/index.cjs +14 -0
  35. package/dist/index.cjs.map +1 -0
  36. package/dist/{index.d.ts → index.d.cts} +10 -10
  37. package/dist/index.d.cts.map +1 -0
  38. package/dist/index.d.mts +10 -0
  39. package/dist/index.d.mts.map +1 -0
  40. package/dist/index.mjs +5 -0
  41. package/dist/index.mjs.map +1 -0
  42. package/dist/social-constants.cjs +31 -0
  43. package/dist/social-constants.cjs.map +1 -0
  44. package/dist/social-constants.d.cts +28 -0
  45. package/dist/social-constants.d.cts.map +1 -0
  46. package/dist/social-constants.d.mts +28 -0
  47. package/dist/social-constants.d.mts.map +1 -0
  48. package/dist/{social-constants.js → social-constants.mjs} +1 -1
  49. package/dist/social-constants.mjs.map +1 -0
  50. package/dist/social-types.cjs +27 -0
  51. package/dist/social-types.cjs.map +1 -0
  52. package/dist/{social-types.d.ts → social-types.d.cts} +14 -14
  53. package/dist/social-types.d.cts.map +1 -0
  54. package/dist/social-types.d.mts +343 -0
  55. package/dist/social-types.d.mts.map +1 -0
  56. package/dist/{social-types.js → social-types.mjs} +2 -2
  57. package/dist/social-types.mjs.map +1 -0
  58. package/package.json +16 -12
  59. package/dist/SocialController-method-action-types.d.ts.map +0 -1
  60. package/dist/SocialController-method-action-types.js.map +0 -1
  61. package/dist/SocialController.d.ts.map +0 -1
  62. package/dist/SocialController.js.map +0 -1
  63. package/dist/SocialService-method-action-types.d.ts.map +0 -1
  64. package/dist/SocialService-method-action-types.js.map +0 -1
  65. package/dist/SocialService.d.ts.map +0 -1
  66. package/dist/SocialService.js.map +0 -1
  67. package/dist/index.d.ts.map +0 -1
  68. package/dist/index.js +0 -5
  69. package/dist/index.js.map +0 -1
  70. package/dist/social-constants.d.ts +0 -28
  71. package/dist/social-constants.d.ts.map +0 -1
  72. package/dist/social-constants.js.map +0 -1
  73. package/dist/social-types.d.ts.map +0 -1
  74. package/dist/social-types.js.map +0 -1
@@ -0,0 +1,194 @@
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 a single position by its unique ID.
80
+ *
81
+ * Calls `GET ${baseUrl}/traders/position/${positionId}`.
82
+ *
83
+ * @param options - Options bag.
84
+ * @param options.positionId - Unique position ID (UUID).
85
+ * @returns The position.
86
+ */
87
+ export type SocialServiceFetchPositionByIdAction = {
88
+ type: `SocialService:fetchPositionById`;
89
+ handler: SocialService['fetchPositionById'];
90
+ };
91
+ /**
92
+ * Fetches a page of the trader-activity feed.
93
+ *
94
+ * Calls `GET ${baseUrl}/feed`. For the `following` scope the current user is
95
+ * identified server-side from the JWT sub claim carried in the Authorization
96
+ * header; the `leaderboard` scope is generic and shared by all users.
97
+ *
98
+ * Cursor pagination supports infinite scroll: pass `pagination.olderCursor`
99
+ * from a prior response back as `olderThan` to load older items, and
100
+ * `pagination.newerCursor` as `newerThan` to fetch newer items.
101
+ *
102
+ * @param options - Options bag.
103
+ * @param options.scope - `following` (default) or `leaderboard`.
104
+ * @param options.chains - Filter by one or more chains.
105
+ * @param options.limit - Number of results per page.
106
+ * @param options.olderThan - Cursor for older items (scroll down).
107
+ * @param options.newerThan - Cursor for newer items (refresh).
108
+ * @returns The feed response with items and pagination cursors.
109
+ */
110
+ export type SocialServiceFetchFeedAction = {
111
+ type: `SocialService:fetchFeed`;
112
+ handler: SocialService['fetchFeed'];
113
+ };
114
+ /**
115
+ * Fetches the list of traders the current user is following.
116
+ *
117
+ * Calls `GET ${baseUrl}/users/me/following`. The caller is identified
118
+ * server-side from the JWT sub claim carried in the Authorization header.
119
+ *
120
+ * @returns The following response.
121
+ */
122
+ export type SocialServiceFetchFollowingAction = {
123
+ type: `SocialService:fetchFollowing`;
124
+ handler: SocialService['fetchFollowing'];
125
+ };
126
+ /**
127
+ * Follows one or more traders on behalf of the current user.
128
+ *
129
+ * Calls `PUT ${baseUrl}/users/me/follows`. The caller is identified
130
+ * server-side from the JWT sub claim carried in the Authorization header.
131
+ *
132
+ * @param options - Options bag.
133
+ * @param options.targets - Array of wallet addresses or profile IDs to follow.
134
+ * @returns The follow response with confirmed follows.
135
+ */
136
+ export type SocialServiceFollowAction = {
137
+ type: `SocialService:follow`;
138
+ handler: SocialService['follow'];
139
+ };
140
+ /**
141
+ * Unfollows one or more traders on behalf of the current user.
142
+ *
143
+ * Calls `DELETE ${baseUrl}/users/me/follows?targets=...`. Targets are sent
144
+ * as query params because Fastify does not parse request bodies on DELETE
145
+ * requests per RFC 9110. The caller is identified server-side from the JWT
146
+ * sub claim carried in the Authorization header.
147
+ *
148
+ * @param options - Options bag.
149
+ * @param options.targets - Array of wallet addresses or profile IDs to unfollow.
150
+ * @returns The unfollow response with confirmed unfollows.
151
+ */
152
+ export type SocialServiceUnfollowAction = {
153
+ type: `SocialService:unfollow`;
154
+ handler: SocialService['unfollow'];
155
+ };
156
+ /**
157
+ * Opts the current user out of the PnL leaderboard.
158
+ */
159
+ export type SocialServiceOptOutOfLeaderboardAction = {
160
+ type: `SocialService:optOutOfLeaderboard`;
161
+ handler: SocialService['optOutOfLeaderboard'];
162
+ };
163
+ /**
164
+ * Opts the current user back into the PnL leaderboard.
165
+ */
166
+ export type SocialServiceOptInToLeaderboardAction = {
167
+ type: `SocialService:optInToLeaderboard`;
168
+ handler: SocialService['optInToLeaderboard'];
169
+ };
170
+ /**
171
+ * Asks the social-api to refresh its cached copy of the current user's
172
+ * notification preferences.
173
+ *
174
+ * Calls `POST ${baseUrl}/notifications/preferences/cache-refresh`. The caller
175
+ * is identified server-side from the JWT sub claim carried in the
176
+ * Authorization header, so it can only ever refresh its own entry.
177
+ *
178
+ * The client calls this immediately after writing a preference change to
179
+ * Authenticated User Storage (AUS), which is the source of truth. The social
180
+ * api re-reads from AUS and repopulates its cache so the change is honoured
181
+ * near-instantly rather than after the cache TTL lapses. It is a pure
182
+ * optimisation on top of that bounded TTL: the write has already succeeded by
183
+ * the time this runs, so callers should treat it as best-effort and must not
184
+ * roll back the AUS write if it fails.
185
+ */
186
+ export type SocialServiceRefreshNotificationPreferencesCacheAction = {
187
+ type: `SocialService:refreshNotificationPreferencesCache`;
188
+ handler: SocialService['refreshNotificationPreferencesCache'];
189
+ };
190
+ /**
191
+ * Union of all SocialService action types.
192
+ */
193
+ export type SocialServiceMethodActions = SocialServiceFetchLeaderboardAction | SocialServiceFetchTraderProfileAction | SocialServiceFetchOpenPositionsAction | SocialServiceFetchClosedPositionsAction | SocialServiceFetchFollowersAction | SocialServiceFetchPositionByIdAction | SocialServiceFetchFeedAction | SocialServiceFetchFollowingAction | SocialServiceFollowAction | SocialServiceUnfollowAction | SocialServiceOptOutOfLeaderboardAction | SocialServiceOptInToLeaderboardAction | SocialServiceRefreshNotificationPreferencesCacheAction;
194
+ //# 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,4BAA2B;AAExD;;;;;;;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,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,yBAAyB,CAAC;IAChC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CACrC,CAAC;AAEF;;;;;;;GAOG;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,sCAAsC,GAAG;IACnD,IAAI,EAAE,mCAAmC,CAAC;IAC1C,OAAO,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAC/C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,sDAAsD,GAAG;IACnE,IAAI,EAAE,mDAAmD,CAAC;IAC1D,OAAO,EAAE,aAAa,CAAC,qCAAqC,CAAC,CAAC;CAC/D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAClC,mCAAmC,GACnC,qCAAqC,GACrC,qCAAqC,GACrC,uCAAuC,GACvC,iCAAiC,GACjC,oCAAoC,GACpC,4BAA4B,GAC5B,iCAAiC,GACjC,yBAAyB,GACzB,2BAA2B,GAC3B,sCAAsC,GACtC,qCAAqC,GACrC,sDAAsD,CAAC"}
@@ -3,4 +3,4 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
  export {};
6
- //# sourceMappingURL=SocialService-method-action-types.js.map
6
+ //# sourceMappingURL=SocialService-method-action-types.mjs.map
@@ -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.js';\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 a single position by its unique ID.\n *\n * Calls `GET ${baseUrl}/traders/position/${positionId}`.\n *\n * @param options - Options bag.\n * @param options.positionId - Unique position ID (UUID).\n * @returns The position.\n */\nexport type SocialServiceFetchPositionByIdAction = {\n type: `SocialService:fetchPositionById`;\n handler: SocialService['fetchPositionById'];\n};\n\n/**\n * Fetches a page of the trader-activity feed.\n *\n * Calls `GET ${baseUrl}/feed`. For the `following` scope the current user is\n * identified server-side from the JWT sub claim carried in the Authorization\n * header; the `leaderboard` scope is generic and shared by all users.\n *\n * Cursor pagination supports infinite scroll: pass `pagination.olderCursor`\n * from a prior response back as `olderThan` to load older items, and\n * `pagination.newerCursor` as `newerThan` to fetch newer items.\n *\n * @param options - Options bag.\n * @param options.scope - `following` (default) or `leaderboard`.\n * @param options.chains - Filter by one or more chains.\n * @param options.limit - Number of results per page.\n * @param options.olderThan - Cursor for older items (scroll down).\n * @param options.newerThan - Cursor for newer items (refresh).\n * @returns The feed response with items and pagination cursors.\n */\nexport type SocialServiceFetchFeedAction = {\n type: `SocialService:fetchFeed`;\n handler: SocialService['fetchFeed'];\n};\n\n/**\n * Fetches the list of traders the current user is following.\n *\n * Calls `GET ${baseUrl}/users/me/following`. The caller is identified\n * server-side from the JWT sub claim carried in the Authorization header.\n *\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 on behalf of the current user.\n *\n * Calls `PUT ${baseUrl}/users/me/follows`. The caller is identified\n * server-side from the JWT sub claim carried in the Authorization header.\n *\n * @param options - Options bag.\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 on behalf of the current user.\n *\n * Calls `DELETE ${baseUrl}/users/me/follows?targets=...`. Targets are sent\n * as query params because Fastify does not parse request bodies on DELETE\n * requests per RFC 9110. The caller is identified server-side from the JWT\n * sub claim carried in the Authorization header.\n *\n * @param options - Options bag.\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 * Opts the current user out of the PnL leaderboard.\n */\nexport type SocialServiceOptOutOfLeaderboardAction = {\n type: `SocialService:optOutOfLeaderboard`;\n handler: SocialService['optOutOfLeaderboard'];\n};\n\n/**\n * Opts the current user back into the PnL leaderboard.\n */\nexport type SocialServiceOptInToLeaderboardAction = {\n type: `SocialService:optInToLeaderboard`;\n handler: SocialService['optInToLeaderboard'];\n};\n\n/**\n * Asks the social-api to refresh its cached copy of the current user's\n * notification preferences.\n *\n * Calls `POST ${baseUrl}/notifications/preferences/cache-refresh`. The caller\n * is identified server-side from the JWT sub claim carried in the\n * Authorization header, so it can only ever refresh its own entry.\n *\n * The client calls this immediately after writing a preference change to\n * Authenticated User Storage (AUS), which is the source of truth. The social\n * api re-reads from AUS and repopulates its cache so the change is honoured\n * near-instantly rather than after the cache TTL lapses. It is a pure\n * optimisation on top of that bounded TTL: the write has already succeeded by\n * the time this runs, so callers should treat it as best-effort and must not\n * roll back the AUS write if it fails.\n */\nexport type SocialServiceRefreshNotificationPreferencesCacheAction = {\n type: `SocialService:refreshNotificationPreferencesCache`;\n handler: SocialService['refreshNotificationPreferencesCache'];\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 | SocialServiceFetchPositionByIdAction\n | SocialServiceFetchFeedAction\n | SocialServiceFetchFollowingAction\n | SocialServiceFollowAction\n | SocialServiceUnfollowAction\n | SocialServiceOptOutOfLeaderboardAction\n | SocialServiceOptInToLeaderboardAction\n | SocialServiceRefreshNotificationPreferencesCacheAction;\n"]}