@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientTypes-YF5d8bvg.d.cts","names":[],"sources":["../src/types/src/types/clientTypes.ts"],"mappings":";;;;;;;;AAoCA;;;;;;UAAiB,mBAAA;EACf,UAAA,EAAY,GAAA;EAKZ;EAHA,QAAA;EASA;EAPA,WAAA;EACA,WAAA;EAQmC;AAAA;AAOrC;;EAVE,aAAA;EACA,cAAA;EAUA;EARA,aAAA,GAAgB,mBAAmB;AAAA;;;;AAc1B;UAPM,qBAAA;EACf,UAAA,EAAY,GAAG;;EAEf,QAAA;EAcA;EAZA,WAAA;EAmBA;EAjBA,SAAA;AAAA;AAiBiC;AAMnC;;;;AANmC,UATlB,mBAAA;EAgBL;EAdV,WAAA;EAuBA;EArBA,eAAA;EAqBa;AAQf;;;EAxBE,UAAA,EAAY,qBAAqB;AAAA;;;;UAMlB,uBAAA;EACf,QAAA,EAAU,qBAAqB;EA2BU;;;AAG5B;AAMf;;EA7BE,WAAA;EA8BA;EA5BA,aAAA;AAAA;;;;;;UAQe,oBAAA;EACf,QAAA,EAAU,uBAAuB;EA8BhB;EA5BjB,UAAA;AAAA;;;;;UAOe,0BAAA;EACf,WAAA;EA4B4D;EA1B5D,aAAa;AAAA;;;;UAME,0BAAA;EACf,QAAA;EACA,SAAS;AAAA;;;;;;UAQM,gBAAA;EACf,IAAA,EAAM,oBAAoB;EAC1B,iBAAA;AAAA;;;;;;UAQe,eAAA,SAAwB,qBAAA;EAkC7B;EAhCV,WAAA,EAAa,GAAA;EACb,SAAA;EAgCuC;EA9BvC,QAAA;EA8BwB;EA5BxB,QAAA;EA6BI;EA3BJ,YAAA;EACA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QZ,MAAA;AAAA;;UAIe,iCAAA,SACP,0BAAA,EAA4B,0BAAA;EAL9B;EAON,cAAA,GAAiB,8BAAA;AAAA;;KAIP,yBAAA,GAA4B,iCAAiC;;KAG7D,6BAAA,GAAgC,iCAAiC;;KAGjE,0BAAA,GAA6B,iCAAA;EAZuB,2FAc9D,MAAA,EAAQ,UAAU;AAAA;;KAIR,0BAAA,GAA6B,iCAAA;EAhBQ,wDAkB/C,UAAA,EAAY,UAAU;AAAA;;KAIZ,yBAAA,GAA4B,0BAAA,GACtC,0BAA0B;EAnB6C,sCAqBrE,SAAA;AAAA;;KAIQ,2BAAA,GAA8B,0BAAA,GACxC,0BAA0B;EAvBiD,4BAyBzE,UAAA;AAAA;;KAIQ,uBAAA,GAA0B,0BAA0B;EAxB5C,wBA0BlB,MAAA,UA1BA;EA4BA,mBAAA,WA5BkB;EA8BlB,SAAA;AAAA;;KAIU,0BAAA;EA5BY,8FA8BtB,MAAA,UA9BA;EAgCA,SAAA,UAhCsB;EAkCtB,cAAA,YA9BU;EAgCV,kBAAA;EAEA,YAAA,kBAlCsC;EAoCtC,gBAAA,UAjCE;EAmCF,UAAA,UAnCW;EAqCX,WAAA;AAAA"}
|
package/dist/dataMappers.cjs
CHANGED
|
@@ -170,6 +170,343 @@ function mapMobileRegisteredWallet(server) {
|
|
|
170
170
|
lastSeenAt: server.last_seen_at
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Maps the official account PnL badge, retaining x18 amount units.
|
|
175
|
+
* @param server - The service response.
|
|
176
|
+
* @returns The mapped trader badge.
|
|
177
|
+
*/
|
|
178
|
+
function mapMobileSocialFeedTraderBadge(server) {
|
|
179
|
+
return {
|
|
180
|
+
code: server.code,
|
|
181
|
+
pnl: (0, _nadohq_shared.toBigNumber)(server.pnl_x18),
|
|
182
|
+
metricKey: server.metric_key,
|
|
183
|
+
window: server.window,
|
|
184
|
+
sourceAsOfMs: server.source_as_of_ms,
|
|
185
|
+
fetchedAtMs: server.fetched_at_ms,
|
|
186
|
+
snapshotId: server.snapshot_id
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Maps author identity, relationship state, and optional qualification badge.
|
|
191
|
+
* @param server - The service response.
|
|
192
|
+
* @returns The mapped feed author.
|
|
193
|
+
*/
|
|
194
|
+
function mapMobileSocialFeedAuthor(server) {
|
|
195
|
+
return {
|
|
196
|
+
...mapMobileIdentitySummary(server),
|
|
197
|
+
isFollowing: server.is_following,
|
|
198
|
+
traderBadge: server.trader_badge === null ? null : mapMobileSocialFeedTraderBadge(server.trader_badge),
|
|
199
|
+
traderDataStatus: server.trader_data_status
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Maps social market metadata.
|
|
204
|
+
* @param server - The service response.
|
|
205
|
+
* @returns The mapped feed market.
|
|
206
|
+
*/
|
|
207
|
+
function mapMobileSocialFeedMarket(server) {
|
|
208
|
+
return {
|
|
209
|
+
productId: server.product_id,
|
|
210
|
+
symbol: server.symbol,
|
|
211
|
+
logoUrl: server.logo_url,
|
|
212
|
+
category: server.category,
|
|
213
|
+
sourceCategories: server.source_categories
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Maps position PnL while retaining x18 amount units and availability.
|
|
218
|
+
* @param server - The service response.
|
|
219
|
+
* @returns The mapped feed pnl.
|
|
220
|
+
*/
|
|
221
|
+
function mapMobileSocialFeedPnl(server) {
|
|
222
|
+
return {
|
|
223
|
+
amount: server.amount_x18 === null ? null : (0, _nadohq_shared.toBigNumber)(server.amount_x18),
|
|
224
|
+
basis: server.basis,
|
|
225
|
+
mode: server.mode,
|
|
226
|
+
asOfMs: server.as_of_ms,
|
|
227
|
+
quality: server.quality
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Maps complete position facts, converting entry price to decimal units.
|
|
232
|
+
* @param server - The service response.
|
|
233
|
+
* @returns The mapped feed position patch.
|
|
234
|
+
*/
|
|
235
|
+
function mapMobileSocialFeedPositionPatch(server) {
|
|
236
|
+
return {
|
|
237
|
+
positionId: server.position_id,
|
|
238
|
+
positionVersion: server.position_version,
|
|
239
|
+
stateAsOfMs: server.state_as_of_ms,
|
|
240
|
+
entryPrice: (0, _nadohq_shared.removeDecimals)(server.entry_price_x18),
|
|
241
|
+
displayBasis: server.display_basis,
|
|
242
|
+
snapshotAtMs: server.snapshot_at_ms,
|
|
243
|
+
quantity: (0, _nadohq_shared.toBigNumber)(server.quantity_x18),
|
|
244
|
+
notional: (0, _nadohq_shared.toBigNumber)(server.notional_x18),
|
|
245
|
+
state: server.state,
|
|
246
|
+
historyQuality: server.history_quality,
|
|
247
|
+
marginMode: server.margin_mode,
|
|
248
|
+
leverage: server.leverage,
|
|
249
|
+
leverageAtMs: server.leverage_at_ms,
|
|
250
|
+
pnl: mapMobileSocialFeedPnl(server.pnl)
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Maps a position card with its current or frozen financial state.
|
|
255
|
+
* @param server - The service response.
|
|
256
|
+
* @returns The mapped feed position card.
|
|
257
|
+
*/
|
|
258
|
+
function mapMobileSocialFeedPositionCard(server) {
|
|
259
|
+
return {
|
|
260
|
+
...mapMobileSocialFeedPositionPatch(server),
|
|
261
|
+
productId: server.product_id,
|
|
262
|
+
market: mapMobileSocialFeedMarket(server.market),
|
|
263
|
+
direction: server.direction
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Maps interaction counters without inventing unavailable relationship state.
|
|
268
|
+
* @param server - The service response.
|
|
269
|
+
* @returns The mapped feed interaction.
|
|
270
|
+
*/
|
|
271
|
+
function mapMobileSocialFeedInteraction(server) {
|
|
272
|
+
return {
|
|
273
|
+
likeCount: server.like_count,
|
|
274
|
+
commentCount: server.comment_count,
|
|
275
|
+
viewCount: server.view_count,
|
|
276
|
+
likedByMe: server.liked_by_me
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Maps common item metadata and server capabilities.
|
|
281
|
+
* @param server - The service response.
|
|
282
|
+
* @returns The mapped social feed item base.
|
|
283
|
+
*/
|
|
284
|
+
function mapMobileSocialFeedItemBase(server) {
|
|
285
|
+
return {
|
|
286
|
+
id: server.id,
|
|
287
|
+
hasAnalysis: server.has_analysis,
|
|
288
|
+
drawing: server.drawing,
|
|
289
|
+
author: mapMobileSocialFeedAuthor(server.author),
|
|
290
|
+
createdAtMs: server.created_at_ms,
|
|
291
|
+
displayAtMs: server.display_at_ms,
|
|
292
|
+
version: server.version,
|
|
293
|
+
market: mapMobileSocialFeedMarket(server.market),
|
|
294
|
+
capabilities: {
|
|
295
|
+
canLike: server.capabilities.can_like,
|
|
296
|
+
canComment: server.capabilities.can_comment,
|
|
297
|
+
canRecordView: server.capabilities.can_record_view
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Maps an automatic trade card and its position and interaction metadata.
|
|
303
|
+
* @param server - The service response.
|
|
304
|
+
* @returns The mapped social trade card.
|
|
305
|
+
*/
|
|
306
|
+
function mapMobileSocialFeedTradeCard(server) {
|
|
307
|
+
return {
|
|
308
|
+
...mapMobileSocialFeedItemBase(server),
|
|
309
|
+
kind: server.kind,
|
|
310
|
+
action: server.action,
|
|
311
|
+
text: server.text,
|
|
312
|
+
mentions: server.mentions,
|
|
313
|
+
position: mapMobileSocialFeedPositionCard(server.position),
|
|
314
|
+
interaction: mapMobileSocialFeedInteraction(server.interaction),
|
|
315
|
+
commentPreview: {
|
|
316
|
+
items: server.comment_preview.items,
|
|
317
|
+
totalCount: server.comment_preview.total_count,
|
|
318
|
+
nextCursor: server.comment_preview.next_cursor
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Maps historical trade facts with decimal execution prices and x18 quantities.
|
|
324
|
+
* @param server - The service response.
|
|
325
|
+
* @returns The mapped social trade row base.
|
|
326
|
+
*/
|
|
327
|
+
function mapMobileSocialFeedTradeRowBase(server) {
|
|
328
|
+
return {
|
|
329
|
+
...mapMobileSocialFeedItemBase(server),
|
|
330
|
+
kind: server.kind,
|
|
331
|
+
positionId: server.position_id,
|
|
332
|
+
direction: server.direction,
|
|
333
|
+
marginMode: server.margin_mode,
|
|
334
|
+
leverage: server.leverage,
|
|
335
|
+
leverageAtMs: server.leverage_at_ms,
|
|
336
|
+
tradeCount: server.trade_count,
|
|
337
|
+
quantity: (0, _nadohq_shared.toBigNumber)(server.quantity_x18),
|
|
338
|
+
averagePrice: (0, _nadohq_shared.removeDecimals)(server.average_price_x18)
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Maps size changes and independently nullable liquidation facts.
|
|
343
|
+
* @param server - The service response.
|
|
344
|
+
* @returns The mapped social trade row.
|
|
345
|
+
*/
|
|
346
|
+
function mapMobileSocialFeedTradeRow(server) {
|
|
347
|
+
const base = mapMobileSocialFeedTradeRowBase(server);
|
|
348
|
+
if (server.action === "liquidated") return {
|
|
349
|
+
...base,
|
|
350
|
+
action: server.action,
|
|
351
|
+
notional: server.notional_x18 === null ? null : (0, _nadohq_shared.toBigNumber)(server.notional_x18),
|
|
352
|
+
entryPrice: (0, _nadohq_shared.removeDecimals)(server.entry_price_x18),
|
|
353
|
+
liquidationOraclePrice: (0, _nadohq_shared.removeDecimals)(server.liquidation_oracle_price_x18),
|
|
354
|
+
liquidationExecutionPrice: (0, _nadohq_shared.removeDecimals)(server.liquidation_execution_price_x18),
|
|
355
|
+
realizedPnlDelta: server.realized_pnl_delta_x18 === null ? null : (0, _nadohq_shared.toBigNumber)(server.realized_pnl_delta_x18)
|
|
356
|
+
};
|
|
357
|
+
return {
|
|
358
|
+
...base,
|
|
359
|
+
action: server.action,
|
|
360
|
+
notional: (0, _nadohq_shared.toBigNumber)(server.notional_x18)
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Maps the item variant without mixing card and row fields.
|
|
365
|
+
* @param server - The service response.
|
|
366
|
+
* @returns The mapped social feed item.
|
|
367
|
+
*/
|
|
368
|
+
function mapMobileSocialFeedItem(server) {
|
|
369
|
+
return server.kind === "trade_card" ? mapMobileSocialFeedTradeCard(server) : mapMobileSocialFeedTradeRow(server);
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Maps a fixed reading session, preserving opaque credentials and cursors.
|
|
373
|
+
* @param server - The service response.
|
|
374
|
+
* @returns The mapped feed read session.
|
|
375
|
+
*/
|
|
376
|
+
function mapMobileSocialFeedReadSession(server) {
|
|
377
|
+
return {
|
|
378
|
+
sessionId: server.session_id,
|
|
379
|
+
mode: server.mode,
|
|
380
|
+
expiresAtMs: server.expires_at_ms,
|
|
381
|
+
viewTracking: {
|
|
382
|
+
minVisibleRatio: server.view_tracking.min_visible_ratio,
|
|
383
|
+
minDurationMs: server.view_tracking.min_duration_ms
|
|
384
|
+
},
|
|
385
|
+
updateCursor: server.update_cursor,
|
|
386
|
+
viewerToken: server.viewer_token
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Maps a fixed feed page without changing item order or pagination.
|
|
391
|
+
* @param server - The service response.
|
|
392
|
+
* @returns The mapped social feed page.
|
|
393
|
+
*/
|
|
394
|
+
function mapMobileSocialFeedPage(server) {
|
|
395
|
+
return {
|
|
396
|
+
readSession: mapMobileSocialFeedReadSession(server.read_session),
|
|
397
|
+
items: server.items.map(mapMobileSocialFeedItem),
|
|
398
|
+
nextCursor: server.next_cursor,
|
|
399
|
+
watermark: server.watermark
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Maps a main feed page and its ranking version.
|
|
404
|
+
* @param server - The service response.
|
|
405
|
+
* @returns The mapped ranked feed page.
|
|
406
|
+
*/
|
|
407
|
+
function mapMobileSocialFeedRankedPage(server) {
|
|
408
|
+
return {
|
|
409
|
+
...mapMobileSocialFeedPage(server),
|
|
410
|
+
rankingVersion: server.ranking_version
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Maps qualified trader items and their shared eligibility snapshot.
|
|
415
|
+
* @param server - The service response.
|
|
416
|
+
* @returns The mapped top traders feed page.
|
|
417
|
+
*/
|
|
418
|
+
function mapMobileSocialFeedTopTradersPage(server) {
|
|
419
|
+
return {
|
|
420
|
+
...mapMobileSocialFeedRankedPage(server),
|
|
421
|
+
cohort: {
|
|
422
|
+
snapshotId: server.cohort.snapshot_id,
|
|
423
|
+
status: server.cohort.status,
|
|
424
|
+
coverage: {
|
|
425
|
+
scope: server.cohort.coverage.scope,
|
|
426
|
+
totalAuthors: server.cohort.coverage.total_authors,
|
|
427
|
+
queriedAuthors: server.cohort.coverage.queried_authors,
|
|
428
|
+
complete: server.cohort.coverage.complete
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Maps item details and the authorized reading session.
|
|
435
|
+
* @param server - The service response.
|
|
436
|
+
* @returns The mapped social feed item response.
|
|
437
|
+
*/
|
|
438
|
+
function mapMobileSocialFeedItemResponse(server) {
|
|
439
|
+
return {
|
|
440
|
+
item: mapMobileSocialFeedItem(server.item),
|
|
441
|
+
readSession: mapMobileSocialFeedReadSession(server.read_session)
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Maps item deltas, preserving omitted fields and explicit null clears.
|
|
446
|
+
* @param server - The service response.
|
|
447
|
+
* @returns The mapped feed item patch.
|
|
448
|
+
*/
|
|
449
|
+
function mapMobileSocialFeedItemPatch(server) {
|
|
450
|
+
return {
|
|
451
|
+
itemId: server.item_id,
|
|
452
|
+
version: server.version,
|
|
453
|
+
author: mapMobileSocialFeedAuthor(server.author),
|
|
454
|
+
displayAtMs: server.display_at_ms,
|
|
455
|
+
...server.interaction === void 0 ? {} : { interaction: mapMobileSocialFeedInteraction(server.interaction) },
|
|
456
|
+
...server.trade_count === void 0 ? {} : { tradeCount: server.trade_count },
|
|
457
|
+
...server.quantity_x18 === void 0 ? {} : { quantity: (0, _nadohq_shared.toBigNumber)(server.quantity_x18) },
|
|
458
|
+
...server.notional_x18 === void 0 ? {} : { notional: server.notional_x18 === null ? null : (0, _nadohq_shared.toBigNumber)(server.notional_x18) },
|
|
459
|
+
...server.average_price_x18 === void 0 ? {} : { averagePrice: (0, _nadohq_shared.removeDecimals)(server.average_price_x18) },
|
|
460
|
+
...server.entry_price_x18 === void 0 ? {} : { entryPrice: (0, _nadohq_shared.removeDecimals)(server.entry_price_x18) },
|
|
461
|
+
...server.liquidation_oracle_price_x18 === void 0 ? {} : { liquidationOraclePrice: (0, _nadohq_shared.removeDecimals)(server.liquidation_oracle_price_x18) },
|
|
462
|
+
...server.liquidation_execution_price_x18 === void 0 ? {} : { liquidationExecutionPrice: (0, _nadohq_shared.removeDecimals)(server.liquidation_execution_price_x18) },
|
|
463
|
+
...server.realized_pnl_delta_x18 === void 0 ? {} : { realizedPnlDelta: server.realized_pnl_delta_x18 === null ? null : (0, _nadohq_shared.toBigNumber)(server.realized_pnl_delta_x18) },
|
|
464
|
+
...server.leverage === void 0 ? {} : { leverage: server.leverage },
|
|
465
|
+
...server.leverage_at_ms === void 0 ? {} : { leverageAtMs: server.leverage_at_ms }
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Maps viewport changes while preserving the sequence and update baseline.
|
|
470
|
+
* @param server - The service response.
|
|
471
|
+
* @returns The mapped feed updates.
|
|
472
|
+
*/
|
|
473
|
+
function mapMobileSocialFeedUpdates(server) {
|
|
474
|
+
return {
|
|
475
|
+
itemPatches: server.item_patches.map(mapMobileSocialFeedItemPatch),
|
|
476
|
+
positionPatches: server.position_patches.map(mapMobileSocialFeedPositionPatch),
|
|
477
|
+
unavailableTargets: server.unavailable_targets,
|
|
478
|
+
newItemsCount: server.new_items_count,
|
|
479
|
+
updateCursor: server.update_cursor,
|
|
480
|
+
reset: server.reset,
|
|
481
|
+
viewportRevision: server.viewport_revision,
|
|
482
|
+
requestSeq: server.request_seq
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Maps common list parameters to the public query wire format without inserting defaults.
|
|
487
|
+
* @param params - Client filters and session pagination.
|
|
488
|
+
* @returns Wire fields; undefined options are omitted when serialized to JSON.
|
|
489
|
+
*/
|
|
490
|
+
function mapMobileSocialFeedListParamsToServer(params) {
|
|
491
|
+
return {
|
|
492
|
+
feed_types: params.feedTypes,
|
|
493
|
+
minimum_notional: params.minimumNotional,
|
|
494
|
+
limit: params.limit,
|
|
495
|
+
session_id: params.sessionId,
|
|
496
|
+
cursor: params.cursor
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Maps the public viewing account and browser credential without inferring an identity.
|
|
501
|
+
* @param params - Public relationship perspective and optional session credential.
|
|
502
|
+
* @returns Wire fields for a public feed read.
|
|
503
|
+
*/
|
|
504
|
+
function mapMobileSocialFeedReadParamsToServer(params) {
|
|
505
|
+
return {
|
|
506
|
+
view_as: params.viewAs === void 0 ? void 0 : (0, _nadohq_shared.subaccountToHex)(params.viewAs),
|
|
507
|
+
viewer_token: params.viewerToken
|
|
508
|
+
};
|
|
509
|
+
}
|
|
173
510
|
//#endregion
|
|
174
511
|
exports.mapMobileFeedPage = mapMobileFeedPage;
|
|
175
512
|
exports.mapMobileFollowListPage = mapMobileFollowListPage;
|
|
@@ -180,5 +517,26 @@ exports.mapMobileNotificationPreferencesToServer = mapMobileNotificationPreferen
|
|
|
180
517
|
exports.mapMobileProfilesIncludeToServer = mapMobileProfilesIncludeToServer;
|
|
181
518
|
exports.mapMobilePublicProfile = mapMobilePublicProfile;
|
|
182
519
|
exports.mapMobileRegisteredWallet = mapMobileRegisteredWallet;
|
|
520
|
+
exports.mapMobileSocialFeedAuthor = mapMobileSocialFeedAuthor;
|
|
521
|
+
exports.mapMobileSocialFeedInteraction = mapMobileSocialFeedInteraction;
|
|
522
|
+
exports.mapMobileSocialFeedItem = mapMobileSocialFeedItem;
|
|
523
|
+
exports.mapMobileSocialFeedItemBase = mapMobileSocialFeedItemBase;
|
|
524
|
+
exports.mapMobileSocialFeedItemPatch = mapMobileSocialFeedItemPatch;
|
|
525
|
+
exports.mapMobileSocialFeedItemResponse = mapMobileSocialFeedItemResponse;
|
|
526
|
+
exports.mapMobileSocialFeedListParamsToServer = mapMobileSocialFeedListParamsToServer;
|
|
527
|
+
exports.mapMobileSocialFeedMarket = mapMobileSocialFeedMarket;
|
|
528
|
+
exports.mapMobileSocialFeedPage = mapMobileSocialFeedPage;
|
|
529
|
+
exports.mapMobileSocialFeedPnl = mapMobileSocialFeedPnl;
|
|
530
|
+
exports.mapMobileSocialFeedPositionCard = mapMobileSocialFeedPositionCard;
|
|
531
|
+
exports.mapMobileSocialFeedPositionPatch = mapMobileSocialFeedPositionPatch;
|
|
532
|
+
exports.mapMobileSocialFeedRankedPage = mapMobileSocialFeedRankedPage;
|
|
533
|
+
exports.mapMobileSocialFeedReadParamsToServer = mapMobileSocialFeedReadParamsToServer;
|
|
534
|
+
exports.mapMobileSocialFeedReadSession = mapMobileSocialFeedReadSession;
|
|
535
|
+
exports.mapMobileSocialFeedTopTradersPage = mapMobileSocialFeedTopTradersPage;
|
|
536
|
+
exports.mapMobileSocialFeedTradeCard = mapMobileSocialFeedTradeCard;
|
|
537
|
+
exports.mapMobileSocialFeedTradeRow = mapMobileSocialFeedTradeRow;
|
|
538
|
+
exports.mapMobileSocialFeedTradeRowBase = mapMobileSocialFeedTradeRowBase;
|
|
539
|
+
exports.mapMobileSocialFeedTraderBadge = mapMobileSocialFeedTraderBadge;
|
|
540
|
+
exports.mapMobileSocialFeedUpdates = mapMobileSocialFeedUpdates;
|
|
183
541
|
|
|
184
542
|
//# sourceMappingURL=dataMappers.cjs.map
|
package/dist/dataMappers.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataMappers.cjs","names":[],"sources":["../src/dataMappers.ts"],"sourcesContent":["import { subaccountToHex } from '@nadohq/shared';\nimport {\n GetMobileFollowListParams,\n MobileFeedPage,\n MobileFeedTrade,\n MobileFollowListPage,\n MobileFollowMutationResult,\n MobileFollowSummary,\n MobileIdentitySummary,\n MobileNotificationPreferenceScope,\n MobileNotificationPreferences,\n MobileProfilesInclude,\n MobilePublicProfile,\n MobileRegisteredWallet,\n} from './types/clientTypes';\nimport { MobileServerFollowMutationResponse } from './types/serverExecuteTypes';\nimport {\n MobileServerFeedTrade,\n MobileServerFollowSummary,\n MobileServerIdentitySummary,\n MobileServerNotificationPreferenceScope,\n MobileServerNotificationPreferences,\n MobileServerProfile,\n} from './types/serverModelTypes';\nimport {\n MobileServerFeedResponse,\n MobileServerFollowListResponse,\n MobileServerRegisteredWalletResponse,\n} from './types/serverQueryTypes';\nimport {\n MobileServerFollowListRequest,\n MobileServerProfilesInclude,\n} from './types/serverRequestTypes';\n\n/**\n * Maps a server-side public profile (snake_case) to its client-side (camelCase) representation. The three\n * include-gated fields stay `undefined` when the backend omitted them, rather than being coerced to `null`\n * or zero, so callers can tell \"not requested\" from a real value.\n */\nexport function mapMobilePublicProfile(\n server: MobileServerProfile,\n): MobilePublicProfile {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n privateMode: server.private_mode,\n followerCount: server.follower_count,\n followingCount: server.following_count,\n followSummary: server.follow_summary\n ? mapMobileFollowSummary(server.follow_summary)\n : undefined,\n };\n}\n\n/**\n * Maps a server-side identity summary (snake_case) to its client-side (camelCase) representation.\n */\nfunction mapMobileIdentitySummary(\n server: MobileServerIdentitySummary,\n): MobileIdentitySummary {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n avatarUrl: server.avatar_url,\n };\n}\n\n/**\n * Maps a server-side follow summary to its client-side representation.\n */\nfunction mapMobileFollowSummary(\n server: MobileServerFollowSummary,\n): MobileFollowSummary {\n return {\n isFollowing: server.is_following,\n followedByCount: server.followed_by_count,\n followedBy: server.followed_by.map(mapMobileIdentitySummary),\n };\n}\n\n/**\n * Maps a server-side Followers or Following response to a client-side {@link MobileFollowListPage}. Rows\n * keep `isFollowing` absent when the request named no `viewAs`, rather than defaulting it to `false`.\n */\nexport function mapMobileFollowListPage(\n server: MobileServerFollowListResponse,\n): MobileFollowListPage {\n return {\n accounts: server.accounts.map((account) => ({\n identity: mapMobileIdentitySummary(account.identity),\n isFollowing: account.is_following,\n followerCount: account.follower_count,\n })),\n nextCursor: server.next_cursor,\n };\n}\n\n/**\n * Maps a server-side follow or unfollow response to its client-side representation.\n */\nexport function mapMobileFollowMutationResult(\n server: MobileServerFollowMutationResponse,\n): MobileFollowMutationResult {\n return {\n isFollowing: server.is_following,\n followerCount: server.follower_count,\n };\n}\n\n/**\n * Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.\n */\nexport function mapMobileNotificationPreferences(\n server: MobileServerNotificationPreferences,\n): MobileNotificationPreferences {\n return {\n schemaVersion: server.schema_version,\n categories: server.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScope),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScope(\n server: MobileServerNotificationPreferenceScope,\n): MobileNotificationPreferenceScope {\n if (server.type === 'subaccount') {\n return { type: 'subaccount', subaccount: server.subaccount };\n }\n return { type: 'product', productId: server.product_id };\n}\n\n/**\n * Maps client-side profiles includes (camelCase) to the server-side (snake_case) wire shape.\n */\nexport function mapMobileProfilesIncludeToServer(\n include: MobileProfilesInclude,\n): MobileServerProfilesInclude {\n return {\n follow_counts: include.followCounts,\n follow_summary: include.followSummary\n ? { view_as: subaccountToHex(include.followSummary.viewAs) }\n : undefined,\n };\n}\n\n/**\n * Maps the client-side params of a Followers or Following page to the server-side wire shape. Both list\n * directions take identical params and differ only in the `type` the caller dispatches on.\n */\nexport function mapMobileFollowListParamsToServer(\n params: GetMobileFollowListParams,\n): MobileServerFollowListRequest {\n return {\n subaccount: subaccountToHex(params.target),\n view_as: params.viewAs ? subaccountToHex(params.viewAs) : undefined,\n cursor: params.cursor,\n limit: params.limit,\n };\n}\n\n/**\n * Maps client-side notification preferences (camelCase) to the server-side (snake_case) wire shape.\n */\nexport function mapMobileNotificationPreferencesToServer(\n preferences: MobileNotificationPreferences,\n): MobileServerNotificationPreferences {\n return {\n schema_version: preferences.schemaVersion,\n categories: preferences.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScopeToServer),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScopeToServer(\n scope: MobileNotificationPreferenceScope,\n): MobileServerNotificationPreferenceScope {\n if (scope.type === 'subaccount') {\n return { type: 'subaccount', subaccount: scope.subaccount };\n }\n return { type: 'product', product_id: scope.productId };\n}\n\n/**\n * Maps a server-side feed trade (snake_case) to its client-side (camelCase) representation.\n */\nfunction mapMobileFeedTrade(server: MobileServerFeedTrade): MobileFeedTrade {\n return {\n ...mapMobileIdentitySummary(server),\n orderDigest: server.order_digest,\n productId: server.product_id,\n quantity: server.quantity,\n notional: server.notional,\n averagePrice: server.average_price,\n margin: {\n mode: server.margin.mode,\n estimatedLeverage: server.margin.estimated_leverage,\n },\n position: server.position,\n realizedPnl: server.realized_pnl,\n filledAt: server.filled_at_ms,\n };\n}\n\n/**\n * Maps a server-side feed response to a client-side {@link MobileFeedPage}.\n */\nexport function mapMobileFeedPage(\n server: MobileServerFeedResponse,\n): MobileFeedPage {\n return {\n trades: server.trades.map(mapMobileFeedTrade),\n nextCursor: server.next_cursor,\n };\n}\n\n/**\n * Maps a server-side registered wallet (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileRegisteredWallet(\n server: MobileServerRegisteredWalletResponse,\n): MobileRegisteredWallet {\n return {\n wallet: server.wallet,\n platform: server.platform,\n locale: server.locale,\n appVersion: server.app_version,\n tokenFingerprintPrefix: server.token_fingerprint_prefix,\n lastSeenAt: server.last_seen_at,\n };\n}\n"],"mappings":";;;;;;;;AAuCA,SAAgB,uBACd,QACqB;CACrB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,aAAa,OAAO;EACpB,eAAe,OAAO;EACtB,gBAAgB,OAAO;EACvB,eAAe,OAAO,iBAClB,uBAAuB,OAAO,cAAc,IAC5C,KAAA;CACN;AACF;;;;AAKA,SAAS,yBACP,QACuB;CACvB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,WAAW,OAAO;CACpB;AACF;;;;AAKA,SAAS,uBACP,QACqB;CACrB,OAAO;EACL,aAAa,OAAO;EACpB,iBAAiB,OAAO;EACxB,YAAY,OAAO,YAAY,IAAI,wBAAwB;CAC7D;AACF;;;;;AAMA,SAAgB,wBACd,QACsB;CACtB,OAAO;EACL,UAAU,OAAO,SAAS,KAAK,aAAa;GAC1C,UAAU,yBAAyB,QAAQ,QAAQ;GACnD,aAAa,QAAQ;GACrB,eAAe,QAAQ;EACzB,EAAE;EACF,YAAY,OAAO;CACrB;AACF;;;;AAKA,SAAgB,8BACd,QAC4B;CAC5B,OAAO;EACL,aAAa,OAAO;EACpB,eAAe,OAAO;CACxB;AACF;;;;AAKA,SAAgB,iCACd,QAC+B;CAC/B,OAAO;EACL,eAAe,OAAO;EACtB,YAAY,OAAO,WAAW,KAAK,cAAc;GAC/C,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,oCAAoC;EAClE,EAAE;CACJ;AACF;AAEA,SAAS,qCACP,QACmC;CACnC,IAAI,OAAO,SAAS,cAClB,OAAO;EAAE,MAAM;EAAc,YAAY,OAAO;CAAW;CAE7D,OAAO;EAAE,MAAM;EAAW,WAAW,OAAO;CAAW;AACzD;;;;AAKA,SAAgB,iCACd,SAC6B;CAC7B,OA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AAO;CACrB;AACF"}
|
|
1
|
+
{"version":3,"file":"dataMappers.cjs","names":[],"sources":["../src/dataMappers.ts"],"sourcesContent":["import { removeDecimals, subaccountToHex, toBigNumber } from '@nadohq/shared';\nimport {\n GetMobileFollowListParams,\n MobileFeedPage,\n MobileFeedTrade,\n MobileFollowListPage,\n MobileFollowMutationResult,\n MobileFollowSummary,\n MobileIdentitySummary,\n MobileNotificationPreferenceScope,\n MobileNotificationPreferences,\n MobileProfilesInclude,\n MobilePublicProfile,\n MobileRegisteredWallet,\n MobileSocialFeedAuthor,\n MobileSocialFeedInteraction,\n MobileSocialFeedItem,\n MobileSocialFeedItemBase,\n MobileSocialFeedItemPatch,\n MobileSocialFeedItemResponse,\n MobileSocialFeedListParams,\n MobileSocialFeedMarket,\n MobileSocialFeedPage,\n MobileSocialFeedPnl,\n MobileSocialFeedPositionCard,\n MobileSocialFeedPositionPatch,\n MobileSocialFeedRankedPage,\n MobileSocialFeedReadParams,\n MobileSocialFeedReadSession,\n MobileSocialFeedTopTradersPage,\n MobileSocialFeedTradeCard,\n MobileSocialFeedTradeRow,\n MobileSocialFeedTradeRowBase,\n MobileSocialFeedTraderBadge,\n MobileSocialFeedUpdates,\n} from './types/clientTypes';\nimport { MobileServerFollowMutationResponse } from './types/serverExecuteTypes';\nimport {\n MobileServerFeedTrade,\n MobileServerFollowSummary,\n MobileServerIdentitySummary,\n MobileServerNotificationPreferenceScope,\n MobileServerNotificationPreferences,\n MobileServerProfile,\n MobileServerSocialFeedAuthor,\n MobileServerSocialFeedInteraction,\n MobileServerSocialFeedItem,\n MobileServerSocialFeedItemBase,\n MobileServerSocialFeedItemPatch,\n MobileServerSocialFeedMarket,\n MobileServerSocialFeedPnl,\n MobileServerSocialFeedPositionCard,\n MobileServerSocialFeedPositionPatch,\n MobileServerSocialFeedReadSession,\n MobileServerSocialFeedTradeCard,\n MobileServerSocialFeedTradeRow,\n MobileServerSocialFeedTradeRowBase,\n MobileServerSocialFeedTraderBadge,\n} from './types/serverModelTypes';\nimport {\n MobileServerFeedResponse,\n MobileServerFollowListResponse,\n MobileServerRegisteredWalletResponse,\n MobileServerSocialFeedItemResponse,\n MobileServerSocialFeedRankedResponse,\n MobileServerSocialFeedResponse,\n MobileServerSocialFeedTopTradersResponse,\n MobileServerSocialFeedUpdatesResponse,\n} from './types/serverQueryTypes';\nimport {\n MobileServerFollowListRequest,\n MobileServerProfilesInclude,\n MobileServerSocialFeedListParams,\n MobileServerSocialFeedReadParams,\n} from './types/serverRequestTypes';\n\n/**\n * Maps a server-side public profile (snake_case) to its client-side (camelCase) representation. The three\n * include-gated fields stay `undefined` when the backend omitted them, rather than being coerced to `null`\n * or zero, so callers can tell \"not requested\" from a real value.\n */\nexport function mapMobilePublicProfile(\n server: MobileServerProfile,\n): MobilePublicProfile {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n privateMode: server.private_mode,\n followerCount: server.follower_count,\n followingCount: server.following_count,\n followSummary: server.follow_summary\n ? mapMobileFollowSummary(server.follow_summary)\n : undefined,\n };\n}\n\n/**\n * Maps a server-side identity summary (snake_case) to its client-side (camelCase) representation.\n */\nfunction mapMobileIdentitySummary(\n server: MobileServerIdentitySummary,\n): MobileIdentitySummary {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n avatarUrl: server.avatar_url,\n };\n}\n\n/**\n * Maps a server-side follow summary to its client-side representation.\n */\nfunction mapMobileFollowSummary(\n server: MobileServerFollowSummary,\n): MobileFollowSummary {\n return {\n isFollowing: server.is_following,\n followedByCount: server.followed_by_count,\n followedBy: server.followed_by.map(mapMobileIdentitySummary),\n };\n}\n\n/**\n * Maps a server-side Followers or Following response to a client-side {@link MobileFollowListPage}. Rows\n * keep `isFollowing` absent when the request named no `viewAs`, rather than defaulting it to `false`.\n */\nexport function mapMobileFollowListPage(\n server: MobileServerFollowListResponse,\n): MobileFollowListPage {\n return {\n accounts: server.accounts.map((account) => ({\n identity: mapMobileIdentitySummary(account.identity),\n isFollowing: account.is_following,\n followerCount: account.follower_count,\n })),\n nextCursor: server.next_cursor,\n };\n}\n\n/**\n * Maps a server-side follow or unfollow response to its client-side representation.\n */\nexport function mapMobileFollowMutationResult(\n server: MobileServerFollowMutationResponse,\n): MobileFollowMutationResult {\n return {\n isFollowing: server.is_following,\n followerCount: server.follower_count,\n };\n}\n\n/**\n * Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.\n */\nexport function mapMobileNotificationPreferences(\n server: MobileServerNotificationPreferences,\n): MobileNotificationPreferences {\n return {\n schemaVersion: server.schema_version,\n categories: server.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScope),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScope(\n server: MobileServerNotificationPreferenceScope,\n): MobileNotificationPreferenceScope {\n if (server.type === 'subaccount') {\n return { type: 'subaccount', subaccount: server.subaccount };\n }\n return { type: 'product', productId: server.product_id };\n}\n\n/**\n * Maps client-side profiles includes (camelCase) to the server-side (snake_case) wire shape.\n */\nexport function mapMobileProfilesIncludeToServer(\n include: MobileProfilesInclude,\n): MobileServerProfilesInclude {\n return {\n follow_counts: include.followCounts,\n follow_summary: include.followSummary\n ? { view_as: subaccountToHex(include.followSummary.viewAs) }\n : undefined,\n };\n}\n\n/**\n * Maps the client-side params of a Followers or Following page to the server-side wire shape. Both list\n * directions take identical params and differ only in the `type` the caller dispatches on.\n */\nexport function mapMobileFollowListParamsToServer(\n params: GetMobileFollowListParams,\n): MobileServerFollowListRequest {\n return {\n subaccount: subaccountToHex(params.target),\n view_as: params.viewAs ? subaccountToHex(params.viewAs) : undefined,\n cursor: params.cursor,\n limit: params.limit,\n };\n}\n\n/**\n * Maps client-side notification preferences (camelCase) to the server-side (snake_case) wire shape.\n */\nexport function mapMobileNotificationPreferencesToServer(\n preferences: MobileNotificationPreferences,\n): MobileServerNotificationPreferences {\n return {\n schema_version: preferences.schemaVersion,\n categories: preferences.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScopeToServer),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScopeToServer(\n scope: MobileNotificationPreferenceScope,\n): MobileServerNotificationPreferenceScope {\n if (scope.type === 'subaccount') {\n return { type: 'subaccount', subaccount: scope.subaccount };\n }\n return { type: 'product', product_id: scope.productId };\n}\n\n/**\n * Maps a server-side feed trade (snake_case) to its client-side (camelCase) representation.\n */\nfunction mapMobileFeedTrade(server: MobileServerFeedTrade): MobileFeedTrade {\n return {\n ...mapMobileIdentitySummary(server),\n orderDigest: server.order_digest,\n productId: server.product_id,\n quantity: server.quantity,\n notional: server.notional,\n averagePrice: server.average_price,\n margin: {\n mode: server.margin.mode,\n estimatedLeverage: server.margin.estimated_leverage,\n },\n position: server.position,\n realizedPnl: server.realized_pnl,\n filledAt: server.filled_at_ms,\n };\n}\n\n/**\n * Maps a server-side feed response to a client-side {@link MobileFeedPage}.\n */\nexport function mapMobileFeedPage(\n server: MobileServerFeedResponse,\n): MobileFeedPage {\n return {\n trades: server.trades.map(mapMobileFeedTrade),\n nextCursor: server.next_cursor,\n };\n}\n\n/**\n * Maps a server-side registered wallet (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileRegisteredWallet(\n server: MobileServerRegisteredWalletResponse,\n): MobileRegisteredWallet {\n return {\n wallet: server.wallet,\n platform: server.platform,\n locale: server.locale,\n appVersion: server.app_version,\n tokenFingerprintPrefix: server.token_fingerprint_prefix,\n lastSeenAt: server.last_seen_at,\n };\n}\n\n/**\n * Maps the official account PnL badge, retaining x18 amount units.\n * @param server - The service response.\n * @returns The mapped trader badge.\n */\nexport function mapMobileSocialFeedTraderBadge(\n server: MobileServerSocialFeedTraderBadge,\n): MobileSocialFeedTraderBadge {\n return {\n code: server.code,\n pnl: toBigNumber(server.pnl_x18),\n metricKey: server.metric_key,\n window: server.window,\n sourceAsOfMs: server.source_as_of_ms,\n fetchedAtMs: server.fetched_at_ms,\n snapshotId: server.snapshot_id,\n };\n}\n\n/**\n * Maps author identity, relationship state, and optional qualification badge.\n * @param server - The service response.\n * @returns The mapped feed author.\n */\nexport function mapMobileSocialFeedAuthor(\n server: MobileServerSocialFeedAuthor,\n): MobileSocialFeedAuthor {\n return {\n ...mapMobileIdentitySummary(server),\n isFollowing: server.is_following,\n traderBadge:\n server.trader_badge === null\n ? null\n : mapMobileSocialFeedTraderBadge(server.trader_badge),\n traderDataStatus: server.trader_data_status,\n };\n}\n\n/**\n * Maps social market metadata.\n * @param server - The service response.\n * @returns The mapped feed market.\n */\nexport function mapMobileSocialFeedMarket(\n server: MobileServerSocialFeedMarket,\n): MobileSocialFeedMarket {\n return {\n productId: server.product_id,\n symbol: server.symbol,\n logoUrl: server.logo_url,\n category: server.category,\n sourceCategories: server.source_categories,\n };\n}\n\n/**\n * Maps position PnL while retaining x18 amount units and availability.\n * @param server - The service response.\n * @returns The mapped feed pnl.\n */\nexport function mapMobileSocialFeedPnl(\n server: MobileServerSocialFeedPnl,\n): MobileSocialFeedPnl {\n return {\n amount: server.amount_x18 === null ? null : toBigNumber(server.amount_x18),\n basis: server.basis,\n mode: server.mode,\n asOfMs: server.as_of_ms,\n quality: server.quality,\n };\n}\n\n/**\n * Maps complete position facts, converting entry price to decimal units.\n * @param server - The service response.\n * @returns The mapped feed position patch.\n */\nexport function mapMobileSocialFeedPositionPatch(\n server: MobileServerSocialFeedPositionPatch,\n): MobileSocialFeedPositionPatch {\n return {\n positionId: server.position_id,\n positionVersion: server.position_version,\n stateAsOfMs: server.state_as_of_ms,\n entryPrice: removeDecimals(server.entry_price_x18),\n displayBasis: server.display_basis,\n snapshotAtMs: server.snapshot_at_ms,\n quantity: toBigNumber(server.quantity_x18),\n notional: toBigNumber(server.notional_x18),\n state: server.state,\n historyQuality: server.history_quality,\n marginMode: server.margin_mode,\n leverage: server.leverage,\n leverageAtMs: server.leverage_at_ms,\n pnl: mapMobileSocialFeedPnl(server.pnl),\n };\n}\n\n/**\n * Maps a position card with its current or frozen financial state.\n * @param server - The service response.\n * @returns The mapped feed position card.\n */\nexport function mapMobileSocialFeedPositionCard(\n server: MobileServerSocialFeedPositionCard,\n): MobileSocialFeedPositionCard {\n return {\n ...mapMobileSocialFeedPositionPatch(server),\n productId: server.product_id,\n market: mapMobileSocialFeedMarket(server.market),\n direction: server.direction,\n };\n}\n\n/**\n * Maps interaction counters without inventing unavailable relationship state.\n * @param server - The service response.\n * @returns The mapped feed interaction.\n */\nexport function mapMobileSocialFeedInteraction(\n server: MobileServerSocialFeedInteraction,\n): MobileSocialFeedInteraction {\n return {\n likeCount: server.like_count,\n commentCount: server.comment_count,\n viewCount: server.view_count,\n likedByMe: server.liked_by_me,\n };\n}\n\n/**\n * Maps common item metadata and server capabilities.\n * @param server - The service response.\n * @returns The mapped social feed item base.\n */\nexport function mapMobileSocialFeedItemBase(\n server: MobileServerSocialFeedItemBase,\n): MobileSocialFeedItemBase {\n return {\n id: server.id,\n hasAnalysis: server.has_analysis,\n drawing: server.drawing,\n author: mapMobileSocialFeedAuthor(server.author),\n createdAtMs: server.created_at_ms,\n displayAtMs: server.display_at_ms,\n version: server.version,\n market: mapMobileSocialFeedMarket(server.market),\n capabilities: {\n canLike: server.capabilities.can_like,\n canComment: server.capabilities.can_comment,\n canRecordView: server.capabilities.can_record_view,\n },\n };\n}\n\n/**\n * Maps an automatic trade card and its position and interaction metadata.\n * @param server - The service response.\n * @returns The mapped social trade card.\n */\nexport function mapMobileSocialFeedTradeCard(\n server: MobileServerSocialFeedTradeCard,\n): MobileSocialFeedTradeCard {\n return {\n ...mapMobileSocialFeedItemBase(server),\n kind: server.kind,\n action: server.action,\n text: server.text,\n mentions: server.mentions,\n position: mapMobileSocialFeedPositionCard(server.position),\n interaction: mapMobileSocialFeedInteraction(server.interaction),\n commentPreview: {\n items: server.comment_preview.items,\n totalCount: server.comment_preview.total_count,\n nextCursor: server.comment_preview.next_cursor,\n },\n };\n}\n\n/**\n * Maps historical trade facts with decimal execution prices and x18 quantities.\n * @param server - The service response.\n * @returns The mapped social trade row base.\n */\nexport function mapMobileSocialFeedTradeRowBase(\n server: MobileServerSocialFeedTradeRowBase,\n): MobileSocialFeedTradeRowBase {\n return {\n ...mapMobileSocialFeedItemBase(server),\n kind: server.kind,\n positionId: server.position_id,\n direction: server.direction,\n marginMode: server.margin_mode,\n leverage: server.leverage,\n leverageAtMs: server.leverage_at_ms,\n tradeCount: server.trade_count,\n quantity: toBigNumber(server.quantity_x18),\n averagePrice: removeDecimals(server.average_price_x18),\n };\n}\n\n/**\n * Maps size changes and independently nullable liquidation facts.\n * @param server - The service response.\n * @returns The mapped social trade row.\n */\nexport function mapMobileSocialFeedTradeRow(\n server: MobileServerSocialFeedTradeRow,\n): MobileSocialFeedTradeRow {\n const base = mapMobileSocialFeedTradeRowBase(server);\n if (server.action === 'liquidated') {\n return {\n ...base,\n action: server.action,\n notional:\n server.notional_x18 === null ? null : toBigNumber(server.notional_x18),\n entryPrice: removeDecimals(server.entry_price_x18),\n liquidationOraclePrice: removeDecimals(\n server.liquidation_oracle_price_x18,\n ),\n liquidationExecutionPrice: removeDecimals(\n server.liquidation_execution_price_x18,\n ),\n realizedPnlDelta:\n server.realized_pnl_delta_x18 === null\n ? null\n : toBigNumber(server.realized_pnl_delta_x18),\n };\n }\n return {\n ...base,\n action: server.action,\n notional: toBigNumber(server.notional_x18),\n };\n}\n\n/**\n * Maps the item variant without mixing card and row fields.\n * @param server - The service response.\n * @returns The mapped social feed item.\n */\nexport function mapMobileSocialFeedItem(\n server: MobileServerSocialFeedItem,\n): MobileSocialFeedItem {\n return server.kind === 'trade_card'\n ? mapMobileSocialFeedTradeCard(server)\n : mapMobileSocialFeedTradeRow(server);\n}\n\n/**\n * Maps a fixed reading session, preserving opaque credentials and cursors.\n * @param server - The service response.\n * @returns The mapped feed read session.\n */\nexport function mapMobileSocialFeedReadSession(\n server: MobileServerSocialFeedReadSession,\n): MobileSocialFeedReadSession {\n return {\n sessionId: server.session_id,\n mode: server.mode,\n expiresAtMs: server.expires_at_ms,\n viewTracking: {\n minVisibleRatio: server.view_tracking.min_visible_ratio,\n minDurationMs: server.view_tracking.min_duration_ms,\n },\n updateCursor: server.update_cursor,\n viewerToken: server.viewer_token,\n };\n}\n\n/**\n * Maps a fixed feed page without changing item order or pagination.\n * @param server - The service response.\n * @returns The mapped social feed page.\n */\nexport function mapMobileSocialFeedPage(\n server: MobileServerSocialFeedResponse,\n): MobileSocialFeedPage {\n return {\n readSession: mapMobileSocialFeedReadSession(server.read_session),\n items: server.items.map(mapMobileSocialFeedItem),\n nextCursor: server.next_cursor,\n watermark: server.watermark,\n };\n}\n\n/**\n * Maps a main feed page and its ranking version.\n * @param server - The service response.\n * @returns The mapped ranked feed page.\n */\nexport function mapMobileSocialFeedRankedPage(\n server: MobileServerSocialFeedRankedResponse,\n): MobileSocialFeedRankedPage {\n return {\n ...mapMobileSocialFeedPage(server),\n rankingVersion: server.ranking_version,\n };\n}\n\n/**\n * Maps qualified trader items and their shared eligibility snapshot.\n * @param server - The service response.\n * @returns The mapped top traders feed page.\n */\nexport function mapMobileSocialFeedTopTradersPage(\n server: MobileServerSocialFeedTopTradersResponse,\n): MobileSocialFeedTopTradersPage {\n return {\n ...mapMobileSocialFeedRankedPage(server),\n cohort: {\n snapshotId: server.cohort.snapshot_id,\n status: server.cohort.status,\n coverage: {\n scope: server.cohort.coverage.scope,\n totalAuthors: server.cohort.coverage.total_authors,\n queriedAuthors: server.cohort.coverage.queried_authors,\n complete: server.cohort.coverage.complete,\n },\n },\n };\n}\n\n/**\n * Maps item details and the authorized reading session.\n * @param server - The service response.\n * @returns The mapped social feed item response.\n */\nexport function mapMobileSocialFeedItemResponse(\n server: MobileServerSocialFeedItemResponse,\n): MobileSocialFeedItemResponse {\n return {\n item: mapMobileSocialFeedItem(server.item),\n readSession: mapMobileSocialFeedReadSession(server.read_session),\n };\n}\n\n/**\n * Maps item deltas, preserving omitted fields and explicit null clears.\n * @param server - The service response.\n * @returns The mapped feed item patch.\n */\nexport function mapMobileSocialFeedItemPatch(\n server: MobileServerSocialFeedItemPatch,\n): MobileSocialFeedItemPatch {\n return {\n itemId: server.item_id,\n version: server.version,\n author: mapMobileSocialFeedAuthor(server.author),\n displayAtMs: server.display_at_ms,\n ...(server.interaction === undefined\n ? {}\n : { interaction: mapMobileSocialFeedInteraction(server.interaction) }),\n ...(server.trade_count === undefined\n ? {}\n : { tradeCount: server.trade_count }),\n ...(server.quantity_x18 === undefined\n ? {}\n : { quantity: toBigNumber(server.quantity_x18) }),\n ...(server.notional_x18 === undefined\n ? {}\n : {\n notional:\n server.notional_x18 === null\n ? null\n : toBigNumber(server.notional_x18),\n }),\n ...(server.average_price_x18 === undefined\n ? {}\n : {\n averagePrice: removeDecimals(server.average_price_x18),\n }),\n ...(server.entry_price_x18 === undefined\n ? {}\n : {\n entryPrice: removeDecimals(server.entry_price_x18),\n }),\n ...(server.liquidation_oracle_price_x18 === undefined\n ? {}\n : {\n liquidationOraclePrice: removeDecimals(\n server.liquidation_oracle_price_x18,\n ),\n }),\n ...(server.liquidation_execution_price_x18 === undefined\n ? {}\n : {\n liquidationExecutionPrice: removeDecimals(\n server.liquidation_execution_price_x18,\n ),\n }),\n ...(server.realized_pnl_delta_x18 === undefined\n ? {}\n : {\n realizedPnlDelta:\n server.realized_pnl_delta_x18 === null\n ? null\n : toBigNumber(server.realized_pnl_delta_x18),\n }),\n ...(server.leverage === undefined ? {} : { leverage: server.leverage }),\n ...(server.leverage_at_ms === undefined\n ? {}\n : { leverageAtMs: server.leverage_at_ms }),\n };\n}\n\n/**\n * Maps viewport changes while preserving the sequence and update baseline.\n * @param server - The service response.\n * @returns The mapped feed updates.\n */\nexport function mapMobileSocialFeedUpdates(\n server: MobileServerSocialFeedUpdatesResponse,\n): MobileSocialFeedUpdates {\n return {\n itemPatches: server.item_patches.map(mapMobileSocialFeedItemPatch),\n positionPatches: server.position_patches.map(\n mapMobileSocialFeedPositionPatch,\n ),\n unavailableTargets: server.unavailable_targets,\n newItemsCount: server.new_items_count,\n updateCursor: server.update_cursor,\n reset: server.reset,\n viewportRevision: server.viewport_revision,\n requestSeq: server.request_seq,\n };\n}\n\n/**\n * Maps common list parameters to the public query wire format without inserting defaults.\n * @param params - Client filters and session pagination.\n * @returns Wire fields; undefined options are omitted when serialized to JSON.\n */\nexport function mapMobileSocialFeedListParamsToServer(\n params: MobileSocialFeedListParams,\n): MobileServerSocialFeedListParams {\n return {\n feed_types: params.feedTypes,\n minimum_notional: params.minimumNotional,\n limit: params.limit,\n session_id: params.sessionId,\n cursor: params.cursor,\n };\n}\n\n/**\n * Maps the public viewing account and browser credential without inferring an identity.\n * @param params - Public relationship perspective and optional session credential.\n * @returns Wire fields for a public feed read.\n */\nexport function mapMobileSocialFeedReadParamsToServer(\n params: MobileSocialFeedReadParams,\n): MobileServerSocialFeedReadParams {\n return {\n view_as:\n params.viewAs === undefined ? undefined : subaccountToHex(params.viewAs),\n viewer_token: params.viewerToken,\n };\n}\n"],"mappings":";;;;;;;;AAiFA,SAAgB,uBACd,QACqB;CACrB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,aAAa,OAAO;EACpB,eAAe,OAAO;EACtB,gBAAgB,OAAO;EACvB,eAAe,OAAO,iBAClB,uBAAuB,OAAO,cAAc,IAC5C,KAAA;CACN;AACF;;;;AAKA,SAAS,yBACP,QACuB;CACvB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,WAAW,OAAO;CACpB;AACF;;;;AAKA,SAAS,uBACP,QACqB;CACrB,OAAO;EACL,aAAa,OAAO;EACpB,iBAAiB,OAAO;EACxB,YAAY,OAAO,YAAY,IAAI,wBAAwB;CAC7D;AACF;;;;;AAMA,SAAgB,wBACd,QACsB;CACtB,OAAO;EACL,UAAU,OAAO,SAAS,KAAK,aAAa;GAC1C,UAAU,yBAAyB,QAAQ,QAAQ;GACnD,aAAa,QAA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1,8 @@
|
|
|
1
|
-
import { _ as MobileServerNotificationPreferences, v as MobileServerProfile } from "./serverModelTypes-
|
|
2
|
-
import {
|
|
3
|
-
import { n as MobileServerFollowListRequest, r as MobileServerProfilesInclude } from "./serverRequestTypes-
|
|
4
|
-
import { a as MobileServerFollowMutationResponse } from "./serverExecuteTypes-
|
|
5
|
-
import { c as MobileServerRegisteredWalletResponse, n as MobileServerFollowListResponse, t as MobileServerFeedResponse } from "./serverQueryTypes-
|
|
1
|
+
import { A as MobileServerSocialFeedPositionCard, D as MobileServerSocialFeedItemPatch, E as MobileServerSocialFeedItemBase, F as MobileServerSocialFeedTradeRowBase, I as MobileServerSocialFeedTraderBadge, M as MobileServerSocialFeedReadSession, N as MobileServerSocialFeedTradeCard, O as MobileServerSocialFeedMarket, P as MobileServerSocialFeedTradeRow, T as MobileServerSocialFeedItem, _ as MobileServerNotificationPreferences, j as MobileServerSocialFeedPositionPatch, k as MobileServerSocialFeedPnl, v as MobileServerProfile, w as MobileServerSocialFeedInteraction, y as MobileServerSocialFeedAuthor } from "./serverModelTypes-MlqdaMRd.cjs";
|
|
2
|
+
import { $ as MobileSocialFeedRankedPage, D as MobileNotificationPreferences, G as MobileSocialFeedItemPatch, H as MobileSocialFeedInteraction, I as MobileSocialFeedAuthor, J as MobileSocialFeedMarket, K as MobileSocialFeedItemResponse, O as MobileProfilesInclude, Q as MobileSocialFeedPositionPatch, S as MobileFollowMutationResult, U as MobileSocialFeedItem, W as MobileSocialFeedItemBase, X as MobileSocialFeedPnl, Y as MobileSocialFeedPage, Z as MobileSocialFeedPositionCard, at as MobileSocialFeedTradeRowBase, et as MobileSocialFeedReadParams, i as GetMobileFollowListParams, it as MobileSocialFeedTradeRow, j as MobileRegisteredWallet, k as MobilePublicProfile, nt as MobileSocialFeedTopTradersPage, ot as MobileSocialFeedTraderBadge, q as MobileSocialFeedListParams, rt as MobileSocialFeedTradeCard, st as MobileSocialFeedUpdates, tt as MobileSocialFeedReadSession, v as MobileFeedPage, x as MobileFollowListPage } from "./clientTypes-YF5d8bvg.cjs";
|
|
3
|
+
import { d as MobileServerSocialFeedReadParams, n as MobileServerFollowListRequest, r as MobileServerProfilesInclude, u as MobileServerSocialFeedListParams } from "./serverRequestTypes-XbnLUsXT.cjs";
|
|
4
|
+
import { a as MobileServerFollowMutationResponse } from "./serverExecuteTypes-TPX0GCgv.cjs";
|
|
5
|
+
import { c as MobileServerRegisteredWalletResponse, d as MobileServerSocialFeedResponse, f as MobileServerSocialFeedTopTradersResponse, l as MobileServerSocialFeedItemResponse, n as MobileServerFollowListResponse, p as MobileServerSocialFeedUpdatesResponse, t as MobileServerFeedResponse, u as MobileServerSocialFeedRankedResponse } from "./serverQueryTypes-BZOoJBpb.cjs";
|
|
6
6
|
|
|
7
7
|
//#region src/dataMappers.d.ts
|
|
8
8
|
/**
|
|
@@ -45,6 +45,132 @@ declare function mapMobileFeedPage(server: MobileServerFeedResponse): MobileFeed
|
|
|
45
45
|
* Maps a server-side registered wallet (snake_case) to its client-side (camelCase) representation.
|
|
46
46
|
*/
|
|
47
47
|
declare function mapMobileRegisteredWallet(server: MobileServerRegisteredWalletResponse): MobileRegisteredWallet;
|
|
48
|
+
/**
|
|
49
|
+
* Maps the official account PnL badge, retaining x18 amount units.
|
|
50
|
+
* @param server - The service response.
|
|
51
|
+
* @returns The mapped trader badge.
|
|
52
|
+
*/
|
|
53
|
+
declare function mapMobileSocialFeedTraderBadge(server: MobileServerSocialFeedTraderBadge): MobileSocialFeedTraderBadge;
|
|
54
|
+
/**
|
|
55
|
+
* Maps author identity, relationship state, and optional qualification badge.
|
|
56
|
+
* @param server - The service response.
|
|
57
|
+
* @returns The mapped feed author.
|
|
58
|
+
*/
|
|
59
|
+
declare function mapMobileSocialFeedAuthor(server: MobileServerSocialFeedAuthor): MobileSocialFeedAuthor;
|
|
60
|
+
/**
|
|
61
|
+
* Maps social market metadata.
|
|
62
|
+
* @param server - The service response.
|
|
63
|
+
* @returns The mapped feed market.
|
|
64
|
+
*/
|
|
65
|
+
declare function mapMobileSocialFeedMarket(server: MobileServerSocialFeedMarket): MobileSocialFeedMarket;
|
|
66
|
+
/**
|
|
67
|
+
* Maps position PnL while retaining x18 amount units and availability.
|
|
68
|
+
* @param server - The service response.
|
|
69
|
+
* @returns The mapped feed pnl.
|
|
70
|
+
*/
|
|
71
|
+
declare function mapMobileSocialFeedPnl(server: MobileServerSocialFeedPnl): MobileSocialFeedPnl;
|
|
72
|
+
/**
|
|
73
|
+
* Maps complete position facts, converting entry price to decimal units.
|
|
74
|
+
* @param server - The service response.
|
|
75
|
+
* @returns The mapped feed position patch.
|
|
76
|
+
*/
|
|
77
|
+
declare function mapMobileSocialFeedPositionPatch(server: MobileServerSocialFeedPositionPatch): MobileSocialFeedPositionPatch;
|
|
78
|
+
/**
|
|
79
|
+
* Maps a position card with its current or frozen financial state.
|
|
80
|
+
* @param server - The service response.
|
|
81
|
+
* @returns The mapped feed position card.
|
|
82
|
+
*/
|
|
83
|
+
declare function mapMobileSocialFeedPositionCard(server: MobileServerSocialFeedPositionCard): MobileSocialFeedPositionCard;
|
|
84
|
+
/**
|
|
85
|
+
* Maps interaction counters without inventing unavailable relationship state.
|
|
86
|
+
* @param server - The service response.
|
|
87
|
+
* @returns The mapped feed interaction.
|
|
88
|
+
*/
|
|
89
|
+
declare function mapMobileSocialFeedInteraction(server: MobileServerSocialFeedInteraction): MobileSocialFeedInteraction;
|
|
90
|
+
/**
|
|
91
|
+
* Maps common item metadata and server capabilities.
|
|
92
|
+
* @param server - The service response.
|
|
93
|
+
* @returns The mapped social feed item base.
|
|
94
|
+
*/
|
|
95
|
+
declare function mapMobileSocialFeedItemBase(server: MobileServerSocialFeedItemBase): MobileSocialFeedItemBase;
|
|
96
|
+
/**
|
|
97
|
+
* Maps an automatic trade card and its position and interaction metadata.
|
|
98
|
+
* @param server - The service response.
|
|
99
|
+
* @returns The mapped social trade card.
|
|
100
|
+
*/
|
|
101
|
+
declare function mapMobileSocialFeedTradeCard(server: MobileServerSocialFeedTradeCard): MobileSocialFeedTradeCard;
|
|
102
|
+
/**
|
|
103
|
+
* Maps historical trade facts with decimal execution prices and x18 quantities.
|
|
104
|
+
* @param server - The service response.
|
|
105
|
+
* @returns The mapped social trade row base.
|
|
106
|
+
*/
|
|
107
|
+
declare function mapMobileSocialFeedTradeRowBase(server: MobileServerSocialFeedTradeRowBase): MobileSocialFeedTradeRowBase;
|
|
108
|
+
/**
|
|
109
|
+
* Maps size changes and independently nullable liquidation facts.
|
|
110
|
+
* @param server - The service response.
|
|
111
|
+
* @returns The mapped social trade row.
|
|
112
|
+
*/
|
|
113
|
+
declare function mapMobileSocialFeedTradeRow(server: MobileServerSocialFeedTradeRow): MobileSocialFeedTradeRow;
|
|
114
|
+
/**
|
|
115
|
+
* Maps the item variant without mixing card and row fields.
|
|
116
|
+
* @param server - The service response.
|
|
117
|
+
* @returns The mapped social feed item.
|
|
118
|
+
*/
|
|
119
|
+
declare function mapMobileSocialFeedItem(server: MobileServerSocialFeedItem): MobileSocialFeedItem;
|
|
120
|
+
/**
|
|
121
|
+
* Maps a fixed reading session, preserving opaque credentials and cursors.
|
|
122
|
+
* @param server - The service response.
|
|
123
|
+
* @returns The mapped feed read session.
|
|
124
|
+
*/
|
|
125
|
+
declare function mapMobileSocialFeedReadSession(server: MobileServerSocialFeedReadSession): MobileSocialFeedReadSession;
|
|
126
|
+
/**
|
|
127
|
+
* Maps a fixed feed page without changing item order or pagination.
|
|
128
|
+
* @param server - The service response.
|
|
129
|
+
* @returns The mapped social feed page.
|
|
130
|
+
*/
|
|
131
|
+
declare function mapMobileSocialFeedPage(server: MobileServerSocialFeedResponse): MobileSocialFeedPage;
|
|
132
|
+
/**
|
|
133
|
+
* Maps a main feed page and its ranking version.
|
|
134
|
+
* @param server - The service response.
|
|
135
|
+
* @returns The mapped ranked feed page.
|
|
136
|
+
*/
|
|
137
|
+
declare function mapMobileSocialFeedRankedPage(server: MobileServerSocialFeedRankedResponse): MobileSocialFeedRankedPage;
|
|
138
|
+
/**
|
|
139
|
+
* Maps qualified trader items and their shared eligibility snapshot.
|
|
140
|
+
* @param server - The service response.
|
|
141
|
+
* @returns The mapped top traders feed page.
|
|
142
|
+
*/
|
|
143
|
+
declare function mapMobileSocialFeedTopTradersPage(server: MobileServerSocialFeedTopTradersResponse): MobileSocialFeedTopTradersPage;
|
|
144
|
+
/**
|
|
145
|
+
* Maps item details and the authorized reading session.
|
|
146
|
+
* @param server - The service response.
|
|
147
|
+
* @returns The mapped social feed item response.
|
|
148
|
+
*/
|
|
149
|
+
declare function mapMobileSocialFeedItemResponse(server: MobileServerSocialFeedItemResponse): MobileSocialFeedItemResponse;
|
|
150
|
+
/**
|
|
151
|
+
* Maps item deltas, preserving omitted fields and explicit null clears.
|
|
152
|
+
* @param server - The service response.
|
|
153
|
+
* @returns The mapped feed item patch.
|
|
154
|
+
*/
|
|
155
|
+
declare function mapMobileSocialFeedItemPatch(server: MobileServerSocialFeedItemPatch): MobileSocialFeedItemPatch;
|
|
156
|
+
/**
|
|
157
|
+
* Maps viewport changes while preserving the sequence and update baseline.
|
|
158
|
+
* @param server - The service response.
|
|
159
|
+
* @returns The mapped feed updates.
|
|
160
|
+
*/
|
|
161
|
+
declare function mapMobileSocialFeedUpdates(server: MobileServerSocialFeedUpdatesResponse): MobileSocialFeedUpdates;
|
|
162
|
+
/**
|
|
163
|
+
* Maps common list parameters to the public query wire format without inserting defaults.
|
|
164
|
+
* @param params - Client filters and session pagination.
|
|
165
|
+
* @returns Wire fields; undefined options are omitted when serialized to JSON.
|
|
166
|
+
*/
|
|
167
|
+
declare function mapMobileSocialFeedListParamsToServer(params: MobileSocialFeedListParams): MobileServerSocialFeedListParams;
|
|
168
|
+
/**
|
|
169
|
+
* Maps the public viewing account and browser credential without inferring an identity.
|
|
170
|
+
* @param params - Public relationship perspective and optional session credential.
|
|
171
|
+
* @returns Wire fields for a public feed read.
|
|
172
|
+
*/
|
|
173
|
+
declare function mapMobileSocialFeedReadParamsToServer(params: MobileSocialFeedReadParams): MobileServerSocialFeedReadParams;
|
|
48
174
|
//#endregion
|
|
49
|
-
export { mapMobileFeedPage, mapMobileFollowListPage, mapMobileFollowListParamsToServer, mapMobileFollowMutationResult, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobileProfilesIncludeToServer, mapMobilePublicProfile, mapMobileRegisteredWallet };
|
|
175
|
+
export { mapMobileFeedPage, mapMobileFollowListPage, mapMobileFollowListParamsToServer, mapMobileFollowMutationResult, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobileProfilesIncludeToServer, mapMobilePublicProfile, mapMobileRegisteredWallet, mapMobileSocialFeedAuthor, mapMobileSocialFeedInteraction, mapMobileSocialFeedItem, mapMobileSocialFeedItemBase, mapMobileSocialFeedItemPatch, mapMobileSocialFeedItemResponse, mapMobileSocialFeedListParamsToServer, mapMobileSocialFeedMarket, mapMobileSocialFeedPage, mapMobileSocialFeedPnl, mapMobileSocialFeedPositionCard, mapMobileSocialFeedPositionPatch, mapMobileSocialFeedRankedPage, mapMobileSocialFeedReadParamsToServer, mapMobileSocialFeedReadSession, mapMobileSocialFeedTopTradersPage, mapMobileSocialFeedTradeCard, mapMobileSocialFeedTradeRow, mapMobileSocialFeedTradeRowBase, mapMobileSocialFeedTraderBadge, mapMobileSocialFeedUpdates };
|
|
50
176
|
//# sourceMappingURL=dataMappers.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataMappers.d.cts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"dataMappers.d.cts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;;;;AAiFA;;;iBAAgB,sBAAA,CACd,MAAA,EAAQ,mBAAA,GACP,mBAAmB;;;;;iBA6CN,uBAAA,CACd,MAAA,EAAQ,8BAAA,GACP,oBAAoB;AAFvB;;;AAAA,iBAgBgB,6BAAA,CACd,MAAA,EAAQ,kCAAA,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