@nadohq/mobile-client 0.65.0 → 0.67.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.
Files changed (211) hide show
  1. package/README.md +202 -10
  2. package/dist/{MobileClient-CfVZXTcz.cjs → MobileClient-vuI5wlB_.cjs} +303 -21
  3. package/dist/MobileClient-vuI5wlB_.cjs.map +1 -0
  4. package/dist/MobileClient.cjs +1 -1
  5. package/dist/MobileClient.d.cts +175 -20
  6. package/dist/MobileClient.d.cts.map +1 -1
  7. package/dist/MobileClient.d.ts +175 -20
  8. package/dist/MobileClient.d.ts.map +1 -1
  9. package/dist/MobileClient.js +303 -21
  10. package/dist/MobileClient.js.map +1 -1
  11. package/dist/{MobileServerFailureError-BZVwlsMg.d.ts → MobileServerFailureError-BeCCNShj.d.cts} +2 -3
  12. package/dist/MobileServerFailureError-BeCCNShj.d.cts.map +1 -0
  13. package/dist/{MobileServerFailureError-CbtK8kD4.d.cts → MobileServerFailureError-hHv28weI.d.ts} +2 -3
  14. package/dist/MobileServerFailureError-hHv28weI.d.ts.map +1 -0
  15. package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.cts +15 -0
  16. package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.cts.map +1 -0
  17. package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.ts +15 -0
  18. package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.ts.map +1 -0
  19. package/dist/{buildSignedMobileRequest-C1v0flCR.d.cts → buildSignedMobileRequest-DcEMKU_4.d.cts} +2 -2
  20. package/dist/{buildSignedMobileRequest-C1v0flCR.d.cts.map → buildSignedMobileRequest-DcEMKU_4.d.cts.map} +1 -1
  21. package/dist/{buildSignedMobileRequest-UeeWdYGU.d.ts → buildSignedMobileRequest-DlTMvoXR.d.ts} +2 -2
  22. package/dist/{buildSignedMobileRequest-UeeWdYGU.d.ts.map → buildSignedMobileRequest-DlTMvoXR.d.ts.map} +1 -1
  23. package/dist/{canonicalize-5eeZrkzQ.d.ts → canonicalize-BOZlflI3.d.ts} +2 -2
  24. package/dist/canonicalize-BOZlflI3.d.ts.map +1 -0
  25. package/dist/{canonicalize-CBaZprTo.d.cts → canonicalize-BvCozzvJ.d.cts} +2 -2
  26. package/dist/canonicalize-BvCozzvJ.d.cts.map +1 -0
  27. package/dist/{clientTypes-_mEgzmNs.d.cts → clientTypes-KpHlCDGZ.d.cts} +341 -38
  28. package/dist/clientTypes-KpHlCDGZ.d.cts.map +1 -0
  29. package/dist/{clientTypes-C9dJufxk.d.ts → clientTypes-XRI41VdC.d.ts} +341 -38
  30. package/dist/clientTypes-XRI41VdC.d.ts.map +1 -0
  31. package/dist/dataMappers.cjs +257 -20
  32. package/dist/dataMappers.cjs.map +1 -1
  33. package/dist/dataMappers.d.cts +98 -15
  34. package/dist/dataMappers.d.cts.map +1 -1
  35. package/dist/dataMappers.d.ts +98 -15
  36. package/dist/dataMappers.d.ts.map +1 -1
  37. package/dist/dataMappers.js +242 -20
  38. package/dist/dataMappers.js.map +1 -1
  39. package/dist/{eip712MethodByType-D8jLoxDu.d.cts → eip712MethodByType-DyAmzH7b.d.cts} +2 -2
  40. package/dist/eip712MethodByType-DyAmzH7b.d.cts.map +1 -0
  41. package/dist/{eip712MethodByType-DcUh8h-l.d.ts → eip712MethodByType-qSSAF6i2.d.ts} +2 -2
  42. package/dist/eip712MethodByType-qSSAF6i2.d.ts.map +1 -0
  43. package/dist/feed-BrgkFqP3.d.cts +23 -0
  44. package/dist/feed-BrgkFqP3.d.cts.map +1 -0
  45. package/dist/feed-DcbhLoo1.d.ts +23 -0
  46. package/dist/feed-DcbhLoo1.d.ts.map +1 -0
  47. package/dist/index-BVVgDSdq.d.cts +1 -0
  48. package/dist/index-BVVgDSdq.d.ts +1 -0
  49. package/dist/index.cjs +8 -2
  50. package/dist/index.d.cts +14 -16
  51. package/dist/index.d.ts +14 -16
  52. package/dist/index.js +4 -3
  53. package/dist/{mobileErrorCodes-CmjYEIYm.d.ts → mobileErrorCodes-CdwX6QTO.d.cts} +8 -3
  54. package/dist/mobileErrorCodes-CdwX6QTO.d.cts.map +1 -0
  55. package/dist/{mobileErrorCodes-CmjYEIYm.d.cts → mobileErrorCodes-CdwX6QTO.d.ts} +8 -3
  56. package/dist/mobileErrorCodes-CdwX6QTO.d.ts.map +1 -0
  57. package/dist/{payloadHash-DhHmgRqL.d.cts → payloadHash-BgGSZock.d.cts} +2 -2
  58. package/dist/payloadHash-BgGSZock.d.cts.map +1 -0
  59. package/dist/{payloadHash-E1_8fpLW.d.ts → payloadHash-Bi6upCLQ.d.ts} +2 -2
  60. package/dist/payloadHash-Bi6upCLQ.d.ts.map +1 -0
  61. package/dist/{serverExecuteTypes-BwWGspOg.d.ts → serverExecuteTypes-DuCWe_H_.d.cts} +23 -14
  62. package/dist/serverExecuteTypes-DuCWe_H_.d.cts.map +1 -0
  63. package/dist/{serverExecuteTypes-B-OJok19.d.cts → serverExecuteTypes-usJ6HMJv.d.ts} +23 -14
  64. package/dist/serverExecuteTypes-usJ6HMJv.d.ts.map +1 -0
  65. package/dist/{serverModelTypes-CiA-dy1R.d.ts → serverModelTypes-CTHMNIQS.d.cts} +170 -13
  66. package/dist/serverModelTypes-CTHMNIQS.d.cts.map +1 -0
  67. package/dist/{serverModelTypes-CiA-dy1R.d.cts → serverModelTypes-CTHMNIQS.d.ts} +170 -13
  68. package/dist/serverModelTypes-CTHMNIQS.d.ts.map +1 -0
  69. package/dist/{serverResponseGuards-CShiXpHT.d.ts → serverResponseGuards-CzmldAad.d.cts} +2 -2
  70. package/dist/{serverResponseGuards-BW69PS7O.d.cts.map → serverResponseGuards-CzmldAad.d.cts.map} +1 -1
  71. package/dist/{serverResponseGuards-BW69PS7O.d.cts → serverResponseGuards-Dvkbjp2_.d.ts} +2 -2
  72. package/dist/{serverResponseGuards-CShiXpHT.d.ts.map → serverResponseGuards-Dvkbjp2_.d.ts.map} +1 -1
  73. package/dist/signing/buildSignedMobileRequest.d.cts +1 -1
  74. package/dist/signing/buildSignedMobileRequest.d.ts +1 -1
  75. package/dist/signing/canonicalize.cjs +53 -2
  76. package/dist/signing/canonicalize.cjs.map +1 -1
  77. package/dist/signing/canonicalize.d.cts +1 -1
  78. package/dist/signing/canonicalize.d.ts +1 -1
  79. package/dist/signing/canonicalize.js +53 -2
  80. package/dist/signing/canonicalize.js.map +1 -1
  81. package/dist/signing/eip712MethodByType.cjs +7 -0
  82. package/dist/signing/eip712MethodByType.cjs.map +1 -1
  83. package/dist/signing/eip712MethodByType.d.cts +1 -1
  84. package/dist/signing/eip712MethodByType.d.ts +1 -1
  85. package/dist/signing/eip712MethodByType.js +7 -0
  86. package/dist/signing/eip712MethodByType.js.map +1 -1
  87. package/dist/signing/index.d.cts +5 -5
  88. package/dist/signing/index.d.ts +5 -5
  89. package/dist/signing/payloadHash.cjs +1 -1
  90. package/dist/signing/payloadHash.d.cts +1 -1
  91. package/dist/signing/payloadHash.d.ts +1 -1
  92. package/dist/signing/payloadHash.js +1 -1
  93. package/dist/signing/types.d.cts +1 -1
  94. package/dist/signing/types.d.ts +1 -1
  95. package/dist/types/MobileServerFailureError.d.cts +1 -1
  96. package/dist/types/MobileServerFailureError.d.ts +1 -1
  97. package/dist/types/MobileUnsupportedNotificationRouteError.cjs +19 -0
  98. package/dist/types/MobileUnsupportedNotificationRouteError.cjs.map +1 -0
  99. package/dist/types/MobileUnsupportedNotificationRouteError.d.cts +2 -0
  100. package/dist/types/MobileUnsupportedNotificationRouteError.d.ts +2 -0
  101. package/dist/types/MobileUnsupportedNotificationRouteError.js +18 -0
  102. package/dist/types/MobileUnsupportedNotificationRouteError.js.map +1 -0
  103. package/dist/types/clientTypes.d.cts +2 -2
  104. package/dist/types/clientTypes.d.ts +2 -2
  105. package/dist/types/index.cjs +4 -0
  106. package/dist/types/index.d.cts +8 -9
  107. package/dist/types/index.d.ts +8 -9
  108. package/dist/types/index.js +3 -2
  109. package/dist/types/mobileErrorCodes.cjs +11 -1
  110. package/dist/types/mobileErrorCodes.cjs.map +1 -1
  111. package/dist/types/mobileErrorCodes.d.cts +1 -1
  112. package/dist/types/mobileErrorCodes.d.ts +1 -1
  113. package/dist/types/mobileErrorCodes.js +11 -1
  114. package/dist/types/mobileErrorCodes.js.map +1 -1
  115. package/dist/types/serverBaseTypes.d.cts +1 -1
  116. package/dist/types/serverBaseTypes.d.ts +1 -1
  117. package/dist/types/serverExecuteTypes.d.cts +2 -2
  118. package/dist/types/serverExecuteTypes.d.ts +2 -2
  119. package/dist/types/serverModelTypes.cjs +15 -0
  120. package/dist/types/serverModelTypes.cjs.map +1 -1
  121. package/dist/types/serverModelTypes.d.cts +2 -2
  122. package/dist/types/serverModelTypes.d.ts +2 -2
  123. package/dist/types/serverModelTypes.js +14 -1
  124. package/dist/types/serverModelTypes.js.map +1 -1
  125. package/dist/types/serverQueryTypes.d.cts +2 -2
  126. package/dist/types/serverQueryTypes.d.ts +2 -2
  127. package/dist/types/serverRequestTypes.d.cts +2 -2
  128. package/dist/types/serverRequestTypes.d.ts +2 -2
  129. package/dist/types-CByl_NyJ.d.ts +825 -0
  130. package/dist/types-CByl_NyJ.d.ts.map +1 -0
  131. package/dist/types-CR5iaKR4.d.cts +825 -0
  132. package/dist/types-CR5iaKR4.d.cts.map +1 -0
  133. package/dist/utils/buildMobileFeedImageMultipart.cjs +31 -0
  134. package/dist/utils/buildMobileFeedImageMultipart.cjs.map +1 -0
  135. package/dist/utils/buildMobileFeedImageMultipart.d.cts +15 -0
  136. package/dist/utils/buildMobileFeedImageMultipart.d.cts.map +1 -0
  137. package/dist/utils/buildMobileFeedImageMultipart.d.ts +15 -0
  138. package/dist/utils/buildMobileFeedImageMultipart.d.ts.map +1 -0
  139. package/dist/utils/buildMobileFeedImageMultipart.js +30 -0
  140. package/dist/utils/buildMobileFeedImageMultipart.js.map +1 -0
  141. package/dist/utils/feed.cjs +12 -0
  142. package/dist/utils/feed.cjs.map +1 -1
  143. package/dist/utils/feed.d.cts +2 -2
  144. package/dist/utils/feed.d.ts +2 -2
  145. package/dist/utils/feed.js +11 -1
  146. package/dist/utils/feed.js.map +1 -1
  147. package/dist/utils/index.cjs +3 -1
  148. package/dist/utils/index.d.cts +3 -3
  149. package/dist/utils/index.d.ts +3 -3
  150. package/dist/utils/index.js +2 -2
  151. package/dist/utils/serverResponseGuards.d.cts +1 -1
  152. package/dist/utils/serverResponseGuards.d.ts +1 -1
  153. package/package.json +3 -3
  154. package/src/MobileClient.ts +444 -19
  155. package/src/dataMappers.test.ts +511 -6
  156. package/src/dataMappers.ts +325 -24
  157. package/src/feedImages.test.ts +309 -0
  158. package/src/notifications.test.ts +950 -0
  159. package/src/signing/canonicalize.ts +72 -0
  160. package/src/signing/eip712MethodByType.ts +10 -0
  161. package/src/signing/signing.test.ts +67 -1
  162. package/src/signing/types.ts +55 -9
  163. package/src/socialFeed.test.ts +63 -2
  164. package/src/types/MobileUnsupportedNotificationRouteError.ts +16 -0
  165. package/src/types/clientTypes.ts +427 -36
  166. package/src/types/index.ts +1 -0
  167. package/src/types/mobileErrorCodes.ts +10 -0
  168. package/src/types/serverExecuteTypes.ts +22 -10
  169. package/src/types/serverModelTypes.ts +216 -11
  170. package/src/types/serverQueryTypes.ts +106 -9
  171. package/src/types/serverRequestTypes.ts +114 -17
  172. package/src/utils/buildMobileFeedImageMultipart.test.ts +45 -0
  173. package/src/utils/buildMobileFeedImageMultipart.ts +36 -0
  174. package/src/utils/feed.ts +16 -0
  175. package/dist/MobileClient-CfVZXTcz.cjs.map +0 -1
  176. package/dist/MobileServerFailureError-BZVwlsMg.d.ts.map +0 -1
  177. package/dist/MobileServerFailureError-CbtK8kD4.d.cts.map +0 -1
  178. package/dist/canonicalize-5eeZrkzQ.d.ts.map +0 -1
  179. package/dist/canonicalize-CBaZprTo.d.cts.map +0 -1
  180. package/dist/clientTypes-C9dJufxk.d.ts.map +0 -1
  181. package/dist/clientTypes-_mEgzmNs.d.cts.map +0 -1
  182. package/dist/eip712MethodByType-D8jLoxDu.d.cts.map +0 -1
  183. package/dist/eip712MethodByType-DcUh8h-l.d.ts.map +0 -1
  184. package/dist/feed-DTJlsg8W.d.cts +0 -14
  185. package/dist/feed-DTJlsg8W.d.cts.map +0 -1
  186. package/dist/feed-DTJlsg8W.d.ts +0 -14
  187. package/dist/feed-DTJlsg8W.d.ts.map +0 -1
  188. package/dist/mobileErrorCodes-CmjYEIYm.d.cts.map +0 -1
  189. package/dist/mobileErrorCodes-CmjYEIYm.d.ts.map +0 -1
  190. package/dist/payloadHash-DhHmgRqL.d.cts.map +0 -1
  191. package/dist/payloadHash-E1_8fpLW.d.ts.map +0 -1
  192. package/dist/serverBaseTypes-B5J1_TyC.d.cts +0 -25
  193. package/dist/serverBaseTypes-B5J1_TyC.d.cts.map +0 -1
  194. package/dist/serverBaseTypes-DnLzsdm-.d.ts +0 -25
  195. package/dist/serverBaseTypes-DnLzsdm-.d.ts.map +0 -1
  196. package/dist/serverExecuteTypes-B-OJok19.d.cts.map +0 -1
  197. package/dist/serverExecuteTypes-BwWGspOg.d.ts.map +0 -1
  198. package/dist/serverModelTypes-CiA-dy1R.d.cts.map +0 -1
  199. package/dist/serverModelTypes-CiA-dy1R.d.ts.map +0 -1
  200. package/dist/serverQueryTypes-CJcjLB7n.d.ts +0 -283
  201. package/dist/serverQueryTypes-CJcjLB7n.d.ts.map +0 -1
  202. package/dist/serverQueryTypes-V1f9yE7L.d.cts +0 -283
  203. package/dist/serverQueryTypes-V1f9yE7L.d.cts.map +0 -1
  204. package/dist/serverRequestTypes-CRlkNSu5.d.cts +0 -270
  205. package/dist/serverRequestTypes-CRlkNSu5.d.cts.map +0 -1
  206. package/dist/serverRequestTypes-DZoOhV2o.d.ts +0 -270
  207. package/dist/serverRequestTypes-DZoOhV2o.d.ts.map +0 -1
  208. package/dist/types-BiRmH5Iv.d.cts +0 -108
  209. package/dist/types-BiRmH5Iv.d.cts.map +0 -1
  210. package/dist/types-DoJuq0Ij.d.ts +0 -108
  211. package/dist/types-DoJuq0Ij.d.ts.map +0 -1
