@nadohq/mobile-client 0.27.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 (204) hide show
  1. package/README.md +73 -0
  2. package/dist/MobileClient-9JSAzblH.cjs +218 -0
  3. package/dist/MobileClient-9JSAzblH.cjs.map +1 -0
  4. package/dist/MobileClient.cjs +4 -0
  5. package/dist/MobileClient.d.cts +114 -0
  6. package/dist/MobileClient.d.cts.map +1 -0
  7. package/dist/MobileClient.d.ts +114 -0
  8. package/dist/MobileClient.d.ts.map +1 -0
  9. package/dist/MobileClient.js +185 -0
  10. package/dist/MobileClient.js.map +1 -0
  11. package/dist/MobileServerFailureError-Belp_yef.d.cts +25 -0
  12. package/dist/MobileServerFailureError-Belp_yef.d.cts.map +1 -0
  13. package/dist/MobileServerFailureError-DqM0T6CB.d.ts +25 -0
  14. package/dist/MobileServerFailureError-DqM0T6CB.d.ts.map +1 -0
  15. package/dist/buildSignedMobileRequest-BsbBkU0K.d.cts +14 -0
  16. package/dist/buildSignedMobileRequest-BsbBkU0K.d.cts.map +1 -0
  17. package/dist/buildSignedMobileRequest-CDRsRNHm.d.ts +14 -0
  18. package/dist/buildSignedMobileRequest-CDRsRNHm.d.ts.map +1 -0
  19. package/dist/canonicalize-Dm7sXwPg.d.cts +14 -0
  20. package/dist/canonicalize-Dm7sXwPg.d.cts.map +1 -0
  21. package/dist/canonicalize-PX6dTIdF.d.ts +14 -0
  22. package/dist/canonicalize-PX6dTIdF.d.ts.map +1 -0
  23. package/dist/clientTypes-DWW2N66c.d.ts +168 -0
  24. package/dist/clientTypes-DWW2N66c.d.ts.map +1 -0
  25. package/dist/clientTypes-Et0PUa2d.d.cts +168 -0
  26. package/dist/clientTypes-Et0PUa2d.d.cts.map +1 -0
  27. package/dist/dataMappers.cjs +89 -0
  28. package/dist/dataMappers.cjs.map +1 -0
  29. package/dist/dataMappers.d.cts +27 -0
  30. package/dist/dataMappers.d.cts.map +1 -0
  31. package/dist/dataMappers.d.ts +27 -0
  32. package/dist/dataMappers.d.ts.map +1 -0
  33. package/dist/dataMappers.js +84 -0
  34. package/dist/dataMappers.js.map +1 -0
  35. package/dist/eip712MethodByType-DJgXal9r.d.ts +10 -0
  36. package/dist/eip712MethodByType-DJgXal9r.d.ts.map +1 -0
  37. package/dist/eip712MethodByType-DLh9MRsD.d.cts +10 -0
  38. package/dist/eip712MethodByType-DLh9MRsD.d.cts.map +1 -0
  39. package/dist/endpoints.cjs +14 -0
  40. package/dist/endpoints.cjs.map +1 -0
  41. package/dist/endpoints.d.cts +10 -0
  42. package/dist/endpoints.d.cts.map +1 -0
  43. package/dist/endpoints.d.ts +10 -0
  44. package/dist/endpoints.d.ts.map +1 -0
  45. package/dist/endpoints.js +13 -0
  46. package/dist/endpoints.js.map +1 -0
  47. package/dist/index.cjs +27 -0
  48. package/dist/index.d.cts +18 -0
  49. package/dist/index.d.ts +18 -0
  50. package/dist/index.js +15 -0
  51. package/dist/mobileErrorCodes-D8KzJXbU.d.cts +29 -0
  52. package/dist/mobileErrorCodes-D8KzJXbU.d.cts.map +1 -0
  53. package/dist/mobileErrorCodes-DM09jnNe.d.ts +29 -0
  54. package/dist/mobileErrorCodes-DM09jnNe.d.ts.map +1 -0
  55. package/dist/nonce-DCOrXXkQ.d.ts +15 -0
  56. package/dist/nonce-DCOrXXkQ.d.ts.map +1 -0
  57. package/dist/nonce-zGyisRlj.d.cts +15 -0
  58. package/dist/nonce-zGyisRlj.d.cts.map +1 -0
  59. package/dist/patterns-B9J2ldpx.d.cts +8 -0
  60. package/dist/patterns-B9J2ldpx.d.cts.map +1 -0
  61. package/dist/patterns-BbxH3_VA.d.ts +8 -0
  62. package/dist/patterns-BbxH3_VA.d.ts.map +1 -0
  63. package/dist/payloadHash-Bmhzs78N.d.ts +13 -0
  64. package/dist/payloadHash-Bmhzs78N.d.ts.map +1 -0
  65. package/dist/payloadHash-nj8WuLUP.d.cts +13 -0
  66. package/dist/payloadHash-nj8WuLUP.d.cts.map +1 -0
  67. package/dist/serverBaseTypes-BicXMrZV.d.cts +43 -0
  68. package/dist/serverBaseTypes-BicXMrZV.d.cts.map +1 -0
  69. package/dist/serverBaseTypes-ewbo8l4R.d.ts +43 -0
  70. package/dist/serverBaseTypes-ewbo8l4R.d.ts.map +1 -0
  71. package/dist/serverExecuteTypes-CXnMjKnt.d.ts +11 -0
  72. package/dist/serverExecuteTypes-CXnMjKnt.d.ts.map +1 -0
  73. package/dist/serverExecuteTypes-DKYK1V7C.d.cts +11 -0
  74. package/dist/serverExecuteTypes-DKYK1V7C.d.cts.map +1 -0
  75. package/dist/serverModelTypes-CQgfqgW3.d.cts +69 -0
  76. package/dist/serverModelTypes-CQgfqgW3.d.cts.map +1 -0
  77. package/dist/serverModelTypes-vEPhHIit.d.ts +69 -0
  78. package/dist/serverModelTypes-vEPhHIit.d.ts.map +1 -0
  79. package/dist/serverQueryTypes-BI-2TD8F.d.ts +53 -0
  80. package/dist/serverQueryTypes-BI-2TD8F.d.ts.map +1 -0
  81. package/dist/serverQueryTypes-D7Yharse.d.cts +53 -0
  82. package/dist/serverQueryTypes-D7Yharse.d.cts.map +1 -0
  83. package/dist/serverResponseGuards-C_vZIgGl.d.ts +16 -0
  84. package/dist/serverResponseGuards-C_vZIgGl.d.ts.map +1 -0
  85. package/dist/serverResponseGuards-DjCNL3CR.d.cts +16 -0
  86. package/dist/serverResponseGuards-DjCNL3CR.d.cts.map +1 -0
  87. package/dist/signing/buildSignedMobileRequest.cjs +47 -0
  88. package/dist/signing/buildSignedMobileRequest.cjs.map +1 -0
  89. package/dist/signing/buildSignedMobileRequest.d.cts +2 -0
  90. package/dist/signing/buildSignedMobileRequest.d.ts +2 -0
  91. package/dist/signing/buildSignedMobileRequest.js +45 -0
  92. package/dist/signing/buildSignedMobileRequest.js.map +1 -0
  93. package/dist/signing/canonicalize.cjs +68 -0
  94. package/dist/signing/canonicalize.cjs.map +1 -0
  95. package/dist/signing/canonicalize.d.cts +2 -0
  96. package/dist/signing/canonicalize.d.ts +2 -0
  97. package/dist/signing/canonicalize.js +67 -0
  98. package/dist/signing/canonicalize.js.map +1 -0
  99. package/dist/signing/eip712MethodByType.cjs +20 -0
  100. package/dist/signing/eip712MethodByType.cjs.map +1 -0
  101. package/dist/signing/eip712MethodByType.d.cts +2 -0
  102. package/dist/signing/eip712MethodByType.d.ts +2 -0
  103. package/dist/signing/eip712MethodByType.js +19 -0
  104. package/dist/signing/eip712MethodByType.js.map +1 -0
  105. package/dist/signing/index.cjs +11 -0
  106. package/dist/signing/index.d.cts +7 -0
  107. package/dist/signing/index.d.ts +7 -0
  108. package/dist/signing/index.js +6 -0
  109. package/dist/signing/nonce.cjs +19 -0
  110. package/dist/signing/nonce.cjs.map +1 -0
  111. package/dist/signing/nonce.d.cts +2 -0
  112. package/dist/signing/nonce.d.ts +2 -0
  113. package/dist/signing/nonce.js +18 -0
  114. package/dist/signing/nonce.js.map +1 -0
  115. package/dist/signing/payloadHash.cjs +17 -0
  116. package/dist/signing/payloadHash.cjs.map +1 -0
  117. package/dist/signing/payloadHash.d.cts +2 -0
  118. package/dist/signing/payloadHash.d.ts +2 -0
  119. package/dist/signing/payloadHash.js +15 -0
  120. package/dist/signing/payloadHash.js.map +1 -0
  121. package/dist/signing/types.cjs +0 -0
  122. package/dist/signing/types.d.cts +2 -0
  123. package/dist/signing/types.d.ts +2 -0
  124. package/dist/signing/types.js +1 -0
  125. package/dist/types/MobileServerFailureError.cjs +17 -0
  126. package/dist/types/MobileServerFailureError.cjs.map +1 -0
  127. package/dist/types/MobileServerFailureError.d.cts +2 -0
  128. package/dist/types/MobileServerFailureError.d.ts +2 -0
  129. package/dist/types/MobileServerFailureError.js +16 -0
  130. package/dist/types/MobileServerFailureError.js.map +1 -0
  131. package/dist/types/clientTypes.cjs +0 -0
  132. package/dist/types/clientTypes.d.cts +2 -0
  133. package/dist/types/clientTypes.d.ts +2 -0
  134. package/dist/types/clientTypes.js +1 -0
  135. package/dist/types/index.cjs +5 -0
  136. package/dist/types/index.d.cts +8 -0
  137. package/dist/types/index.d.ts +8 -0
  138. package/dist/types/index.js +3 -0
  139. package/dist/types/mobileErrorCodes.cjs +27 -0
  140. package/dist/types/mobileErrorCodes.cjs.map +1 -0
  141. package/dist/types/mobileErrorCodes.d.cts +2 -0
  142. package/dist/types/mobileErrorCodes.d.ts +2 -0
  143. package/dist/types/mobileErrorCodes.js +26 -0
  144. package/dist/types/mobileErrorCodes.js.map +1 -0
  145. package/dist/types/serverBaseTypes.cjs +0 -0
  146. package/dist/types/serverBaseTypes.d.cts +2 -0
  147. package/dist/types/serverBaseTypes.d.ts +2 -0
  148. package/dist/types/serverBaseTypes.js +1 -0
  149. package/dist/types/serverExecuteTypes.cjs +0 -0
  150. package/dist/types/serverExecuteTypes.d.cts +2 -0
  151. package/dist/types/serverExecuteTypes.d.ts +2 -0
  152. package/dist/types/serverExecuteTypes.js +1 -0
  153. package/dist/types/serverModelTypes.cjs +0 -0
  154. package/dist/types/serverModelTypes.d.cts +2 -0
  155. package/dist/types/serverModelTypes.d.ts +2 -0
  156. package/dist/types/serverModelTypes.js +1 -0
  157. package/dist/types/serverQueryTypes.cjs +0 -0
  158. package/dist/types/serverQueryTypes.d.cts +2 -0
  159. package/dist/types/serverQueryTypes.d.ts +2 -0
  160. package/dist/types/serverQueryTypes.js +1 -0
  161. package/dist/types-B76Pn7Sy.d.ts +73 -0
  162. package/dist/types-B76Pn7Sy.d.ts.map +1 -0
  163. package/dist/types-uCD4BNZR.d.cts +73 -0
  164. package/dist/types-uCD4BNZR.d.cts.map +1 -0
  165. package/dist/utils/index.cjs +6 -0
  166. package/dist/utils/index.d.cts +3 -0
  167. package/dist/utils/index.d.ts +3 -0
  168. package/dist/utils/index.js +3 -0
  169. package/dist/utils/patterns.cjs +10 -0
  170. package/dist/utils/patterns.cjs.map +1 -0
  171. package/dist/utils/patterns.d.cts +2 -0
  172. package/dist/utils/patterns.d.ts +2 -0
  173. package/dist/utils/patterns.js +9 -0
  174. package/dist/utils/patterns.js.map +1 -0
  175. package/dist/utils/serverResponseGuards.cjs +19 -0
  176. package/dist/utils/serverResponseGuards.cjs.map +1 -0
  177. package/dist/utils/serverResponseGuards.d.cts +2 -0
  178. package/dist/utils/serverResponseGuards.d.ts +2 -0
  179. package/dist/utils/serverResponseGuards.js +17 -0
  180. package/dist/utils/serverResponseGuards.js.map +1 -0
  181. package/package.json +58 -0
  182. package/src/MobileClient.ts +395 -0
  183. package/src/dataMappers.ts +106 -0
  184. package/src/endpoints.ts +10 -0
  185. package/src/index.ts +5 -0
  186. package/src/signing/buildSignedMobileRequest.ts +58 -0
  187. package/src/signing/canonicalize.ts +69 -0
  188. package/src/signing/eip712MethodByType.ts +19 -0
  189. package/src/signing/index.ts +6 -0
  190. package/src/signing/nonce.ts +16 -0
  191. package/src/signing/payloadHash.ts +12 -0
  192. package/src/signing/signing.test.ts +224 -0
  193. package/src/signing/types.ts +71 -0
  194. package/src/types/MobileServerFailureError.ts +18 -0
  195. package/src/types/clientTypes.ts +182 -0
  196. package/src/types/index.ts +7 -0
  197. package/src/types/mobileErrorCodes.ts +27 -0
  198. package/src/types/serverBaseTypes.ts +43 -0
  199. package/src/types/serverExecuteTypes.ts +12 -0
  200. package/src/types/serverModelTypes.ts +74 -0
  201. package/src/types/serverQueryTypes.ts +74 -0
  202. package/src/utils/index.ts +2 -0
  203. package/src/utils/patterns.ts +4 -0
  204. package/src/utils/serverResponseGuards.ts +27 -0
