@nadohq/mobile-client 0.52.0 → 0.54.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 (147) hide show
  1. package/README.md +12 -4
  2. package/dist/{MobileClient-CEVEYnV1.cjs → MobileClient-BbTaqTzi.cjs} +141 -3
  3. package/dist/MobileClient-BbTaqTzi.cjs.map +1 -0
  4. package/dist/MobileClient.cjs +1 -1
  5. package/dist/MobileClient.d.cts +75 -8
  6. package/dist/MobileClient.d.cts.map +1 -1
  7. package/dist/MobileClient.d.ts +75 -8
  8. package/dist/MobileClient.d.ts.map +1 -1
  9. package/dist/MobileClient.js +141 -3
  10. package/dist/MobileClient.js.map +1 -1
  11. package/dist/{MobileServerFailureError-GsGrBgO0.d.ts → MobileServerFailureError-B2og8e5O.d.ts} +3 -3
  12. package/dist/{MobileServerFailureError-GsGrBgO0.d.ts.map → MobileServerFailureError-B2og8e5O.d.ts.map} +1 -1
  13. package/dist/{MobileServerFailureError-D4ina2b2.d.cts → MobileServerFailureError-BrLtaHnU.d.cts} +3 -3
  14. package/dist/{MobileServerFailureError-D4ina2b2.d.cts.map → MobileServerFailureError-BrLtaHnU.d.cts.map} +1 -1
  15. package/dist/{buildSignedMobileRequest-D9XzRTyq.d.cts → buildSignedMobileRequest-CZ-EdxYI.d.cts} +2 -2
  16. package/dist/{buildSignedMobileRequest-D9XzRTyq.d.cts.map → buildSignedMobileRequest-CZ-EdxYI.d.cts.map} +1 -1
  17. package/dist/{buildSignedMobileRequest-7Iwi5k6h.d.ts → buildSignedMobileRequest-CoAVSDPx.d.ts} +2 -2
  18. package/dist/{buildSignedMobileRequest-7Iwi5k6h.d.ts.map → buildSignedMobileRequest-CoAVSDPx.d.ts.map} +1 -1
  19. package/dist/{canonicalize-OYR35XMP.d.cts → canonicalize-0_B6UOxO.d.cts} +2 -2
  20. package/dist/canonicalize-0_B6UOxO.d.cts.map +1 -0
  21. package/dist/{canonicalize-T4ShepBu.d.ts → canonicalize-BC-JICjp.d.ts} +2 -2
  22. package/dist/canonicalize-BC-JICjp.d.ts.map +1 -0
  23. package/dist/clientTypes-P4LAjreY.d.ts +731 -0
  24. package/dist/clientTypes-P4LAjreY.d.ts.map +1 -0
  25. package/dist/clientTypes-YF5d8bvg.d.cts +731 -0
  26. package/dist/clientTypes-YF5d8bvg.d.cts.map +1 -0
  27. package/dist/dataMappers.cjs +358 -0
  28. package/dist/dataMappers.cjs.map +1 -1
  29. package/dist/dataMappers.d.cts +132 -6
  30. package/dist/dataMappers.d.cts.map +1 -1
  31. package/dist/dataMappers.d.ts +132 -6
  32. package/dist/dataMappers.d.ts.map +1 -1
  33. package/dist/dataMappers.js +339 -2
  34. package/dist/dataMappers.js.map +1 -1
  35. package/dist/{eip712MethodByType-D6edRSIs.d.ts → eip712MethodByType-DWtLyPY7.d.ts} +2 -2
  36. package/dist/eip712MethodByType-DWtLyPY7.d.ts.map +1 -0
  37. package/dist/{eip712MethodByType-BAqld4fP.d.cts → eip712MethodByType-sHQ-VTHd.d.cts} +2 -2
  38. package/dist/eip712MethodByType-sHQ-VTHd.d.cts.map +1 -0
  39. package/dist/index.cjs +1 -1
  40. package/dist/index.d.cts +15 -15
  41. package/dist/index.d.ts +15 -15
  42. package/dist/{mobileErrorCodes-CGYR3_Io.d.ts → mobileErrorCodes-DccrM4NI.d.cts} +8 -2
  43. package/dist/{mobileErrorCodes-CGYR3_Io.d.cts.map → mobileErrorCodes-DccrM4NI.d.cts.map} +1 -1
  44. package/dist/{mobileErrorCodes-CGYR3_Io.d.cts → mobileErrorCodes-DccrM4NI.d.ts} +8 -2
  45. package/dist/{mobileErrorCodes-CGYR3_Io.d.ts.map → mobileErrorCodes-DccrM4NI.d.ts.map} +1 -1
  46. package/dist/{payloadHash-B7Nmf64N.d.cts → payloadHash-CSgTglN4.d.cts} +2 -2
  47. package/dist/payloadHash-CSgTglN4.d.cts.map +1 -0
  48. package/dist/{payloadHash-RxkbwgTH.d.ts → payloadHash-qsU1DEF0.d.ts} +2 -2
  49. package/dist/payloadHash-qsU1DEF0.d.ts.map +1 -0
  50. package/dist/{serverBaseTypes-BOuAdmuQ.d.cts → serverBaseTypes-CuMsGXgc.d.cts} +2 -2
  51. package/dist/{serverBaseTypes-BOuAdmuQ.d.cts.map → serverBaseTypes-CuMsGXgc.d.cts.map} +1 -1
  52. package/dist/{serverBaseTypes-DDzfBA1a.d.ts → serverBaseTypes-DKCLDn3x.d.ts} +2 -2
  53. package/dist/{serverBaseTypes-DDzfBA1a.d.ts.map → serverBaseTypes-DKCLDn3x.d.ts.map} +1 -1
  54. package/dist/{serverExecuteTypes-DrxK2r7m.d.ts → serverExecuteTypes-DKG1mqy1.d.ts} +3 -3
  55. package/dist/{serverExecuteTypes-DrxK2r7m.d.ts.map → serverExecuteTypes-DKG1mqy1.d.ts.map} +1 -1
  56. package/dist/{serverExecuteTypes-DamHfu25.d.cts → serverExecuteTypes-TPX0GCgv.d.cts} +3 -3
  57. package/dist/{serverExecuteTypes-DamHfu25.d.cts.map → serverExecuteTypes-TPX0GCgv.d.cts.map} +1 -1
  58. package/dist/serverModelTypes-MlqdaMRd.d.cts +490 -0
  59. package/dist/serverModelTypes-MlqdaMRd.d.cts.map +1 -0
  60. package/dist/serverModelTypes-MlqdaMRd.d.ts +490 -0
  61. package/dist/serverModelTypes-MlqdaMRd.d.ts.map +1 -0
  62. package/dist/serverQueryTypes-BLUe10AI.d.ts +152 -0
  63. package/dist/serverQueryTypes-BLUe10AI.d.ts.map +1 -0
  64. package/dist/serverQueryTypes-BZOoJBpb.d.cts +152 -0
  65. package/dist/serverQueryTypes-BZOoJBpb.d.cts.map +1 -0
  66. package/dist/{serverRequestTypes-BylecTUn.d.cts → serverRequestTypes-BULjZnnz.d.ts} +69 -4
  67. package/dist/serverRequestTypes-BULjZnnz.d.ts.map +1 -0
  68. package/dist/{serverRequestTypes-DcdmGfTu.d.ts → serverRequestTypes-XbnLUsXT.d.cts} +69 -4
  69. package/dist/serverRequestTypes-XbnLUsXT.d.cts.map +1 -0
  70. package/dist/{serverResponseGuards-CjR1tv7G.d.cts → serverResponseGuards-DIj9MIrJ.d.cts} +2 -2
  71. package/dist/{serverResponseGuards-CjR1tv7G.d.cts.map → serverResponseGuards-DIj9MIrJ.d.cts.map} +1 -1
  72. package/dist/{serverResponseGuards-BspbRjOM.d.ts → serverResponseGuards-DY_8lAo7.d.ts} +2 -2
  73. package/dist/{serverResponseGuards-BspbRjOM.d.ts.map → serverResponseGuards-DY_8lAo7.d.ts.map} +1 -1
  74. package/dist/signing/buildSignedMobileRequest.d.cts +1 -1
  75. package/dist/signing/buildSignedMobileRequest.d.ts +1 -1
  76. package/dist/signing/canonicalize.d.cts +1 -1
  77. package/dist/signing/canonicalize.d.ts +1 -1
  78. package/dist/signing/eip712MethodByType.d.cts +1 -1
  79. package/dist/signing/eip712MethodByType.d.ts +1 -1
  80. package/dist/signing/index.d.cts +5 -5
  81. package/dist/signing/index.d.ts +5 -5
  82. package/dist/signing/payloadHash.d.cts +1 -1
  83. package/dist/signing/payloadHash.d.ts +1 -1
  84. package/dist/signing/types.d.cts +1 -1
  85. package/dist/signing/types.d.ts +1 -1
  86. package/dist/types/MobileServerFailureError.d.cts +1 -1
  87. package/dist/types/MobileServerFailureError.d.ts +1 -1
  88. package/dist/types/clientTypes.d.cts +2 -2
  89. package/dist/types/clientTypes.d.ts +2 -2
  90. package/dist/types/index.d.cts +9 -9
  91. package/dist/types/index.d.ts +9 -9
  92. package/dist/types/mobileErrorCodes.cjs +13 -1
  93. package/dist/types/mobileErrorCodes.cjs.map +1 -1
  94. package/dist/types/mobileErrorCodes.d.cts +1 -1
  95. package/dist/types/mobileErrorCodes.d.ts +1 -1
  96. package/dist/types/mobileErrorCodes.js +13 -1
  97. package/dist/types/mobileErrorCodes.js.map +1 -1
  98. package/dist/types/serverBaseTypes.d.cts +1 -1
  99. package/dist/types/serverBaseTypes.d.ts +1 -1
  100. package/dist/types/serverExecuteTypes.d.cts +1 -1
  101. package/dist/types/serverExecuteTypes.d.ts +1 -1
  102. package/dist/types/serverModelTypes.cjs.map +1 -1
  103. package/dist/types/serverModelTypes.d.cts +2 -2
  104. package/dist/types/serverModelTypes.d.ts +2 -2
  105. package/dist/types/serverModelTypes.js.map +1 -1
  106. package/dist/types/serverQueryTypes.d.cts +2 -2
  107. package/dist/types/serverQueryTypes.d.ts +2 -2
  108. package/dist/types/serverRequestTypes.d.cts +2 -2
  109. package/dist/types/serverRequestTypes.d.ts +2 -2
  110. package/dist/{types-BG321aOe.d.ts → types-B_4veFLc.d.ts} +3 -3
  111. package/dist/{types-BG321aOe.d.ts.map → types-B_4veFLc.d.ts.map} +1 -1
  112. package/dist/{types-D30luCKT.d.cts → types-CwpXP7xM.d.cts} +3 -3
  113. package/dist/{types-D30luCKT.d.cts.map → types-CwpXP7xM.d.cts.map} +1 -1
  114. package/dist/utils/index.d.cts +1 -1
  115. package/dist/utils/index.d.ts +1 -1
  116. package/dist/utils/serverResponseGuards.d.cts +1 -1
  117. package/dist/utils/serverResponseGuards.d.ts +1 -1
  118. package/package.json +3 -3
  119. package/src/MobileClient.ts +192 -2
  120. package/src/dataMappers.ts +503 -1
  121. package/src/socialFeed.test.ts +723 -0
  122. package/src/types/clientTypes.ts +467 -0
  123. package/src/types/mobileErrorCodes.ts +12 -0
  124. package/src/types/serverModelTypes.ts +388 -0
  125. package/src/types/serverQueryTypes.ts +74 -0
  126. package/src/types/serverRequestTypes.ts +94 -1
  127. package/dist/MobileClient-CEVEYnV1.cjs.map +0 -1
  128. package/dist/canonicalize-OYR35XMP.d.cts.map +0 -1
  129. package/dist/canonicalize-T4ShepBu.d.ts.map +0 -1
  130. package/dist/clientTypes-FQTkDfq3.d.cts +0 -349
  131. package/dist/clientTypes-FQTkDfq3.d.cts.map +0 -1
  132. package/dist/clientTypes-FaHdWkNu.d.ts +0 -349
  133. package/dist/clientTypes-FaHdWkNu.d.ts.map +0 -1
  134. package/dist/eip712MethodByType-BAqld4fP.d.cts.map +0 -1
  135. package/dist/eip712MethodByType-D6edRSIs.d.ts.map +0 -1
  136. package/dist/payloadHash-B7Nmf64N.d.cts.map +0 -1
  137. package/dist/payloadHash-RxkbwgTH.d.ts.map +0 -1
  138. package/dist/serverModelTypes-YmHqfxc8.d.cts +0 -173
  139. package/dist/serverModelTypes-YmHqfxc8.d.cts.map +0 -1
  140. package/dist/serverModelTypes-YmHqfxc8.d.ts +0 -173
  141. package/dist/serverModelTypes-YmHqfxc8.d.ts.map +0 -1
  142. package/dist/serverQueryTypes-C-_h9awN.d.ts +0 -89
  143. package/dist/serverQueryTypes-C-_h9awN.d.ts.map +0 -1
  144. package/dist/serverQueryTypes-CuVsrzGV.d.cts +0 -89
  145. package/dist/serverQueryTypes-CuVsrzGV.d.cts.map +0 -1
  146. package/dist/serverRequestTypes-BylecTUn.d.cts.map +0 -1
  147. package/dist/serverRequestTypes-DcdmGfTu.d.ts.map +0 -1