@@ -1,8 +1,7 @@
1
- import { $ as MobileServerSocialFeedTradeRow, A as MobileServerSocialFeedCompactCard, B as MobileServerSocialFeedItemPatch, C as MobileServerSocialFeedAuthor, H as MobileServerSocialFeedPnl, I as MobileServerSocialFeedHistoryTake, J as MobileServerSocialFeedPublishablePosition, K as MobileServerSocialFeedPositionPatch, L as MobileServerSocialFeedInteraction, M as MobileServerSocialFeedDrawing, P as MobileServerSocialFeedHistoryMetrics, Q as MobileServerSocialFeedTradeCard, R as MobileServerSocialFeedItem, S as MobileServerSocialFeedActionMarker, U as MobileServerSocialFeedPositionAction, V as MobileServerSocialFeedMarket, W as MobileServerSocialFeedPositionCard, X as MobileServerSocialFeedReply, Y as MobileServerSocialFeedReadSession, Z as MobileServerSocialFeedTimelineEntry, _t as MobileSocialFeedMention, b as MobileServerProfile, d as MobileServerAvatarSelection, et as MobileServerSocialFeedTradeRowBase, j as MobileServerSocialFeedContentBase, nt as MobileServerSocialFeedTradingContext, q as MobileServerSocialFeedPost, rt as MobileServerSocialFeedTradingTarget, tt as MobileServerSocialFeedTraderBadge, u as MobileServerAvatarPreset, w as MobileServerSocialFeedCandle, x as MobileServerSocialFeedActionCandidate, y as MobileServerNotificationPreferences, z as MobileServerSocialFeedItemBase } from "./serverModelTypes-CiA-dy1R.js";
2
- import { $t as MobileSocialFeedTradeCard, At as MobileSocialFeedLikeResult, C as MobileAvatarPreset, Dt as MobileSocialFeedItemBase, Et as MobileSocialFeedItem, F as MobileFollowListPage, Ft as MobileSocialFeedPnl, G as MobilePublicProfile, Gt as MobileSocialFeedPresence, Ht as MobileSocialFeedPositionResolutionResult, I as MobileFollowMutationResult, It as MobileSocialFeedPositionAction, J as MobileRegisteredWallet, Jt as MobileSocialFeedReadParams, Kt as MobileSocialFeedPublishablePosition, Lt as MobileSocialFeedPositionCard, Mt as MobileSocialFeedMarket, N as MobileFollowBatchResultItem, Nt as MobileSocialFeedMentionParams, Ot as MobileSocialFeedItemPatch, Pt as MobileSocialFeedPage, Qt as MobileSocialFeedTopTradersPage, Rt as MobileSocialFeedPositionChart, St as MobileSocialFeedHistoryMetrics, T as MobileAvatarUpload, Tt as MobileSocialFeedInteraction, U as MobileProfileSearchPage, Ut as MobileSocialFeedPositionsPage, V as MobileNotificationPreferences, Vt as MobileSocialFeedPositionPatch, W as MobileProfilesInclude, Wt as MobileSocialFeedPost, Xt as MobileSocialFeedReply, Yt as MobileSocialFeedReadSession, Zt as MobileSocialFeedTimelineEntry, _t as MobileSocialFeedContentBase, an as MobileSocialFeedUpdates, at as MobileSocialFeedActionResolutionResult, bt as MobileSocialFeedDrawingResult, cn as MobileSocialFeedWatchers, en as MobileSocialFeedTradeRow, gt as MobileSocialFeedCompactCard, hn as SearchMobileProfilesParams, ht as MobileSocialFeedCommentsPage, in as MobileSocialFeedTradingTarget, it as MobileSocialFeedActionMarker, j as MobileFeedPage, jt as MobileSocialFeedListParams, kt as MobileSocialFeedItemResponse, mt as MobileSocialFeedCommentResult, nn as MobileSocialFeedTraderBadge, o as GetMobileFollowListParams, ot as MobileSocialFeedAuthor, qt as MobileSocialFeedRankedPage, rn as MobileSocialFeedTradingContext, rt as MobileSocialFeedActionCandidate, sn as MobileSocialFeedViewsResult, st as MobileSocialFeedCandle, tn as MobileSocialFeedTradeRowBase, vt as MobileSocialFeedDrawing, w as MobileAvatarSelection, wt as MobileSocialFeedHistoryTake, yt as MobileSocialFeedDrawingMutationResult, zt as MobileSocialFeedPositionHistory } from "./clientTypes-C9dJufxk.js";
3
- import { d as MobileServerSocialFeedListParams, f as MobileServerSocialFeedReadParams, l as MobileServerSearchProfilesRequest, n as MobileServerFollowListRequest, r as MobileServerProfilesInclude } from "./serverRequestTypes-DZoOhV2o.js";
4
- import { _ as MobileServerSocialFeedViewsResponse, c as MobileServerFollowMutationResponse, f as MobileServerSocialFeedCommentResponse, g as MobileServerSocialFeedPresenceResponse, m as MobileServerSocialFeedLikeResponse, o as MobileServerFollowBatchResponse, p as MobileServerSocialFeedDrawingMutationResponse, t as MobileServerAvatarUploadResponse } from "./serverExecuteTypes-BwWGspOg.js";
5
- import { C as MobileServerSocialFeedWatchersResponse, S as MobileServerSocialFeedUpdatesResponse, _ as MobileServerSocialFeedPositionResolutionResponse, b as MobileServerSocialFeedResponse, d as MobileServerSocialFeedActionResolutionResponse, f as MobileServerSocialFeedCommentsResponse, g as MobileServerSocialFeedPositionHistoryResponse, h as MobileServerSocialFeedPositionChartResponse, l as MobileServerRegisteredWalletResponse, m as MobileServerSocialFeedItemResponse, n as MobileServerFeedResponse, p as MobileServerSocialFeedDrawingResponse, r as MobileServerFollowListResponse, u as MobileServerSearchProfilesResponse, v as MobileServerSocialFeedPositionsResponse, x as MobileServerSocialFeedTopTradersResponse, y as MobileServerSocialFeedRankedResponse } from "./serverQueryTypes-CJcjLB7n.js";
1
+ import { $ as MobileServerSocialFeedImage, A as MobileServerNotificationPreferences, F as MobileServerSocialFeedActionCandidate, Ft as MobileSocialFeedMention, G as MobileServerSocialFeedCompactCard, I as MobileServerSocialFeedActionMarker, K as MobileServerSocialFeedContentBase, L as MobileServerSocialFeedAuthor, M as MobileServerNotificationSettings, N as MobileServerProductEvent, O as MobileServerNotificationPayloadV2, P as MobileServerProfile, Q as MobileServerSocialFeedHistoryTake, R as MobileServerSocialFeedCandle, St as MobileServerSocialFeedUploadedImage, U as MobileServerSocialFeedCommentGroup, X as MobileServerSocialFeedHistoryMetrics, _ as MobileServerAvatarPreset, _t as MobileServerSocialFeedTradeRow, at as MobileServerSocialFeedMarket, bt as MobileServerSocialFeedTradingContext, ct as MobileServerSocialFeedPositionCard, dt as MobileServerSocialFeedPost, ft as MobileServerSocialFeedPublishablePosition, gt as MobileServerSocialFeedTradeCard, ht as MobileServerSocialFeedTimelineEntry, it as MobileServerSocialFeedItemPatch, j as MobileServerNotificationRoute, mt as MobileServerSocialFeedReply, nt as MobileServerSocialFeedItem, ot as MobileServerSocialFeedPnl, pt as MobileServerSocialFeedReadSession, q as MobileServerSocialFeedDrawing, rt as MobileServerSocialFeedItemBase, st as MobileServerSocialFeedPositionAction, tt as MobileServerSocialFeedInteraction, ut as MobileServerSocialFeedPositionPatch, v as MobileServerAvatarSelection, vt as MobileServerSocialFeedTradeRowBase, xt as MobileServerSocialFeedTradingTarget, yt as MobileServerSocialFeedTraderBadge } from "./serverModelTypes-CTHMNIQS.js";
2
+ import { $ as MobileNotificationPayloadV2, $t as MobileSocialFeedItem, An as MobileSocialFeedTradeRowBase, At as MobileSocialFeedCandle, Bt as MobileSocialFeedCompactCard, Cn as MobileSocialFeedReadParams, Dn as MobileSocialFeedTopTradersPage, Dt as MobileSocialFeedActionMarker, En as MobileSocialFeedTimelineEntry, Et as MobileSocialFeedActionCandidate, Fn as MobileSocialFeedUploadedImage, G as MobileFollowListPage, Gn as SearchMobileProfilesParams, Ht as MobileSocialFeedDrawing, In as MobileSocialFeedWatchers, It as MobileSocialFeedCommentGroup, K as MobileFollowMutationResult, M as MobileAvatarSelection, Mn as MobileSocialFeedTradingContext, N as MobileAvatarUpload, Nn as MobileSocialFeedTradingTarget, On as MobileSocialFeedTradeCard, Ot as MobileSocialFeedActionResolutionResult, Pn as MobileSocialFeedUpdates, Q as MobileNotificationInboxV2, Qt as MobileSocialFeedInteraction, Rt as MobileSocialFeedCommentResult, Sn as MobileSocialFeedRankedPage, Tn as MobileSocialFeedReply, U as MobileFollowBatchResultItem, Ut as MobileSocialFeedDrawingMutationResult, V as MobileFeedPage, Vt as MobileSocialFeedContentBase, Wt as MobileSocialFeedDrawingResult, Xt as MobileSocialFeedImage, Y as MobileNotificationCapabilities, Yt as MobileSocialFeedHistoryTake, _n as MobileSocialFeedPositionThoughtsPage, _t as MobileRegisteredWallet, an as MobileSocialFeedMarket, at as MobileNotificationSettingsV2, bn as MobileSocialFeedPresence, c as GetMobileFollowListParams, cn as MobileSocialFeedPnl, dn as MobileSocialFeedPositionChart, dt as MobileProfilesInclude, en as MobileSocialFeedItemBase, fn as MobileSocialFeedPositionHistory, ft as MobilePublicProfile, gn as MobileSocialFeedPositionThought, hn as MobileSocialFeedPositionResolutionResult, in as MobileSocialFeedListParams, it as MobileNotificationSettings, j as MobileAvatarPreset, jn as MobileSocialFeedTraderBadge, kn as MobileSocialFeedTradeRow, kt as MobileSocialFeedAuthor, ln as MobileSocialFeedPositionAction, lt as MobileProductEvent, mn as MobileSocialFeedPositionPatch, nn as MobileSocialFeedItemResponse, nt as MobileNotificationRegistrationV2, on as MobileSocialFeedMentionParams, ot as MobileNotificationSubscriptions, qt as MobileSocialFeedHistoryMetrics, rn as MobileSocialFeedLikeResult, rt as MobileNotificationRoute, sn as MobileSocialFeedPage, st as MobileNotificationSubscriptionsUpdate, tn as MobileSocialFeedItemPatch, tt as MobileNotificationPreferences, un as MobileSocialFeedPositionCard, ut as MobileProfileSearchPage, vn as MobileSocialFeedPositionsPage, wn as MobileSocialFeedReadSession, xn as MobileSocialFeedPublishablePosition, yn as MobileSocialFeedPost, zt as MobileSocialFeedCommentsPage } from "./clientTypes-XRI41VdC.js";
3
+ import { $ as MobileServerSocialFeedWatchersResponse, A as MobileServerNotificationSubscriptionsResponse, B as MobileServerSocialFeedCommentsResponse, E as MobileServerNotificationInboxV2Response, F as MobileServerRegisteredWalletResponse, G as MobileServerSocialFeedPositionResolutionResponse, H as MobileServerSocialFeedItemResponse, I as MobileServerSearchProfilesResponse, J as MobileServerSocialFeedPositionsResponse, K as MobileServerSocialFeedPositionThought, O as MobileServerNotificationRegistrationV2Response, Q as MobileServerSocialFeedUpdatesResponse, T as MobileServerFollowListResponse, U as MobileServerSocialFeedPositionChartResponse, V as MobileServerSocialFeedDrawingResponse, W as MobileServerSocialFeedPositionHistoryResponse, X as MobileServerSocialFeedResponse, Y as MobileServerSocialFeedRankedResponse, Z as MobileServerSocialFeedTopTradersResponse, _ as MobileServerSearchProfilesRequest, b as MobileServerSocialFeedListParams, c as MobileServerNotificationSubscriptionsUpdate, h as MobileServerRegisterExpoTokenV2Params, k as MobileServerNotificationSettingsV2Response, l as MobileServerProfilesInclude, q as MobileServerSocialFeedPositionThoughtsResponse, s as MobileServerFollowListRequest, w as MobileServerFeedResponse, x as MobileServerSocialFeedReadParams, z as MobileServerSocialFeedActionResolutionResponse } from "./types-CByl_NyJ.js";
4
+ import { _ as MobileServerSocialFeedPresenceResponse, c as MobileServerFollowMutationResponse, f as MobileServerSocialFeedCommentResponse, h as MobileServerSocialFeedLikeResponse, o as MobileServerFollowBatchResponse, p as MobileServerSocialFeedDrawingMutationResponse, t as MobileServerAvatarUploadResponse } from "./serverExecuteTypes-usJ6HMJv.js";
6
5
 