@@ -0,0 +1,29 @@
1
+ //#region src/types/mobileErrorCodes.d.ts
2
+ /**
3
+ * Numeric error codes returned by the mobile service API. Identity codes (61xx) and notification codes
4
+ * (62xx) are mobile-specific; the remaining codes are shared cross-service codes from the backend's common
5
+ * error enum.
6
+ */
7
+ declare const MOBILE_ERROR_CODES: {
8
+ readonly NOT_IMPLEMENTED: 4001;
9
+ readonly INVALID_SIGNER: 2028;
10
+ readonly SERVICE_UNAVAILABLE: 1006;
11
+ readonly INVALID_DISPLAY_NAME: 6100;
12
+ readonly USERNAME_UNAVAILABLE: 6101;
13
+ readonly IDENTITY_ALREADY_CLAIMED: 6102;
14
+ readonly IDENTITY_REQUIRED: 6103;
15
+ readonly INVALID_IDENTITY_TARGET: 6104;
16
+ readonly STALE_IDENTITY_UPDATE: 6105;
17
+ readonly PROFILE_NOT_FOUND: 6106;
18
+ readonly INVALID_EXPO_TOKEN: 6200;
19
+ readonly INVALID_DEVICE_METADATA: 6201;
20
+ readonly INVALID_PREFERENCES: 6202;
21
+ readonly INTERNAL_ERROR: 5000;
22
+ };
23
+ /**
24
+ * Union of all known mobile service API error codes.
25
+ */
26
+ type MobileErrorCode = (typeof MOBILE_ERROR_CODES)[keyof typeof MOBILE_ERROR_CODES];
27
+ //#endregion
28
+ export { MobileErrorCode as n, MOBILE_ERROR_CODES as t };
29
+ //# sourceMappingURL=mobileErrorCodes-D8KzJXbU.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobileErrorCodes-D8KzJXbU.d.cts","names":[],"sources":["../src/types/src/types/mobileErrorCodes.ts"],"mappings":";;AAKA;;;;cAAa,kBAAA;EAAA;;;;;;;;;;;;;;;AAoBb;;;AAAA,KAAY,eAAA,WACF,kBAAA,eAAiC,kBAAkB"}
@@ -0,0 +1,29 @@
1
+ //#region src/types/mobileErrorCodes.d.ts
2
+ /**
3
+ * Numeric error codes returned by the mobile service API. Identity codes (61xx) and notification codes
4
+ * (62xx) are mobile-specific; the remaining codes are shared cross-service codes from the backend's common
5
+ * error enum.
6
+ */
7
+ declare const MOBILE_ERROR_CODES: {
8
+ readonly NOT_IMPLEMENTED: 4001;
9
+ readonly INVALID_SIGNER: 2028;
10
+ readonly SERVICE_UNAVAILABLE: 1006;
11
+ readonly INVALID_DISPLAY_NAME: 6100;
12
+ readonly USERNAME_UNAVAILABLE: 6101;
13
+ readonly IDENTITY_ALREADY_CLAIMED: 6102;
14
+ readonly IDENTITY_REQUIRED: 6103;
15
+ readonly INVALID_IDENTITY_TARGET: 6104;
16
+ readonly STALE_IDENTITY_UPDATE: 6105;
17
+ readonly PROFILE_NOT_FOUND: 6106;
18
+ readonly INVALID_EXPO_TOKEN: 6200;
19
+ readonly INVALID_DEVICE_METADATA: 6201;
20
+ readonly INVALID_PREFERENCES: 6202;
21
+ readonly INTERNAL_ERROR: 5000;
22
+ };
23
+ /**
24
+ * Union of all known mobile service API error codes.
25
+ */
26
+ type MobileErrorCode = (typeof MOBILE_ERROR_CODES)[keyof typeof MOBILE_ERROR_CODES];
27
+ //#endregion
28
+ export { MobileErrorCode as n, MOBILE_ERROR_CODES as t };
29
+ //# sourceMappingURL=mobileErrorCodes-DM09jnNe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobileErrorCodes-DM09jnNe.d.ts","names":[],"sources":["../src/types/src/types/mobileErrorCodes.ts"],"mappings":";;AAKA;;;;cAAa,kBAAA;EAAA;;;;;;;;;;;;;;;AAoBb;;;AAAA,KAAY,eAAA,WACF,kBAAA,eAAiC,kBAAkB"}
@@ -0,0 +1,15 @@
1
+ //#region src/signing/nonce.d.ts
2
+ /**
3
+ * Generates a `nonce` for a signed mobile service API request, following the same shape as `getOrderNonce`:
4
+ * a receive-deadline timestamp in the high digits plus a random low-digits component to avoid collisions. The
5
+ * server reads `nonce / 1_000_000` as a millisecond receive deadline, which must be later than server time
6
+ * and no more than 100s ahead — hence the 30s default window. The random low six digits keep nonces
7
+ * generated within the same millisecond distinct.
8
+ *
9
+ * @param deadlineMs - Receive deadline in milliseconds; defaults to 30s ahead of now.
10
+ * @param randomInt - Random integer in `[0, 1_000_000)` placed in the low six digits to avoid collisions.
11
+ */
12
+ declare function getMobileNonce(deadlineMs?: number, randomInt?: number): bigint;
13
+ //#endregion
14
+ export { getMobileNonce as t };
15
+ //# sourceMappingURL=nonce-DCOrXXkQ.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nonce-DCOrXXkQ.d.ts","names":[],"sources":["../src/signing/src/signing/nonce.ts"],"mappings":";;AAUA;;;;AAE2D;;;;;iBAF3C,cAAA,CACd,UAAA,WACA,SAAyD"}
@@ -0,0 +1,15 @@
1
+ //#region src/signing/nonce.d.ts
2
+ /**
3
+ * Generates a `nonce` for a signed mobile service API request, following the same shape as `getOrderNonce`:
4
+ * a receive-deadline timestamp in the high digits plus a random low-digits component to avoid collisions. The
5
+ * server reads `nonce / 1_000_000` as a millisecond receive deadline, which must be later than server time
6
+ * and no more than 100s ahead — hence the 30s default window. The random low six digits keep nonces
7
+ * generated within the same millisecond distinct.
8
+ *
9
+ * @param deadlineMs - Receive deadline in milliseconds; defaults to 30s ahead of now.
10
+ * @param randomInt - Random integer in `[0, 1_000_000)` placed in the low six digits to avoid collisions.
11
+ */
12
+ declare function getMobileNonce(deadlineMs?: number, randomInt?: number): bigint;
13
+ //#endregion
14
+ export { getMobileNonce as t };
15
+ //# sourceMappingURL=nonce-zGyisRlj.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nonce-zGyisRlj.d.cts","names":[],"sources":["../src/signing/src/signing/nonce.ts"],"mappings":";;AAUA;;;;AAE2D;;;;;iBAF3C,cAAA,CACd,UAAA,WACA,SAAyD"}
@@ -0,0 +1,8 @@
1
+ //#region src/utils/patterns.d.ts
2
+ /**
3
+ * Validates a display name: 3-20 ASCII characters from `[A-Za-z0-9_.]`, allowed in any position.
4
+ */
5
+ declare const MOBILE_DISPLAY_NAME_PATTERN: RegExp;
6
+ //#endregion
7
+ export { MOBILE_DISPLAY_NAME_PATTERN as t };
8
+ //# sourceMappingURL=patterns-B9J2ldpx.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns-B9J2ldpx.d.cts","names":[],"sources":["../src/utils/src/utils/patterns.ts"],"mappings":";;AAGA;;cAAa,2BAAA,EAA2B,MAA0B"}
@@ -0,0 +1,8 @@
1
+ //#region src/utils/patterns.d.ts
2
+ /**
3
+ * Validates a display name: 3-20 ASCII characters from `[A-Za-z0-9_.]`, allowed in any position.
4
+ */
5
+ declare const MOBILE_DISPLAY_NAME_PATTERN: RegExp;
6
+ //#endregion
7
+ export { MOBILE_DISPLAY_NAME_PATTERN as t };
8
+ //# sourceMappingURL=patterns-BbxH3_VA.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns-BbxH3_VA.d.ts","names":[],"sources":["../src/utils/src/utils/patterns.ts"],"mappings":";;AAGA;;cAAa,2BAAA,EAA2B,MAA0B"}
@@ -0,0 +1,13 @@
1
+ import { n as MobileSignedInner } from "./types-B76Pn7Sy.js";
2
+ import { Hex } from "viem";
3
+
4
+ //#region src/signing/payloadHash.d.ts
5
+ /**
6
+ * Computes the EIP-712 `payloadHash` for a canonicalized inner payload: `keccak256(msgpack(inner))`.
7
+ *
8
+ * @param inner - A canonicalized inner payload; callers must run {@link canonicalizeMobileInner} first.
9
+ */
10
+ declare function getMobilePayloadHash(inner: MobileSignedInner): Hex;
11
+ //#endregion
12
+ export { getMobilePayloadHash as t };
13
+ //# sourceMappingURL=payloadHash-Bmhzs78N.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payloadHash-Bmhzs78N.d.ts","names":[],"sources":["../src/signing/src/signing/payloadHash.ts"],"mappings":";;;;;;AASA;;;iBAAgB,oBAAA,CAAqB,KAAA,EAAO,iBAAA,GAAoB,GAAG"}
@@ -0,0 +1,13 @@
1
+ import { n as MobileSignedInner } from "./types-uCD4BNZR.cjs";
2
+ import { Hex } from "viem";
3
+
4
+ //#region src/signing/payloadHash.d.ts
5
+ /**
6
+ * Computes the EIP-712 `payloadHash` for a canonicalized inner payload: `keccak256(msgpack(inner))`.
7
+ *
8
+ * @param inner - A canonicalized inner payload; callers must run {@link canonicalizeMobileInner} first.
9
+ */
10
+ declare function getMobilePayloadHash(inner: MobileSignedInner): Hex;
11
+ //#endregion
12
+ export { getMobilePayloadHash as t };
13
+ //# sourceMappingURL=payloadHash-nj8WuLUP.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payloadHash-nj8WuLUP.d.cts","names":[],"sources":["../src/signing/src/signing/payloadHash.ts"],"mappings":";;;;;;AASA;;;iBAAgB,oBAAA,CAAqB,KAAA,EAAO,iBAAA,GAAoB,GAAG"}
@@ -0,0 +1,43 @@
1
+ //#region src/types/serverBaseTypes.d.ts
2
+ /**
3
+ * Params for each unsigned `public_query`, keyed by request `type`.
4
+ */
5
+ interface MobileServerPublicQueryParamsByType {
6
+ username_availability: {
7
+ display_name: string;
8
+ };
9
+ profile: {
10
+ username: string;
11
+ };
12
+ }
13
+ /**
14
+ * Discriminant `type` values for unsigned `public_query` requests.
15
+ */
16
+ type MobileServerPublicQueryType = keyof MobileServerPublicQueryParamsByType;
17
+ /**
18
+ * Wire `request_type` the backend echoes on failure envelopes, prefixed by route (`public_query_*`,
19
+ * `query_*`, `execute_*`, e.g. `execute_claim_username`). Public-query types are enumerated; signed
20
+ * query/execute names are kept as a `${prefix}_${string}` template to avoid duplicating the signed-type
21
+ * tags declared in `signing.ts`.
22
+ */
23
+ type MobileServerRequestType = `public_query_${MobileServerPublicQueryType}` | `query_${string}` | `execute_${string}`;
24
+ /**
25
+ * Successful mobile service API envelope, discriminated on `status`. Payload fields are inlined alongside
26
+ * `status` rather than nested under a `data` key, matching the mobile backend's wire format.
27
+ */
28
+ type MobileServerSuccessResponse<TData extends object = object> = {
29
+ status: 'success';
30
+ } & TData;
31
+ /**
32
+ * Failure envelope returned by any mobile service API route. A response missing this envelope shape
33
+ * (e.g. a malformed body, or a non-JSON response) is a transport-level error, not a domain error.
34
+ */
35
+ interface MobileServerFailureResponse {
36
+ status: 'failure';
37
+ error: string;
38
+ error_code: number;
39
+ request_type: MobileServerRequestType;
40
+ }
41
+ //#endregion
42
+ export { MobileServerSuccessResponse as a, MobileServerRequestType as i, MobileServerPublicQueryParamsByType as n, MobileServerPublicQueryType as r, MobileServerFailureResponse as t };
43
+ //# sourceMappingURL=serverBaseTypes-BicXMrZV.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverBaseTypes-BicXMrZV.d.cts","names":[],"sources":["../src/types/src/types/serverBaseTypes.ts"],"mappings":";;AAGA;;UAAiB,mCAAA;EACf,qBAAA;IAAyB,YAAA;EAAA;EACzB,OAAA;IAAW,QAAA;EAAA;AAAA;AAMb;;;AAAA,KAAY,2BAAA,SACJ,mCAAmC;AAAA;AAQ3C;;;;AAC+C;AATJ,KAQ/B,uBAAA,mBACQ,2BAA2B;;;;;KAQnC,2BAAA;EACV,MAAA;AAAA,IACE,KAAK;AAAA;AAMT;;;AANS,UAMQ,2BAAA;EACf,MAAA;EACA,KAAA;EACA,UAAA;EACA,YAAA,EAAc,uBAAuB;AAAA"}
@@ -0,0 +1,43 @@
1
+ //#region src/types/serverBaseTypes.d.ts
2
+ /**
3
+ * Params for each unsigned `public_query`, keyed by request `type`.
4
+ */
5
+ interface MobileServerPublicQueryParamsByType {
6
+ username_availability: {
7
+ display_name: string;
8
+ };
9
+ profile: {
10
+ username: string;
11
+ };
12
+ }
13
+ /**
14
+ * Discriminant `type` values for unsigned `public_query` requests.
15
+ */
16
+ type MobileServerPublicQueryType = keyof MobileServerPublicQueryParamsByType;
17
+ /**
18
+ * Wire `request_type` the backend echoes on failure envelopes, prefixed by route (`public_query_*`,
19
+ * `query_*`, `execute_*`, e.g. `execute_claim_username`). Public-query types are enumerated; signed
20
+ * query/execute names are kept as a `${prefix}_${string}` template to avoid duplicating the signed-type
21
+ * tags declared in `signing.ts`.
22
+ */
23
+ type MobileServerRequestType = `public_query_${MobileServerPublicQueryType}` | `query_${string}` | `execute_${string}`;
24
+ /**
25
+ * Successful mobile service API envelope, discriminated on `status`. Payload fields are inlined alongside
26
+ * `status` rather than nested under a `data` key, matching the mobile backend's wire format.
27
+ */
28
+ type MobileServerSuccessResponse<TData extends object = object> = {
29
+ status: 'success';
30
+ } & TData;
31
+ /**
32
+ * Failure envelope returned by any mobile service API route. A response missing this envelope shape
33
+ * (e.g. a malformed body, or a non-JSON response) is a transport-level error, not a domain error.
34
+ */
35
+ interface MobileServerFailureResponse {
36
+ status: 'failure';
37
+ error: string;
38
+ error_code: number;
39
+ request_type: MobileServerRequestType;
40
+ }
41
+ //#endregion
42
+ export { MobileServerSuccessResponse as a, MobileServerRequestType as i, MobileServerPublicQueryParamsByType as n, MobileServerPublicQueryType as r, MobileServerFailureResponse as t };
43
+ //# sourceMappingURL=serverBaseTypes-ewbo8l4R.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverBaseTypes-ewbo8l4R.d.ts","names":[],"sources":["../src/types/src/types/serverBaseTypes.ts"],"mappings":";;AAGA;;UAAiB,mCAAA;EACf,qBAAA;IAAyB,YAAA;EAAA;EACzB,OAAA;IAAW,QAAA;EAAA;AAAA;AAMb;;;AAAA,KAAY,2BAAA,SACJ,mCAAmC;AAAA;AAQ3C;;;;AAC+C;AATJ,KAQ/B,uBAAA,mBACQ,2BAA2B;;;;;KAQnC,2BAAA;EACV,MAAA;AAAA,IACE,KAAK;AAAA;AAMT;;;AANS,UAMQ,2BAAA;EACf,MAAA;EACA,KAAA;EACA,UAAA;EACA,YAAA,EAAc,uBAAuB;AAAA"}
@@ -0,0 +1,11 @@
1
+ import { a as MobileServerSuccessResponse, t as MobileServerFailureResponse } from "./serverBaseTypes-ewbo8l4R.js";
2
+
3
+ //#region src/types/serverExecuteTypes.d.ts
4
+ /**
5
+ * Discriminated `execute` result union. Mobile execute routes return no payload beyond the success
6
+ * discriminant, so the success arm is the base success envelope; failures use the uniform failure envelope.
7
+ */
8
+ type MobileServerExecuteResult = MobileServerSuccessResponse | MobileServerFailureResponse;
9
+ //#endregion
10
+ export { MobileServerExecuteResult as t };
11
+ //# sourceMappingURL=serverExecuteTypes-CXnMjKnt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverExecuteTypes-CXnMjKnt.d.ts","names":[],"sources":["../src/types/src/types/serverExecuteTypes.ts"],"mappings":";;;;;AASA;;KAAY,yBAAA,GACR,2BAAA,GACA,2BAA2B"}
@@ -0,0 +1,11 @@
1
+ import { a as MobileServerSuccessResponse, t as MobileServerFailureResponse } from "./serverBaseTypes-BicXMrZV.cjs";
2
+
3
+ //#region src/types/serverExecuteTypes.d.ts
4
+ /**
5
+ * Discriminated `execute` result union. Mobile execute routes return no payload beyond the success
6
+ * discriminant, so the success arm is the base success envelope; failures use the uniform failure envelope.
7
+ */
8
+ type MobileServerExecuteResult = MobileServerSuccessResponse | MobileServerFailureResponse;
9
+ //#endregion
10
+ export { MobileServerExecuteResult as t };
11
+ //# sourceMappingURL=serverExecuteTypes-DKYK1V7C.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverExecuteTypes-DKYK1V7C.d.cts","names":[],"sources":["../src/types/src/types/serverExecuteTypes.ts"],"mappings":";;;;;AASA;;KAAY,yBAAA,GACR,2BAAA,GACA,2BAA2B"}
@@ -0,0 +1,69 @@
1
+ import { Hex } from "viem";
2
+
3
+ //#region src/types/serverModelTypes.d.ts
4
+ /**
5
+ * Platform of a device registered for push notifications.
6
+ */
7
+ type MobileNotificationPlatform = 'ios' | 'android';
8
+ /**
9
+ * Category of push notification.
10
+ */
11
+ type MobileNotificationCategory = 'order_fill' | 'order_update' | 'liquidation' | 'funding' | 'product_listing' | 'announcement';
12
+ /**
13
+ * Server-side public profile shape (snake_case).
14
+ */
15
+ interface MobileServerProfile {
16
+ subaccount: Hex;
17
+ username: string;
18
+ display_name: string;
19
+ }
20
+ /**
21
+ * Server-side identity shape (snake_case) returned by the signed `self_identity` query.
22
+ */
23
+ interface MobileServerIdentity {
24
+ subaccount: Hex;
25
+ username: string;
26
+ display_name: string;
27
+ private_mode: boolean;
28
+ }
29
+ /**
30
+ * Server-side scope limiting a notification category preference. Scopes are rejected by the backend for the
31
+ * MVP (`scopes` must be empty) but are part of the wire format.
32
+ */
33
+ type MobileServerNotificationPreferenceScope = {
34
+ type: 'subaccount';
35
+ subaccount: Hex;
36
+ } | {
37
+ type: 'product';
38
+ product_id: number;
39
+ };
40
+ /**
41
+ * Server-side per-category notification preference (snake_case).
42
+ */
43
+ interface MobileServerNotificationCategoryPreference {
44
+ category: MobileNotificationCategory;
45
+ enabled: boolean;
46
+ scopes: MobileServerNotificationPreferenceScope[];
47
+ }
48
+ /**
49
+ * Server-side notification preferences shape (snake_case), used in both the `update_preferences` execute and
50
+ * the `notification_preferences` query response.
51
+ */
52
+ interface MobileServerNotificationPreferences {
53
+ /** Only `1` is accepted by the backend for the MVP. */
54
+ schema_version: 1;
55
+ categories: MobileServerNotificationCategoryPreference[];
56
+ }
57
+ /**
58
+ * Server-side registered push device shape (snake_case).
59
+ */
60
+ interface MobileServerRegisteredDevice {
61
+ platform: MobileNotificationPlatform;
62
+ locale: string | null;
63
+ app_version: string | null;
64
+ token_fingerprint_prefix: string;
65
+ last_seen_at: number;
66
+ }
67
+ //#endregion
68
+ export { MobileServerNotificationPreferenceScope as a, MobileServerRegisteredDevice as c, MobileServerNotificationCategoryPreference as i, MobileNotificationPlatform as n, MobileServerNotificationPreferences as o, MobileServerIdentity as r, MobileServerProfile as s, MobileNotificationCategory as t };
69
+ //# sourceMappingURL=serverModelTypes-CQgfqgW3.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverModelTypes-CQgfqgW3.d.cts","names":[],"sources":["../src/types/src/types/serverModelTypes.ts"],"mappings":";;;;;AAKA;KAAY,0BAAA;;;AAA0B;KAK1B,0BAAA;;;;UAWK,mBAAA;EACf,UAAA,EAAY,GAAG;EACf,QAAA;EACA,YAAA;AAAA;;;;UAMe,oBAAA;EACf,UAAA,EAAY,GAAG;EACf,QAAA;EACA,YAAA;EACA,YAAA;AAAA;;;;;KAOU,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;AAHjD;;;;AAAA,UAUiB,mCAAA;EATL;EAWV,cAAA;EACA,UAAA,EAAY,0CAA0C;AAAA;;AAVP;AAOjD;UASiB,4BAAA;EACf,QAAA,EAAU,0BAA0B;EACpC,MAAA;EACA,WAAA;EACA,wBAAA;EACA,YAAA;AAAA"}
@@ -0,0 +1,69 @@
1
+ import { Hex } from "viem";
2
+
3
+ //#region src/types/serverModelTypes.d.ts
4
+ /**
5
+ * Platform of a device registered for push notifications.
6
+ */
7
+ type MobileNotificationPlatform = 'ios' | 'android';
8
+ /**
9
+ * Category of push notification.
10
+ */
11
+ type MobileNotificationCategory = 'order_fill' | 'order_update' | 'liquidation' | 'funding' | 'product_listing' | 'announcement';
12
+ /**
13
+ * Server-side public profile shape (snake_case).
14
+ */
15
+ interface MobileServerProfile {
16
+ subaccount: Hex;
17
+ username: string;
18
+ display_name: string;
19
+ }
20
+ /**
21
+ * Server-side identity shape (snake_case) returned by the signed `self_identity` query.
22
+ */
23
+ interface MobileServerIdentity {
24
+ subaccount: Hex;
25
+ username: string;
26
+ display_name: string;
27
+ private_mode: boolean;
28
+ }
29
+ /**
30
+ * Server-side scope limiting a notification category preference. Scopes are rejected by the backend for the
31
+ * MVP (`scopes` must be empty) but are part of the wire format.
32
+ */
33
+ type MobileServerNotificationPreferenceScope = {
34
+ type: 'subaccount';
35
+ subaccount: Hex;
36
+ } | {
37
+ type: 'product';
38
+ product_id: number;
39
+ };
40
+ /**
41
+ * Server-side per-category notification preference (snake_case).
42
+ */
43
+ interface MobileServerNotificationCategoryPreference {
44
+ category: MobileNotificationCategory;
45
+ enabled: boolean;
46
+ scopes: MobileServerNotificationPreferenceScope[];
47
+ }
48
+ /**
49
+ * Server-side notification preferences shape (snake_case), used in both the `update_preferences` execute and
50
+ * the `notification_preferences` query response.
51
+ */
52
+ interface MobileServerNotificationPreferences {
53
+ /** Only `1` is accepted by the backend for the MVP. */
54
+ schema_version: 1;
55
+ categories: MobileServerNotificationCategoryPreference[];
56
+ }
57
+ /**
58
+ * Server-side registered push device shape (snake_case).
59
+ */
60
+ interface MobileServerRegisteredDevice {
61
+ platform: MobileNotificationPlatform;
62
+ locale: string | null;
63
+ app_version: string | null;
64
+ token_fingerprint_prefix: string;
65
+ last_seen_at: number;
66
+ }
67
+ //#endregion
68
+ export { MobileServerNotificationPreferenceScope as a, MobileServerRegisteredDevice as c, MobileServerNotificationCategoryPreference as i, MobileNotificationPlatform as n, MobileServerNotificationPreferences as o, MobileServerIdentity as r, MobileServerProfile as s, MobileNotificationCategory as t };
69
+ //# sourceMappingURL=serverModelTypes-vEPhHIit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverModelTypes-vEPhHIit.d.ts","names":[],"sources":["../src/types/src/types/serverModelTypes.ts"],"mappings":";;;;;AAKA;KAAY,0BAAA;;;AAA0B;KAK1B,0BAAA;;;;UAWK,mBAAA;EACf,UAAA,EAAY,GAAG;EACf,QAAA;EACA,YAAA;AAAA;;;;UAMe,oBAAA;EACf,UAAA,EAAY,GAAG;EACf,QAAA;EACA,YAAA;EACA,YAAA;AAAA;;;;;KAOU,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;AAHjD;;;;AAAA,UAUiB,mCAAA;EATL;EAWV,cAAA;EACA,UAAA,EAAY,0CAA0C;AAAA;;AAVP;AAOjD;UASiB,4BAAA;EACf,QAAA,EAAU,0BAA0B;EACpC,MAAA;EACA,WAAA;EACA,wBAAA;EACA,YAAA;AAAA"}
@@ -0,0 +1,53 @@
1
+ import { c as MobileServerRegisteredDevice, o as MobileServerNotificationPreferences, r as MobileServerIdentity, s as MobileServerProfile } from "./serverModelTypes-vEPhHIit.js";
2
+ import { a as MobileServerSuccessResponse, n as MobileServerPublicQueryParamsByType, r as MobileServerPublicQueryType } from "./serverBaseTypes-ewbo8l4R.js";
3
+
4
+ //#region src/types/serverQueryTypes.d.ts
5
+ /**
6
+ * Unsigned `public_query` request body: a `type` discriminant flattened with its params.
7
+ */
8
+ type MobileServerPublicQueryRequest<T extends MobileServerPublicQueryType = MobileServerPublicQueryType> = { [K in MobileServerPublicQueryType]: {
9
+ type: K;
10
+ } & MobileServerPublicQueryParamsByType[K] }[T];
11
+ /**
12
+ * Request body for the `username_availability` public query.
13
+ */
14
+ type MobileServerUsernameAvailabilityRequest = MobileServerPublicQueryRequest<'username_availability'>;
15
+ /**
16
+ * Request body for the `profile` public query.
17
+ */
18
+ type MobileServerProfileRequest = MobileServerPublicQueryRequest<'profile'>;
19
+ /**
20
+ * Successful response for the `username_availability` public query.
21
+ */
22
+ type MobileServerUsernameAvailabilityResponse = MobileServerSuccessResponse<{
23
+ username: string;
24
+ available: boolean;
25
+ }>;
26
+ /**
27
+ * Successful response for the `profile` public query.
28
+ */
29
+ type MobileServerProfileResponse = MobileServerSuccessResponse<{
30
+ profile: MobileServerProfile;
31
+ }>;
32
+ /**
33
+ * Successful response for the signed `self_identity` query. A `null` identity means the subaccount has not
34
+ * claimed a username yet — this is normal data, not an error.
35
+ */
36
+ type MobileServerSelfIdentityResponse = MobileServerSuccessResponse<{
37
+ identity: MobileServerIdentity | null;
38
+ }>;
39
+ /**
40
+ * Successful response for the signed `notification_preferences` query.
41
+ */
42
+ type MobileServerNotificationPreferencesResponse = MobileServerSuccessResponse<{
43
+ preferences: MobileServerNotificationPreferences;
44
+ }>;
45
+ /**
46
+ * Successful response for the signed `registered_devices` query.
47
+ */
48
+ type MobileServerRegisteredDevicesResponse = MobileServerSuccessResponse<{
49
+ devices: MobileServerRegisteredDevice[];
50
+ }>;
51
+ //#endregion
52
+ export { MobileServerRegisteredDevicesResponse as a, MobileServerUsernameAvailabilityResponse as c, MobileServerPublicQueryRequest as i, MobileServerProfileRequest as n, MobileServerSelfIdentityResponse as o, MobileServerProfileResponse as r, MobileServerUsernameAvailabilityRequest as s, MobileServerNotificationPreferencesResponse as t };
53
+ //# sourceMappingURL=serverQueryTypes-BI-2TD8F.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverQueryTypes-BI-2TD8F.d.ts","names":[],"sources":["../src/types/src/types/serverQueryTypes.ts"],"mappings":";;;;;;AAeA;KAAY,8BAAA,WACA,2BAAA,GAA8B,2BAAA,YAElC,2BAAA;EACJ,IAAA,EAAM,CAAA;AAAA,IACJ,mCAAA,CAAoC,CAAA,IACxC,CAAA;;;;KAKU,uCAAA,GACV,8BAA8B;;;;KAKpB,0BAAA,GACV,8BAA8B;;;;KAKpB,wCAAA,GACV,2BAA2B;EACzB,QAAA;EACA,SAAA;AAAA;;;AApBD;KA0BS,2BAAA,GAA8B,2BAA2B;EACnE,OAAA,EAAS,mBAAA;AAAA;;AArBqB;AAKhC;;KAuBY,gCAAA,GAAmC,2BAA2B;EACxE,QAAA,EAAU,oBAAA;AAAA;AAlBZ;;;AAAA,KAwBY,2CAAA,GACV,2BAA2B;EACzB,WAAA,EAAa,mCAAA;AAAA;;;AAvBJ;KA6BD,qCAAA,GACV,2BAA2B;EACzB,OAAA,EAAS,4BAAA;AAAA"}
@@ -0,0 +1,53 @@
1
+ import { c as MobileServerRegisteredDevice, o as MobileServerNotificationPreferences, r as MobileServerIdentity, s as MobileServerProfile } from "./serverModelTypes-CQgfqgW3.cjs";
2
+ import { a as MobileServerSuccessResponse, n as MobileServerPublicQueryParamsByType, r as MobileServerPublicQueryType } from "./serverBaseTypes-BicXMrZV.cjs";
3
+
4
+ //#region src/types/serverQueryTypes.d.ts
5
+ /**
6
+ * Unsigned `public_query` request body: a `type` discriminant flattened with its params.
7
+ */
8
+ type MobileServerPublicQueryRequest<T extends MobileServerPublicQueryType = MobileServerPublicQueryType> = { [K in MobileServerPublicQueryType]: {
9
+ type: K;
10
+ } & MobileServerPublicQueryParamsByType[K] }[T];
11
+ /**
12
+ * Request body for the `username_availability` public query.
13
+ */
14
+ type MobileServerUsernameAvailabilityRequest = MobileServerPublicQueryRequest<'username_availability'>;
15
+ /**
16
+ * Request body for the `profile` public query.
17
+ */
18
+ type MobileServerProfileRequest = MobileServerPublicQueryRequest<'profile'>;
19
+ /**
20
+ * Successful response for the `username_availability` public query.
21
+ */
22
+ type MobileServerUsernameAvailabilityResponse = MobileServerSuccessResponse<{
23
+ username: string;
24
+ available: boolean;
25
+ }>;
26
+ /**
27
+ * Successful response for the `profile` public query.
28
+ */
29
+ type MobileServerProfileResponse = MobileServerSuccessResponse<{
30
+ profile: MobileServerProfile;
31
+ }>;
32
+ /**
33
+ * Successful response for the signed `self_identity` query. A `null` identity means the subaccount has not
34
+ * claimed a username yet — this is normal data, not an error.
35
+ */
36
+ type MobileServerSelfIdentityResponse = MobileServerSuccessResponse<{
37
+ identity: MobileServerIdentity | null;
38
+ }>;
39
+ /**
40
+ * Successful response for the signed `notification_preferences` query.
41
+ */
42
+ type MobileServerNotificationPreferencesResponse = MobileServerSuccessResponse<{
43
+ preferences: MobileServerNotificationPreferences;
44
+ }>;
45
+ /**
46
+ * Successful response for the signed `registered_devices` query.
47
+ */
48
+ type MobileServerRegisteredDevicesResponse = MobileServerSuccessResponse<{
49
+ devices: MobileServerRegisteredDevice[];
50
+ }>;
51
+ //#endregion
52
+ export { MobileServerRegisteredDevicesResponse as a, MobileServerUsernameAvailabilityResponse as c, MobileServerPublicQueryRequest as i, MobileServerProfileRequest as n, MobileServerSelfIdentityResponse as o, MobileServerProfileResponse as r, MobileServerUsernameAvailabilityRequest as s, MobileServerNotificationPreferencesResponse as t };
53
+ //# sourceMappingURL=serverQueryTypes-D7Yharse.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverQueryTypes-D7Yharse.d.cts","names":[],"sources":["../src/types/src/types/serverQueryTypes.ts"],"mappings":";;;;;;AAeA;KAAY,8BAAA,WACA,2BAAA,GAA8B,2BAAA,YAElC,2BAAA;EACJ,IAAA,EAAM,CAAA;AAAA,IACJ,mCAAA,CAAoC,CAAA,IACxC,CAAA;;;;KAKU,uCAAA,GACV,8BAA8B;;;;KAKpB,0BAAA,GACV,8BAA8B;;;;KAKpB,wCAAA,GACV,2BAA2B;EACzB,QAAA;EACA,SAAA;AAAA;;;AApBD;KA0BS,2BAAA,GAA8B,2BAA2B;EACnE,OAAA,EAAS,mBAAA;AAAA;;AArBqB;AAKhC;;KAuBY,gCAAA,GAAmC,2BAA2B;EACxE,QAAA,EAAU,oBAAA;AAAA;AAlBZ;;;AAAA,KAwBY,2CAAA,GACV,2BAA2B;EACzB,WAAA,EAAa,mCAAA;AAAA;;;AAvBJ;KA6BD,qCAAA,GACV,2BAA2B;EACzB,OAAA,EAAS,4BAAA;AAAA"}
@@ -0,0 +1,16 @@
1
+ import { t as MobileServerFailureResponse } from "./serverBaseTypes-ewbo8l4R.js";
2
+
3
+ //#region src/utils/serverResponseGuards.d.ts
4
+ /**
5
+ * Narrows an unknown response body to the mobile service API failure envelope.
6
+ */
7
+ declare function isMobileServerFailureResponse(data: unknown): data is MobileServerFailureResponse;
8
+ /**
9
+ * Narrows an unknown response body to a successful mobile service API envelope.
10
+ */
11
+ declare function isMobileServerSuccessResponse<T extends {
12
+ status: 'success';
13
+ }>(data: unknown): data is T;
14
+ //#endregion
15
+ export { isMobileServerSuccessResponse as n, isMobileServerFailureResponse as t };
16
+ //# sourceMappingURL=serverResponseGuards-C_vZIgGl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverResponseGuards-C_vZIgGl.d.ts","names":[],"sources":["../src/utils/src/utils/serverResponseGuards.ts"],"mappings":";;;;;AAKA;iBAAgB,6BAAA,CACd,IAAA,YACC,IAAA,IAAQ,2BAA2B;;;;iBAWtB,6BAAA;EAA0C,MAAA;AAAA,EAAA,CACxD,IAAA,YACC,IAAA,IAAQ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { t as MobileServerFailureResponse } from "./serverBaseTypes-BicXMrZV.cjs";
2
+
3
+ //#region src/utils/serverResponseGuards.d.ts
4
+ /**
5
+ * Narrows an unknown response body to the mobile service API failure envelope.
6
+ */
7
+ declare function isMobileServerFailureResponse(data: unknown): data is MobileServerFailureResponse;
8
+ /**
9
+ * Narrows an unknown response body to a successful mobile service API envelope.
10
+ */
11
+ declare function isMobileServerSuccessResponse<T extends {
12
+ status: 'success';
13
+ }>(data: unknown): data is T;
14
+ //#endregion
15
+ export { isMobileServerSuccessResponse as n, isMobileServerFailureResponse as t };
16
+ //# sourceMappingURL=serverResponseGuards-DjCNL3CR.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverResponseGuards-DjCNL3CR.d.cts","names":[],"sources":["../src/utils/src/utils/serverResponseGuards.ts"],"mappings":";;;;;AAKA;iBAAgB,6BAAA,CACd,IAAA,YACC,IAAA,IAAQ,2BAA2B;;;;iBAWtB,6BAAA;EAA0C,MAAA;AAAA,EAAA,CACxD,IAAA,YACC,IAAA,IAAQ,CAAC"}