@nadohq/mobile-client 0.53.0 → 0.55.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.
- package/README.md +12 -4
- package/dist/{MobileClient-CEVEYnV1.cjs → MobileClient-BbTaqTzi.cjs} +141 -3
- package/dist/MobileClient-BbTaqTzi.cjs.map +1 -0
- package/dist/MobileClient.cjs +1 -1
- package/dist/MobileClient.d.cts +75 -8
- package/dist/MobileClient.d.cts.map +1 -1
- package/dist/MobileClient.d.ts +75 -8
- package/dist/MobileClient.d.ts.map +1 -1
- package/dist/MobileClient.js +141 -3
- package/dist/MobileClient.js.map +1 -1
- package/dist/{MobileServerFailureError-GsGrBgO0.d.ts → MobileServerFailureError-B2og8e5O.d.ts} +3 -3
- package/dist/{MobileServerFailureError-GsGrBgO0.d.ts.map → MobileServerFailureError-B2og8e5O.d.ts.map} +1 -1
- package/dist/{MobileServerFailureError-D4ina2b2.d.cts → MobileServerFailureError-BrLtaHnU.d.cts} +3 -3
- package/dist/{MobileServerFailureError-D4ina2b2.d.cts.map → MobileServerFailureError-BrLtaHnU.d.cts.map} +1 -1
- package/dist/{buildSignedMobileRequest-D9XzRTyq.d.cts → buildSignedMobileRequest-CZ-EdxYI.d.cts} +2 -2
- package/dist/{buildSignedMobileRequest-D9XzRTyq.d.cts.map → buildSignedMobileRequest-CZ-EdxYI.d.cts.map} +1 -1
- package/dist/{buildSignedMobileRequest-7Iwi5k6h.d.ts → buildSignedMobileRequest-CoAVSDPx.d.ts} +2 -2
- package/dist/{buildSignedMobileRequest-7Iwi5k6h.d.ts.map → buildSignedMobileRequest-CoAVSDPx.d.ts.map} +1 -1
- package/dist/{canonicalize-OYR35XMP.d.cts → canonicalize-0_B6UOxO.d.cts} +2 -2
- package/dist/canonicalize-0_B6UOxO.d.cts.map +1 -0
- package/dist/{canonicalize-T4ShepBu.d.ts → canonicalize-BC-JICjp.d.ts} +2 -2
- package/dist/canonicalize-BC-JICjp.d.ts.map +1 -0
- package/dist/clientTypes-P4LAjreY.d.ts +731 -0
- package/dist/clientTypes-P4LAjreY.d.ts.map +1 -0
- package/dist/clientTypes-YF5d8bvg.d.cts +731 -0
- package/dist/clientTypes-YF5d8bvg.d.cts.map +1 -0
- package/dist/dataMappers.cjs +358 -0
- package/dist/dataMappers.cjs.map +1 -1
- package/dist/dataMappers.d.cts +132 -6
- package/dist/dataMappers.d.cts.map +1 -1
- package/dist/dataMappers.d.ts +132 -6
- package/dist/dataMappers.d.ts.map +1 -1
- package/dist/dataMappers.js +339 -2
- package/dist/dataMappers.js.map +1 -1
- package/dist/{eip712MethodByType-D6edRSIs.d.ts → eip712MethodByType-DWtLyPY7.d.ts} +2 -2
- package/dist/eip712MethodByType-DWtLyPY7.d.ts.map +1 -0
- package/dist/{eip712MethodByType-BAqld4fP.d.cts → eip712MethodByType-sHQ-VTHd.d.cts} +2 -2
- package/dist/eip712MethodByType-sHQ-VTHd.d.cts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/{mobileErrorCodes-CGYR3_Io.d.ts → mobileErrorCodes-DccrM4NI.d.cts} +8 -2
- package/dist/{mobileErrorCodes-CGYR3_Io.d.cts.map → mobileErrorCodes-DccrM4NI.d.cts.map} +1 -1
- package/dist/{mobileErrorCodes-CGYR3_Io.d.cts → mobileErrorCodes-DccrM4NI.d.ts} +8 -2
- package/dist/{mobileErrorCodes-CGYR3_Io.d.ts.map → mobileErrorCodes-DccrM4NI.d.ts.map} +1 -1
- package/dist/{payloadHash-B7Nmf64N.d.cts → payloadHash-CSgTglN4.d.cts} +2 -2
- package/dist/payloadHash-CSgTglN4.d.cts.map +1 -0
- package/dist/{payloadHash-RxkbwgTH.d.ts → payloadHash-qsU1DEF0.d.ts} +2 -2
- package/dist/payloadHash-qsU1DEF0.d.ts.map +1 -0
- package/dist/{serverBaseTypes-BOuAdmuQ.d.cts → serverBaseTypes-CuMsGXgc.d.cts} +2 -2
- package/dist/{serverBaseTypes-BOuAdmuQ.d.cts.map → serverBaseTypes-CuMsGXgc.d.cts.map} +1 -1
- package/dist/{serverBaseTypes-DDzfBA1a.d.ts → serverBaseTypes-DKCLDn3x.d.ts} +2 -2
- package/dist/{serverBaseTypes-DDzfBA1a.d.ts.map → serverBaseTypes-DKCLDn3x.d.ts.map} +1 -1
- package/dist/{serverExecuteTypes-DrxK2r7m.d.ts → serverExecuteTypes-DKG1mqy1.d.ts} +3 -3
- package/dist/{serverExecuteTypes-DrxK2r7m.d.ts.map → serverExecuteTypes-DKG1mqy1.d.ts.map} +1 -1
- package/dist/{serverExecuteTypes-DamHfu25.d.cts → serverExecuteTypes-TPX0GCgv.d.cts} +3 -3
- package/dist/{serverExecuteTypes-DamHfu25.d.cts.map → serverExecuteTypes-TPX0GCgv.d.cts.map} +1 -1
- package/dist/serverModelTypes-MlqdaMRd.d.cts +490 -0
- package/dist/serverModelTypes-MlqdaMRd.d.cts.map +1 -0
- package/dist/serverModelTypes-MlqdaMRd.d.ts +490 -0
- package/dist/serverModelTypes-MlqdaMRd.d.ts.map +1 -0
- package/dist/serverQueryTypes-BLUe10AI.d.ts +152 -0
- package/dist/serverQueryTypes-BLUe10AI.d.ts.map +1 -0
- package/dist/serverQueryTypes-BZOoJBpb.d.cts +152 -0
- package/dist/serverQueryTypes-BZOoJBpb.d.cts.map +1 -0
- package/dist/{serverRequestTypes-BylecTUn.d.cts → serverRequestTypes-BULjZnnz.d.ts} +69 -4
- package/dist/serverRequestTypes-BULjZnnz.d.ts.map +1 -0
- package/dist/{serverRequestTypes-DcdmGfTu.d.ts → serverRequestTypes-XbnLUsXT.d.cts} +69 -4
- package/dist/serverRequestTypes-XbnLUsXT.d.cts.map +1 -0
- package/dist/{serverResponseGuards-CjR1tv7G.d.cts → serverResponseGuards-DIj9MIrJ.d.cts} +2 -2
- package/dist/{serverResponseGuards-CjR1tv7G.d.cts.map → serverResponseGuards-DIj9MIrJ.d.cts.map} +1 -1
- package/dist/{serverResponseGuards-BspbRjOM.d.ts → serverResponseGuards-DY_8lAo7.d.ts} +2 -2
- package/dist/{serverResponseGuards-BspbRjOM.d.ts.map → serverResponseGuards-DY_8lAo7.d.ts.map} +1 -1
- package/dist/signing/buildSignedMobileRequest.d.cts +1 -1
- package/dist/signing/buildSignedMobileRequest.d.ts +1 -1
- package/dist/signing/canonicalize.d.cts +1 -1
- package/dist/signing/canonicalize.d.ts +1 -1
- package/dist/signing/eip712MethodByType.d.cts +1 -1
- package/dist/signing/eip712MethodByType.d.ts +1 -1
- package/dist/signing/index.d.cts +5 -5
- package/dist/signing/index.d.ts +5 -5
- package/dist/signing/payloadHash.d.cts +1 -1
- package/dist/signing/payloadHash.d.ts +1 -1
- package/dist/signing/types.d.cts +1 -1
- package/dist/signing/types.d.ts +1 -1
- package/dist/types/MobileServerFailureError.d.cts +1 -1
- package/dist/types/MobileServerFailureError.d.ts +1 -1
- package/dist/types/clientTypes.d.cts +2 -2
- package/dist/types/clientTypes.d.ts +2 -2
- package/dist/types/index.d.cts +9 -9
- package/dist/types/index.d.ts +9 -9
- package/dist/types/mobileErrorCodes.cjs +13 -1
- package/dist/types/mobileErrorCodes.cjs.map +1 -1
- package/dist/types/mobileErrorCodes.d.cts +1 -1
- package/dist/types/mobileErrorCodes.d.ts +1 -1
- package/dist/types/mobileErrorCodes.js +13 -1
- package/dist/types/mobileErrorCodes.js.map +1 -1
- package/dist/types/serverBaseTypes.d.cts +1 -1
- package/dist/types/serverBaseTypes.d.ts +1 -1
- package/dist/types/serverExecuteTypes.d.cts +1 -1
- package/dist/types/serverExecuteTypes.d.ts +1 -1
- package/dist/types/serverModelTypes.cjs.map +1 -1
- package/dist/types/serverModelTypes.d.cts +2 -2
- package/dist/types/serverModelTypes.d.ts +2 -2
- package/dist/types/serverModelTypes.js.map +1 -1
- package/dist/types/serverQueryTypes.d.cts +2 -2
- package/dist/types/serverQueryTypes.d.ts +2 -2
- package/dist/types/serverRequestTypes.d.cts +2 -2
- package/dist/types/serverRequestTypes.d.ts +2 -2
- package/dist/{types-BG321aOe.d.ts → types-B_4veFLc.d.ts} +3 -3
- package/dist/{types-BG321aOe.d.ts.map → types-B_4veFLc.d.ts.map} +1 -1
- package/dist/{types-D30luCKT.d.cts → types-CwpXP7xM.d.cts} +3 -3
- package/dist/{types-D30luCKT.d.cts.map → types-CwpXP7xM.d.cts.map} +1 -1
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/serverResponseGuards.d.cts +1 -1
- package/dist/utils/serverResponseGuards.d.ts +1 -1
- package/package.json +3 -3
- package/src/MobileClient.ts +192 -2
- package/src/dataMappers.ts +503 -1
- package/src/socialFeed.test.ts +723 -0
- package/src/types/clientTypes.ts +467 -0
- package/src/types/mobileErrorCodes.ts +12 -0
- package/src/types/serverModelTypes.ts +388 -0
- package/src/types/serverQueryTypes.ts +74 -0
- package/src/types/serverRequestTypes.ts +94 -1
- package/dist/MobileClient-CEVEYnV1.cjs.map +0 -1
- package/dist/canonicalize-OYR35XMP.d.cts.map +0 -1
- package/dist/canonicalize-T4ShepBu.d.ts.map +0 -1
- package/dist/clientTypes-FQTkDfq3.d.cts +0 -349
- package/dist/clientTypes-FQTkDfq3.d.cts.map +0 -1
- package/dist/clientTypes-FaHdWkNu.d.ts +0 -349
- package/dist/clientTypes-FaHdWkNu.d.ts.map +0 -1
- package/dist/eip712MethodByType-BAqld4fP.d.cts.map +0 -1
- package/dist/eip712MethodByType-D6edRSIs.d.ts.map +0 -1
- package/dist/payloadHash-B7Nmf64N.d.cts.map +0 -1
- package/dist/payloadHash-RxkbwgTH.d.ts.map +0 -1
- package/dist/serverModelTypes-YmHqfxc8.d.cts +0 -173
- package/dist/serverModelTypes-YmHqfxc8.d.cts.map +0 -1
- package/dist/serverModelTypes-YmHqfxc8.d.ts +0 -173
- package/dist/serverModelTypes-YmHqfxc8.d.ts.map +0 -1
- package/dist/serverQueryTypes-C-_h9awN.d.ts +0 -89
- package/dist/serverQueryTypes-C-_h9awN.d.ts.map +0 -1
- package/dist/serverQueryTypes-CuVsrzGV.d.cts +0 -89
- package/dist/serverQueryTypes-CuVsrzGV.d.cts.map +0 -1
- package/dist/serverRequestTypes-BylecTUn.d.cts.map +0 -1
- package/dist/serverRequestTypes-DcdmGfTu.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# `@nadohq/mobile-client`
|
|
2
2
|
|
|
3
|
-
HTTP client for the Nado mobile service API. Manages usernames, public profile lookups,
|
|
4
|
-
the follower/following graph, privacy settings, and push notification
|
|
5
|
-
msgpack
|
|
3
|
+
HTTP client for the Nado mobile service API. Manages usernames, public profile lookups, global and
|
|
4
|
+
session-based trade feeds, the follower/following graph, privacy settings, and push notification
|
|
5
|
+
devices/preferences. Public queries require no wallet; authenticated operations use EIP-712 + msgpack signing.
|
|
6
6
|
|
|
7
7
|
[Full SDK Documentation](https://nadohq.github.io/nado-typescript-sdk/index.html)
|
|
8
8
|
|
|
@@ -47,7 +47,8 @@ await mobile.setUsername({
|
|
|
47
47
|
### Public Queries
|
|
48
48
|
|
|
49
49
|
`getUsernameAvailability`, `getProfiles`, `getFollowers`, `getFollowing`, `getFeed`,
|
|
50
|
-
`getNotificationPreferences`, `getRegisteredWallet
|
|
50
|
+
`getNotificationPreferences`, `getRegisteredWallet`, `getForYouFeed`, `getTopTradersFeed`,
|
|
51
|
+
`getFriendsFeed`, `getProfileFeed`, `getMarketFeed`, `getPositionFeed`, `getFeedItem`, `getFeedUpdates`.
|
|
51
52
|
|
|
52
53
|
`getProfiles` is the only profile route: it batches up to 25 subaccounts, returns them in the requested order,
|
|
53
54
|
and carries follower totals (`include.followCounts`) and a follow summary (`include.followSummary.viewAs`) as
|
|
@@ -60,6 +61,13 @@ proving one: with it the page is ordered familiar-first and every row carries an
|
|
|
60
61
|
page is ordered by the listed relationship alone and `isFollowing` is absent rather than `false`. As with
|
|
61
62
|
`include.followSummary.viewAs`, an unsigned route means the claimed viewer is not verified.
|
|
62
63
|
|
|
64
|
+
`getFeed` returns the global trade feed. Session-based feeds include `getForYouFeed`, `getTopTradersFeed`,
|
|
65
|
+
and `getFriendsFeed` (requires `viewAs`), plus `getProfileFeed`, `getMarketFeed`, and `getPositionFeed`.
|
|
66
|
+
`getFeedItem` reads one item; `getFeedUpdates` polls session patches using the returned `viewerToken`.
|
|
67
|
+
All are unsigned. Profile, position, and item reads include the `viewAs` account's own hidden content under
|
|
68
|
+
`account_view`; the viewing account is not proof of wallet ownership. Prices are decimal `BigNumber` values;
|
|
69
|
+
quantities, notionals, and PnL retain x18 units. See method and parameter JSDoc for session and polling rules.
|
|
70
|
+
|
|
63
71
|
### Public Executes
|
|
64
72
|
|
|
65
73
|
`unregisterExpoToken`, `updateNotificationPreferences`. These are authenticated by possession of an active Expo
|
|
@@ -29,8 +29,9 @@ let axios = require("axios");
|
|
|
29
29
|
axios = __toESM(axios, 1);
|
|
30
30
|
//#region src/MobileClient.ts
|
|
31
31
|
/**
|
|
32
|
-
* Client for the Nado mobile service API: usernames, public profile lookups, the global trade feed,
|
|
33
|
-
* follower/following graph, privacy settings, and push notification
|
|
32
|
+
* Client for the Nado mobile service API: usernames, public profile lookups, the global trade feed,
|
|
33
|
+
* session-based social feeds, the follower/following graph, privacy settings, and push notification
|
|
34
|
+
* device/preference management.
|
|
34
35
|
*/
|
|
35
36
|
var MobileClient = class {
|
|
36
37
|
constructor(opts) {
|
|
@@ -141,6 +142,143 @@ var MobileClient = class {
|
|
|
141
142
|
return require_dataMappers.mapMobileFeedPage(await this.publicQuery(body));
|
|
142
143
|
}
|
|
143
144
|
/**
|
|
145
|
+
* Fetches chronological For You recommendations with server-side author/thread constraints.
|
|
146
|
+
* Always public, with optional viewAs for relationship state. Preserve the session, viewAs, filters, and limit
|
|
147
|
+
* when paging, including through empty pages with a nextCursor. A 6312 error requires a refresh.
|
|
148
|
+
* @param params - Filters, pagination, optional viewing account, and browser credential; no signing identity.
|
|
149
|
+
* @returns A fixed-session page with its ranking version and new-content watermark.
|
|
150
|
+
* @throws {MobileServerFailureError} On invalid parameters, session mismatch/expiry, or unavailable data.
|
|
151
|
+
*/
|
|
152
|
+
async getForYouFeed(params = {}) {
|
|
153
|
+
const body = {
|
|
154
|
+
type: "for_you_feed",
|
|
155
|
+
market_category: params.marketCategory,
|
|
156
|
+
...require_dataMappers.mapMobileSocialFeedListParamsToServer(params),
|
|
157
|
+
...require_dataMappers.mapMobileSocialFeedReadParamsToServer(params)
|
|
158
|
+
};
|
|
159
|
+
return require_dataMappers.mapMobileSocialFeedRankedPage(await this.publicQuery(body));
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Fetches chronological content by qualified Top Traders, with official account PnL badges.
|
|
163
|
+
* Always public; neither a wallet nor one-click trading setup is required.
|
|
164
|
+
* @param params - Filters, pagination, optional viewing account, and browser credential.
|
|
165
|
+
* @returns A page with its qualification cohort; an unavailable cohort fails instead of returning an empty ranking.
|
|
166
|
+
* @throws {MobileServerFailureError} On request/session errors or unavailable cohort data.
|
|
167
|
+
*/
|
|
168
|
+
async getTopTradersFeed(params = {}) {
|
|
169
|
+
const body = {
|
|
170
|
+
type: "top_traders_feed",
|
|
171
|
+
market_category: params.marketCategory,
|
|
172
|
+
...require_dataMappers.mapMobileSocialFeedListParamsToServer(params),
|
|
173
|
+
...require_dataMappers.mapMobileSocialFeedReadParamsToServer(params)
|
|
174
|
+
};
|
|
175
|
+
return require_dataMappers.mapMobileSocialFeedTopTradersPage(await this.publicQuery(body));
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Fetches public content by authors followed by viewAs, without a signature. One-way following is sufficient.
|
|
179
|
+
* @param params - Required viewing account on every request, filters, pagination, and browser credential.
|
|
180
|
+
* @returns A chronological Friends page and reading session.
|
|
181
|
+
* @throws {MobileServerFailureError} On invalid viewing account, session errors, or feed query failure.
|
|
182
|
+
*/
|
|
183
|
+
async getFriendsFeed(params) {
|
|
184
|
+
const body = {
|
|
185
|
+
type: "friends_feed",
|
|
186
|
+
market_category: params.marketCategory,
|
|
187
|
+
...require_dataMappers.mapMobileSocialFeedListParamsToServer(params),
|
|
188
|
+
view_as: (0, _nadohq_shared.subaccountToHex)(params.viewAs),
|
|
189
|
+
viewer_token: params.viewerToken
|
|
190
|
+
};
|
|
191
|
+
return require_dataMappers.mapMobileSocialFeedRankedPage(await this.publicQuery(body));
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Fetches an author's content visible to viewAs, including that account's own hidden content.
|
|
195
|
+
* @param params - Target identity, filters, pagination, and optional public viewing account.
|
|
196
|
+
* @returns An author page without main-feed ranking or cohort fields.
|
|
197
|
+
* @throws {MobileServerFailureError} On invalid parameters, session errors, or inaccessible content.
|
|
198
|
+
*/
|
|
199
|
+
async getProfileFeed(params) {
|
|
200
|
+
const body = {
|
|
201
|
+
type: "profile_feed",
|
|
202
|
+
subaccount: (0, _nadohq_shared.subaccountToHex)(params.subaccount),
|
|
203
|
+
market_category: params.marketCategory,
|
|
204
|
+
...require_dataMappers.mapMobileSocialFeedListParamsToServer(params),
|
|
205
|
+
...require_dataMappers.mapMobileSocialFeedReadParamsToServer(params)
|
|
206
|
+
};
|
|
207
|
+
return require_dataMappers.mapMobileSocialFeedPage(await this.publicQuery(body));
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Fetches published content for one market.
|
|
211
|
+
* @param params - Product ID, content/size filters, pagination, and public viewing account.
|
|
212
|
+
* @returns A market page without main-feed ranking fields.
|
|
213
|
+
* @throws {MobileServerFailureError} On an unknown market, session errors, or unavailable data.
|
|
214
|
+
*/
|
|
215
|
+
async getMarketFeed(params) {
|
|
216
|
+
const body = {
|
|
217
|
+
type: "market_feed",
|
|
218
|
+
product_id: params.productId,
|
|
219
|
+
...require_dataMappers.mapMobileSocialFeedListParamsToServer(params),
|
|
220
|
+
...require_dataMappers.mapMobileSocialFeedReadParamsToServer(params)
|
|
221
|
+
};
|
|
222
|
+
return require_dataMappers.mapMobileSocialFeedPage(await this.publicQuery(body));
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Fetches already published content for a position lifecycle. This is not full position history
|
|
226
|
+
* and includes hidden content owned by viewAs under account_view. It does not recreate suppressed activity.
|
|
227
|
+
* @param params - Position UUID, filters, pagination, and public viewing account.
|
|
228
|
+
* @returns A fixed-session position feed page.
|
|
229
|
+
* @throws {MobileServerFailureError} On inaccessible content, session errors, or unavailable data.
|
|
230
|
+
*/
|
|
231
|
+
async getPositionFeed(params) {
|
|
232
|
+
const body = {
|
|
233
|
+
type: "position_feed",
|
|
234
|
+
position_id: params.positionId,
|
|
235
|
+
...require_dataMappers.mapMobileSocialFeedListParamsToServer(params),
|
|
236
|
+
...require_dataMappers.mapMobileSocialFeedReadParamsToServer(params)
|
|
237
|
+
};
|
|
238
|
+
return require_dataMappers.mapMobileSocialFeedPage(await this.publicQuery(body));
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Reads one item visible to viewAs, including that account's own hidden content.
|
|
242
|
+
* Creates an item session directly when sessionId is omitted.
|
|
243
|
+
* @param params - Item UUID, preview limit, and optional existing session/read identity.
|
|
244
|
+
* @returns The complete item and authorized reading session.
|
|
245
|
+
* @throws {MobileServerFailureError} On inaccessible content or session mismatch/expiry.
|
|
246
|
+
*/
|
|
247
|
+
async getFeedItem(params) {
|
|
248
|
+
const body = {
|
|
249
|
+
type: "feed_item",
|
|
250
|
+
item_id: params.itemId,
|
|
251
|
+
comment_preview_limit: params.commentPreviewLimit,
|
|
252
|
+
session_id: params.sessionId,
|
|
253
|
+
...require_dataMappers.mapMobileSocialFeedReadParamsToServer(params)
|
|
254
|
+
};
|
|
255
|
+
return require_dataMappers.mapMobileSocialFeedItemResponse(await this.publicQuery(body));
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Polls authorized visible items and positions without inserting or reordering list members.
|
|
259
|
+
* Increment requestSeq across the entire session, including viewport changes; never reset it for a new viewport.
|
|
260
|
+
* Accept only the current session and viewportRevision's latest requestSeq; discard stale patches and cursors together.
|
|
261
|
+
* Updates currently always return reset=true. Apply current author details, follow state, and badges even if the item version is unchanged.
|
|
262
|
+
* Null patches clear values;
|
|
263
|
+
* omitted fields leave them unchanged. Stop polling off-screen and refresh on error 6312.
|
|
264
|
+
* @param params - Session, visible IDs, update baseline, sequence, and matching read identity.
|
|
265
|
+
* @returns Item/position patches, revoked targets, and a new-content hint.
|
|
266
|
+
* @throws {MobileServerFailureError} On invalid or unauthorized targets, session expiry, or unavailable data.
|
|
267
|
+
*/
|
|
268
|
+
async getFeedUpdates(params) {
|
|
269
|
+
const body = {
|
|
270
|
+
type: "feed_updates",
|
|
271
|
+
session_id: params.sessionId,
|
|
272
|
+
visible_item_ids: params.visibleItemIds,
|
|
273
|
+
visible_position_ids: params.visiblePositionIds,
|
|
274
|
+
update_cursor: params.updateCursor,
|
|
275
|
+
viewport_revision: params.viewportRevision,
|
|
276
|
+
request_seq: params.requestSeq,
|
|
277
|
+
viewer_token: params.viewerToken
|
|
278
|
+
};
|
|
279
|
+
return require_dataMappers.mapMobileSocialFeedUpdates(await this.publicQuery(body));
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
144
282
|
* Fetches the push notification preferences of the wallet that owns the given Expo push token. Unsigned —
|
|
145
283
|
* the token identifies the wallet on its own. Falls back to the backend's defaults if the wallet has never
|
|
146
284
|
* updated its preferences.
|
|
@@ -324,4 +462,4 @@ Object.defineProperty(exports, "MobileClient", {
|
|
|
324
462
|
}
|
|
325
463
|
});
|
|
326
464
|
|
|
327
|
-
//# sourceMappingURL=MobileClient-
|
|
465
|
+
//# sourceMappingURL=MobileClient-BbTaqTzi.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobileClient-BbTaqTzi.cjs","names":["subaccountToHex","mapMobileProfilesIncludeToServer","mapMobilePublicProfile","mapMobileFollowListParamsToServer","mapMobileFollowListPage","mapMobileFeedPage","mapMobileSocialFeedListParamsToServer","mapMobileSocialFeedReadParamsToServer","mapMobileSocialFeedRankedPage","mapMobileSocialFeedTopTradersPage","mapMobileSocialFeedPage","mapMobileSocialFeedItemResponse","mapMobileSocialFeedUpdates","mapMobileNotificationPreferences","mapMobileRegisteredWallet","mapMobileNotificationPreferencesToServer","mapMobileFollowMutationResult","WalletNotProvidedError","buildSignedMobileRequest","isMobileServerFailureResponse","MobileServerFailureError","isMobileServerSuccessResponse"],"sources":["../src/MobileClient.ts"],"sourcesContent":["import {\n getNadoClientTypeHeaders,\n subaccountToHex,\n WalletClientWithAccount,\n WalletNotProvidedError,\n} from '@nadohq/shared';\nimport axios, { AxiosInstance, AxiosResponse } from 'axios';\nimport {\n mapMobileFeedPage,\n mapMobileFollowListPage,\n mapMobileFollowListParamsToServer,\n mapMobileFollowMutationResult,\n mapMobileNotificationPreferences,\n mapMobileNotificationPreferencesToServer,\n mapMobileProfilesIncludeToServer,\n mapMobilePublicProfile,\n mapMobileRegisteredWallet,\n mapMobileSocialFeedItemResponse,\n mapMobileSocialFeedListParamsToServer,\n mapMobileSocialFeedPage,\n mapMobileSocialFeedRankedPage,\n mapMobileSocialFeedReadParamsToServer,\n mapMobileSocialFeedTopTradersPage,\n mapMobileSocialFeedUpdates,\n} from './dataMappers';\nimport {\n buildSignedMobileRequest,\n MobileSignedInner,\n MobileSignedInnerByType,\n MobileSignedInnerParams,\n MobileSignedRequest,\n} from './signing';\nimport {\n GetMobileFeedItemParams,\n GetMobileFeedParams,\n GetMobileFeedUpdatesParams,\n GetMobileFollowersParams,\n GetMobileFollowingParams,\n GetMobileForYouFeedParams,\n GetMobileFriendsFeedParams,\n GetMobileMarketFeedParams,\n GetMobileNotificationPreferencesParams,\n GetMobilePositionFeedParams,\n GetMobileProfileFeedParams,\n GetMobileProfilesParams,\n GetMobileRegisteredWalletParams,\n GetMobileTopTradersFeedParams,\n GetMobileUsernameAvailabilityParams,\n MobileFeedPage,\n MobileFollowListPage,\n MobileFollowMutationResult,\n MobileNotificationPreferences,\n MobilePublicProfile,\n MobileRegisteredWallet,\n MobileRegisterExpoTokenParams,\n MobileSetFollowParams,\n MobileSetPrivateModeParams,\n MobileSetUsernameParams,\n MobileSignedRequestParams,\n MobileSocialFeedItemResponse,\n MobileSocialFeedPage,\n MobileSocialFeedRankedPage,\n MobileSocialFeedTopTradersPage,\n MobileSocialFeedUpdates,\n MobileUnregisterExpoTokenParams,\n MobileUpdateNotificationPreferencesParams,\n MobileUsernameAvailability,\n} from './types/clientTypes';\nimport { MobileServerFailureError } from './types/MobileServerFailureError';\nimport { MobileServerSuccessResponse } from './types/serverBaseTypes';\nimport {\n MobileServerExecuteResult,\n MobileServerExecuteSuccessResponse,\n MobileServerPublicExecuteRequest,\n} from './types/serverExecuteTypes';\nimport {\n MobileServerPublicQueryRequest,\n MobileServerPublicQuerySuccessResponse,\n} from './types/serverQueryTypes';\nimport {\n MobileServerExecuteRequestType,\n MobileServerPublicQueryRequestByType,\n MobileServerPublicQueryRequestType,\n} from './types/serverRequestTypes';\nimport {\n isMobileServerFailureResponse,\n isMobileServerSuccessResponse,\n} from './utils/serverResponseGuards';\n\n/**\n * Options for constructing a {@link MobileClient}.\n */\nexport interface MobileClientOpts {\n /**\n * Base URL of the mobile service API, e.g. {@link MOBILE_CLIENT_ENDPOINTS}.\n */\n url: string;\n /**\n * Wallet client used to sign requests.\n */\n walletClient?: WalletClientWithAccount;\n /**\n * If provided, this signer is used instead of `walletClient` for all signed requests.\n */\n linkedSignerWalletClient?: WalletClientWithAccount;\n /**\n * If provided, identifies the calling client, sent as a header with every request.\n */\n clientType?: string;\n}\n\n/**\n * Client for the Nado mobile service API: usernames, public profile lookups, the global trade feed,\n * session-based social feeds, the follower/following graph, privacy settings, and push notification\n * device/preference management.\n */\nexport class MobileClient {\n readonly opts: MobileClientOpts;\n readonly axiosInstance: AxiosInstance;\n\n constructor(opts: MobileClientOpts) {\n this.opts = opts;\n this.axiosInstance = axios.create({\n withCredentials: true,\n // We have custom logic to validate response status and create an appropriate error\n validateStatus: () => true,\n headers: getNadoClientTypeHeaders(opts.clientType),\n });\n }\n\n /**\n * Sets the linked signer for requests\n *\n * @param linkedSignerWalletClient The linkedSigner to use for all signatures. Set to null to revert to the chain signer\n */\n public setLinkedSigner(\n linkedSignerWalletClient: WalletClientWithAccount | null,\n ) {\n this.opts.linkedSignerWalletClient = linkedSignerWalletClient ?? undefined;\n }\n\n /*\n Public queries\n */\n\n /**\n * Checks whether a username derived from the given display name is available to claim.\n */\n async getUsernameAvailability(\n params: GetMobileUsernameAvailabilityParams,\n ): Promise<MobileUsernameAvailability> {\n const body: MobileServerPublicQueryRequest<'username_availability'> = {\n type: 'username_availability',\n display_name: params.displayName,\n };\n const data = await this.publicQuery(body);\n return { username: data.username, available: data.available };\n }\n\n /**\n * Looks up public profiles, optionally with follower totals and a follow summary. Returns one profile per\n * requested subaccount, in the requested order, so callers can correlate positionally. Every non-isolated\n * subaccount resolves, with `username` and `displayName` `null` until a username is claimed. Private Mode\n * does not hide the profile itself, only the account's activity.\n *\n * This is the only profile route, so use it for a single subaccount too. It is unsigned, which means\n * `include.followSummary.viewAs` is an unauthenticated claim.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_PROFILES_REQUEST` if `subaccounts` is empty,\n * holds duplicates, or exceeds `MOBILE_PROFILES_MAX_BATCH_SIZE` (25), or `PROFILE_NOT_FOUND` if any\n * requested subaccount — or the follow summary's `viewAs` — is in the engine-created isolated namespace.\n * One isolated member fails the whole batch rather than being omitted.\n */\n async getProfiles(\n params: GetMobileProfilesParams,\n ): Promise<MobilePublicProfile[]> {\n const body: MobileServerPublicQueryRequest<'profiles'> = {\n type: 'profiles',\n subaccounts: params.subaccounts.map(subaccountToHex),\n include: params.include\n ? mapMobileProfilesIncludeToServer(params.include)\n : undefined,\n };\n const data = await this.publicQuery(body);\n return data.profiles.map(mapMobilePublicProfile);\n }\n\n /**\n * Fetches a page of the accounts that follow the given Profile.\n *\n * Ordering depends on `viewAs`. With it, accounts the Viewer already follows come first, unfamiliar\n * accounts second, and every row carries an `isFollowing`. Without it, the page is ordered by the listed\n * relationship alone and no row carries an `isFollowing`. In both cases the newest listed relationship\n * comes first within a group, with a bytes32 tie-break. The grouping is evaluated per request against the\n * live graph, so following an account from inside the list moves it between groups on the next page —\n * deduplicate by subaccount and do not re-sort locally.\n *\n * @throws {MobileServerFailureError} With error code `PROFILE_NOT_FOUND` if the viewed Profile or `viewAs`\n * is isolated, `INVALID_FOLLOW_CURSOR` if the cursor is malformed or was issued for a different `viewAs`,\n * Profile, or list direction (discard it and restart from the first page), or `INVALID_FOLLOW_LIMIT` if\n * `limit` is outside 1–50.\n */\n async getFollowers(\n params: GetMobileFollowersParams,\n ): Promise<MobileFollowListPage> {\n const body: MobileServerPublicQueryRequest<'followers'> = {\n type: 'followers',\n ...mapMobileFollowListParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileFollowListPage(data);\n }\n\n /**\n * Fetches a page of the accounts the given Profile follows. Ordering, cursor rules, and errors match\n * {@link MobileClient.getFollowers}. When `viewAs` reads its own Following list every row is familiar, so\n * every `isFollowing` is `true`.\n */\n async getFollowing(\n params: GetMobileFollowingParams,\n ): Promise<MobileFollowListPage> {\n const body: MobileServerPublicQueryRequest<'following'> = {\n type: 'following',\n ...mapMobileFollowListParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileFollowListPage(data);\n }\n\n /**\n * Fetches a page of the global trade feed: public perpetual trades, newest first, optionally filtered by a\n * whole-dollar minimum notional (omitted means unfiltered). Trades by subaccounts that have not claimed a\n * username are included with `null` name fields; only private accounts are filtered out. The feed is\n * best-effort rather than authoritative history, and pagination is live (not snapshot), so deduplicate pages\n * by {@link MobileFeedTrade.orderDigest}.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_FEED_FILTER` if `minimumNotional` or\n * `limit` is outside its allowed domain (fix the request; do not retry unchanged), or\n * `INVALID_FEED_CURSOR` if the cursor is malformed or was issued for a different `minimumNotional`\n * (discard the cursor and restart from the first page).\n */\n async getFeed(params: GetMobileFeedParams = {}): Promise<MobileFeedPage> {\n const body: MobileServerPublicQueryRequest<'feed'> = {\n type: 'feed',\n minimum_notional: params.minimumNotional,\n limit: params.limit,\n cursor: params.cursor,\n };\n const data = await this.publicQuery(body);\n return mapMobileFeedPage(data);\n }\n\n /**\n * Fetches chronological For You recommendations with server-side author/thread constraints.\n * Always public, with optional viewAs for relationship state. Preserve the session, viewAs, filters, and limit\n * when paging, including through empty pages with a nextCursor. A 6312 error requires a refresh.\n * @param params - Filters, pagination, optional viewing account, and browser credential; no signing identity.\n * @returns A fixed-session page with its ranking version and new-content watermark.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch/expiry, or unavailable data.\n */\n async getForYouFeed(\n params: GetMobileForYouFeedParams = {},\n ): Promise<MobileSocialFeedRankedPage> {\n const body: MobileServerPublicQueryRequest<'for_you_feed'> = {\n type: 'for_you_feed',\n market_category: params.marketCategory,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedRankedPage(data);\n }\n\n /**\n * Fetches chronological content by qualified Top Traders, with official account PnL badges.\n * Always public; neither a wallet nor one-click trading setup is required.\n * @param params - Filters, pagination, optional viewing account, and browser credential.\n * @returns A page with its qualification cohort; an unavailable cohort fails instead of returning an empty ranking.\n * @throws {MobileServerFailureError} On request/session errors or unavailable cohort data.\n */\n async getTopTradersFeed(\n params: GetMobileTopTradersFeedParams = {},\n ): Promise<MobileSocialFeedTopTradersPage> {\n const body: MobileServerPublicQueryRequest<'top_traders_feed'> = {\n type: 'top_traders_feed',\n market_category: params.marketCategory,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedTopTradersPage(data);\n }\n\n /**\n * Fetches public content by authors followed by viewAs, without a signature. One-way following is sufficient.\n * @param params - Required viewing account on every request, filters, pagination, and browser credential.\n * @returns A chronological Friends page and reading session.\n * @throws {MobileServerFailureError} On invalid viewing account, session errors, or feed query failure.\n */\n async getFriendsFeed(\n params: GetMobileFriendsFeedParams,\n ): Promise<MobileSocialFeedRankedPage> {\n const body: MobileServerPublicQueryRequest<'friends_feed'> = {\n type: 'friends_feed',\n market_category: params.marketCategory,\n ...mapMobileSocialFeedListParamsToServer(params),\n view_as: subaccountToHex(params.viewAs),\n viewer_token: params.viewerToken,\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedRankedPage(data);\n }\n\n /**\n * Fetches an author's content visible to viewAs, including that account's own hidden content.\n * @param params - Target identity, filters, pagination, and optional public viewing account.\n * @returns An author page without main-feed ranking or cohort fields.\n * @throws {MobileServerFailureError} On invalid parameters, session errors, or inaccessible content.\n */\n async getProfileFeed(\n params: GetMobileProfileFeedParams,\n ): Promise<MobileSocialFeedPage> {\n const body: MobileServerPublicQueryRequest<'profile_feed'> = {\n type: 'profile_feed',\n subaccount: subaccountToHex(params.subaccount),\n market_category: params.marketCategory,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedPage(data);\n }\n\n /**\n * Fetches published content for one market.\n * @param params - Product ID, content/size filters, pagination, and public viewing account.\n * @returns A market page without main-feed ranking fields.\n * @throws {MobileServerFailureError} On an unknown market, session errors, or unavailable data.\n */\n async getMarketFeed(\n params: GetMobileMarketFeedParams,\n ): Promise<MobileSocialFeedPage> {\n const body: MobileServerPublicQueryRequest<'market_feed'> = {\n type: 'market_feed',\n product_id: params.productId,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedPage(data);\n }\n\n /**\n * Fetches already published content for a position lifecycle. This is not full position history\n * and includes hidden content owned by viewAs under account_view. It does not recreate suppressed activity.\n * @param params - Position UUID, filters, pagination, and public viewing account.\n * @returns A fixed-session position feed page.\n * @throws {MobileServerFailureError} On inaccessible content, session errors, or unavailable data.\n */\n async getPositionFeed(\n params: GetMobilePositionFeedParams,\n ): Promise<MobileSocialFeedPage> {\n const body: MobileServerPublicQueryRequest<'position_feed'> = {\n type: 'position_feed',\n position_id: params.positionId,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedPage(data);\n }\n\n /**\n * Reads one item visible to viewAs, including that account's own hidden content.\n * Creates an item session directly when sessionId is omitted.\n * @param params - Item UUID, preview limit, and optional existing session/read identity.\n * @returns The complete item and authorized reading session.\n * @throws {MobileServerFailureError} On inaccessible content or session mismatch/expiry.\n */\n async getFeedItem(\n params: GetMobileFeedItemParams,\n ): Promise<MobileSocialFeedItemResponse> {\n const body: MobileServerPublicQueryRequest<'feed_item'> = {\n type: 'feed_item',\n item_id: params.itemId,\n comment_preview_limit: params.commentPreviewLimit,\n session_id: params.sessionId,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedItemResponse(data);\n }\n\n /**\n * Polls authorized visible items and positions without inserting or reordering list members.\n * Increment requestSeq across the entire session, including viewport changes; never reset it for a new viewport.\n * Accept only the current session and viewportRevision's latest requestSeq; discard stale patches and cursors together.\n * Updates currently always return reset=true. Apply current author details, follow state, and badges even if the item version is unchanged.\n * Null patches clear values;\n * omitted fields leave them unchanged. Stop polling off-screen and refresh on error 6312.\n * @param params - Session, visible IDs, update baseline, sequence, and matching read identity.\n * @returns Item/position patches, revoked targets, and a new-content hint.\n * @throws {MobileServerFailureError} On invalid or unauthorized targets, session expiry, or unavailable data.\n */\n async getFeedUpdates(\n params: GetMobileFeedUpdatesParams,\n ): Promise<MobileSocialFeedUpdates> {\n const body: MobileServerPublicQueryRequest<'feed_updates'> = {\n type: 'feed_updates',\n session_id: params.sessionId,\n visible_item_ids: params.visibleItemIds,\n visible_position_ids: params.visiblePositionIds,\n update_cursor: params.updateCursor,\n viewport_revision: params.viewportRevision,\n request_seq: params.requestSeq,\n viewer_token: params.viewerToken,\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedUpdates(data);\n }\n\n /**\n * Fetches the push notification preferences of the wallet that owns the given Expo push token. Unsigned —\n * the token identifies the wallet on its own. Falls back to the backend's defaults if the wallet has never\n * updated its preferences.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_EXPO_TOKEN` if the token is malformed, or is\n * not currently registered to a wallet.\n */\n async getNotificationPreferences(\n params: GetMobileNotificationPreferencesParams,\n ): Promise<MobileNotificationPreferences> {\n const body: MobileServerPublicQueryRequest<'notification_preferences'> = {\n type: 'notification_preferences',\n expo_token: params.expoToken,\n };\n const data = await this.publicQuery(body);\n return mapMobileNotificationPreferences(data.preferences);\n }\n\n /**\n * Resolves the wallet that an Expo push token is currently registered to, along with the redacted metadata\n * of the device that registered it. Unsigned — the token identifies the wallet on its own. Use it to check\n * whether a locally held token is still active and which wallet currently owns it, since registering the\n * same token under another wallet transfers ownership.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_EXPO_TOKEN` if the token is malformed, or is\n * not currently registered to a wallet — including a token that was unregistered. The backend does not\n * distinguish those cases.\n */\n async getRegisteredWallet(\n params: GetMobileRegisteredWalletParams,\n ): Promise<MobileRegisteredWallet> {\n const body: MobileServerPublicQueryRequest<'registered_wallet'> = {\n type: 'registered_wallet',\n expo_token: params.expoToken,\n };\n const data = await this.publicQuery(body);\n return mapMobileRegisteredWallet(data);\n }\n\n /*\n Public executes\n */\n\n /**\n * Unregisters an Expo push token, stopping delivery to that device. Unsigned, so it still works at logout\n * when a wallet signature may no longer be obtainable. Idempotent: unregistering an inactive or unknown\n * well-formed token succeeds.\n *\n * A registration that commits after this call re-activates the token, so stop or await any in-flight\n * {@link MobileClient.registerExpoToken} before unregistering.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_EXPO_TOKEN` if the token is malformed.\n */\n async unregisterExpoToken(\n params: MobileUnregisterExpoTokenParams,\n ): Promise<MobileServerSuccessResponse> {\n const body: MobileServerPublicExecuteRequest<'unregister_expo_token'> = {\n type: 'unregister_expo_token',\n expo_token: params.expoToken,\n };\n return this.publicExecute(body);\n }\n\n /**\n * Replaces the push notification preferences of the wallet that owns the given Expo push token. Possession\n * of an active token is the credential rather than a signature, so anyone holding the token can overwrite\n * that wallet's preferences. The backend requires `schemaVersion` of 1, exactly one entry per known\n * category, and empty `scopes` on every entry.\n *\n * Writes are last-write-wins on commit order rather than ordered by a client nonce, so callers must\n * serialize their own preference writes.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_PREFERENCES` if those rules are violated, or\n * `INVALID_EXPO_TOKEN` if the token is malformed or is not currently registered to a wallet.\n */\n async updateNotificationPreferences(\n params: MobileUpdateNotificationPreferencesParams,\n ): Promise<MobileServerSuccessResponse> {\n const body: MobileServerPublicExecuteRequest<'update_preferences'> = {\n type: 'update_preferences',\n expo_token: params.expoToken,\n preferences: mapMobileNotificationPreferencesToServer(params.preferences),\n };\n return this.publicExecute(body);\n }\n\n /*\n Signed executes\n */\n\n /**\n * Sets a subaccount's username, derived from the given display name. Upserts: the same call claims a first\n * username and renames an existing one, so callers never need to read the current identity first.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_DISPLAY_NAME` if the display name violates\n * `MOBILE_DISPLAY_NAME_PATTERN`, `USERNAME_UNAVAILABLE` if the derived username is reserved or already\n * taken by another subaccount, `INVALID_IDENTITY_TARGET` if the sender is in the engine-created isolated\n * namespace, or `STALE_IDENTITY_UPDATE` if another identity write for this subaccount committed with a\n * later nonce (re-read the identity before retrying).\n */\n async setUsername(\n params: MobileSetUsernameParams,\n ): Promise<MobileServerSuccessResponse> {\n const signedRequest = await this.getSignedRequest('set_username', params, {\n display_name: params.displayName,\n });\n return this.execute(signedRequest);\n }\n\n /**\n * Sets whether a subaccount's profile is private.\n */\n async setPrivateMode(\n params: MobileSetPrivateModeParams,\n ): Promise<MobileServerSuccessResponse> {\n const signedRequest = await this.getSignedRequest(\n 'set_private_mode',\n params,\n { private_mode: params.privateMode },\n );\n return this.execute(signedRequest);\n }\n\n /**\n * Registers an Expo push token for the wallet, transferring active ownership of the token if another\n * wallet had registered it. Idempotent per `(wallet, token)`.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_EXPO_TOKEN` if the token is not a valid Expo\n * push token, or `INVALID_DEVICE_METADATA` if `locale` (max 35 chars) or `appVersion` (max 64 chars) is\n * too long.\n */\n async registerExpoToken(\n params: MobileRegisterExpoTokenParams,\n ): Promise<MobileServerSuccessResponse> {\n const signedRequest = await this.getSignedRequest(\n 'register_expo_token',\n params,\n {\n expo_token: params.expoToken,\n platform: params.platform,\n locale: params.locale ?? null,\n app_version: params.appVersion ?? null,\n },\n );\n return this.execute(signedRequest);\n }\n\n /**\n * Sets whether the signing subaccount follows a Profile. Both directions are idempotent: following again\n * keeps the original relationship creation time, so it does not move the account in recency order, and\n * unfollowing a relationship that does not exist succeeds with `isFollowing: false`. Unfollowing deletes\n * the relationship rather than deactivating it, so a later follow gets a new creation time and moves the\n * account to the front of recency order.\n *\n * Only `isFollowing: true` is checked against the canonical Query DB subaccount index, so unfollowing still\n * works while that index lags.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_FOLLOW_TARGET` if the target is the sender or\n * either party is isolated, `FOLLOWER_NOT_ELIGIBLE` if the sender is not yet in the canonical Query DB\n * subaccount index, or `FOLLOWING_NOT_FOUND` if the target is not. Both index errors are transient for an\n * account that is being recorded, so they are retryable after catch-up — unlike `INVALID_FOLLOW_TARGET`.\n */\n async setFollow(\n params: MobileSetFollowParams,\n ): Promise<MobileFollowMutationResult> {\n const signedRequest = await this.getSignedRequest('set_follow', params, {\n subaccount: subaccountToHex(params.target),\n is_following: params.isFollowing,\n });\n const data = await this.execute(signedRequest);\n return mapMobileFollowMutationResult(data);\n }\n\n /*\n Base Fns\n */\n\n // Returns the request narrowed to `type` so `execute` can infer its response from the request it is given,\n // instead of being told the type a second time at the call site.\n protected async getSignedRequest<T extends MobileSignedInner['type']>(\n type: T,\n params: MobileSignedRequestParams,\n innerParams: MobileSignedInnerParams<T>,\n ): Promise<MobileSignedRequest<MobileSignedInnerByType<T>>> {\n // Use the linked signer if provided, otherwise use the default signer provided to the client\n const walletClient =\n this.opts.linkedSignerWalletClient ?? this.opts.walletClient;\n\n if (walletClient == null) {\n throw new WalletNotProvidedError();\n }\n\n const inner = {\n type,\n ...innerParams,\n } as unknown as MobileSignedInnerByType<T>;\n return buildSignedMobileRequest({ ...params, walletClient, inner });\n }\n\n // Spelled out as an intersection rather than `MobileServerPublicQueryRequest<T>`: the latter is an indexed\n // access on a mapped type, which is not an inference site, so `T` would always widen to the full union.\n protected async publicQuery<T extends MobileServerPublicQueryRequestType>(\n body: { type: T } & MobileServerPublicQueryRequestByType[T],\n ): Promise<MobileServerPublicQuerySuccessResponse<T>> {\n const response = await this.axiosInstance.post<unknown>(\n `${this.opts.url}/public_query`,\n body,\n );\n\n this.checkResponseStatus(response);\n this.checkServerStatus(response);\n\n // checkServerStatus throws on failure responses so the cast to the success response is acceptable here\n return response.data as MobileServerPublicQuerySuccessResponse<T>;\n }\n\n protected async publicExecute(\n body: MobileServerPublicExecuteRequest,\n ): Promise<MobileServerSuccessResponse> {\n const response = await this.axiosInstance.post<MobileServerExecuteResult>(\n `${this.opts.url}/public_execute`,\n body,\n );\n\n this.checkResponseStatus(response);\n this.checkServerStatus(response);\n\n // checkServerStatus catches the failure result and throws the error, so the cast to the success response is acceptable here\n return response.data as MobileServerSuccessResponse;\n }\n\n // `T` is inferred from the body's `type` rather than declared by the caller, for the same reason\n // `publicQuery` spells its body out as an intersection: an indexed access is not an inference site.\n protected async execute<T extends MobileServerExecuteRequestType>(\n body: MobileSignedRequest & { type: T },\n ): Promise<MobileServerExecuteSuccessResponse<T>> {\n const response = await this.axiosInstance.post<MobileServerExecuteResult>(\n `${this.opts.url}/execute`,\n body,\n );\n\n this.checkResponseStatus(response);\n this.checkServerStatus(response);\n\n // checkServerStatus catches the failure result and throws the error, so the cast to the success response is acceptable here\n return response.data as MobileServerExecuteSuccessResponse<T>;\n }\n\n /**\n * Validates the HTTP status before interpreting the body. Unlike the engine, the mobile backend returns\n * failure envelopes with non-2xx statuses (e.g. 404 for `PROFILE_NOT_FOUND`), so a non-2xx response with a\n * failure envelope still throws the typed error; anything else is a transport-level error.\n */\n private checkResponseStatus(response: AxiosResponse<unknown>) {\n if (response.status >= 200 && response.status < 300) {\n return;\n }\n if (isMobileServerFailureResponse(response.data)) {\n throw new MobileServerFailureError(response.data, response.status);\n }\n throw new Error(\n `Unexpected response from mobile service: ${response.status} ${response.statusText}. Data: ${JSON.stringify(response.data)}`,\n );\n }\n\n private checkServerStatus(response: AxiosResponse<unknown>) {\n const { data } = response;\n\n if (isMobileServerFailureResponse(data)) {\n throw new MobileServerFailureError(data, response.status);\n }\n if (!isMobileServerSuccessResponse(data)) {\n throw new Error(\n `Unexpected response from mobile service: missing success envelope. Data: ${JSON.stringify(data)}`,\n );\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoHA,IAAa,eAAb,MAA0B;CAIxB,YAAY,MAAwB;EAClC,KAAK,OAAO;EACZ,KAAK,gBAAgB,MAAA,QAAM,OAAO;GAChC,iBAAiB;GAEjB,sBAAsB;GACtB,UAAA,GAAA,eAAA,0BAAkC,KAAK,UAAU;EACnD,CAAC;CACH;;;;;;CAOA,gBACE,0BACA;EACA,KAAK,KAAK,2BAA2B,4BAA4B,KAAA;CACnE;;;;CASA,MAAM,wBACJ,QACqC;EACrC,MAAM,OAAgE;GACpE,MAAM;GACN,cAAc,OAAO;EACvB;EACA,MAAM,OAAO,MAAM,KAAK,YAAY,IAAI;EACxC,OAAO;GAAE,UAAU,KAAK;GAAU,WAAW,KAAK;EAAU;CAC9D;;;;;;;;;;;;;;;CAgBA,MAAM,YACJ,QACgC;EAChC,MAAM,OAAm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AClB;;;;;;CAOA,oBAA4B,UAAkC;EAC5D,IAAI,SAAS,UAAU,OAAO,SAAS,SAAS,KAC9C;EAEF,IAAIC,mCAAAA,8BAA8B,SAAS,IAAI,GAC7C,MAAM,IAAIC,uCAAAA,yBAAyB,SAAS,MAAM,SAAS,MAAM;EAEnE,MAAM,IAAI,MACR,4CAA4C,SAAS,OAAO,GAAG,SAAS,WAAW,UAAU,KAAK,UAAU,SAAS,IAAI,GAC3H;CACF;CAEA,kBAA0B,UAAkC;EAC1D,MAAM,EAAE,SAAS;EAEjB,IAAID,mCAAAA,8BAA8B,IAAI,GACpC,MAAM,IAAIC,uCAAAA,yBAAyB,MAAM,SAAS,MAAM;EAE1D,IAAI,CAACC,mCAAAA,8BAA8B,IAAI,GACrC,MAAM,IAAI,MACR,4EAA4E,KAAK,UAAU,IAAI,GACjG;CAEJ;AACF"}
|
package/dist/MobileClient.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_MobileClient = require("./MobileClient-
|
|
2
|
+
const require_MobileClient = require("./MobileClient-BbTaqTzi.cjs");
|
|
3
3
|
require("./signing/index.cjs");
|
|
4
4
|
exports.MobileClient = require_MobileClient.MobileClient;
|
package/dist/MobileClient.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as MobileSignedRequest, i as MobileSignedInnerParams, n as MobileSignedInner, r as MobileSignedInnerByType } from "./types-
|
|
3
|
-
import { o as MobileServerPublicQueryRequestByType, s as MobileServerPublicQueryRequestType, t as MobileServerExecuteRequestType } from "./serverRequestTypes-
|
|
4
|
-
import { n as MobileServerSuccessResponse } from "./serverBaseTypes-
|
|
5
|
-
import { i as MobileServerExecuteSuccessResponse, o as MobileServerPublicExecuteRequest } from "./serverExecuteTypes-
|
|
6
|
-
import { s as MobileServerPublicQuerySuccessResponse } from "./serverQueryTypes-
|
|
1
|
+
import { $ as MobileSocialFeedRankedPage, A as MobileRegisterExpoTokenParams, D as MobileNotificationPreferences, F as MobileSignedRequestParams, K as MobileSocialFeedItemResponse, M as MobileSetFollowParams, N as MobileSetPrivateModeParams, P as MobileSetUsernameParams, S as MobileFollowMutationResult, Y as MobileSocialFeedPage, a as GetMobileFollowersParams, c as GetMobileFriendsFeedParams, d as GetMobilePositionFeedParams, dt as MobileUsernameAvailability, f as GetMobileProfileFeedParams, g as GetMobileUsernameAvailabilityParams, h as GetMobileTopTradersFeedParams, j as MobileRegisteredWallet, k as MobilePublicProfile, l as GetMobileMarketFeedParams, lt as MobileUnregisterExpoTokenParams, m as GetMobileRegisteredWalletParams, n as GetMobileFeedParams, nt as MobileSocialFeedTopTradersPage, o as GetMobileFollowingParams, p as GetMobileProfilesParams, r as GetMobileFeedUpdatesParams, s as GetMobileForYouFeedParams, st as MobileSocialFeedUpdates, t as GetMobileFeedItemParams, u as GetMobileNotificationPreferencesParams, ut as MobileUpdateNotificationPreferencesParams, v as MobileFeedPage, x as MobileFollowListPage } from "./clientTypes-YF5d8bvg.cjs";
|
|
2
|
+
import { a as MobileSignedRequest, i as MobileSignedInnerParams, n as MobileSignedInner, r as MobileSignedInnerByType } from "./types-CwpXP7xM.cjs";
|
|
3
|
+
import { o as MobileServerPublicQueryRequestByType, s as MobileServerPublicQueryRequestType, t as MobileServerExecuteRequestType } from "./serverRequestTypes-XbnLUsXT.cjs";
|
|
4
|
+
import { n as MobileServerSuccessResponse } from "./serverBaseTypes-CuMsGXgc.cjs";
|
|
5
|
+
import { i as MobileServerExecuteSuccessResponse, o as MobileServerPublicExecuteRequest } from "./serverExecuteTypes-TPX0GCgv.cjs";
|
|
6
|
+
import { s as MobileServerPublicQuerySuccessResponse } from "./serverQueryTypes-BZOoJBpb.cjs";
|
|
7
7
|
import { WalletClientWithAccount } from "@nadohq/shared";
|
|
8
8
|
import { AxiosInstance } from "axios";
|
|
9
9
|
|
|
@@ -30,8 +30,9 @@ interface MobileClientOpts {
|
|
|
30
30
|
clientType?: string;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Client for the Nado mobile service API: usernames, public profile lookups, the global trade feed,
|
|
34
|
-
* follower/following graph, privacy settings, and push notification
|
|
33
|
+
* Client for the Nado mobile service API: usernames, public profile lookups, the global trade feed,
|
|
34
|
+
* session-based social feeds, the follower/following graph, privacy settings, and push notification
|
|
35
|
+
* device/preference management.
|
|
35
36
|
*/
|
|
36
37
|
declare class MobileClient {
|
|
37
38
|
readonly opts: MobileClientOpts;
|
|
@@ -97,6 +98,72 @@ declare class MobileClient {
|
|
|
97
98
|
* (discard the cursor and restart from the first page).
|
|
98
99
|
*/
|
|
99
100
|
getFeed(params?: GetMobileFeedParams): Promise<MobileFeedPage>;
|
|
101
|
+
/**
|
|
102
|
+
* Fetches chronological For You recommendations with server-side author/thread constraints.
|
|
103
|
+
* Always public, with optional viewAs for relationship state. Preserve the session, viewAs, filters, and limit
|
|
104
|
+
* when paging, including through empty pages with a nextCursor. A 6312 error requires a refresh.
|
|
105
|
+
* @param params - Filters, pagination, optional viewing account, and browser credential; no signing identity.
|
|
106
|
+
* @returns A fixed-session page with its ranking version and new-content watermark.
|
|
107
|
+
* @throws {MobileServerFailureError} On invalid parameters, session mismatch/expiry, or unavailable data.
|
|
108
|
+
*/
|
|
109
|
+
getForYouFeed(params?: GetMobileForYouFeedParams): Promise<MobileSocialFeedRankedPage>;
|
|
110
|
+
/**
|
|
111
|
+
* Fetches chronological content by qualified Top Traders, with official account PnL badges.
|
|
112
|
+
* Always public; neither a wallet nor one-click trading setup is required.
|
|
113
|
+
* @param params - Filters, pagination, optional viewing account, and browser credential.
|
|
114
|
+
* @returns A page with its qualification cohort; an unavailable cohort fails instead of returning an empty ranking.
|
|
115
|
+
* @throws {MobileServerFailureError} On request/session errors or unavailable cohort data.
|
|
116
|
+
*/
|
|
117
|
+
getTopTradersFeed(params?: GetMobileTopTradersFeedParams): Promise<MobileSocialFeedTopTradersPage>;
|
|
118
|
+
/**
|
|
119
|
+
* Fetches public content by authors followed by viewAs, without a signature. One-way following is sufficient.
|
|
120
|
+
* @param params - Required viewing account on every request, filters, pagination, and browser credential.
|
|
121
|
+
* @returns A chronological Friends page and reading session.
|
|
122
|
+
* @throws {MobileServerFailureError} On invalid viewing account, session errors, or feed query failure.
|
|
123
|
+
*/
|
|
124
|
+
getFriendsFeed(params: GetMobileFriendsFeedParams): Promise<MobileSocialFeedRankedPage>;
|
|
125
|
+
/**
|
|
126
|
+
* Fetches an author's content visible to viewAs, including that account's own hidden content.
|
|
127
|
+
* @param params - Target identity, filters, pagination, and optional public viewing account.
|
|
128
|
+
* @returns An author page without main-feed ranking or cohort fields.
|
|
129
|
+
* @throws {MobileServerFailureError} On invalid parameters, session errors, or inaccessible content.
|
|
130
|
+
*/
|
|
131
|
+
getProfileFeed(params: GetMobileProfileFeedParams): Promise<MobileSocialFeedPage>;
|
|
132
|
+
/**
|
|
133
|
+
* Fetches published content for one market.
|
|
134
|
+
* @param params - Product ID, content/size filters, pagination, and public viewing account.
|
|
135
|
+
* @returns A market page without main-feed ranking fields.
|
|
136
|
+
* @throws {MobileServerFailureError} On an unknown market, session errors, or unavailable data.
|
|
137
|
+
*/
|
|
138
|
+
getMarketFeed(params: GetMobileMarketFeedParams): Promise<MobileSocialFeedPage>;
|
|
139
|
+
/**
|
|
140
|
+
* Fetches already published content for a position lifecycle. This is not full position history
|
|
141
|
+
* and includes hidden content owned by viewAs under account_view. It does not recreate suppressed activity.
|
|
142
|
+
* @param params - Position UUID, filters, pagination, and public viewing account.
|
|
143
|
+
* @returns A fixed-session position feed page.
|
|
144
|
+
* @throws {MobileServerFailureError} On inaccessible content, session errors, or unavailable data.
|
|
145
|
+
*/
|
|
146
|
+
getPositionFeed(params: GetMobilePositionFeedParams): Promise<MobileSocialFeedPage>;
|
|
147
|
+
/**
|
|
148
|
+
* Reads one item visible to viewAs, including that account's own hidden content.
|
|
149
|
+
* Creates an item session directly when sessionId is omitted.
|
|
150
|
+
* @param params - Item UUID, preview limit, and optional existing session/read identity.
|
|
151
|
+
* @returns The complete item and authorized reading session.
|
|
152
|
+
* @throws {MobileServerFailureError} On inaccessible content or session mismatch/expiry.
|
|
153
|
+
*/
|
|
154
|
+
getFeedItem(params: GetMobileFeedItemParams): Promise<MobileSocialFeedItemResponse>;
|
|
155
|
+
/**
|
|
156
|
+
* Polls authorized visible items and positions without inserting or reordering list members.
|
|
157
|
+
* Increment requestSeq across the entire session, including viewport changes; never reset it for a new viewport.
|
|
158
|
+
* Accept only the current session and viewportRevision's latest requestSeq; discard stale patches and cursors together.
|
|
159
|
+
* Updates currently always return reset=true. Apply current author details, follow state, and badges even if the item version is unchanged.
|
|
160
|
+
* Null patches clear values;
|
|
161
|
+
* omitted fields leave them unchanged. Stop polling off-screen and refresh on error 6312.
|
|
162
|
+
* @param params - Session, visible IDs, update baseline, sequence, and matching read identity.
|
|
163
|
+
* @returns Item/position patches, revoked targets, and a new-content hint.
|
|
164
|
+
* @throws {MobileServerFailureError} On invalid or unauthorized targets, session expiry, or unavailable data.
|
|
165
|
+
*/
|
|
166
|
+
getFeedUpdates(params: GetMobileFeedUpdatesParams): Promise<MobileSocialFeedUpdates>;
|
|
100
167
|
/**
|
|
101
168
|
* Fetches the push notification preferences of the wallet that owns the given Expo push token. Unsigned —
|
|
102
169
|
* the token identifies the wallet on its own. Falls back to the backend's defaults if the wallet has never
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileClient.d.cts","names":[],"sources":["../src/src/MobileClient.ts"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MobileClient.d.cts","names":[],"sources":["../src/src/MobileClient.ts"],"mappings":";;;;;;;;;;;;;UA4FiB,gBAAA;EAAgB;;;EAI/B,GAAA;EAIA;;;EAAA,YAAA,GAAe,uBAAA;EAQf;;AAAU;EAJV,wBAAA,GAA2B,uBAAuB;EAY3B;;;EARvB,UAAA;AAAA;;;;;;cAQW,YAAA;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obileClient.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as MobileSignedRequest, i as MobileSignedInnerParams, n as MobileSignedInner, r as MobileSignedInnerByType } from "./types-
|
|
3
|
-
import { o as MobileServerPublicQueryRequestByType, s as MobileServerPublicQueryRequestType, t as MobileServerExecuteRequestType } from "./serverRequestTypes-
|
|
4
|
-
import { n as MobileServerSuccessResponse } from "./serverBaseTypes-
|
|
5
|
-
import { i as MobileServerExecuteSuccessResponse, o as MobileServerPublicExecuteRequest } from "./serverExecuteTypes-
|
|
6
|
-
import { s as MobileServerPublicQuerySuccessResponse } from "./serverQueryTypes-
|
|
1
|
+
import { $ as MobileSocialFeedRankedPage, A as MobileRegisterExpoTokenParams, D as MobileNotificationPreferences, F as MobileSignedRequestParams, K as MobileSocialFeedItemResponse, M as MobileSetFollowParams, N as MobileSetPrivateModeParams, P as MobileSetUsernameParams, S as MobileFollowMutationResult, Y as MobileSocialFeedPage, a as GetMobileFollowersParams, c as GetMobileFriendsFeedParams, d as GetMobilePositionFeedParams, dt as MobileUsernameAvailability, f as GetMobileProfileFeedParams, g as GetMobileUsernameAvailabilityParams, h as GetMobileTopTradersFeedParams, j as MobileRegisteredWallet, k as MobilePublicProfile, l as GetMobileMarketFeedParams, lt as MobileUnregisterExpoTokenParams, m as GetMobileRegisteredWalletParams, n as GetMobileFeedParams, nt as MobileSocialFeedTopTradersPage, o as GetMobileFollowingParams, p as GetMobileProfilesParams, r as GetMobileFeedUpdatesParams, s as GetMobileForYouFeedParams, st as MobileSocialFeedUpdates, t as GetMobileFeedItemParams, u as GetMobileNotificationPreferencesParams, ut as MobileUpdateNotificationPreferencesParams, v as MobileFeedPage, x as MobileFollowListPage } from "./clientTypes-P4LAjreY.js";
|
|
2
|
+
import { a as MobileSignedRequest, i as MobileSignedInnerParams, n as MobileSignedInner, r as MobileSignedInnerByType } from "./types-B_4veFLc.js";
|
|
3
|
+
import { o as MobileServerPublicQueryRequestByType, s as MobileServerPublicQueryRequestType, t as MobileServerExecuteRequestType } from "./serverRequestTypes-BULjZnnz.js";
|
|
4
|
+
import { n as MobileServerSuccessResponse } from "./serverBaseTypes-DKCLDn3x.js";
|
|
5
|
+
import { i as MobileServerExecuteSuccessResponse, o as MobileServerPublicExecuteRequest } from "./serverExecuteTypes-DKG1mqy1.js";
|
|
6
|
+
import { s as MobileServerPublicQuerySuccessResponse } from "./serverQueryTypes-BLUe10AI.js";
|
|
7
7
|
import { WalletClientWithAccount } from "@nadohq/shared";
|
|
8
8
|
import { AxiosInstance } from "axios";
|
|
9
9
|
|
|
@@ -30,8 +30,9 @@ interface MobileClientOpts {
|
|
|
30
30
|
clientType?: string;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Client for the Nado mobile service API: usernames, public profile lookups, the global trade feed,
|
|
34
|
-
* follower/following graph, privacy settings, and push notification
|
|
33
|
+
* Client for the Nado mobile service API: usernames, public profile lookups, the global trade feed,
|
|
34
|
+
* session-based social feeds, the follower/following graph, privacy settings, and push notification
|
|
35
|
+
* device/preference management.
|
|
35
36
|
*/
|
|
36
37
|
declare class MobileClient {
|
|
37
38
|
readonly opts: MobileClientOpts;
|
|
@@ -97,6 +98,72 @@ declare class MobileClient {
|
|
|
97
98
|
* (discard the cursor and restart from the first page).
|
|
98
99
|
*/
|
|
99
100
|
getFeed(params?: GetMobileFeedParams): Promise<MobileFeedPage>;
|
|
101
|
+
/**
|
|
102
|
+
* Fetches chronological For You recommendations with server-side author/thread constraints.
|
|
103
|
+
* Always public, with optional viewAs for relationship state. Preserve the session, viewAs, filters, and limit
|
|
104
|
+
* when paging, including through empty pages with a nextCursor. A 6312 error requires a refresh.
|
|
105
|
+
* @param params - Filters, pagination, optional viewing account, and browser credential; no signing identity.
|
|
106
|
+
* @returns A fixed-session page with its ranking version and new-content watermark.
|
|
107
|
+
* @throws {MobileServerFailureError} On invalid parameters, session mismatch/expiry, or unavailable data.
|
|
108
|
+
*/
|
|
109
|
+
getForYouFeed(params?: GetMobileForYouFeedParams): Promise<MobileSocialFeedRankedPage>;
|
|
110
|
+
/**
|
|
111
|
+
* Fetches chronological content by qualified Top Traders, with official account PnL badges.
|
|
112
|
+
* Always public; neither a wallet nor one-click trading setup is required.
|
|
113
|
+
* @param params - Filters, pagination, optional viewing account, and browser credential.
|
|
114
|
+
* @returns A page with its qualification cohort; an unavailable cohort fails instead of returning an empty ranking.
|
|
115
|
+
* @throws {MobileServerFailureError} On request/session errors or unavailable cohort data.
|
|
116
|
+
*/
|
|
117
|
+
getTopTradersFeed(params?: GetMobileTopTradersFeedParams): Promise<MobileSocialFeedTopTradersPage>;
|
|
118
|
+
/**
|
|
119
|
+
* Fetches public content by authors followed by viewAs, without a signature. One-way following is sufficient.
|
|
120
|
+
* @param params - Required viewing account on every request, filters, pagination, and browser credential.
|
|
121
|
+
* @returns A chronological Friends page and reading session.
|
|
122
|
+
* @throws {MobileServerFailureError} On invalid viewing account, session errors, or feed query failure.
|
|
123
|
+
*/
|
|
124
|
+
getFriendsFeed(params: GetMobileFriendsFeedParams): Promise<MobileSocialFeedRankedPage>;
|
|
125
|
+
/**
|
|
126
|
+
* Fetches an author's content visible to viewAs, including that account's own hidden content.
|
|
127
|
+
* @param params - Target identity, filters, pagination, and optional public viewing account.
|
|
128
|
+
* @returns An author page without main-feed ranking or cohort fields.
|
|
129
|
+
* @throws {MobileServerFailureError} On invalid parameters, session errors, or inaccessible content.
|
|
130
|
+
*/
|
|
131
|
+
getProfileFeed(params: GetMobileProfileFeedParams): Promise<MobileSocialFeedPage>;
|
|
132
|
+
/**
|
|
133
|
+
* Fetches published content for one market.
|
|
134
|
+
* @param params - Product ID, content/size filters, pagination, and public viewing account.
|
|
135
|
+
* @returns A market page without main-feed ranking fields.
|
|
136
|
+
* @throws {MobileServerFailureError} On an unknown market, session errors, or unavailable data.
|
|
137
|
+
*/
|
|
138
|
+
getMarketFeed(params: GetMobileMarketFeedParams): Promise<MobileSocialFeedPage>;
|
|
139
|
+
/**
|
|
140
|
+
* Fetches already published content for a position lifecycle. This is not full position history
|
|
141
|
+
* and includes hidden content owned by viewAs under account_view. It does not recreate suppressed activity.
|
|
142
|
+
* @param params - Position UUID, filters, pagination, and public viewing account.
|
|
143
|
+
* @returns A fixed-session position feed page.
|
|
144
|
+
* @throws {MobileServerFailureError} On inaccessible content, session errors, or unavailable data.
|
|
145
|
+
*/
|
|
146
|
+
getPositionFeed(params: GetMobilePositionFeedParams): Promise<MobileSocialFeedPage>;
|
|
147
|
+
/**
|
|
148
|
+
* Reads one item visible to viewAs, including that account's own hidden content.
|
|
149
|
+
* Creates an item session directly when sessionId is omitted.
|
|
150
|
+
* @param params - Item UUID, preview limit, and optional existing session/read identity.
|
|
151
|
+
* @returns The complete item and authorized reading session.
|
|
152
|
+
* @throws {MobileServerFailureError} On inaccessible content or session mismatch/expiry.
|
|
153
|
+
*/
|
|
154
|
+
getFeedItem(params: GetMobileFeedItemParams): Promise<MobileSocialFeedItemResponse>;
|
|
155
|
+
/**
|
|
156
|
+
* Polls authorized visible items and positions without inserting or reordering list members.
|
|
157
|
+
* Increment requestSeq across the entire session, including viewport changes; never reset it for a new viewport.
|
|
158
|
+
* Accept only the current session and viewportRevision's latest requestSeq; discard stale patches and cursors together.
|
|
159
|
+
* Updates currently always return reset=true. Apply current author details, follow state, and badges even if the item version is unchanged.
|
|
160
|
+
* Null patches clear values;
|
|
161
|
+
* omitted fields leave them unchanged. Stop polling off-screen and refresh on error 6312.
|
|
162
|
+
* @param params - Session, visible IDs, update baseline, sequence, and matching read identity.
|
|
163
|
+
* @returns Item/position patches, revoked targets, and a new-content hint.
|
|
164
|
+
* @throws {MobileServerFailureError} On invalid or unauthorized targets, session expiry, or unavailable data.
|
|
165
|
+
*/
|
|
166
|
+
getFeedUpdates(params: GetMobileFeedUpdatesParams): Promise<MobileSocialFeedUpdates>;
|
|
100
167
|
/**
|
|
101
168
|
* Fetches the push notification preferences of the wallet that owns the given Expo push token. Unsigned —
|
|
102
169
|
* the token identifies the wallet on its own. Falls back to the backend's defaults if the wallet has never
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileClient.d.ts","names":[],"sources":["../src/src/MobileClient.ts"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MobileClient.d.ts","names":[],"sources":["../src/src/MobileClient.ts"],"mappings":";;;;;;;;;;;;;UA4FiB,gBAAA;EAAgB;;;EAI/B,GAAA;EAIA;;;EAAA,YAAA,GAAe,uBAAA;EAQf;;AAAU;EAJV,wBAAA,GAA2B,uBAAuB;EAY3B;;;EARvB,UAAA;AAAA;;;;;;cAQW,YAAA;EAAA,SACF,IAAA,EAAM,gBAAA;EAAA,SACN,aAAA,EAAe,aAAA;cAEZ,IAAA,EAAM,gBAAA;EAoFf;;;;;EArEI,eAAA,CACL,wBAAA,EAA0B,uBAAA;EAyGqB;;;EA7F3C,uBAAA,CACJ,MAAA,EAAQ,mCAAA,GACP,OAAA,CAAQ,0BAAA;EAmID;;;;;;;;;;;;;;EA5GJ,WAAA,CACJ,MAAA,EAAQ,uBAAA,GACP,OAAA,CAAQ,mBAAA;EA6MD;;;;;;;;;;;;;;;EAlLJ,YAAA,CACJ,MAAA,EAAQ,wBAAA,GACP,OAAA,CAAQ,oBAAA;EAuSA;;;;;EAzRL,YAAA,CACJ,MAAA,EAAQ,wBAAA,GACP,OAAA,CAAQ,oBAAA;EA4TA;;;;;;;;;;;;EAvSL,OAAA,CAAQ,MAAA,GAAQ,mBAAA,GAA2B,OAAA,CAAQ,cAAA;EA4WF;;;;;;;;EAzVjD,aAAA,CACJ,MAAA,GAAQ,yBAAA,GACP,OAAA,CAAQ,0BAAA;EA2WA;;;;;;;EAzVL,iBAAA,CACJ,MAAA,GAAQ,6BAAA,GACP,OAAA,CAAQ,8BAAA;EAuXmC;;;;;;EAtWxC,cAAA,CACJ,MAAA,EAAQ,0BAAA,GACP,OAAA,CAAQ,0BAAA;EAvLF;;;;;;EAyMH,cAAA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