7
6
  //#region src/dataMappers.d.ts
8
7
  /**
@@ -13,6 +12,64 @@ declare function mapMobileAvatarPreset(server: MobileServerAvatarPreset): Mobile
13
12
  * Maps an upload grant, preserving the signed PUT headers and server-provided lifetime.
14
13
  */
15
14
  declare function mapMobileAvatarUpload(server: MobileServerAvatarUploadResponse): MobileAvatarUpload;
15
+ /** Maps a saved notification registration to the client model without the response envelope.
16
+ * @param server - Registration payload.
17
+ * @returns Saved generation and capabilities.
18
+ */
19
+ declare function mapMobileNotificationRegistrationV2(server: MobileServerNotificationRegistrationV2Response): MobileNotificationRegistrationV2;
20
+ /** Maps a v2 capability declaration to the registration wire format.
21
+ * @param capabilities - Device-supported features.
22
+ * @returns V2-only registration capabilities.
23
+ */
24
+ declare function mapMobileNotificationCapabilitiesToServer(capabilities: MobileNotificationCapabilities): MobileServerRegisterExpoTokenV2Params['capabilities'];
25
+ /** Maps complete notification settings to the client model.
26
+ * @param server - Saved settings.
27
+ * @returns CamelCase settings.
28
+ */
29
+ declare function mapMobileNotificationSettings(server: MobileServerNotificationSettings): MobileNotificationSettings;
30
+ /** Maps a complete replacement settings document to wire format.
31
+ * @param settings - Complete client settings.
32
+ * @returns Settings accepted by the service.
33
+ */
34
+ declare function mapMobileNotificationSettingsToServer(settings: MobileNotificationSettings): MobileServerNotificationSettings;
35
+ /** Maps a revisioned settings response without the response envelope.
36
+ * @param server - Versioned settings payload.
37
+ * @returns Client settings and their revision.
38
+ */
39
+ declare function mapMobileNotificationSettingsV2(server: MobileServerNotificationSettingsV2Response): MobileNotificationSettingsV2;
40
+ /** Maps wallet market subscriptions and Identity bells.
41
+ * @param server - Subscription payload.
42
+ * @returns Client subscription state without the response envelope.
43
+ */
44
+ declare function mapMobileNotificationSubscriptions(server: MobileServerNotificationSubscriptionsResponse): MobileNotificationSubscriptions;
45
+ /** Maps one subscription operation, explicitly nulling unused wire operations.
46
+ * @param update - Exactly one revision-guarded operation.
47
+ * @returns The complete signed inner operation fields.
48
+ */
49
+ declare function mapMobileNotificationSubscriptionsUpdateToServer(update: MobileNotificationSubscriptionsUpdate): MobileServerNotificationSubscriptionsUpdate;
50
+ /** Maps an allowlisted notification destination.
51
+ * @param server - Named backend destination.
52
+ * @returns Client navigation data, never an arbitrary URL.
53
+ * @throws {MobileUnsupportedNotificationRouteError} If the service returns an unsupported route name.
54
+ */
55
+ declare function mapMobileNotificationRoute(server: MobileServerNotificationRoute): MobileNotificationRoute;
56
+ /** Maps v2 push or inbox navigation data.
57
+ * @param server - Wire-format notification payload.
58
+ * @returns Client notification data.
59
+ * @throws {MobileUnsupportedNotificationRouteError} If the service returns an unsupported route name.
60
+ */
61
+ declare function mapMobileNotificationPayloadV2(server: MobileServerNotificationPayloadV2): MobileNotificationPayloadV2;
62
+ /** Maps a private notification page without the response envelope.
63
+ * @param server - Newest-first inbox payload.
64
+ * @returns Client items, attribution flags, and the next cursor.
65
+ * @throws {MobileUnsupportedNotificationRouteError} If a notification has an unsupported route name.
66
+ */
67
+ declare function mapMobileNotificationInboxV2(server: MobileServerNotificationInboxV2Response): MobileNotificationInboxV2;
68
+ /** Maps a typed analytics interaction, nulling unused wire fields.
69
+ * @param event - Event-specific client data.
70
+ * @returns Complete signed wire event.
71
+ */
72
+ declare function mapMobileProductEventToServer(event: MobileProductEvent): MobileServerProductEvent;
16
73
  /**
17
74
  * Maps a client-side avatar selection to the signed wire payload; null clears the saved avatar.
18
75
  */
