@nadohq/mobile-client 0.58.0 → 0.59.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/dist/{MobileClient-Bltb06E-.cjs → MobileClient-aDxiM_Kf.cjs} +24 -1
- package/dist/MobileClient-aDxiM_Kf.cjs.map +1 -0
- package/dist/MobileClient.cjs +1 -1
- package/dist/MobileClient.d.cts +23 -6
- package/dist/MobileClient.d.cts.map +1 -1
- package/dist/MobileClient.d.ts +23 -6
- package/dist/MobileClient.d.ts.map +1 -1
- package/dist/MobileClient.js +24 -1
- package/dist/MobileClient.js.map +1 -1
- package/dist/{MobileServerFailureError-LEYxdWGL.d.cts → MobileServerFailureError-Bpa_WA9f.d.cts} +3 -3
- package/dist/{MobileServerFailureError-LEYxdWGL.d.cts.map → MobileServerFailureError-Bpa_WA9f.d.cts.map} +1 -1
- package/dist/{MobileServerFailureError-DDiGBLVv.d.ts → MobileServerFailureError-Dd3c6P_Z.d.ts} +3 -3
- package/dist/{MobileServerFailureError-DDiGBLVv.d.ts.map → MobileServerFailureError-Dd3c6P_Z.d.ts.map} +1 -1
- package/dist/{buildSignedMobileRequest-OV00zmTJ.d.ts → buildSignedMobileRequest-Cb1T74xV.d.ts} +2 -2
- package/dist/{buildSignedMobileRequest-OV00zmTJ.d.ts.map → buildSignedMobileRequest-Cb1T74xV.d.ts.map} +1 -1
- package/dist/{buildSignedMobileRequest-D-xPmHni.d.cts → buildSignedMobileRequest-NHbMAPzd.d.cts} +2 -2
- package/dist/{buildSignedMobileRequest-D-xPmHni.d.cts.map → buildSignedMobileRequest-NHbMAPzd.d.cts.map} +1 -1
- package/dist/{canonicalize-B7Kp4CTE.d.ts → canonicalize-BBYGh17w.d.ts} +2 -2
- package/dist/canonicalize-BBYGh17w.d.ts.map +1 -0
- package/dist/{canonicalize-Bh1RMrfB.d.cts → canonicalize-BF_SiNvO.d.cts} +2 -2
- package/dist/canonicalize-BF_SiNvO.d.cts.map +1 -0
- package/dist/{clientTypes-vRRpGXH2.d.cts → clientTypes-BWFKo9oE.d.cts} +26 -2
- package/dist/clientTypes-BWFKo9oE.d.cts.map +1 -0
- package/dist/{clientTypes-B-Ssakq7.d.ts → clientTypes-DCTiUV0H.d.ts} +26 -2
- package/dist/clientTypes-DCTiUV0H.d.ts.map +1 -0
- package/dist/dataMappers.cjs +11 -0
- package/dist/dataMappers.cjs.map +1 -1
- package/dist/dataMappers.d.cts +9 -5
- package/dist/dataMappers.d.cts.map +1 -1
- package/dist/dataMappers.d.ts +9 -5
- package/dist/dataMappers.d.ts.map +1 -1
- package/dist/dataMappers.js +11 -1
- package/dist/dataMappers.js.map +1 -1
- package/dist/{eip712MethodByType-DV6V5S-K.d.cts → eip712MethodByType-BSx11xG-.d.cts} +2 -2
- package/dist/eip712MethodByType-BSx11xG-.d.cts.map +1 -0
- package/dist/{eip712MethodByType-Bfquut0v.d.ts → eip712MethodByType-DkiAjCLs.d.ts} +2 -2
- package/dist/eip712MethodByType-DkiAjCLs.d.ts.map +1 -0
- package/dist/{follow-D6Mg8GHx.d.ts → follow-B3CZ04c0.d.cts} +7 -2
- package/dist/{follow-D6Mg8GHx.d.cts.map → follow-B3CZ04c0.d.cts.map} +1 -1
- package/dist/{follow-D6Mg8GHx.d.cts → follow-B3CZ04c0.d.ts} +7 -2
- package/dist/{follow-D6Mg8GHx.d.ts.map → follow-B3CZ04c0.d.ts.map} +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +2 -2
- package/dist/{mobileErrorCodes-BMUSM6_y.d.ts → mobileErrorCodes-3LtreeZM.d.cts} +3 -2
- package/dist/mobileErrorCodes-3LtreeZM.d.cts.map +1 -0
- package/dist/{mobileErrorCodes-BMUSM6_y.d.cts → mobileErrorCodes-3LtreeZM.d.ts} +3 -2
- package/dist/mobileErrorCodes-3LtreeZM.d.ts.map +1 -0
- package/dist/{payloadHash-BVvJEnYe.d.cts → payloadHash-BOWGjqdb.d.cts} +2 -2
- package/dist/payloadHash-BOWGjqdb.d.cts.map +1 -0
- package/dist/{payloadHash-DBmPAfe8.d.ts → payloadHash-Bzf4CtjV.d.ts} +2 -2
- package/dist/payloadHash-Bzf4CtjV.d.ts.map +1 -0
- package/dist/{serverBaseTypes-D-e6DGVM.d.ts → serverBaseTypes-DWf3iGWy.d.ts} +2 -2
- package/dist/{serverBaseTypes-D-e6DGVM.d.ts.map → serverBaseTypes-DWf3iGWy.d.ts.map} +1 -1
- package/dist/{serverBaseTypes-BhTeyS87.d.cts → serverBaseTypes-KREDe2M9.d.cts} +2 -2
- package/dist/{serverBaseTypes-BhTeyS87.d.cts.map → serverBaseTypes-KREDe2M9.d.cts.map} +1 -1
- package/dist/{serverExecuteTypes-RH2dTjJu.d.ts → serverExecuteTypes-DVRa6ifu.d.cts} +26 -6
- package/dist/serverExecuteTypes-DVRa6ifu.d.cts.map +1 -0
- package/dist/{serverExecuteTypes-BeKywZYP.d.cts → serverExecuteTypes-DlYZCp1f.d.ts} +26 -6
- package/dist/serverExecuteTypes-DlYZCp1f.d.ts.map +1 -0
- package/dist/{serverQueryTypes-tm8LMIsw.d.ts → serverQueryTypes-BFdwq0Z2.d.ts} +3 -3
- package/dist/{serverQueryTypes-tm8LMIsw.d.ts.map → serverQueryTypes-BFdwq0Z2.d.ts.map} +1 -1
- package/dist/{serverQueryTypes-CxvEM3U6.d.cts → serverQueryTypes-DNdMpmDr.d.cts} +3 -3
- package/dist/{serverQueryTypes-CxvEM3U6.d.cts.map → serverQueryTypes-DNdMpmDr.d.cts.map} +1 -1
- package/dist/{serverRequestTypes-zPUjncGt.d.ts → serverRequestTypes-BNA7FCY6.d.ts} +2 -2
- package/dist/{serverRequestTypes-zPUjncGt.d.ts.map → serverRequestTypes-BNA7FCY6.d.ts.map} +1 -1
- package/dist/{serverRequestTypes-BgM1pWSL.d.cts → serverRequestTypes-CxDRFKfv.d.cts} +2 -2
- package/dist/{serverRequestTypes-BgM1pWSL.d.cts.map → serverRequestTypes-CxDRFKfv.d.cts.map} +1 -1
- package/dist/{serverResponseGuards-B9VaCkxy.d.ts → serverResponseGuards-BU1Xv_tG.d.ts} +2 -2
- package/dist/{serverResponseGuards-B9VaCkxy.d.ts.map → serverResponseGuards-BU1Xv_tG.d.ts.map} +1 -1
- package/dist/{serverResponseGuards-21nhldS2.d.cts → serverResponseGuards-Dkdok0Sm.d.cts} +2 -2
- package/dist/{serverResponseGuards-21nhldS2.d.cts.map → serverResponseGuards-Dkdok0Sm.d.cts.map} +1 -1
- package/dist/signing/buildSignedMobileRequest.d.cts +1 -1
- package/dist/signing/buildSignedMobileRequest.d.ts +1 -1
- package/dist/signing/canonicalize.cjs +5 -0
- package/dist/signing/canonicalize.cjs.map +1 -1
- package/dist/signing/canonicalize.d.cts +1 -1
- package/dist/signing/canonicalize.d.ts +1 -1
- package/dist/signing/canonicalize.js +5 -0
- package/dist/signing/canonicalize.js.map +1 -1
- package/dist/signing/eip712MethodByType.cjs +2 -1
- package/dist/signing/eip712MethodByType.cjs.map +1 -1
- package/dist/signing/eip712MethodByType.d.cts +1 -1
- package/dist/signing/eip712MethodByType.d.ts +1 -1
- package/dist/signing/eip712MethodByType.js +2 -1
- package/dist/signing/eip712MethodByType.js.map +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 +8 -8
- package/dist/types/index.d.ts +8 -8
- package/dist/types/mobileErrorCodes.cjs +2 -0
- 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 +2 -0
- 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 +2 -2
- package/dist/types/serverExecuteTypes.d.ts +2 -2
- package/dist/types/serverQueryTypes.d.cts +1 -1
- package/dist/types/serverQueryTypes.d.ts +1 -1
- package/dist/types/serverRequestTypes.d.cts +1 -1
- package/dist/types/serverRequestTypes.d.ts +1 -1
- package/dist/{types-B8CkR6QU.d.cts → types-BCr2G5gS.d.cts} +6 -2
- package/dist/types-BCr2G5gS.d.cts.map +1 -0
- package/dist/{types-Cfwd50ls.d.ts → types-C18k-9Vy.d.ts} +6 -2
- package/dist/types-C18k-9Vy.d.ts.map +1 -0
- package/dist/utils/follow.cjs +6 -0
- package/dist/utils/follow.cjs.map +1 -1
- package/dist/utils/follow.d.cts +2 -2
- package/dist/utils/follow.d.ts +2 -2
- package/dist/utils/follow.js +6 -1
- package/dist/utils/follow.js.map +1 -1
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.cts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +2 -2
- 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 +34 -0
- package/src/dataMappers.ts +15 -0
- package/src/signing/canonicalize.ts +6 -0
- package/src/signing/eip712MethodByType.ts +1 -0
- package/src/signing/signing.test.ts +34 -0
- package/src/signing/types.ts +7 -0
- package/src/types/clientTypes.ts +26 -0
- package/src/types/mobileErrorCodes.ts +2 -0
- package/src/types/serverExecuteTypes.ts +24 -2
- package/src/utils/follow.ts +6 -0
- package/dist/MobileClient-Bltb06E-.cjs.map +0 -1
- package/dist/canonicalize-B7Kp4CTE.d.ts.map +0 -1
- package/dist/canonicalize-Bh1RMrfB.d.cts.map +0 -1
- package/dist/clientTypes-B-Ssakq7.d.ts.map +0 -1
- package/dist/clientTypes-vRRpGXH2.d.cts.map +0 -1
- package/dist/eip712MethodByType-Bfquut0v.d.ts.map +0 -1
- package/dist/eip712MethodByType-DV6V5S-K.d.cts.map +0 -1
- package/dist/mobileErrorCodes-BMUSM6_y.d.cts.map +0 -1
- package/dist/mobileErrorCodes-BMUSM6_y.d.ts.map +0 -1
- package/dist/payloadHash-BVvJEnYe.d.cts.map +0 -1
- package/dist/payloadHash-DBmPAfe8.d.ts.map +0 -1
- package/dist/serverExecuteTypes-BeKywZYP.d.cts.map +0 -1
- package/dist/serverExecuteTypes-RH2dTjJu.d.ts.map +0 -1
- package/dist/types-B8CkR6QU.d.cts.map +0 -1
- package/dist/types-Cfwd50ls.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildSignedMobileRequest-
|
|
1
|
+
{"version":3,"file":"buildSignedMobileRequest-NHbMAPzd.d.cts","names":[],"sources":["../src/signing/src/signing/buildSignedMobileRequest.ts"],"mappings":";;;;;AAgBA;;;iBAAsB,wBAAA,WAAmC,iBAAA,CAAA,CACvD,MAAA,EAAQ,8BAAA;EAAmC,KAAA,EAAO,CAAA;AAAA,IACjD,OAAA,CAAQ,mBAAA,CAAoB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as MobileSignedInner } from "./types-
|
|
1
|
+
import { n as MobileSignedInner } from "./types-C18k-9Vy.js";
|
|
2
2
|
|
|
3
3
|
//#region src/signing/canonicalize.d.ts
|
|
4
4
|
/**
|
|
@@ -11,4 +11,4 @@ import { n as MobileSignedInner } from "./types-Cfwd50ls.js";
|
|
|
11
11
|
declare function canonicalizeMobileInner(inner: MobileSignedInner): MobileSignedInner;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { canonicalizeMobileInner as t };
|
|
14
|
-
//# sourceMappingURL=canonicalize-
|
|
14
|
+
//# sourceMappingURL=canonicalize-BBYGh17w.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonicalize-BBYGh17w.d.ts","names":[],"sources":["../src/signing/src/signing/canonicalize.ts"],"mappings":";;;;;AASA;;;;;iBAAgB,uBAAA,CACd,KAAA,EAAO,iBAAA,GACN,iBAAiB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as MobileSignedInner } from "./types-
|
|
1
|
+
import { n as MobileSignedInner } from "./types-BCr2G5gS.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/signing/canonicalize.d.ts
|
|
4
4
|
/**
|
|
@@ -11,4 +11,4 @@ import { n as MobileSignedInner } from "./types-B8CkR6QU.cjs";
|
|
|
11
11
|
declare function canonicalizeMobileInner(inner: MobileSignedInner): MobileSignedInner;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { canonicalizeMobileInner as t };
|
|
14
|
-
//# sourceMappingURL=canonicalize-
|
|
14
|
+
//# sourceMappingURL=canonicalize-BF_SiNvO.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonicalize-BF_SiNvO.d.cts","names":[],"sources":["../src/signing/src/signing/canonicalize.ts"],"mappings":";;;;;AASA;;;;;iBAAgB,uBAAA,CACd,KAAA,EAAO,iBAAA,GACN,iBAAiB"}
|
|
@@ -133,6 +133,17 @@ interface MobileFollowMutationResult {
|
|
|
133
133
|
/** The *target's* follower count after the mutation, not the sender's. */
|
|
134
134
|
followerCount: number;
|
|
135
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Post-commit state of one target in a batch follow or unfollow. The whole batch commits in one database
|
|
138
|
+
* transaction, so these values are authoritative — apply them rather than re-reading.
|
|
139
|
+
*/
|
|
140
|
+
interface MobileFollowBatchResultItem {
|
|
141
|
+
/** The requested target, as lowercase hex. */
|
|
142
|
+
subaccount: Hex;
|
|
143
|
+
isFollowing: boolean;
|
|
144
|
+
/** The *target's* follower count after the batch, not the sender's. */
|
|
145
|
+
followerCount: number;
|
|
146
|
+
}
|
|
136
147
|
/**
|
|
137
148
|
* Result of a username availability check.
|
|
138
149
|
*/
|
|
@@ -365,6 +376,19 @@ interface MobileSetFollowParams extends MobileSignedRequestParams {
|
|
|
365
376
|
/** `true` follows the target, `false` unfollows it. Both directions are idempotent. */
|
|
366
377
|
isFollowing: boolean;
|
|
367
378
|
}
|
|
379
|
+
/**
|
|
380
|
+
* Params for {@link MobileClient.setFollowBatch}. The subaccount carried by {@link MobileSignedRequestParams}
|
|
381
|
+
* is the signing Follower; `targets` are the Profiles on the other end of each relationship.
|
|
382
|
+
*/
|
|
383
|
+
interface MobileSetFollowBatchParams extends MobileSignedRequestParams {
|
|
384
|
+
/**
|
|
385
|
+
* 1 to `MOBILE_FOLLOW_BATCH_MAX_SIZE` (25) distinct Profiles, none of them the signing subaccount or an
|
|
386
|
+
* isolated subaccount. The results keep this order.
|
|
387
|
+
*/
|
|
388
|
+
targets: Subaccount[];
|
|
389
|
+
/** `true` follows every target, `false` unfollows every target. Both directions are idempotent. */
|
|
390
|
+
isFollowing: boolean;
|
|
391
|
+
}
|
|
368
392
|
/**
|
|
369
393
|
* Common params for a Followers or Following page.
|
|
370
394
|
*/
|
|
@@ -816,5 +840,5 @@ type GetMobileFeedUpdatesParams = {
|
|
|
816
840
|
viewerToken: string;
|
|
817
841
|
};
|
|
818
842
|
//#endregion
|
|
819
|
-
export {
|
|
820
|
-
//# sourceMappingURL=clientTypes-
|
|
843
|
+
export { MobileSocialFeedItemBase as $, MobileNotificationCategoryPreference as A, MobileSetFollowBatchParams as B, MobileFeedTrade as C, MobileFollowMutationResult as D, MobileFollowListPage as E, MobilePublicProfile as F, MobileSocialFeedAuthor as G, MobileSetPrivateModeParams as H, MobileRegisterExpoTokenParams as I, MobileSocialFeedCohort as J, MobileSocialFeedCapabilities as K, MobileRegisteredWallet as L, MobileNotificationPreferences as M, MobileProfileSearchPage as N, MobileFollowSummary as O, MobileProfilesInclude as P, MobileSocialFeedItem as Q, MobileSetAvatarParams as R, MobileFeedPage as S, SearchMobileProfilesParams as St, MobileFollowListAccount as T, MobileSetUsernameParams as U, MobileSetFollowParams as V, MobileSignedRequestParams as W, MobileSocialFeedCommentPreview as X, MobileSocialFeedCohortCoverage as Y, MobileSocialFeedInteraction as Z, MobileAvatarPreset as _, MobileSocialFeedViewTracking as _t, GetMobileFollowersParams as a, MobileSocialFeedPnl as at, MobileCreateAvatarUploadParams as b, MobileUsernameAvailability as bt, GetMobileFriendsFeedParams as c, MobileSocialFeedRankedPage as ct, GetMobilePositionFeedParams as d, MobileSocialFeedTopTradersPage as dt, MobileSocialFeedItemPatch as et, GetMobileProfileFeedParams as f, MobileSocialFeedTradeCard as ft, GetMobileUsernameAvailabilityParams as g, MobileSocialFeedUpdates as gt, GetMobileTopTradersFeedParams as h, MobileSocialFeedTraderBadge as ht, GetMobileFollowListParams as i, MobileSocialFeedPage as it, MobileNotificationPreferenceScope as j, MobileIdentitySummary as k, GetMobileMarketFeedParams as l, MobileSocialFeedReadParams as lt, GetMobileRegisteredWalletParams as m, MobileSocialFeedTradeRowBase as mt, GetMobileFeedParams as n, MobileSocialFeedListParams as nt, GetMobileFollowingParams as o, MobileSocialFeedPositionCard as ot, GetMobileProfilesParams as p, MobileSocialFeedTradeRow as pt, MobileSocialFeedCategorizedParams as q, GetMobileFeedUpdatesParams as r, MobileSocialFeedMarket as rt, GetMobileForYouFeedParams as s, MobileSocialFeedPositionPatch as st, GetMobileFeedItemParams as t, MobileSocialFeedItemResponse as tt, GetMobileNotificationPreferencesParams as u, MobileSocialFeedReadSession as ut, MobileAvatarSelection as v, MobileUnregisterExpoTokenParams as vt, MobileFollowBatchResultItem as w, MobileFeedMargin as x, MobileWithExpoTokenParams as xt, MobileAvatarUpload as y, MobileUpdateNotificationPreferencesParams as yt, MobileSetBioParams as z };
|
|
844
|
+
//# sourceMappingURL=clientTypes-BWFKo9oE.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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BAAA,GAA0B,0BAA0B;EAA7B,wBAEjC,MAAA,UAF8D;EAI9D,mBAAA,WAFA;EAIA,SAAA;AAAA;;KAIU,0BAAA;EAAA,8FAEV,MAAA;EAEA,SAAA,UAFA;EAIA,cAAA;EAEA,kBAAA,YAEA;EAAA,YAAA,kBAIA;EAFA,gBAAA,UAIW;EAFX,UAAA;EAEA,WAAA;AAAA"}
|
|
@@ -133,6 +133,17 @@ interface MobileFollowMutationResult {
|
|
|
133
133
|
/** The *target's* follower count after the mutation, not the sender's. */
|
|
134
134
|
followerCount: number;
|
|
135
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Post-commit state of one target in a batch follow or unfollow. The whole batch commits in one database
|
|
138
|
+
* transaction, so these values are authoritative — apply them rather than re-reading.
|
|
139
|
+
*/
|
|
140
|
+
interface MobileFollowBatchResultItem {
|
|
141
|
+
/** The requested target, as lowercase hex. */
|
|
142
|
+
subaccount: Hex;
|
|
143
|
+
isFollowing: boolean;
|
|
144
|
+
/** The *target's* follower count after the batch, not the sender's. */
|
|
145
|
+
followerCount: number;
|
|
146
|
+
}
|
|
136
147
|
/**
|
|
137
148
|
* Result of a username availability check.
|
|
138
149
|
*/
|
|
@@ -365,6 +376,19 @@ interface MobileSetFollowParams extends MobileSignedRequestParams {
|
|
|
365
376
|
/** `true` follows the target, `false` unfollows it. Both directions are idempotent. */
|
|
366
377
|
isFollowing: boolean;
|
|
367
378
|
}
|
|
379
|
+
/**
|
|
380
|
+
* Params for {@link MobileClient.setFollowBatch}. The subaccount carried by {@link MobileSignedRequestParams}
|
|
381
|
+
* is the signing Follower; `targets` are the Profiles on the other end of each relationship.
|
|
382
|
+
*/
|
|
383
|
+
interface MobileSetFollowBatchParams extends MobileSignedRequestParams {
|
|
384
|
+
/**
|
|
385
|
+
* 1 to `MOBILE_FOLLOW_BATCH_MAX_SIZE` (25) distinct Profiles, none of them the signing subaccount or an
|
|
386
|
+
* isolated subaccount. The results keep this order.
|
|
387
|
+
*/
|
|
388
|
+
targets: Subaccount[];
|
|
389
|
+
/** `true` follows every target, `false` unfollows every target. Both directions are idempotent. */
|
|
390
|
+
isFollowing: boolean;
|
|
391
|
+
}
|
|
368
392
|
/**
|
|
369
393
|
* Common params for a Followers or Following page.
|
|
370
394
|
*/
|
|
@@ -816,5 +840,5 @@ type GetMobileFeedUpdatesParams = {
|
|
|
816
840
|
viewerToken: string;
|
|
817
841
|
};
|
|
818
842
|
//#endregion
|
|
819
|
-
export {
|
|
820
|
-
//# sourceMappingURL=clientTypes-
|
|
843
|
+
export { MobileSocialFeedItemBase as $, MobileNotificationCategoryPreference as A, MobileSetFollowBatchParams as B, MobileFeedTrade as C, MobileFollowMutationResult as D, MobileFollowListPage as E, MobilePublicProfile as F, MobileSocialFeedAuthor as G, MobileSetPrivateModeParams as H, MobileRegisterExpoTokenParams as I, MobileSocialFeedCohort as J, MobileSocialFeedCapabilities as K, MobileRegisteredWallet as L, MobileNotificationPreferences as M, MobileProfileSearchPage as N, MobileFollowSummary as O, MobileProfilesInclude as P, MobileSocialFeedItem as Q, MobileSetAvatarParams as R, MobileFeedPage as S, SearchMobileProfilesParams as St, MobileFollowListAccount as T, MobileSetUsernameParams as U, MobileSetFollowParams as V, MobileSignedRequestParams as W, MobileSocialFeedCommentPreview as X, MobileSocialFeedCohortCoverage as Y, MobileSocialFeedInteraction as Z, MobileAvatarPreset as _, MobileSocialFeedViewTracking as _t, GetMobileFollowersParams as a, MobileSocialFeedPnl as at, MobileCreateAvatarUploadParams as b, MobileUsernameAvailability as bt, GetMobileFriendsFeedParams as c, MobileSocialFeedRankedPage as ct, GetMobilePositionFeedParams as d, MobileSocialFeedTopTradersPage as dt, MobileSocialFeedItemPatch as et, GetMobileProfileFeedParams as f, MobileSocialFeedTradeCard as ft, GetMobileUsernameAvailabilityParams as g, MobileSocialFeedUpdates as gt, GetMobileTopTradersFeedParams as h, MobileSocialFeedTraderBadge as ht, GetMobileFollowListParams as i, MobileSocialFeedPage as it, MobileNotificationPreferenceScope as j, MobileIdentitySummary as k, GetMobileMarketFeedParams as l, MobileSocialFeedReadParams as lt, GetMobileRegisteredWalletParams as m, MobileSocialFeedTradeRowBase as mt, GetMobileFeedParams as n, MobileSocialFeedListParams as nt, GetMobileFollowingParams as o, MobileSocialFeedPositionCard as ot, GetMobileProfilesParams as p, MobileSocialFeedTradeRow as pt, MobileSocialFeedCategorizedParams as q, GetMobileFeedUpdatesParams as r, MobileSocialFeedMarket as rt, GetMobileForYouFeedParams as s, MobileSocialFeedPositionPatch as st, GetMobileFeedItemParams as t, MobileSocialFeedItemResponse as tt, GetMobileNotificationPreferencesParams as u, MobileSocialFeedReadSession as ut, MobileAvatarSelection as v, MobileUnregisterExpoTokenParams as vt, MobileFollowBatchResultItem as w, MobileFeedMargin as x, MobileWithExpoTokenParams as xt, MobileAvatarUpload as y, MobileUpdateNotificationPreferencesParams as yt, MobileSetBioParams as z };
|
|
844
|
+
//# sourceMappingURL=clientTypes-DCTiUV0H.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientTypes-DCTiUV0H.d.ts","names":[],"sources":["../src/types/src/types/clientTypes.ts"],"mappings":";;;;;;;;AA+BA;UAAiB,kBAAA;;EAEf,EAAA;EAES;EAAT,SAAS;AAAA;;;;KAMC,qBAAA;EASN,kCANA,IAAA,YAQS;EANT,EAAA;AAAA;EAc6B,8CAV7B,IAAA,YAgBW;EAdX,SAAA;AAAA;;;;;AAgBY;UARD,kBAAA;EAmBoB;EAjBnC,SAAA;EAiBgE;EAfhE,SAAA;EAiBA;EAfA,OAAA,EAAS,MAAM;EAqBf;EAnBA,gBAAA;AAAA;;;AAsBmC;AAOrC;;;;;UAlBiB,mBAAA,SAA4B,qBAAqB;EAqBhE;EAnBA,GAAA;EACA,WAAA;EAsBS;AAAA;AAQX;;EAzBE,aAAA;EACA,cAAA;EA0BA;EAxBA,aAAA,GAAgB,mBAAA;AAAA;;;AA+BiB;AAMnC;UA9BiB,qBAAA;EACf,UA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UAIe,0BAAA;EA0BqB;;;;EArBpC,MAAA,GAAS,UAAU;EA2BT;EAzBV,WAAA;AAAA;;UAIe,0BAAA;EAwBL;EAtBV,SAAA,GAAY,oBAAoB;;EAEhC,eAAA;EAoB2E;EAlB3E,KAAA;EAqBoC;EAnBpC,SAAA;EAqBkB;EAnBlB,MAAA;AAAA;;UAIe,iCAAA,SACP,0BAAA,EAA4B,0BAAA;EAclB;EAZlB,cAAA,GAAiB,8BAAA;AAAA;;KAIP,yBAAA,GAA4B,iCAAiC;;KAG7D,6BAAA,GAAgC,iCAAiC;;KAGjE,0BAAA,GAA6B,iCAAA;EAQjB,2FANtB,MAAA,EAAQ,UAAU;AAAA;;KAIR,0BAAA,GAA6B,iCAAA;EAMD,wDAJtC,UAAA,EAAY,UAAU;AAAA;;KAIZ,yBAAA,GAA4B,0BAAA,GACtC,0BAA0B;EAMhB,sCAJR,SAAA;AAAA;;KAIQ,2BAAA,GAA8B,0BAAA,GACxC,0BAA0B;EAA1B,4BAEE,UAAA;AAAA;AAAU;AAAA,KAIF,uBAAA,GAA0B,0BAA0B;EAA7B,wBAEjC,MAAA,UAF8D;EAI9D,mBAAA,WAFA;EAIA,SAAA;AAAA;;KAIU,0BAAA;EAAA,8FAEV,MAAA;EAEA,SAAA,UAFA;EAIA,cAAA;EAEA,kBAAA,YAEA;EAAA,YAAA,kBAIA;EAFA,gBAAA,UAIW;EAFX,UAAA;EAEA,WAAA;AAAA"}
|
package/dist/dataMappers.cjs
CHANGED
|
@@ -105,6 +105,16 @@ function mapMobileFollowMutationResult(server) {
|
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
|
+
* Maps a server-side batch follow or unfollow response to its client-side representation.
|
|
109
|
+
*/
|
|
110
|
+
function mapMobileFollowBatchResult(server) {
|
|
111
|
+
return server.results.map((result) => ({
|
|
112
|
+
subaccount: result.subaccount,
|
|
113
|
+
isFollowing: result.is_following,
|
|
114
|
+
followerCount: result.follower_count
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
108
118
|
* Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.
|
|
109
119
|
*/
|
|
110
120
|
function mapMobileNotificationPreferences(server) {
|
|
@@ -566,6 +576,7 @@ exports.mapMobileAvatarPreset = mapMobileAvatarPreset;
|
|
|
566
576
|
exports.mapMobileAvatarSelectionToServer = mapMobileAvatarSelectionToServer;
|
|
567
577
|
exports.mapMobileAvatarUpload = mapMobileAvatarUpload;
|
|
568
578
|
exports.mapMobileFeedPage = mapMobileFeedPage;
|
|
579
|
+
exports.mapMobileFollowBatchResult = mapMobileFollowBatchResult;
|
|
569
580
|
exports.mapMobileFollowListPage = mapMobileFollowListPage;
|
|
570
581
|
exports.mapMobileFollowListParamsToServer = mapMobileFollowListParamsToServer;
|
|
571
582
|
exports.mapMobileFollowMutationResult = mapMobileFollowMutationResult;
|
package/dist/dataMappers.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataMappers.cjs","names":[],"sources":["../src/dataMappers.ts"],"sourcesContent":["import { removeDecimals, subaccountToHex, toBigNumber } from '@nadohq/shared';\nimport {\n GetMobileFollowListParams,\n MobileAvatarPreset,\n MobileAvatarSelection,\n MobileAvatarUpload,\n MobileFeedPage,\n MobileFeedTrade,\n MobileFollowListPage,\n MobileFollowMutationResult,\n MobileFollowSummary,\n MobileIdentitySummary,\n MobileNotificationPreferenceScope,\n MobileNotificationPreferences,\n MobileProfileSearchPage,\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 SearchMobileProfilesParams,\n} from './types/clientTypes';\nimport {\n MobileServerAvatarUploadResponse,\n MobileServerFollowMutationResponse,\n} from './types/serverExecuteTypes';\nimport {\n MobileServerAvatarPreset,\n MobileServerAvatarSelection,\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 MobileServerSearchProfilesResponse,\n MobileServerSocialFeedItemResponse,\n MobileServerSocialFeedRankedResponse,\n MobileServerSocialFeedResponse,\n MobileServerSocialFeedTopTradersResponse,\n MobileServerSocialFeedUpdatesResponse,\n} from './types/serverQueryTypes';\nimport {\n MobileServerFollowListRequest,\n MobileServerProfilesInclude,\n MobileServerSearchProfilesRequest,\n MobileServerSocialFeedListParams,\n MobileServerSocialFeedReadParams,\n} from './types/serverRequestTypes';\n\n/**\n * Maps a server-side avatar preset to its client-side representation.\n */\nexport function mapMobileAvatarPreset(\n server: MobileServerAvatarPreset,\n): MobileAvatarPreset {\n return { id: server.id, avatarUrl: server.avatar_url };\n}\n\n/**\n * Maps an upload grant, preserving the signed PUT headers and server-provided lifetime.\n */\nexport function mapMobileAvatarUpload(\n server: MobileServerAvatarUploadResponse,\n): MobileAvatarUpload {\n return {\n uploadKey: server.upload_key,\n uploadUrl: server.upload_url,\n headers: server.headers,\n expiresInSeconds: server.expires_in_seconds,\n };\n}\n\n/**\n * Maps a client-side avatar selection to the signed wire payload; null clears the saved avatar.\n */\nexport function mapMobileAvatarSelectionToServer(\n avatar: MobileAvatarSelection | null,\n): MobileServerAvatarSelection | null {\n if (avatar === null) {\n return null;\n }\n if (avatar.type === 'preset') {\n return { type: 'preset', id: avatar.id };\n }\n return { type: 'upload', upload_key: avatar.uploadKey };\n}\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 ...mapMobileIdentitySummary(server),\n bio: server.bio,\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 profile search page (snake_case) to its client-side (camelCase) representation. Each\n * match goes through {@link mapMobilePublicProfile}, so include-gated fields stay `undefined` when omitted.\n */\nexport function mapMobileProfileSearchPage(\n server: MobileServerSearchProfilesResponse,\n): MobileProfileSearchPage {\n return {\n profiles: server.profiles.map(mapMobilePublicProfile),\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 the client-side params of a profile search page to the server-side wire shape.\n */\nexport function mapMobileProfileSearchParamsToServer(\n params: SearchMobileProfilesParams,\n): MobileServerSearchProfilesRequest {\n return {\n query: params.query,\n include: params.include\n ? mapMobileProfilesIncludeToServer(params.include)\n : 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":";;;;;;AA2FA,SAAgB,sBACd,QACoB;CACpB,OAAO;EAAE,IAAI,OAAO;EAAI,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A,gBAA6B,OAAO,iBAAiB,EACvD;EACJ,GAAI,OAAO,oBAAoB,KAAA,IAC3B,CAAC,IACD,EACE,aAAA,GAAA,eAAA,gBAA2B,OAAO,eAAe,EACnD;EACJ,GAAI,OAAO,iCAAiC,KAAA,IACxC,CAAC,IACD,EACE,yBAAA,GAAA,eAAA,gBACE,OAAO,4BACT,EACF;EACJ,GAAI,OAAO,oCAAoC,KAAA,IAC3C,CAAC,IACD,EACE,4BAAA,GAAA,eAAA,gBACE,OAAO,+BACT,EACF;EACJ,GAAI,OAAO,2BAA2B,KAAA,IAClC,CAAC,IACD,EACE,kBACE,OAAO,2BAA2B,OAC9B,QAAA,GAAA,eAAA,aACY,OAAO,sBAAsB,EACjD;EACJ,GAAI,OAAO,aAAa,KAAA,IAAY,CAAC,IAAI,EAAE,UAAU,OAAO,SAAS;EACrE,GAAI,OAAO,mBAAmB,KAAA,IAC1B,CAAC,IACD,EAAE,cAAc,OAAO,eAAe;CAC5C;AACF;;;;;;AAOA,SAAgB,2BACd,QACyB;CACzB,OAAO;EACL,aAAa,OAAO,aAAa,IAAI,4BAA4B;EACjE,iBAAiB,OAAO,iBAAiB,IACvC,gCACF;EACA,oBAAoB,OAAO;EAC3B,eAAe,OAAO;EACtB,cAAc,OAAO;EACrB,OAAO,OAAO;EACd,kBAAkB,OAAO;EACzB,YAAY,OAAO;CACrB;AACF;;;;;;AAOA,SAAgB,sCACd,QACkC;CAClC,OAAO;EACL,YAAY,OAAO;EACnB,kBAAkB,OAAO;EACzB,OAAO,OAAO;EACd,YAAY,OAAO;EACnB,QAAQ,OAAO;CACjB;AACF;;;;;;AAOA,SAAgB,sCACd,QACkC;CAClC,OAAO;EACL,SACE,OAAO,WAAW,KAAA,IAAY,KAAA,KAAA,GAAA,eAAA,iBAA4B,OAAO,MAAM;EACzE,cAAc,OAAO;CACvB;AACF"}
|
|
1
|
+
{"version":3,"file":"dataMappers.cjs","names":[],"sources":["../src/dataMappers.ts"],"sourcesContent":["import { removeDecimals, subaccountToHex, toBigNumber } from '@nadohq/shared';\nimport {\n GetMobileFollowListParams,\n MobileAvatarPreset,\n MobileAvatarSelection,\n MobileAvatarUpload,\n MobileFeedPage,\n MobileFeedTrade,\n MobileFollowBatchResultItem,\n MobileFollowListPage,\n MobileFollowMutationResult,\n MobileFollowSummary,\n MobileIdentitySummary,\n MobileNotificationPreferenceScope,\n MobileNotificationPreferences,\n MobileProfileSearchPage,\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 SearchMobileProfilesParams,\n} from './types/clientTypes';\nimport {\n MobileServerAvatarUploadResponse,\n MobileServerFollowBatchResponse,\n MobileServerFollowMutationResponse,\n} from './types/serverExecuteTypes';\nimport {\n MobileServerAvatarPreset,\n MobileServerAvatarSelection,\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 MobileServerSearchProfilesResponse,\n MobileServerSocialFeedItemResponse,\n MobileServerSocialFeedRankedResponse,\n MobileServerSocialFeedResponse,\n MobileServerSocialFeedTopTradersResponse,\n MobileServerSocialFeedUpdatesResponse,\n} from './types/serverQueryTypes';\nimport {\n MobileServerFollowListRequest,\n MobileServerProfilesInclude,\n MobileServerSearchProfilesRequest,\n MobileServerSocialFeedListParams,\n MobileServerSocialFeedReadParams,\n} from './types/serverRequestTypes';\n\n/**\n * Maps a server-side avatar preset to its client-side representation.\n */\nexport function mapMobileAvatarPreset(\n server: MobileServerAvatarPreset,\n): MobileAvatarPreset {\n return { id: server.id, avatarUrl: server.avatar_url };\n}\n\n/**\n * Maps an upload grant, preserving the signed PUT headers and server-provided lifetime.\n */\nexport function mapMobileAvatarUpload(\n server: MobileServerAvatarUploadResponse,\n): MobileAvatarUpload {\n return {\n uploadKey: server.upload_key,\n uploadUrl: server.upload_url,\n headers: server.headers,\n expiresInSeconds: server.expires_in_seconds,\n };\n}\n\n/**\n * Maps a client-side avatar selection to the signed wire payload; null clears the saved avatar.\n */\nexport function mapMobileAvatarSelectionToServer(\n avatar: MobileAvatarSelection | null,\n): MobileServerAvatarSelection | null {\n if (avatar === null) {\n return null;\n }\n if (avatar.type === 'preset') {\n return { type: 'preset', id: avatar.id };\n }\n return { type: 'upload', upload_key: avatar.uploadKey };\n}\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 ...mapMobileIdentitySummary(server),\n bio: server.bio,\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 profile search page (snake_case) to its client-side (camelCase) representation. Each\n * match goes through {@link mapMobilePublicProfile}, so include-gated fields stay `undefined` when omitted.\n */\nexport function mapMobileProfileSearchPage(\n server: MobileServerSearchProfilesResponse,\n): MobileProfileSearchPage {\n return {\n profiles: server.profiles.map(mapMobilePublicProfile),\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 a server-side batch follow or unfollow response to its client-side representation.\n */\nexport function mapMobileFollowBatchResult(\n server: MobileServerFollowBatchResponse,\n): MobileFollowBatchResultItem[] {\n return server.results.map((result) => ({\n subaccount: result.subaccount,\n isFollowing: result.is_following,\n followerCount: result.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 the client-side params of a profile search page to the server-side wire shape.\n */\nexport function mapMobileProfileSearchParamsToServer(\n params: SearchMobileProfilesParams,\n): MobileServerSearchProfilesRequest {\n return {\n query: params.query,\n include: params.include\n ? mapMobileProfilesIncludeToServer(params.include)\n : 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":";;;;;;AA6FA,SAAgB,sBACd,QACoB;CACpB,OAAO;EAAE,IAAI,OAAO;EAAI,WAAW,OAAO;CAAW;AACvD;;;;AAKA,SAAgB,sBACd,QACoB;CACpB,OAAO;EACL,WAAW,OAAO;EAClB,WAAW,OAAO;EAClB,SAAS,OAAO;EAChB,kBAAkB,OAAO;CAC3B;AACF;;;;AAKA,SAAgB,iCACd,QACoC;CACpC,IAAI,WAAW,MACb,OAAO;CAET,IAAI,OAAO,SAAS,UAClB,OAAO;EAAE,MAAM;EAAU,IAAI,OAAO;CAAG;CAEzC,OAAO;EAAE,MAAM;EAAU,YAAY,OAAO;CAAU;AACxD;;;;;;AAOA,SAAgB,uBACd,QACqB;CACrB,OAAO;EACL,GAAG,yBAAyB,MAAM;EAClC,KAAK,OAAO;EACZ,aAAa,OAAO;EACpB,eAAe,OA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,+BACT,EACF;EACJ,GAAI,OAAO,2BAA2B,KAAA,IAClC,CAAC,IACD,EACE,kBACE,OAAO,2BAA2B,OAC9B,QAAA,GAAA,eAAA,aACY,OAAO,sBAAsB,EACjD;EACJ,GAAI,OAAO,aAAa,KAAA,IAAY,CAAC,IAAI,EAAE,UAAU,OAAO,SAAS;EACrE,GAAI,OAAO,mBAAmB,KAAA,IAC1B,CAAC,IACD,EAAE,cAAc,OAAO,eAAe;CAC5C;AACF;;;;;;AAOA,SAAgB,2BACd,QACyB;CACzB,OAAO;EACL,aAAa,OAAO,aAAa,IAAI,4BAA4B;EACjE,iBAAiB,OAAO,iBAAiB,IACvC,gCACF;EACA,oBAAoB,OAAO;EAC3B,eAAe,OAAO;EACtB,cAAc,OAAO;EACrB,OAAO,OAAO;EACd,kBAAkB,OAAO;EACzB,YAAY,OAAO;CACrB;AACF;;;;;;AAOA,SAAgB,sCACd,QACkC;CAClC,OAAO;EACL,YAAY,OAAO;EACnB,kBAAkB,OAAO;EACzB,OAAO,OAAO;EACd,YAAY,OAAO;EACnB,QAAQ,OAAO;CACjB;AACF;;;;;;AAOA,SAAgB,sCACd,QACkC;CAClC,OAAO;EACL,SACE,OAAO,WAAW,KAAA,IAAY,KAAA,KAAA,GAAA,eAAA,iBAA4B,OAAO,MAAM;EACzE,cAAc,OAAO;CACvB;AACF"}
|
package/dist/dataMappers.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { A as MobileServerSocialFeedMarket, D as MobileServerSocialFeedItem, E as MobileServerSocialFeedInteraction, F as MobileServerSocialFeedTradeCard, I as MobileServerSocialFeedTradeRow, L as MobileServerSocialFeedTradeRowBase, M as MobileServerSocialFeedPositionCard, N as MobileServerSocialFeedPositionPatch, O as MobileServerSocialFeedItemBase, P as MobileServerSocialFeedReadSession, R as MobileServerSocialFeedTraderBadge, b as MobileServerProfile, d as MobileServerAvatarSelection, j as MobileServerSocialFeedPnl, k as MobileServerSocialFeedItemPatch, u as MobileServerAvatarPreset, x as MobileServerSocialFeedAuthor, y as MobileServerNotificationPreferences } from "./serverModelTypes-DAqEyYtB.cjs";
|
|
2
|
-
import { $ as
|
|
3
|
-
import { d as MobileServerSocialFeedListParams, f as MobileServerSocialFeedReadParams, l as MobileServerSearchProfilesRequest, n as MobileServerFollowListRequest, r as MobileServerProfilesInclude } from "./serverRequestTypes-
|
|
4
|
-
import {
|
|
5
|
-
import { d as MobileServerSocialFeedItemResponse, f as MobileServerSocialFeedRankedResponse, h as MobileServerSocialFeedUpdatesResponse, l as MobileServerRegisteredWalletResponse, m as MobileServerSocialFeedTopTradersResponse, n as MobileServerFeedResponse, p as MobileServerSocialFeedResponse, r as MobileServerFollowListResponse, u as MobileServerSearchProfilesResponse } from "./serverQueryTypes-
|
|
2
|
+
import { $ as MobileSocialFeedItemBase, D as MobileFollowMutationResult, E as MobileFollowListPage, F as MobilePublicProfile, G as MobileSocialFeedAuthor, L as MobileRegisteredWallet, M as MobileNotificationPreferences, N as MobileProfileSearchPage, P as MobileProfilesInclude, Q as MobileSocialFeedItem, S as MobileFeedPage, St as SearchMobileProfilesParams, Z as MobileSocialFeedInteraction, _ as MobileAvatarPreset, at as MobileSocialFeedPnl, ct as MobileSocialFeedRankedPage, dt as MobileSocialFeedTopTradersPage, et as MobileSocialFeedItemPatch, ft as MobileSocialFeedTradeCard, gt as MobileSocialFeedUpdates, ht as MobileSocialFeedTraderBadge, i as GetMobileFollowListParams, it as MobileSocialFeedPage, lt as MobileSocialFeedReadParams, mt as MobileSocialFeedTradeRowBase, nt as MobileSocialFeedListParams, ot as MobileSocialFeedPositionCard, pt as MobileSocialFeedTradeRow, rt as MobileSocialFeedMarket, st as MobileSocialFeedPositionPatch, tt as MobileSocialFeedItemResponse, ut as MobileSocialFeedReadSession, v as MobileAvatarSelection, w as MobileFollowBatchResultItem, y as MobileAvatarUpload } from "./clientTypes-BWFKo9oE.cjs";
|
|
3
|
+
import { d as MobileServerSocialFeedListParams, f as MobileServerSocialFeedReadParams, l as MobileServerSearchProfilesRequest, n as MobileServerFollowListRequest, r as MobileServerProfilesInclude } from "./serverRequestTypes-CxDRFKfv.cjs";
|
|
4
|
+
import { c as MobileServerFollowMutationResponse, o as MobileServerFollowBatchResponse, t as MobileServerAvatarUploadResponse } from "./serverExecuteTypes-DVRa6ifu.cjs";
|
|
5
|
+
import { d as MobileServerSocialFeedItemResponse, f as MobileServerSocialFeedRankedResponse, h as MobileServerSocialFeedUpdatesResponse, l as MobileServerRegisteredWalletResponse, m as MobileServerSocialFeedTopTradersResponse, n as MobileServerFeedResponse, p as MobileServerSocialFeedResponse, r as MobileServerFollowListResponse, u as MobileServerSearchProfilesResponse } from "./serverQueryTypes-DNdMpmDr.cjs";
|
|
6
6
|
|
|
7
7
|
//#region src/dataMappers.d.ts
|
|
8
8
|
/**
|
|
@@ -37,6 +37,10 @@ declare function mapMobileProfileSearchPage(server: MobileServerSearchProfilesRe
|
|
|
37
37
|
* Maps a server-side follow or unfollow response to its client-side representation.
|
|
38
38
|
*/
|
|
39
39
|
declare function mapMobileFollowMutationResult(server: MobileServerFollowMutationResponse): MobileFollowMutationResult;
|
|
40
|
+
/**
|
|
41
|
+
* Maps a server-side batch follow or unfollow response to its client-side representation.
|
|
42
|
+
*/
|
|
43
|
+
declare function mapMobileFollowBatchResult(server: MobileServerFollowBatchResponse): MobileFollowBatchResultItem[];
|
|
40
44
|
/**
|
|
41
45
|
* Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.
|
|
42
46
|
*/
|
|
@@ -193,5 +197,5 @@ declare function mapMobileSocialFeedListParamsToServer(params: MobileSocialFeedL
|
|
|
193
197
|
*/
|
|
194
198
|
declare function mapMobileSocialFeedReadParamsToServer(params: MobileSocialFeedReadParams): MobileServerSocialFeedReadParams;
|
|
195
199
|
//#endregion
|
|
196
|
-
export { mapMobileAvatarPreset, mapMobileAvatarSelectionToServer, mapMobileAvatarUpload, mapMobileFeedPage, mapMobileFollowListPage, mapMobileFollowListParamsToServer, mapMobileFollowMutationResult, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobileProfileSearchPage, mapMobileProfileSearchParamsToServer, mapMobileProfilesIncludeToServer, mapMobilePublicProfile, mapMobileRegisteredWallet, mapMobileSocialFeedAuthor, mapMobileSocialFeedInteraction, mapMobileSocialFeedItem, mapMobileSocialFeedItemBase, mapMobileSocialFeedItemPatch, mapMobileSocialFeedItemResponse, mapMobileSocialFeedListParamsToServer, mapMobileSocialFeedMarket, mapMobileSocialFeedPage, mapMobileSocialFeedPnl, mapMobileSocialFeedPositionCard, mapMobileSocialFeedPositionPatch, mapMobileSocialFeedRankedPage, mapMobileSocialFeedReadParamsToServer, mapMobileSocialFeedReadSession, mapMobileSocialFeedTopTradersPage, mapMobileSocialFeedTradeCard, mapMobileSocialFeedTradeRow, mapMobileSocialFeedTradeRowBase, mapMobileSocialFeedTraderBadge, mapMobileSocialFeedUpdates };
|
|
200
|
+
export { mapMobileAvatarPreset, mapMobileAvatarSelectionToServer, mapMobileAvatarUpload, mapMobileFeedPage, mapMobileFollowBatchResult, mapMobileFollowListPage, mapMobileFollowListParamsToServer, mapMobileFollowMutationResult, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobileProfileSearchPage, mapMobileProfileSearchParamsToServer, mapMobileProfilesIncludeToServer, mapMobilePublicProfile, mapMobileRegisteredWallet, mapMobileSocialFeedAuthor, mapMobileSocialFeedInteraction, mapMobileSocialFeedItem, mapMobileSocialFeedItemBase, mapMobileSocialFeedItemPatch, mapMobileSocialFeedItemResponse, mapMobileSocialFeedListParamsToServer, mapMobileSocialFeedMarket, mapMobileSocialFeedPage, mapMobileSocialFeedPnl, mapMobileSocialFeedPositionCard, mapMobileSocialFeedPositionPatch, mapMobileSocialFeedRankedPage, mapMobileSocialFeedReadParamsToServer, mapMobileSocialFeedReadSession, mapMobileSocialFeedTopTradersPage, mapMobileSocialFeedTradeCard, mapMobileSocialFeedTradeRow, mapMobileSocialFeedTradeRowBase, mapMobileSocialFeedTraderBadge, mapMobileSocialFeedUpdates };
|
|
197
201
|
//# 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":";;;;;;;;;AA6FA;iBAAgB,qBAAA,CACd,MAAA,EAAQ,wBAAA,GACP,kBAAkB;;;;iBAOL,qBAAA,CACd,MAAA,EAAQ,gCAAA,GACP,kBAAkB;;;AATA;iBAqBL,gCAAA,CACd,MAAA,EAAQ,qBAAA,UACP,2BAA2B;;;;;;iBAed,sBAAA,CACd,MAAA,EAAQ,mBAAA,GACP,mBAAmB;;AA/BD;AAYrB;;iBA+DgB,uBAAA,CACd,MAAA,EAAQ,8BAAA,GACP,oBAAoB;;;;;iBAeP,0BAAA,CACd,MAAA,EAAQ,kCAAA,GACP,uBAAuB;AAhFI;AAe9B;;AAf8B,iBA0Fd,6BAAA,CACd,MAAA,EAAQ,kCAAA,GACP,0BAA0B;;;;iBAUb,0BAAA,CACd,MAAA,EAAQ,+BAAA,GACP,2BAA2B;;AAvFR;AA4CtB;iBAsDgB,gCAAA,CACd,MAAA,EAAQ,mCAAA,GACP,6BAA6B;;;;iBAuBhB,gCAAA,CACd,OAAA,EAAS,qBAAA,GACR,2BAA2B;;;AA/EP;AAevB;iBA6EgB,iCAAA,CACd,MAAA,EAAQ,yBAAA,GACP,6BAA6B;;;;iBAYhB,oCAAA,CACd,MAAA,EAAQ,0BAAA,GACP,iCAAiC;;;AA3FV;iBAyGV,wCAAA,CACd,WAAA,EAAa,6BAAA,GACZ,mCAAmC;;;;iBA4CtB,iBAAA,CACd,MAAA,EAAQ,wBAAA,GACP,cAAc;;;;iBAUD,yBAAA,CACd,MAAA,EAAQ,oCAAA,GACP,sBAAsB;AA/IzB;;;;;AAAA,iBA+J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;;;;;AAAA,iBA8UgB,0BAAA,CACd,MAAA,EAAQ,qCAAA,GACP,uBAAuB;;;AA9UM;AAwBhC;;iBA0UgB,qCAAA,CACd,MAAA,EAAQ,0BAAA,GACP,gCAAgC;;;;;;iBAenB,qCAAA,CACd,MAAA,EAAQ,0BAAA,GACP,gCAAgC"}
|
package/dist/dataMappers.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { A as MobileServerSocialFeedMarket, D as MobileServerSocialFeedItem, E as MobileServerSocialFeedInteraction, F as MobileServerSocialFeedTradeCard, I as MobileServerSocialFeedTradeRow, L as MobileServerSocialFeedTradeRowBase, M as MobileServerSocialFeedPositionCard, N as MobileServerSocialFeedPositionPatch, O as MobileServerSocialFeedItemBase, P as MobileServerSocialFeedReadSession, R as MobileServerSocialFeedTraderBadge, b as MobileServerProfile, d as MobileServerAvatarSelection, j as MobileServerSocialFeedPnl, k as MobileServerSocialFeedItemPatch, u as MobileServerAvatarPreset, x as MobileServerSocialFeedAuthor, y as MobileServerNotificationPreferences } from "./serverModelTypes-DAqEyYtB.js";
|
|
2
|
-
import { $ as
|
|
3
|
-
import { d as MobileServerSocialFeedListParams, f as MobileServerSocialFeedReadParams, l as MobileServerSearchProfilesRequest, n as MobileServerFollowListRequest, r as MobileServerProfilesInclude } from "./serverRequestTypes-
|
|
4
|
-
import {
|
|
5
|
-
import { d as MobileServerSocialFeedItemResponse, f as MobileServerSocialFeedRankedResponse, h as MobileServerSocialFeedUpdatesResponse, l as MobileServerRegisteredWalletResponse, m as MobileServerSocialFeedTopTradersResponse, n as MobileServerFeedResponse, p as MobileServerSocialFeedResponse, r as MobileServerFollowListResponse, u as MobileServerSearchProfilesResponse } from "./serverQueryTypes-
|
|
2
|
+
import { $ as MobileSocialFeedItemBase, D as MobileFollowMutationResult, E as MobileFollowListPage, F as MobilePublicProfile, G as MobileSocialFeedAuthor, L as MobileRegisteredWallet, M as MobileNotificationPreferences, N as MobileProfileSearchPage, P as MobileProfilesInclude, Q as MobileSocialFeedItem, S as MobileFeedPage, St as SearchMobileProfilesParams, Z as MobileSocialFeedInteraction, _ as MobileAvatarPreset, at as MobileSocialFeedPnl, ct as MobileSocialFeedRankedPage, dt as MobileSocialFeedTopTradersPage, et as MobileSocialFeedItemPatch, ft as MobileSocialFeedTradeCard, gt as MobileSocialFeedUpdates, ht as MobileSocialFeedTraderBadge, i as GetMobileFollowListParams, it as MobileSocialFeedPage, lt as MobileSocialFeedReadParams, mt as MobileSocialFeedTradeRowBase, nt as MobileSocialFeedListParams, ot as MobileSocialFeedPositionCard, pt as MobileSocialFeedTradeRow, rt as MobileSocialFeedMarket, st as MobileSocialFeedPositionPatch, tt as MobileSocialFeedItemResponse, ut as MobileSocialFeedReadSession, v as MobileAvatarSelection, w as MobileFollowBatchResultItem, y as MobileAvatarUpload } from "./clientTypes-DCTiUV0H.js";
|
|
3
|
+
import { d as MobileServerSocialFeedListParams, f as MobileServerSocialFeedReadParams, l as MobileServerSearchProfilesRequest, n as MobileServerFollowListRequest, r as MobileServerProfilesInclude } from "./serverRequestTypes-BNA7FCY6.js";
|
|
4
|
+
import { c as MobileServerFollowMutationResponse, o as MobileServerFollowBatchResponse, t as MobileServerAvatarUploadResponse } from "./serverExecuteTypes-DlYZCp1f.js";
|
|
5
|
+
import { d as MobileServerSocialFeedItemResponse, f as MobileServerSocialFeedRankedResponse, h as MobileServerSocialFeedUpdatesResponse, l as MobileServerRegisteredWalletResponse, m as MobileServerSocialFeedTopTradersResponse, n as MobileServerFeedResponse, p as MobileServerSocialFeedResponse, r as MobileServerFollowListResponse, u as MobileServerSearchProfilesResponse } from "./serverQueryTypes-BFdwq0Z2.js";
|
|
6
6
|
|
|
7
7
|
//#region src/dataMappers.d.ts
|
|
8
8
|
/**
|
|
@@ -37,6 +37,10 @@ declare function mapMobileProfileSearchPage(server: MobileServerSearchProfilesRe
|
|
|
37
37
|
* Maps a server-side follow or unfollow response to its client-side representation.
|
|
38
38
|
*/
|
|
39
39
|
declare function mapMobileFollowMutationResult(server: MobileServerFollowMutationResponse): MobileFollowMutationResult;
|
|
40
|
+
/**
|
|
41
|
+
* Maps a server-side batch follow or unfollow response to its client-side representation.
|
|
42
|
+
*/
|
|
43
|
+
declare function mapMobileFollowBatchResult(server: MobileServerFollowBatchResponse): MobileFollowBatchResultItem[];
|
|
40
44
|
/**
|
|
41
45
|
* Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.
|
|
42
46
|
*/
|
|
@@ -193,5 +197,5 @@ declare function mapMobileSocialFeedListParamsToServer(params: MobileSocialFeedL
|
|
|
193
197
|
*/
|
|
194
198
|
declare function mapMobileSocialFeedReadParamsToServer(params: MobileSocialFeedReadParams): MobileServerSocialFeedReadParams;
|
|
195
199
|
//#endregion
|
|
196
|
-
export { mapMobileAvatarPreset, mapMobileAvatarSelectionToServer, mapMobileAvatarUpload, mapMobileFeedPage, mapMobileFollowListPage, mapMobileFollowListParamsToServer, mapMobileFollowMutationResult, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobileProfileSearchPage, mapMobileProfileSearchParamsToServer, mapMobileProfilesIncludeToServer, mapMobilePublicProfile, mapMobileRegisteredWallet, mapMobileSocialFeedAuthor, mapMobileSocialFeedInteraction, mapMobileSocialFeedItem, mapMobileSocialFeedItemBase, mapMobileSocialFeedItemPatch, mapMobileSocialFeedItemResponse, mapMobileSocialFeedListParamsToServer, mapMobileSocialFeedMarket, mapMobileSocialFeedPage, mapMobileSocialFeedPnl, mapMobileSocialFeedPositionCard, mapMobileSocialFeedPositionPatch, mapMobileSocialFeedRankedPage, mapMobileSocialFeedReadParamsToServer, mapMobileSocialFeedReadSession, mapMobileSocialFeedTopTradersPage, mapMobileSocialFeedTradeCard, mapMobileSocialFeedTradeRow, mapMobileSocialFeedTradeRowBase, mapMobileSocialFeedTraderBadge, mapMobileSocialFeedUpdates };
|
|
200
|
+
export { mapMobileAvatarPreset, mapMobileAvatarSelectionToServer, mapMobileAvatarUpload, mapMobileFeedPage, mapMobileFollowBatchResult, mapMobileFollowListPage, mapMobileFollowListParamsToServer, mapMobileFollowMutationResult, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobileProfileSearchPage, mapMobileProfileSearchParamsToServer, mapMobileProfilesIncludeToServer, mapMobilePublicProfile, mapMobileRegisteredWallet, mapMobileSocialFeedAuthor, mapMobileSocialFeedInteraction, mapMobileSocialFeedItem, mapMobileSocialFeedItemBase, mapMobileSocialFeedItemPatch, mapMobileSocialFeedItemResponse, mapMobileSocialFeedListParamsToServer, mapMobileSocialFeedMarket, mapMobileSocialFeedPage, mapMobileSocialFeedPnl, mapMobileSocialFeedPositionCard, mapMobileSocialFeedPositionPatch, mapMobileSocialFeedRankedPage, mapMobileSocialFeedReadParamsToServer, mapMobileSocialFeedReadSession, mapMobileSocialFeedTopTradersPage, mapMobileSocialFeedTradeCard, mapMobileSocialFeedTradeRow, mapMobileSocialFeedTradeRowBase, mapMobileSocialFeedTraderBadge, mapMobileSocialFeedUpdates };
|
|
197
201
|
//# sourceMappingURL=dataMappers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataMappers.d.ts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"dataMappers.d.ts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;;;;AA6FA;iBAAgB,qBAAA,CACd,MAAA,EAAQ,wBAAA,GACP,kBAAkB;;;;iBAOL,qBAAA,CACd,MAAA,EAAQ,gCAAA,GACP,kBAAkB;;;AATA;iBAqBL,gCAAA,CACd,MAAA,EAAQ,qBAAA,UACP,2BAA2B;;;;;;iBAed,sBAAA,CACd,MAAA,EAAQ,mBAAA,GACP,mBAAmB;;AA/BD;AAYrB;;iBA+DgB,uBAAA,CACd,MAAA,EAAQ,8BAAA,GACP,oBAAoB;;;;;iBAeP,0BAAA,CACd,MAAA,EAAQ,kCAAA,GACP,uBAAuB;AAhFI;AA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A,EAAQ,kCAAA,GACP,4BAA4B;;;AAjNd;AAUjB;;iBA2NgB,2BAAA,CACd,MAAA,EAAQ,8BAAA,GACP,wBAAwB;;;;;;iBAiCX,uBAAA,CACd,MAAA,EAAQ,0BAAA,GACP,oBAAoB;AA9OvB;;;;;AAAA,iBAyPgB,8BAAA,CACd,MAAA,EAAQ,iCAAA,GACP,2BAA2B;;;AAzPA;AAiB9B;;iBA2PgB,uBAAA,CACd,MAAA,EAAQ,8BAAA,GACP,oBAAoB;;;;;;iBAcP,6BAAA,CACd,MAAA,EAAQ,oCAAA,GACP,0BAA0B;AA1P7B;;;;;AAAA,iBAsQgB,iCAAA,CACd,MAAA,EAAQ,wCAAA,GACP,8BAA8B;;;AAtQR;AAezB;;iBA4QgB,+BAAA,CACd,MAAA,EAAQ,kCAAA,GACP,4BAA4B;;;;;;iBAYf,4BAAA,CACd,MAAA,EAAQ,+BAAA,GACP,yBAAyB;AA3Q5B;;;;;AAAA,iBA8UgB,0BAAA,CACd,MAAA,EAAQ,qCAAA,GACP,uBAAuB;;;AA9UM;AAwBhC;;iBA0UgB,qCAAA,CACd,MAAA,EAAQ,0BAAA,GACP,gCAAgC;;;;;;iBAenB,qCAAA,CACd,MAAA,EAAQ,0BAAA,GACP,gCAAgC"}
|
package/dist/dataMappers.js
CHANGED
|
@@ -104,6 +104,16 @@ function mapMobileFollowMutationResult(server) {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
/**
|
|
107
|
+
* Maps a server-side batch follow or unfollow response to its client-side representation.
|
|
108
|
+
*/
|
|
109
|
+
function mapMobileFollowBatchResult(server) {
|
|
110
|
+
return server.results.map((result) => ({
|
|
111
|
+
subaccount: result.subaccount,
|
|
112
|
+
isFollowing: result.is_following,
|
|
113
|
+
followerCount: result.follower_count
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
107
117
|
* Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.
|
|
108
118
|
*/
|
|
109
119
|
function mapMobileNotificationPreferences(server) {
|
|
@@ -561,6 +571,6 @@ function mapMobileSocialFeedReadParamsToServer(params) {
|
|
|
561
571
|
};
|
|
562
572
|
}
|
|
563
573
|
//#endregion
|
|
564
|
-
export { mapMobileAvatarPreset, mapMobileAvatarSelectionToServer, mapMobileAvatarUpload, mapMobileFeedPage, mapMobileFollowListPage, mapMobileFollowListParamsToServer, mapMobileFollowMutationResult, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobileProfileSearchPage, mapMobileProfileSearchParamsToServer, mapMobileProfilesIncludeToServer, mapMobilePublicProfile, mapMobileRegisteredWallet, mapMobileSocialFeedAuthor, mapMobileSocialFeedInteraction, mapMobileSocialFeedItem, mapMobileSocialFeedItemBase, mapMobileSocialFeedItemPatch, mapMobileSocialFeedItemResponse, mapMobileSocialFeedListParamsToServer, mapMobileSocialFeedMarket, mapMobileSocialFeedPage, mapMobileSocialFeedPnl, mapMobileSocialFeedPositionCard, mapMobileSocialFeedPositionPatch, mapMobileSocialFeedRankedPage, mapMobileSocialFeedReadParamsToServer, mapMobileSocialFeedReadSession, mapMobileSocialFeedTopTradersPage, mapMobileSocialFeedTradeCard, mapMobileSocialFeedTradeRow, mapMobileSocialFeedTradeRowBase, mapMobileSocialFeedTraderBadge, mapMobileSocialFeedUpdates };
|
|
574
|
+
export { mapMobileAvatarPreset, mapMobileAvatarSelectionToServer, mapMobileAvatarUpload, mapMobileFeedPage, mapMobileFollowBatchResult, mapMobileFollowListPage, mapMobileFollowListParamsToServer, mapMobileFollowMutationResult, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobileProfileSearchPage, mapMobileProfileSearchParamsToServer, mapMobileProfilesIncludeToServer, mapMobilePublicProfile, mapMobileRegisteredWallet, mapMobileSocialFeedAuthor, mapMobileSocialFeedInteraction, mapMobileSocialFeedItem, mapMobileSocialFeedItemBase, mapMobileSocialFeedItemPatch, mapMobileSocialFeedItemResponse, mapMobileSocialFeedListParamsToServer, mapMobileSocialFeedMarket, mapMobileSocialFeedPage, mapMobileSocialFeedPnl, mapMobileSocialFeedPositionCard, mapMobileSocialFeedPositionPatch, mapMobileSocialFeedRankedPage, mapMobileSocialFeedReadParamsToServer, mapMobileSocialFeedReadSession, mapMobileSocialFeedTopTradersPage, mapMobileSocialFeedTradeCard, mapMobileSocialFeedTradeRow, mapMobileSocialFeedTradeRowBase, mapMobileSocialFeedTraderBadge, mapMobileSocialFeedUpdates };
|
|
565
575
|
|
|
566
576
|
//# sourceMappingURL=dataMappers.js.map
|