@@ -1,173 +0,0 @@
1
- import { BalanceSide } from "@nadohq/shared";
2
- import { Hex } from "viem";
3
-
4
- //#region src/types/serverModelTypes.d.ts
5
- /**
6
- * Platform of a device registered for push notifications.
7
- */
8
- type MobileNotificationPlatform = 'ios' | 'android';
9
- /**
10
- * Category of push notification.
11
- */
12
- type MobileNotificationCategory = 'order_fill' | 'order_update' | 'liquidation' | 'funding' | 'product_listing' | 'announcement';
13
- /**
14
- * Server-side identity summary (snake_case): the read-time identity fields the backend attaches to a
15
- * subaccount wherever it surfaces one alongside other data. Name fields are `null` until the subaccount
16
- * claims a username, and a rename shows up on the next read without any change to the surrounding record.
17
- */
18
- interface MobileServerIdentitySummary {
19
- subaccount: Hex;
20
- username: string | null;
21
- display_name: string | null;
22
- /** Reserved for a future avatar source; `null` until one is implemented. */
23
- avatar_url: string | null;
24
- }
25
- /**
26
- * Server-side follow summary (snake_case), nested in a `profiles` entry when the `follow_summary` include is
27
- * requested. `is_following` is the direct `view_as -> this profile` relationship; every `followed_by` entry
28
- * satisfies both `view_as -> entry` and `entry -> this profile`, so each one is already familiar to the
29
- * viewer and carries no `is_following` of its own.
30
- */
31
- interface MobileServerFollowSummary {
32
- is_following: boolean;
33
- /** Exact size of the two-edge intersection, independent of how many previews came back. */
34
- followed_by_count: number;
35
- /** Capped at `MOBILE_FOLLOWED_BY_PREVIEW_LIMIT` (2) by the backend; not client-configurable. */
36
- followed_by: MobileServerIdentitySummary[];
37
- }
38
- /**
39
- * Server-side public profile shape (snake_case), shared by the singular `profile` and batched `profiles`
40
- * queries. Name fields are `null` until the subaccount claims a username; a subaccount with no identity row
41
- * still yields an entry, with `null` names and `private_mode: false`.
42
- *
43
- * The three optional fields are omitted from the wire entirely unless the matching `profiles` include asked
44
- * for them, which is why they are optional rather than nullable — absent means "not requested", not "none".
45
- * The singular `profile` query never returns any of them.
46
- */
47
- interface MobileServerProfile {
48
- subaccount: Hex;
49
- username: string | null;
50
- display_name: string | null;
51
- private_mode: boolean;
52
- /**
53
- * Exact count at query time — the backend counts rather than reading a cached counter. Unnamed and private
54
- * accounts are included: Private Mode hides activity, not relationships. Requires `follow_counts`.
55
- */
56
- follower_count?: number;
57
- following_count?: number;
58
- /** Requires the `follow_summary` include, and is relative to that include's `view_as`. */
59
- follow_summary?: MobileServerFollowSummary;
60
- }
61
- /**
62
- * Server-side row of a Followers or Following page (snake_case).
63
- */
64
- interface MobileServerFollowListAccount {
65
- identity: MobileServerIdentitySummary;
66
- /**
67
- * The `view_as` Viewer's relationship to this account, not the listed relationship that put it in the
68
- * page, so it is `false` on the Viewer's own row. Omitted entirely when the request named no `view_as`,
69
- * rather than being sent as a misleading `false`.
70
- */
71
- is_following?: boolean;
72
- /** The listed account's own follower count, exact at query time. */
73
- follower_count: number;
74
- }
75
- /**
76
- * Direction of the position a feed trade resulted in — for `closed`, the direction that was closed. This is
77
- * NOT the execution buy/sell side, which the feed does not expose. Aliases {@link BalanceSide} so the feed's
78
- * direction values stay in lockstep with the rest of the SDK.
79
- */
80
- type MobileFeedTradePositionDirection = BalanceSide;
81
- /**
82
- * Every {@link MobileFeedTradePositionDirection} the feed can report, for callers that need the values at
83
- * runtime (validation, filters, UI enumeration).
84
- */
85
- declare const MOBILE_FEED_TRADE_POSITION_DIRECTIONS: readonly ["long", "short"];
86
- /**
87
- * Every {@link MobileFeedTradePositionEffect} the feed can report, for callers that need the values at
88
- * runtime (validation, filters, UI enumeration).
89
- */
90
- declare const MOBILE_FEED_TRADE_POSITION_EFFECTS: readonly ["opened", "increased", "reduced", "closed", "flipped"];
91
- /**
92
- * How a feed trade changed the trader's position in the product.
93
- */
94
- type MobileFeedTradePositionEffect = (typeof MOBILE_FEED_TRADE_POSITION_EFFECTS)[number];
95
- /**
96
- * Position change of a feed trade. Both keys are single words, so the wire and client shapes are identical
97
- * and this type is shared by {@link MobileServerFeedTrade} and the client-side `MobileFeedTrade`.
98
- */
99
- interface MobileFeedTradePosition {
100
- direction: MobileFeedTradePositionDirection;
101
- effect: MobileFeedTradePositionEffect;
102
- }
103
- /**
104
- * Every {@link MobileFeedMarginMode} the feed can report, for callers that need the values at runtime
105
- * (validation, filters, UI enumeration).
106
- */
107
- declare const MOBILE_FEED_MARGIN_MODES: readonly ["cross", "isolated"];
108
- /**
109
- * Margin mode a feed trade was executed under. Shared by the wire and client margin shapes.
110
- */
111
- type MobileFeedMarginMode = (typeof MOBILE_FEED_MARGIN_MODES)[number];
112
- /**
113
- * Server-side margin of a feed trade. Branch on `mode` — do not infer isolated state from leverage presence:
114
- * `estimated_leverage` (a rounded whole-number estimate, not exact submitted leverage) is omitted on `cross`,
115
- * and also omitted inside `isolated` when no estimate is available.
116
- */
117
- interface MobileServerFeedMargin {
118
- mode: MobileFeedMarginMode;
119
- estimated_leverage?: number;
120
- }
121
- /**
122
- * Server-side feed trade shape (snake_case): one row per order digest, enriched at read time with the
123
- * trader's current identity. Amounts are display-oriented human-unit JSON numbers — do not use them for
124
- * accounting, order construction, or exact threshold decisions.
125
- */
126
- interface MobileServerFeedTrade extends MobileServerIdentitySummary {
127
- /** Order digest this row is keyed by; the stable id clients use to reconcile live pagination. */
128
- order_digest: Hex;
129
- product_id: number;
130
- /** Executed quantity in human units. */
131
- quantity: number;
132
- /** Trade notional in whole-dollar human units. */
133
- notional: number;
134
- /** Average execution price in human units. */
135
- average_price: number;
136
- margin: MobileServerFeedMargin;
137
- position: MobileFeedTradePosition;
138
- /** Realized PnL of the trade in human units; can be negative. */
139
- realized_pnl: number;
140
- /** Fill time as JavaScript-safe integer Unix milliseconds. */
141
- filled_at_ms: number;
142
- }
143
- /**
144
- * Server-side scope limiting a notification category preference. Scopes are rejected by the backend for the
145
- * MVP (`scopes` must be empty) but are part of the wire format.
146
- */
147
- type MobileServerNotificationPreferenceScope = {
148
- type: 'subaccount';
149
- subaccount: Hex;
150
- } | {
151
- type: 'product';
152
- product_id: number;
153
- };
154
- /**
155
- * Server-side per-category notification preference (snake_case).
156
- */
157
- interface MobileServerNotificationCategoryPreference {
158
- category: MobileNotificationCategory;
159
- enabled: boolean;
160
- scopes: MobileServerNotificationPreferenceScope[];
161
- }
162
- /**
163
- * Server-side notification preferences shape (snake_case), used in both the `update_preferences` public
164
- * execute and the `notification_preferences` public query response.
165
- */
166
- interface MobileServerNotificationPreferences {
167
- /** Only `1` is accepted by the backend for the MVP. */
168
- schema_version: 1;
169
- categories: MobileServerNotificationCategoryPreference[];
170
- }
171
- //#endregion
172
- export { MobileServerNotificationPreferences as _, MobileFeedTradePosition as a, MobileNotificationCategory as c, MobileServerFeedTrade as d, MobileServerFollowListAccount as f, MobileServerNotificationPreferenceScope as g, MobileServerNotificationCategoryPreference as h, MobileFeedMarginMode as i, MobileNotificationPlatform as l, MobileServerIdentitySummary as m, MOBILE_FEED_TRADE_POSITION_DIRECTIONS as n, MobileFeedTradePositionDirection as o, MobileServerFollowSummary as p, MOBILE_FEED_TRADE_POSITION_EFFECTS as r, MobileFeedTradePositionEffect as s, MOBILE_FEED_MARGIN_MODES as t, MobileServerFeedMargin as u, MobileServerProfile as v };
173
- //# sourceMappingURL=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AAA;EAUI;EARJ,YAAA;AAAA;;;;AAS+B;KAFrB,uCAAA;EACN,IAAA;EAAoB,UAAA,EAAY,GAAG;AAAA;EACnC,IAAA;EAAiB,UAAA;AAAA;;;;UAKN,0CAAA;EACf,QAAA,EAAU,0BAAA;EACV,OAAA;EACA,MAAA,EAAQ,uCAAuC;AAAA;;;;;UAOhC,mCAAA;;EAEf,cAAA;EACA,UAAA,EAAY,0CAA0C;AAAA"}
@@ -1,89 +0,0 @@
1
- import { _ as MobileServerNotificationPreferences, d as MobileServerFeedTrade, f as MobileServerFollowListAccount, l as MobileNotificationPlatform, v as MobileServerProfile } from "./serverModelTypes-YmHqfxc8.js";
2
- import { o as MobileServerPublicQueryRequestByType, s as MobileServerPublicQueryRequestType } from "./serverRequestTypes-DcdmGfTu.js";
3
- import { n as MobileServerSuccessResponse } from "./serverBaseTypes-DDzfBA1a.js";
4
- import { Hex } from "viem";
5
-
6
- //#region src/types/serverQueryTypes.d.ts
7
- /**
8
- * Unsigned `public_query` request body: a `type` discriminant flattened with its params.
9
- */
10
- type MobileServerPublicQueryRequest<T extends MobileServerPublicQueryRequestType = MobileServerPublicQueryRequestType> = { [K in MobileServerPublicQueryRequestType]: {
11
- type: K;
12
- } & MobileServerPublicQueryRequestByType[K] }[T];
13
- /**
14
- * Payload of the `username_availability` public query success response.
15
- */
16
- interface MobileServerUsernameAvailabilityResponse {
17
- username: string;
18
- available: boolean;
19
- }
20
- /**
21
- * Payload of the `profiles` public query success response. One entry per requested subaccount, in the exact
22
- * order they were requested, so callers can correlate positionally as well as by `subaccount`.
23
- */
24
- interface MobileServerProfilesResponse {
25
- profiles: MobileServerProfile[];
26
- }
27
- /**
28
- * Payload of the `followers` and `following` public query success responses. Both list directions share one
29
- * shape; only the relationship that selected the rows differs.
30
- */
31
- interface MobileServerFollowListResponse {
32
- accounts: MobileServerFollowListAccount[];
33
- /** `null` means the list is complete. */
34
- next_cursor: string | null;
35
- }
36
- /**
37
- * Payload of the `feed` public query success response.
38
- */
39
- interface MobileServerFeedResponse {
40
- trades: MobileServerFeedTrade[];
41
- /**
42
- * `null` when there was no additional candidate at query time; a page may contain fewer than `limit` trades
43
- * (or none) with a non-null cursor because invalid enrichment rows are omitted and pagination is live
44
- * rather than snapshot.
45
- */
46
- next_cursor: string | null;
47
- }
48
- /**
49
- * Payload of the `notification_preferences` public query success response.
50
- */
51
- interface MobileServerNotificationPreferencesResponse {
52
- preferences: MobileServerNotificationPreferences;
53
- }
54
- /**
55
- * Payload of the `registered_wallet` public query success response. Inlined into the envelope rather than
56
- * nested under a key, matching the backend's `RegisteredWalletResponse`.
57
- */
58
- interface MobileServerRegisteredWalletResponse {
59
- wallet: Hex;
60
- platform: MobileNotificationPlatform;
61
- locale: string | null;
62
- app_version: string | null;
63
- token_fingerprint_prefix: string;
64
- last_seen_at: number;
65
- }
66
- /**
67
- * Success payloads for each unsigned `public_query`, keyed by request `type`. Counterpart to
68
- * {@link MobileServerPublicQueryRequestByType} so a query's request params and response share one lookup,
69
- * matching engine's `EngineServerQueryResponseByType`. Holds the unwrapped payload; the envelope is applied
70
- * by {@link MobileServerPublicQuerySuccessResponse}.
71
- */
72
- interface MobileServerPublicQueryResponseByType {
73
- username_availability: MobileServerUsernameAvailabilityResponse;
74
- profiles: MobileServerProfilesResponse;
75
- followers: MobileServerFollowListResponse;
76
- following: MobileServerFollowListResponse;
77
- feed: MobileServerFeedResponse;
78
- notification_preferences: MobileServerNotificationPreferencesResponse;
79
- registered_wallet: MobileServerRegisteredWalletResponse;
80
- }
81
- /**
82
- * Full success response for an unsigned `public_query`: the {@link MobileServerSuccessResponse} envelope with
83
- * the query's payload inlined alongside `status`. Derived from {@link MobileServerPublicQueryResponseByType},
84
- * mirroring engine's `EngineServerQuerySuccessResponse` (inlined here instead of nested under `data`).
85
- */
86
- type MobileServerPublicQuerySuccessResponse<T extends MobileServerPublicQueryRequestType = MobileServerPublicQueryRequestType> = MobileServerSuccessResponse & MobileServerPublicQueryResponseByType[T];
87
- //#endregion
88
- export { MobileServerPublicQueryRequest as a, MobileServerRegisteredWalletResponse as c, MobileServerProfilesResponse as i, MobileServerUsernameAvailabilityResponse as l, MobileServerFollowListResponse as n, MobileServerPublicQueryResponseByType as o, MobileServerNotificationPreferencesResponse as r, MobileServerPublicQuerySuccessResponse as s, MobileServerFeedResponse as t };
89
- //# sourceMappingURL=serverQueryTypes-C-_h9awN.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serverQueryTypes-C-_h9awN.d.ts","names":[],"sources":["../src/types/src/types/serverQueryTypes.ts"],"mappings":";;;;;;;;AAiBA;KAAY,8BAAA,WACA,kCAAA,GACR,kCAAA,YAEI,kCAAA;EACJ,IAAA,EAAM,CAAA;AAAA,IACJ,oCAAA,CAAqC,CAAA,IACzC,CAAA;;;;UAKe,wCAAA;EACf,QAAA;EACA,SAAS;AAAA;;;;;UAOM,4BAAA;EACf,QAAA,EAAU,mBAAmB;AAAA;;;;AAf5B;UAsBc,8BAAA;EACf,QAAA,EAAU,6BAA6B;;EAEvC,WAAA;AAAA;AAXF;;;AAAA,UAiBiB,wBAAA;EACf,MAAA,EAAQ,qBAAqB;EAVd;;;;;EAgBf,WAAA;AAAA;;AAbW;AAMb;UAaiB,2CAAA;EACf,WAAA,EAAa,mCAAmC;AAAA;;;;;UAOjC,oCAAA;EACf,MAAA,EAAQ,GAAA;EACR,QAAA,EAAU,0BAA0B;EACpC,MAAA;EACA,WAAA;EACA,wBAAA;EACA,YAAA;AAAA;;;;;;;UASe,qCAAA;EACf,qBAAA,EAAuB,wCAAA;EACvB,QAAA,EAAU,4BAAA;EACV,SAAA,EAAW,8BAAA;EACX,SAAA,EAAW,8BAAA;EACX,IAAA,EAAM,wBAAA;EACN,wBAAA,EAA0B,2CAAA;EAC1B,iBAAA,EAAmB,oCAAA;AAAA;;;;;;KAQT,sCAAA,WACA,kCAAA,GACR,kCAAA,IACA,2BAAA,GAA8B,qCAAA,CAAsC,CAAA"}
@@ -1,89 +0,0 @@
1
- import { _ as MobileServerNotificationPreferences, d as MobileServerFeedTrade, f as MobileServerFollowListAccount, l as MobileNotificationPlatform, v as MobileServerProfile } from "./serverModelTypes-YmHqfxc8.cjs";
2
- import { o as MobileServerPublicQueryRequestByType, s as MobileServerPublicQueryRequestType } from "./serverRequestTypes-BylecTUn.cjs";
3
- import { n as MobileServerSuccessResponse } from "./serverBaseTypes-BOuAdmuQ.cjs";
4
- import { Hex } from "viem";
5
-
6
- //#region src/types/serverQueryTypes.d.ts
7
- /**
8
- * Unsigned `public_query` request body: a `type` discriminant flattened with its params.
9
- */
10
- type MobileServerPublicQueryRequest<T extends MobileServerPublicQueryRequestType = MobileServerPublicQueryRequestType> = { [K in MobileServerPublicQueryRequestType]: {
11
- type: K;
12
- } & MobileServerPublicQueryRequestByType[K] }[T];
13
- /**
14
- * Payload of the `username_availability` public query success response.
15
- */
16
- interface MobileServerUsernameAvailabilityResponse {
17
- username: string;
18
- available: boolean;
19
- }
20
- /**
21
- * Payload of the `profiles` public query success response. One entry per requested subaccount, in the exact
22
- * order they were requested, so callers can correlate positionally as well as by `subaccount`.
23
- */
24
- interface MobileServerProfilesResponse {
25
- profiles: MobileServerProfile[];
26
- }
27
- /**
28
- * Payload of the `followers` and `following` public query success responses. Both list directions share one
29
- * shape; only the relationship that selected the rows differs.
30
- */
31
- interface MobileServerFollowListResponse {
32
- accounts: MobileServerFollowListAccount[];
33
- /** `null` means the list is complete. */
34
- next_cursor: string | null;
35
- }
36
- /**
37
- * Payload of the `feed` public query success response.
38
- */
39
- interface MobileServerFeedResponse {
40
- trades: MobileServerFeedTrade[];
41
- /**
42
- * `null` when there was no additional candidate at query time; a page may contain fewer than `limit` trades
43
- * (or none) with a non-null cursor because invalid enrichment rows are omitted and pagination is live
44
- * rather than snapshot.
45
- */
46
- next_cursor: string | null;
47
- }
48
- /**
49
- * Payload of the `notification_preferences` public query success response.
50
- */
51
- interface MobileServerNotificationPreferencesResponse {
52
- preferences: MobileServerNotificationPreferences;
53
- }
54
- /**
55
- * Payload of the `registered_wallet` public query success response. Inlined into the envelope rather than
56
- * nested under a key, matching the backend's `RegisteredWalletResponse`.
57
- */
58
- interface MobileServerRegisteredWalletResponse {
59
- wallet: Hex;
60
- platform: MobileNotificationPlatform;
61
- locale: string | null;
62
- app_version: string | null;
63
- token_fingerprint_prefix: string;
64
- last_seen_at: number;
65
- }
66
- /**
67
- * Success payloads for each unsigned `public_query`, keyed by request `type`. Counterpart to
68
- * {@link MobileServerPublicQueryRequestByType} so a query's request params and response share one lookup,
69
- * matching engine's `EngineServerQueryResponseByType`. Holds the unwrapped payload; the envelope is applied
70
- * by {@link MobileServerPublicQuerySuccessResponse}.
71
- */
72
- interface MobileServerPublicQueryResponseByType {
73
- username_availability: MobileServerUsernameAvailabilityResponse;
74
- profiles: MobileServerProfilesResponse;
75
- followers: MobileServerFollowListResponse;
76
- following: MobileServerFollowListResponse;
77
- feed: MobileServerFeedResponse;
78
- notification_preferences: MobileServerNotificationPreferencesResponse;
79
- registered_wallet: MobileServerRegisteredWalletResponse;
80
- }
81
- /**
82
- * Full success response for an unsigned `public_query`: the {@link MobileServerSuccessResponse} envelope with
83
- * the query's payload inlined alongside `status`. Derived from {@link MobileServerPublicQueryResponseByType},
84
- * mirroring engine's `EngineServerQuerySuccessResponse` (inlined here instead of nested under `data`).
85
- */
86
- type MobileServerPublicQuerySuccessResponse<T extends MobileServerPublicQueryRequestType = MobileServerPublicQueryRequestType> = MobileServerSuccessResponse & MobileServerPublicQueryResponseByType[T];
87
- //#endregion
88
- export { MobileServerPublicQueryRequest as a, MobileServerRegisteredWalletResponse as c, MobileServerProfilesResponse as i, MobileServerUsernameAvailabilityResponse as l, MobileServerFollowListResponse as n, MobileServerPublicQueryResponseByType as o, MobileServerNotificationPreferencesResponse as r, MobileServerPublicQuerySuccessResponse as s, MobileServerFeedResponse as t };
89
- //# sourceMappingURL=serverQueryTypes-CuVsrzGV.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serverQueryTypes-CuVsrzGV.d.cts","names":[],"sources":["../src/types/src/types/serverQueryTypes.ts"],"mappings":";;;;;;;;AAiBA;KAAY,8BAAA,WACA,kCAAA,GACR,kCAAA,YAEI,kCAAA;EACJ,IAAA,EAAM,CAAA;AAAA,IACJ,oCAAA,CAAqC,CAAA,IACzC,CAAA;;;;UAKe,wCAAA;EACf,QAAA;EACA,SAAS;AAAA;;;;;UAOM,4BAAA;EACf,QAAA,EAAU,mBAAmB;AAAA;;;;AAf5B;UAsBc,8BAAA;EACf,QAAA,EAAU,6BAA6B;;EAEvC,WAAA;AAAA;AAXF;;;AAAA,UAiBiB,wBAAA;EACf,MAAA,EAAQ,qBAAqB;EAVd;;;;;EAgBf,WAAA;AAAA;;AAbW;AAMb;UAaiB,2CAAA;EACf,WAAA,EAAa,mCAAmC;AAAA;;;;;UAOjC,oCAAA;EACf,MAAA,EAAQ,GAAA;EACR,QAAA,EAAU,0BAA0B;EACpC,MAAA;EACA,WAAA;EACA,wBAAA;EACA,YAAA;AAAA;;;;;;;UASe,qCAAA;EACf,qBAAA,EAAuB,wCAAA;EACvB,QAAA,EAAU,4BAAA;EACV,SAAA,EAAW,8BAAA;EACX,SAAA,EAAW,8BAAA;EACX,IAAA,EAAM,wBAAA;EACN,wBAAA,EAA0B,2CAAA;EAC1B,iBAAA,EAAmB,oCAAA;AAAA;;;;;;KAQT,sCAAA,WACA,kCAAA,GACR,kCAAA,IACA,2BAAA,GAA8B,qCAAA,CAAsC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"serverRequestTypes-BylecTUn.d.cts","names":[],"sources":["../src/types/src/types/serverRequestTypes.ts"],"mappings":";;;;;;;AASA;;;UAAiB,2BAAA;EAEf;EAAA,aAAA;EAKmB;;;AAAY;EAA/B,cAAA;IAAmB,OAAA,EAAS,GAAG;EAAA;AAAA;;;;;UAOhB,6BAAA;EAYf;EAVA,UAAA,EAAY,GAAA;EAUP;AAMP;;;;EAVE,OAAA,GAAU,GAAG;EAoBF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