@@ -112,6 +169,18 @@ declare function mapMobileSocialFeedPositionCard(server: MobileServerSocialFeedP
112
169
  * @returns The mapped feed interaction.
113
170
  */
114
171
  declare function mapMobileSocialFeedInteraction(server: MobileServerSocialFeedInteraction): MobileSocialFeedInteraction;
172
+ /**
173
+ * Maps uploaded image metadata; bytes remain behind a protected GET.
174
+ * @param server - The service response.
175
+ * @returns The mapped feed image.
176
+ */
177
+ declare function mapMobileSocialFeedUploadedImage(server: MobileServerSocialFeedUploadedImage): MobileSocialFeedUploadedImage;
178
+ /**
179
+ * Maps either protected upload metadata or an external URL without inventing metadata.
180
+ * @param server - The service response.
181
+ * @returns The mapped uploaded image or external URL.
182
+ */
183
+ declare function mapMobileSocialFeedImage(server: MobileServerSocialFeedImage): MobileSocialFeedImage;
115
184
  /**
116
185
  * Maps common item metadata and server capabilities.
117
186
  * @param server - The service response.
@@ -150,7 +219,7 @@ declare function mapMobileSocialFeedTradeRow(server: MobileServerSocialFeedTrade
150
219
  */
151
220
  declare function mapMobileSocialFeedItem(server: MobileServerSocialFeedItem): MobileSocialFeedItem;
152
221
  /**
153
- * Maps a fixed reading session, preserving opaque credentials and cursors.
222
+ * Maps a reading session and its current idle expiration, preserving opaque credentials and cursors.
154
223
  * @param server - The service response.
155
224
  * @returns The mapped feed read session.
156
225
  */
@@ -317,9 +386,15 @@ declare function mapMobileSocialFeedDrawingResult(server: MobileServerSocialFeed
317
386
  */
318
387
  declare function mapMobileSocialFeedDrawingMutationResult(server: MobileServerSocialFeedDrawingMutationResponse): MobileSocialFeedDrawingMutationResult;
319
388
  /**
320
- * Maps bidirectional comments and the actual returned session.
389
+ * Maps a top-level comment and its complete flat descendants without sorting or dropping content.
390
+ * @param server - A comment group from the service thread snapshot.
391
+ * @returns The mapped top-level comment with each descendant's original parent relationship.
392
+ */
393
+ declare function mapMobileSocialFeedCommentGroup(server: MobileServerSocialFeedCommentGroup): MobileSocialFeedCommentGroup;
394
+ /**
395
+ * Maps complete comment groups in server order and the actual returned session.
321
396
  * @param server - Service payload with its original wire fields.
322
- * @returns Mapped replies, total count, bidirectional cursors, nullable anchor, and the actual reading session.
397
+ * @returns Mapped groups, whole-thread counts, bidirectional cursors, nullable anchor, and reading session.
323
398
  */
324
399
  declare function mapMobileSocialFeedCommentsPage(server: MobileServerSocialFeedCommentsResponse): MobileSocialFeedCommentsPage;
325
400
  /**
@@ -334,12 +409,6 @@ declare function mapMobileSocialFeedCommentResult(server: MobileServerSocialFeed
334
409
  * @returns The applied like state, authoritative count, and item ID/version after the mutation.
335
410
  */
336
411
  declare function mapMobileSocialFeedLikeResult(server: MobileServerSocialFeedLikeResponse): MobileSocialFeedLikeResult;
337
- /**
338
- * Maps exposure deduplication results without adding timestamps.
339
- * @param server - Service payload with its original wire fields.
340
- * @returns Newly accepted and duplicate item ID lists without inventing an observation timestamp.
341
- */
342
- declare function mapMobileSocialFeedViewsResult(server: MobileServerSocialFeedViewsResponse): MobileSocialFeedViewsResult;
343
412
  /**
344
413
  * Maps a published history take without treating unknown kinds as posts.
345
414
  * @param server - The published service item.
@@ -379,6 +448,20 @@ declare function mapMobileSocialFeedWatchers(server: MobileServerSocialFeedWatch
379
448
  * @returns Visitor count and public previews with heartbeat/lease durations in seconds, without an observation timestamp.
380
449
  */
381
450
  declare function mapMobileSocialFeedPresence(server: MobileServerSocialFeedPresenceResponse): MobileSocialFeedPresence;
451
+ /**
452
+ * Maps a published thought, keeping its guaranteed analysis flag and drawing.
453
+ * @param server - Service payload with its original wire fields.
454
+ * @returns The mapped post or trade card with a non-null drawing.
455
+ * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported take kind.
456
+ */
457
+ declare function mapMobileSocialFeedPositionThought(server: MobileServerSocialFeedPositionThought): MobileSocialFeedPositionThought;
458
+ /**
459
+ * Maps a thoughts page in server order, preserving empty pages with continuation cursors.
460
+ * @param server - Service payload with its original wire fields.
461
+ * @returns Thoughts, the next cursor, and the position reading session.
462
+ * @throws {MobileUnsupportedFeedItemError} If an item is not a post or trade card.
463
+ */
464
+ declare function mapMobileSocialFeedPositionThoughts(server: MobileServerSocialFeedPositionThoughtsResponse): MobileSocialFeedPositionThoughtsPage;
382
465
  //#endregion
383
- export { mapMobileAvatarPreset, mapMobileAvatarSelectionToServer, mapMobileAvatarUpload, mapMobileFeedPage, mapMobileFollowBatchResult, mapMobileFollowListPage, mapMobileFollowListParamsToServer, mapMobileFollowMutationResult, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobileProfileSearchPage, mapMobileProfileSearchParamsToServer, mapMobileProfilesIncludeToServer, mapMobilePublicProfile, mapMobileRegisteredWallet, mapMobileSocialFeedActionCandidate, mapMobileSocialFeedActionMarker, mapMobileSocialFeedActionResolutionResult, mapMobileSocialFeedAuthor, mapMobileSocialFeedCandle, mapMobileSocialFeedCommentResult, mapMobileSocialFeedCommentsPage, mapMobileSocialFeedCompactCard, mapMobileSocialFeedContentBase, mapMobileSocialFeedDrawing, mapMobileSocialFeedDrawingMutationResult, mapMobileSocialFeedDrawingResult, mapMobileSocialFeedHistoryMetrics, mapMobileSocialFeedHistoryTake, mapMobileSocialFeedInteraction, mapMobileSocialFeedItem, mapMobileSocialFeedItemBase, mapMobileSocialFeedItemPatch, mapMobileSocialFeedItemResponse, mapMobileSocialFeedLikeResult, mapMobileSocialFeedListParamsToServer, mapMobileSocialFeedMarket, mapMobileSocialFeedMentionToServer, mapMobileSocialFeedPage, mapMobileSocialFeedPnl, mapMobileSocialFeedPositionAction, mapMobileSocialFeedPositionCard, mapMobileSocialFeedPositionChart, mapMobileSocialFeedPositionHistory, mapMobileSocialFeedPositionPatch, mapMobileSocialFeedPositionResolutionResult, mapMobileSocialFeedPositionsPage, mapMobileSocialFeedPost, mapMobileSocialFeedPresence, mapMobileSocialFeedPublishablePosition, mapMobileSocialFeedRankedPage, mapMobileSocialFeedReadParamsToServer, mapMobileSocialFeedReadSession, mapMobileSocialFeedReply, mapMobileSocialFeedTimelineEntry, mapMobileSocialFeedTopTradersPage, mapMobileSocialFeedTradeCard, mapMobileSocialFeedTradeRow, mapMobileSocialFeedTradeRowBase, mapMobileSocialFeedTraderBadge, mapMobileSocialFeedTradingContext, mapMobileSocialFeedTradingTarget, mapMobileSocialFeedUpdates, mapMobileSocialFeedViewsResult, mapMobileSocialFeedWatchers };
466
+ export { mapMobileAvatarPreset, mapMobileAvatarSelectionToServer, mapMobileAvatarUpload, mapMobileFeedPage, mapMobileFollowBatchResult, mapMobileFollowListPage, mapMobileFollowListParamsToServer, mapMobileFollowMutationResult, mapMobileNotificationCapabilitiesToServer, mapMobileNotificationInboxV2, mapMobileNotificationPayloadV2, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobileNotificationRegistrationV2, mapMobileNotificationRoute, mapMobileNotificationSettings, mapMobileNotificationSettingsToServer, mapMobileNotificationSettingsV2, mapMobileNotificationSubscriptions, mapMobileNotificationSubscriptionsUpdateToServer, mapMobileProductEventToServer, mapMobileProfileSearchPage, mapMobileProfileSearchParamsToServer, mapMobileProfilesIncludeToServer, mapMobilePublicProfile, mapMobileRegisteredWallet, mapMobileSocialFeedActionCandidate, mapMobileSocialFeedActionMarker, mapMobileSocialFeedActionResolutionResult, mapMobileSocialFeedAuthor, mapMobileSocialFeedCandle, mapMobileSocialFeedCommentGroup, mapMobileSocialFeedCommentResult, mapMobileSocialFeedCommentsPage, mapMobileSocialFeedCompactCard, mapMobileSocialFeedContentBase, mapMobileSocialFeedDrawing, mapMobileSocialFeedDrawingMutationResult, mapMobileSocialFeedDrawingResult, mapMobileSocialFeedHistoryMetrics, mapMobileSocialFeedHistoryTake, mapMobileSocialFeedImage, mapMobileSocialFeedInteraction, mapMobileSocialFeedItem, mapMobileSocialFeedItemBase, mapMobileSocialFeedItemPatch, mapMobileSocialFeedItemResponse, mapMobileSocialFeedLikeResult, mapMobileSocialFeedListParamsToServer, mapMobileSocialFeedMarket, mapMobileSocialFeedMentionToServer, mapMobileSocialFeedPage, mapMobileSocialFeedPnl, mapMobileSocialFeedPositionAction, mapMobileSocialFeedPositionCard, mapMobileSocialFeedPositionChart, mapMobileSocialFeedPositionHistory, mapMobileSocialFeedPositionPatch, mapMobileSocialFeedPositionResolutionResult, mapMobileSocialFeedPositionThought, mapMobileSocialFeedPositionThoughts, mapMobileSocialFeedPositionsPage, mapMobileSocialFeedPost, mapMobileSocialFeedPresence, mapMobileSocialFeedPublishablePosition, mapMobileSocialFeedRankedPage, mapMobileSocialFeedReadParamsToServer, mapMobileSocialFeedReadSession, mapMobileSocialFeedReply, mapMobileSocialFeedTimelineEntry, mapMobileSocialFeedTopTradersPage, mapMobileSocialFeedTradeCard, mapMobileSocialFeedTradeRow, mapMobileSocialFeedTradeRowBase, mapMobileSocialFeedTraderBadge, mapMobileSocialFeedTradingContext, mapMobileSocialFeedTradingTarget, mapMobileSocialFeedUpdates, mapMobileSocialFeedUploadedImage, mapMobileSocialFeedWatchers };
384
467
  //# sourceMappingURL=dataMappers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataMappers.d.ts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;;;;AAwJA;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,gCAA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miBgB,wCAAA,CACd,MAAA,EAAQ,6CAAA,GACP,qCAAqC;;;;;;iBAaxB,+BAAA,CACd,MAAA,EAAQ,kCAAA,GACP,4BAA4B;AAljBR;AAevB;;;;AAfuB,iBA8jBP,+BAAA,CACd,MAAA,EAAQ,sCAAA,GACP,4BAA4B;;;;AA/iBF;AAa7B;iBAmjBgB,gCAAA,CACd,MAAA,EAAQ,qCAAA,GACP,6BAA6B;;;;;;iBAYhB,6BAAA,CACd,MAAA,EAAQ,kCAAA,GACP,0BAA0B;AAjkBI;AAsBjC;;;;;AAtBiC,iBAglBjB,8BAAA,CACd,MAAA,EAAQ,iCAAA,GACP,2BAA2B;;;AA1jBC;AAY/B;;;iBAgkBgB,gCAAA,CACd,MAAA,EAAQ,mCAAA,GACP,6BAA6B;;;;;AAhkBJ;AA8E5B;iBA+gBgB,kCAAA,CACd,MAAA,EAAQ,6CAAA,GACP,+BAA+B;;;;;;iBAwBlB,gCAAA,CACd,MAAA,EAAQ,2CAAA,GACP,6BAA6B;AAziBN;AAoB1B;;;;AApB0B,iBA+jBV,2BAAA,CACd,MAAA,EAAQ,sCAAA,GACP,wBAAwB;;;;AA3iBQ;AAenC;iBAyiBgB,2BAAA,CACd,MAAA,EAAQ,sCAAA,GACP,wBAAwB;;;;;;;iBAeX,kCAAA,CACd,MAAA,EAAQ,qCAAA,GACP,+BAA+B;AA5iBlC;;;;;;AAAA,iBA0jBgB,mCAAA,CACd,MAAA,EAAQ,8CAAA,GACP,oCAAoC"}
@@ -1,4 +1,5 @@
1
1
  import { MobileUnsupportedFeedItemError } from "./types/MobileUnsupportedFeedItemError.js";
2
+ import { MobileUnsupportedNotificationRouteError } from "./types/MobileUnsupportedNotificationRouteError.js";
2
3
  import { removeDecimals, subaccountToHex, toBigNumber } from "@nadohq/shared";
3
4
  //#region src/dataMappers.ts
4
5
  /**
@@ -21,6 +22,172 @@ function mapMobileAvatarUpload(server) {
21
22
  expiresInSeconds: server.expires_in_seconds
22
23
  };
23
24
  }
25
+ /** Maps a saved notification registration to the client model without the response envelope.
26
+ * @param server - Registration payload.
27
+ * @returns Saved generation and capabilities.
28
+ */
29
+ function mapMobileNotificationRegistrationV2(server) {
30
+ return {
31
+ registrationGeneration: server.registration_generation,
32
+ capabilities: {
33
+ payloadVersions: server.capabilities.payload_versions,
34
+ typeIds: server.capabilities.type_ids,
35
+ routes: server.capabilities.routes
36
+ }
37
+ };
38
+ }
39
+ /** Maps a v2 capability declaration to the registration wire format.
40
+ * @param capabilities - Device-supported features.
41
+ * @returns V2-only registration capabilities.
42
+ */
43
+ function mapMobileNotificationCapabilitiesToServer(capabilities) {
44
+ return {
45
+ payload_versions: capabilities.payloadVersions,
46
+ type_ids: capabilities.typeIds,
47
+ routes: capabilities.routes
48
+ };
49
+ }
50
+ /** Maps complete notification settings to the client model.
51
+ * @param server - Saved settings.
52
+ * @returns CamelCase settings.
53
+ */
54
+ function mapMobileNotificationSettings(server) {
55
+ return {
56
+ myPositions: server.my_positions,
57
+ positionThresholds: server.position_thresholds,
58
+ myOrders: server.my_orders,
59
+ followingTrades: server.following_trades,
60
+ followingPosts: server.following_posts,
61
+ minTradeSizeUsd: server.min_trade_size_usd,
62
+ newFollowers: server.new_followers,
63
+ announcements: server.announcements,
64
+ discovery: server.discovery
65
+ };
66
+ }
67
+ /** Maps a complete replacement settings document to wire format.
68
+ * @param settings - Complete client settings.
69
+ * @returns Settings accepted by the service.
70
+ */
71
+ function mapMobileNotificationSettingsToServer(settings) {
72
+ return {
73
+ my_positions: settings.myPositions,
74
+ position_thresholds: settings.positionThresholds,
75
+ my_orders: settings.myOrders,
76
+ following_trades: settings.followingTrades,
77
+ following_posts: settings.followingPosts,
78
+ min_trade_size_usd: settings.minTradeSizeUsd,
79
+ new_followers: settings.newFollowers,
80
+ announcements: settings.announcements,
81
+ discovery: settings.discovery
82
+ };
83
+ }
84
+ /** Maps a revisioned settings response without the response envelope.
85
+ * @param server - Versioned settings payload.
86
+ * @returns Client settings and their revision.
87
+ */
88
+ function mapMobileNotificationSettingsV2(server) {
89
+ return {
90
+ schemaVersion: server.schema_version,
91
+ revision: server.revision,
92
+ settings: mapMobileNotificationSettings(server.settings)
93
+ };
94
+ }
95
+ /** Maps wallet market subscriptions and Identity bells.
96
+ * @param server - Subscription payload.
97
+ * @returns Client subscription state without the response envelope.
98
+ */
99
+ function mapMobileNotificationSubscriptions(server) {
100
+ return {
101
+ revision: server.revision,
102
+ favoritesImported: server.favorites_imported,
103
+ marketIds: server.market_ids,
104
+ traderBells: server.trader_bells
105
+ };
106
+ }
107
+ /** Maps one subscription operation, explicitly nulling unused wire operations.
108
+ * @param update - Exactly one revision-guarded operation.
109
+ * @returns The complete signed inner operation fields.
110
+ */
111
+ function mapMobileNotificationSubscriptionsUpdateToServer(update) {
112
+ return {
113
+ expected_revision: update.expectedRevision,
114
+ trader_bell: update.traderBell == null ? null : {
115
+ subaccount: subaccountToHex(update.traderBell.subaccount),
116
+ enabled: update.traderBell.enabled
117
+ },
118
+ market: update.market == null ? null : {
119
+ product_id: update.market.productId,
120
+ subscribed: update.market.subscribed
121
+ },
122
+ import_markets: update.importMarkets ?? null
123
+ };
124
+ }
125
+ /** Maps an allowlisted notification destination.
126
+ * @param server - Named backend destination.
127
+ * @returns Client navigation data, never an arbitrary URL.
128
+ * @throws {MobileUnsupportedNotificationRouteError} If the service returns an unsupported route name.
129
+ */
130
+ function mapMobileNotificationRoute(server) {
131
+ const name = server.name;
132
+ switch (name) {
133
+ case "market": return {
134
+ name: server.name,
135
+ productId: server.product_id
136
+ };
137
+ case "profile": return {
138
+ name: server.name,
139
+ subaccount: server.subaccount
140
+ };
141
+ case "portfolio": return { name: server.name };
142
+ default: throw new MobileUnsupportedNotificationRouteError(name);
143
+ }
144
+ }
145
+ /** Maps v2 push or inbox navigation data.
146
+ * @param server - Wire-format notification payload.
147
+ * @returns Client notification data.
148
+ * @throws {MobileUnsupportedNotificationRouteError} If the service returns an unsupported route name.
149
+ */
150
+ function mapMobileNotificationPayloadV2(server) {
151
+ return {
152
+ payloadVersion: server.payload_version,
153
+ notificationId: server.notification_id,
154
+ recipientWallet: server.recipient_wallet,
155
+ typeId: server.type_id,
156
+ templateVersion: server.template_version,
157
+ route: mapMobileNotificationRoute(server.route)
158
+ };
159
+ }
160
+ /** Maps a private notification page without the response envelope.
161
+ * @param server - Newest-first inbox payload.
162
+ * @returns Client items, attribution flags, and the next cursor.
163
+ * @throws {MobileUnsupportedNotificationRouteError} If a notification has an unsupported route name.
164
+ */
165
+ function mapMobileNotificationInboxV2(server) {
166
+ return {
167
+ notifications: server.notifications.map((item) => ({
168
+ notificationId: item.notification_id,
169
+ typeId: item.type_id,
170
+ data: mapMobileNotificationPayloadV2(item.data),
171
+ createdAt: item.created_at,
172
+ tradeWithin24h: item.trade_within_24h
173
+ })),
174
+ nextCursor: server.next_cursor
175
+ };
176
+ }
177
+ /** Maps a typed analytics interaction, nulling unused wire fields.
178
+ * @param event - Event-specific client data.
179
+ * @returns Complete signed wire event.
180
+ */
181
+ function mapMobileProductEventToServer(event) {
182
+ return {
183
+ client_event_id: event.clientEventId,
184
+ event_name: event.eventName,
185
+ notification_id: event.notificationId ?? null,
186
+ occurred_at: event.occurredAt,
187
+ product_id: event.productId ?? null,
188
+ query: event.query ?? null
189
+ };
190
+ }
24
191
  /**
25
192
  * Maps a client-side avatar selection to the signed wire payload; null clears the saved avatar.
26
193
  */
@@ -342,6 +509,35 @@ function mapMobileSocialFeedInteraction(server) {
342
509
  };
343
510
  }
344
511
  /**
512
+ * Maps uploaded image metadata; bytes remain behind a protected GET.
513
+ * @param server - The service response.
514
+ * @returns The mapped feed image.
515
+ */
516
+ function mapMobileSocialFeedUploadedImage(server) {
517
+ return {
518
+ imageId: server.image_id,
519
+ url: server.url,
520
+ width: server.width,
521
+ height: server.height,
522
+ contentType: server.content_type,
523
+ byteSize: server.byte_size,
524
+ thumbnail: {
525
+ url: server.thumbnail.url,
526
+ width: server.thumbnail.width,
527
+ height: server.thumbnail.height
528
+ }
529
+ };
530
+ }
531
+ /**
532
+ * Maps either protected upload metadata or an external URL without inventing metadata.
533
+ * @param server - The service response.
534
+ * @returns The mapped uploaded image or external URL.
535
+ */
536
+ function mapMobileSocialFeedImage(server) {
537
+ if ("image_id" in server) return mapMobileSocialFeedUploadedImage(server);
538
+ return { url: server.url };
539
+ }
540
+ /**
345
541
  * Maps common item metadata and server capabilities.
346
542
  * @param server - The service response.
347
543
  * @returns The mapped social feed item base.
@@ -371,6 +567,7 @@ function mapMobileSocialFeedItemBase(server) {
371
567
  function mapMobileSocialFeedContentBase(server) {
372
568
  return {
373
569
  ...mapMobileSocialFeedItemBase(server),
570
+ images: server.images.map(mapMobileSocialFeedImage),
374
571
  text: server.text,
375
572
  mentions: server.mentions,
376
573
  position: mapMobileSocialFeedPositionCard(server.position),
@@ -452,7 +649,7 @@ function mapMobileSocialFeedItem(server) {
452
649
  }
453
650
  }
454
651
  /**
455
- * Maps a fixed reading session, preserving opaque credentials and cursors.
652
+ * Maps a reading session and its current idle expiration, preserving opaque credentials and cursors.
456
653
  * @param server - The service response.
457
654
  * @returns The mapped feed read session.
458
655
  */
@@ -461,10 +658,6 @@ function mapMobileSocialFeedReadSession(server) {
461
658
  sessionId: server.session_id,
462
659
  mode: server.mode,
463
660
  expiresAtMs: server.expires_at_ms,
464
- viewTracking: {
465
- minVisibleRatio: server.view_tracking.min_visible_ratio,
466
- minDurationMs: server.view_tracking.min_duration_ms
467
- },
468
661
  updateCursor: server.update_cursor,
469
662
  viewerToken: server.viewer_token
470
663
  };
@@ -662,6 +855,7 @@ function mapMobileSocialFeedReply(server) {
662
855
  return {
663
856
  ...mapMobileSocialFeedItemBase(server),
664
857
  kind: server.kind,
858
+ images: server.images.map(mapMobileSocialFeedImage),
665
859
  text: server.text,
666
860
  mentions: server.mentions,
667
861
  rootItemId: server.root_item_id,
@@ -869,14 +1063,26 @@ function mapMobileSocialFeedDrawingMutationResult(server) {
869
1063
  };
870
1064
  }
871
1065
  /**
872
- * Maps bidirectional comments and the actual returned session.
1066
+ * Maps a top-level comment and its complete flat descendants without sorting or dropping content.
1067
+ * @param server - A comment group from the service thread snapshot.
1068
+ * @returns The mapped top-level comment with each descendant's original parent relationship.
1069
+ */
1070
+ function mapMobileSocialFeedCommentGroup(server) {
1071
+ return {
1072
+ ...mapMobileSocialFeedReply(server),
1073
+ replies: server.replies.map(mapMobileSocialFeedReply)
1074
+ };
1075
+ }
1076
+ /**
1077
+ * Maps complete comment groups in server order and the actual returned session.
873
1078
  * @param server - Service payload with its original wire fields.
874
- * @returns Mapped replies, total count, bidirectional cursors, nullable anchor, and the actual reading session.
1079
+ * @returns Mapped groups, whole-thread counts, bidirectional cursors, nullable anchor, and reading session.
875
1080
  */
876
1081
  function mapMobileSocialFeedCommentsPage(server) {
877
1082
  return {
878
- comments: server.comments.map(mapMobileSocialFeedReply),
1083
+ comments: server.comments.map(mapMobileSocialFeedCommentGroup),
879
1084
  totalCount: server.total_count,
1085
+ topLevelCount: server.top_level_count,
880
1086
  nextCursor: server.next_cursor,
881
1087
  previousCursor: server.previous_cursor,
882
1088
  anchorReplyId: server.anchor_reply_id,
@@ -908,17 +1114,6 @@ function mapMobileSocialFeedLikeResult(server) {
908
1114
  };
909
1115
  }
910
1116
  /**
911
- * Maps exposure deduplication results without adding timestamps.
912
- * @param server - Service payload with its original wire fields.
913
- * @returns Newly accepted and duplicate item ID lists without inventing an observation timestamp.
914
- */
915
- function mapMobileSocialFeedViewsResult(server) {
916
- return {
917
- acceptedItemIds: server.accepted_item_ids,
918
- duplicateItemIds: server.duplicate_item_ids
919
- };
920
- }
921
- /**
922
1117
  * Maps a published history take without treating unknown kinds as posts.
923
1118
  * @param server - The published service item.
924
1119
  * @returns The mapped post or trade card.
@@ -962,6 +1157,7 @@ function mapMobileSocialFeedTimelineEntry(server) {
962
1157
  */
963
1158
  function mapMobileSocialFeedPositionHistory(server) {
964
1159
  return {
1160
+ owner: mapMobileSocialFeedAuthor(server.owner),
965
1161
  position: {
966
1162
  ...mapMobileSocialFeedPositionCard(server.position),
967
1163
  ...mapMobileSocialFeedHistoryMetrics(server.position)
@@ -1020,7 +1216,33 @@ function mapMobileSocialFeedPresence(server) {
1020
1216
  expiresInSeconds: server.expires_in_seconds
1021
1217
  };
1022
1218
  }
1219
+ /**
1220
+ * Maps a published thought, keeping its guaranteed analysis flag and drawing.
1221
+ * @param server - Service payload with its original wire fields.
1222
+ * @returns The mapped post or trade card with a non-null drawing.
1223
+ * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported take kind.
1224
+ */
1225
+ function mapMobileSocialFeedPositionThought(server) {
1226
+ return {
1227
+ ...mapMobileSocialFeedHistoryTake(server),
1228
+ hasAnalysis: server.has_analysis,
1229
+ drawing: mapMobileSocialFeedDrawing(server.drawing)
1230
+ };
1231
+ }
1232
+ /**
1233
+ * Maps a thoughts page in server order, preserving empty pages with continuation cursors.
1234
+ * @param server - Service payload with its original wire fields.
1235
+ * @returns Thoughts, the next cursor, and the position reading session.
1236
+ * @throws {MobileUnsupportedFeedItemError} If an item is not a post or trade card.
1237
+ */
1238
+ function mapMobileSocialFeedPositionThoughts(server) {
1239
+ return {
1240
+ items: server.items.map(mapMobileSocialFeedPositionThought),
1241
+ nextCursor: server.next_cursor,
1242
+ readSession: mapMobileSocialFeedReadSession(server.read_session)
1243
+ };
1244
+ }
1023
1245
  //#endregion
1024
- export { mapMobileAvatarPreset, mapMobileAvatarSelectionToServer, mapMobileAvatarUpload, mapMobileFeedPage, mapMobileFollowBatchResult, mapMobileFollowListPage, mapMobileFollowListParamsToServer, mapMobileFollowMutationResult, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobileProfileSearchPage, mapMobileProfileSearchParamsToServer, mapMobileProfilesIncludeToServer, mapMobilePublicProfile, mapMobileRegisteredWallet, mapMobileSocialFeedActionCandidate, mapMobileSocialFeedActionMarker, mapMobileSocialFeedActionResolutionResult, mapMobileSocialFeedAuthor, mapMobileSocialFeedCandle, mapMobileSocialFeedCommentResult, mapMobileSocialFeedCommentsPage, mapMobileSocialFeedCompactCard, mapMobileSocialFeedContentBase, mapMobileSocialFeedDrawing, mapMobileSocialFeedDrawingMutationResult, mapMobileSocialFeedDrawingResult, mapMobileSocialFeedHistoryMetrics, mapMobileSocialFeedHistoryTake, mapMobileSocialFeedInteraction, mapMobileSocialFeedItem, mapMobileSocialFeedItemBase, mapMobileSocialFeedItemPatch, mapMobileSocialFeedItemResponse, mapMobileSocialFeedLikeResult, mapMobileSocialFeedListParamsToServer, mapMobileSocialFeedMarket, mapMobileSocialFeedMentionToServer, mapMobileSocialFeedPage, mapMobileSocialFeedPnl, mapMobileSocialFeedPositionAction, mapMobileSocialFeedPositionCard, mapMobileSocialFeedPositionChart, mapMobileSocialFeedPositionHistory, mapMobileSocialFeedPositionPatch, mapMobileSocialFeedPositionResolutionResult, mapMobileSocialFeedPositionsPage, mapMobileSocialFeedPost, mapMobileSocialFeedPresence, mapMobileSocialFeedPublishablePosition, mapMobileSocialFeedRankedPage, mapMobileSocialFeedReadParamsToServer, mapMobileSocialFeedReadSession, mapMobileSocialFeedReply, mapMobileSocialFeedTimelineEntry, mapMobileSocialFeedTopTradersPage, mapMobileSocialFeedTradeCard, mapMobileSocialFeedTradeRow, mapMobileSocialFeedTradeRowBase, mapMobileSocialFeedTraderBadge, mapMobileSocialFeedTradingContext, mapMobileSocialFeedTradingTarget, mapMobileSocialFeedUpdates, mapMobileSocialFeedViewsResult, mapMobileSocialFeedWatchers };
1246
+ export { mapMobileAvatarPreset, mapMobileAvatarSelectionToServer, mapMobileAvatarUpload, mapMobileFeedPage, mapMobileFollowBatchResult, mapMobileFollowListPage, mapMobileFollowListParamsToServer, mapMobileFollowMutationResult, mapMobileNotificationCapabilitiesToServer, mapMobileNotificationInboxV2, mapMobileNotificationPayloadV2, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobileNotificationRegistrationV2, mapMobileNotificationRoute, mapMobileNotificationSettings, mapMobileNotificationSettingsToServer, mapMobileNotificationSettingsV2, mapMobileNotificationSubscriptions, mapMobileNotificationSubscriptionsUpdateToServer, mapMobileProductEventToServer, mapMobileProfileSearchPage, mapMobileProfileSearchParamsToServer, mapMobileProfilesIncludeToServer, mapMobilePublicProfile, mapMobileRegisteredWallet, mapMobileSocialFeedActionCandidate, mapMobileSocialFeedActionMarker, mapMobileSocialFeedActionResolutionResult, mapMobileSocialFeedAuthor, mapMobileSocialFeedCandle, mapMobileSocialFeedCommentGroup, mapMobileSocialFeedCommentResult, mapMobileSocialFeedCommentsPage, mapMobileSocialFeedCompactCard, mapMobileSocialFeedContentBase, mapMobileSocialFeedDrawing, mapMobileSocialFeedDrawingMutationResult, mapMobileSocialFeedDrawingResult, mapMobileSocialFeedHistoryMetrics, mapMobileSocialFeedHistoryTake, mapMobileSocialFeedImage, mapMobileSocialFeedInteraction, mapMobileSocialFeedItem, mapMobileSocialFeedItemBase, mapMobileSocialFeedItemPatch, mapMobileSocialFeedItemResponse, mapMobileSocialFeedLikeResult, mapMobileSocialFeedListParamsToServer, mapMobileSocialFeedMarket, mapMobileSocialFeedMentionToServer, mapMobileSocialFeedPage, mapMobileSocialFeedPnl, mapMobileSocialFeedPositionAction, mapMobileSocialFeedPositionCard, mapMobileSocialFeedPositionChart, mapMobileSocialFeedPositionHistory, mapMobileSocialFeedPositionPatch, mapMobileSocialFeedPositionResolutionResult, mapMobileSocialFeedPositionThought, mapMobileSocialFeedPositionThoughts, mapMobileSocialFeedPositionsPage, mapMobileSocialFeedPost, mapMobileSocialFeedPresence, mapMobileSocialFeedPublishablePosition, mapMobileSocialFeedRankedPage, mapMobileSocialFeedReadParamsToServer, mapMobileSocialFeedReadSession, mapMobileSocialFeedReply, mapMobileSocialFeedTimelineEntry, mapMobileSocialFeedTopTradersPage, mapMobileSocialFeedTradeCard, mapMobileSocialFeedTradeRow, mapMobileSocialFeedTradeRowBase, mapMobileSocialFeedTraderBadge, mapMobileSocialFeedTradingContext, mapMobileSocialFeedTradingTarget, mapMobileSocialFeedUpdates, mapMobileSocialFeedUploadedImage, mapMobileSocialFeedWatchers };
1025
1247
 
1026
1248
  //# sourceMappingURL=dataMappers.js.map