@polyester/sdk 0.35.0 → 0.36.0-devnet-20261112202000

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 (281) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/browser-core.js +1 -1
  3. package/dist/catalogs/snapshot-validation.js +5 -0
  4. package/dist/catalogs/snapshot-validation.js.map +1 -1
  5. package/dist/client.d.ts +2 -0
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +2 -0
  8. package/dist/client.js.map +1 -1
  9. package/dist/gen/ai/v1/assistant_pb.d.ts +145 -3
  10. package/dist/gen/ai/v1/assistant_pb.d.ts.map +1 -1
  11. package/dist/gen/ai/v1/assistant_pb.js +33 -3
  12. package/dist/gen/ai/v1/assistant_pb.js.map +1 -1
  13. package/dist/gen/alerts/v1/price_alerts_pb.d.ts +12 -6
  14. package/dist/gen/alerts/v1/price_alerts_pb.d.ts.map +1 -1
  15. package/dist/gen/alerts/v1/price_alerts_pb.js +3 -1
  16. package/dist/gen/alerts/v1/price_alerts_pb.js.map +1 -1
  17. package/dist/gen/auth/v1/address_book_pb.d.ts +1 -1
  18. package/dist/gen/auth/v1/api_keys_pb.d.ts +1 -1
  19. package/dist/gen/auth/v1/auth_pb.d.ts +1 -1
  20. package/dist/gen/auth/v1/mfa_pb.d.ts +1 -1
  21. package/dist/gen/auth/v1/policies_pb.d.ts +15 -2
  22. package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
  23. package/dist/gen/auth/v1/policies_pb.js +14 -1
  24. package/dist/gen/auth/v1/policies_pb.js.map +1 -1
  25. package/dist/gen/auth/v1/profile_pb.d.ts +1 -1
  26. package/dist/gen/auth/v1/resolve_pb.d.ts +1 -1
  27. package/dist/gen/auth/v1/social_verification_pb.d.ts +1 -1
  28. package/dist/gen/auth/v1/subaccounts_pb.d.ts +15 -2
  29. package/dist/gen/auth/v1/subaccounts_pb.d.ts.map +1 -1
  30. package/dist/gen/auth/v1/subaccounts_pb.js +15 -2
  31. package/dist/gen/auth/v1/subaccounts_pb.js.map +1 -1
  32. package/dist/gen/chain/analytics/v1/analytics_read_pb.d.ts +1 -1
  33. package/dist/gen/chain/deposit/v1/deposit_pb.d.ts +1 -1
  34. package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts +1 -1
  35. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +1 -1
  36. package/dist/gen/chain/lifecycle/v1/types_pb.d.ts +1 -1
  37. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts +1 -1
  38. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +1 -1
  39. package/dist/gen/chain/zipper/v1/reason_pb.d.ts +1 -1
  40. package/dist/gen/chain/zipper/v1/zipper_pb.d.ts +1 -1
  41. package/dist/gen/changelog/v1/changelog_pb.d.ts +8 -2
  42. package/dist/gen/changelog/v1/changelog_pb.d.ts.map +1 -1
  43. package/dist/gen/changelog/v1/changelog_pb.js +7 -1
  44. package/dist/gen/changelog/v1/changelog_pb.js.map +1 -1
  45. package/dist/gen/checkpoints/v1/checkpoints_pb.d.ts +1 -1
  46. package/dist/gen/claims/v1/claims_pb.d.ts +1 -1
  47. package/dist/gen/fees/v1/fees_pb.d.ts +1 -1
  48. package/dist/gen/index.d.ts +2 -1
  49. package/dist/gen/index.js +22 -21
  50. package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +1 -1
  51. package/dist/gen/marketdata/v1/heatmap_pb.d.ts +1 -1
  52. package/dist/gen/marketdata/v1/marketdata_pb.d.ts +58 -6
  53. package/dist/gen/marketdata/v1/marketdata_pb.d.ts.map +1 -1
  54. package/dist/gen/marketdata/v1/marketdata_pb.js +10 -4
  55. package/dist/gen/marketdata/v1/marketdata_pb.js.map +1 -1
  56. package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts +1 -1
  57. package/dist/gen/notifications/v1/notifications_pb.d.ts +827 -0
  58. package/dist/gen/notifications/v1/notifications_pb.d.ts.map +1 -0
  59. package/dist/gen/notifications/v1/notifications_pb.js +346 -0
  60. package/dist/gen/notifications/v1/notifications_pb.js.map +1 -0
  61. package/dist/gen/orderbook/v1/orderbook_pb.d.ts +1 -1
  62. package/dist/gen/orders/v1/orders_pb.d.ts +248 -20
  63. package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
  64. package/dist/gen/orders/v1/orders_pb.js +188 -66
  65. package/dist/gen/orders/v1/orders_pb.js.map +1 -1
  66. package/dist/gen/orders/v1/orders_read_pb.d.ts +74 -6
  67. package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
  68. package/dist/gen/orders/v1/orders_read_pb.js +40 -5
  69. package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
  70. package/dist/gen/polyester/ratelimit/v1/types_pb.d.ts +1 -1
  71. package/dist/gen/polyester/type/v1/u128_pb.d.ts +1 -1
  72. package/dist/gen/privatews/v1/private_ws_pb.d.ts +1 -1
  73. package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts +1 -1
  74. package/dist/gen/rewards/v1/rewards_pb.d.ts +1 -1
  75. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +1195 -190
  76. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts.map +1 -1
  77. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js +317 -7
  78. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js.map +1 -1
  79. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +370 -7
  80. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts.map +1 -1
  81. package/dist/gen/swap/quickswap/v1/quickswap_pb.js +237 -14
  82. package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -1
  83. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts +1 -1
  84. package/dist/gen/swap/v1/swap_pb.d.ts +1 -1
  85. package/dist/gen/system/v1/system_pb.d.ts +1 -1
  86. package/dist/gen/tradews/v1/trade_ws_pb.d.ts +40 -2
  87. package/dist/gen/tradews/v1/trade_ws_pb.d.ts.map +1 -1
  88. package/dist/gen/tradews/v1/trade_ws_pb.js +2 -1
  89. package/dist/gen/tradews/v1/trade_ws_pb.js.map +1 -1
  90. package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +1 -1
  91. package/dist/gen/triggers/v1/triggers_pb.d.ts +527 -14
  92. package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
  93. package/dist/gen/triggers/v1/triggers_pb.js +126 -26
  94. package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
  95. package/dist/gen/vip/v1/vip_pb.d.ts +1 -1
  96. package/dist/index.d.ts +7 -4
  97. package/dist/index.js +1 -1
  98. package/dist/realtime/snapshot-then-stream.js +1 -1
  99. package/dist/server-core.js +3 -3
  100. package/dist/services/accounts/accounts.js +1 -1
  101. package/dist/services/accounts/accounts.schemas.js +1 -1
  102. package/dist/services/address-book/address-book.js +1 -1
  103. package/dist/services/api-keys/api-keys.js +1 -1
  104. package/dist/services/api-keys/api-keys.schemas.js +1 -1
  105. package/dist/services/assistant/assistant-events.schemas.d.ts +63 -45
  106. package/dist/services/assistant/assistant-events.schemas.d.ts.map +1 -1
  107. package/dist/services/assistant/assistant.codecs.d.ts +1 -1
  108. package/dist/services/assistant/assistant.codecs.js +1 -1
  109. package/dist/services/assistant/assistant.codecs.js.map +1 -1
  110. package/dist/services/assistant/assistant.d.ts +18 -3
  111. package/dist/services/assistant/assistant.d.ts.map +1 -1
  112. package/dist/services/assistant/assistant.js +27 -4
  113. package/dist/services/assistant/assistant.js.map +1 -1
  114. package/dist/services/assistant/assistant.schemas.d.ts +14 -2
  115. package/dist/services/assistant/assistant.schemas.d.ts.map +1 -1
  116. package/dist/services/assistant/assistant.schemas.js +16 -2
  117. package/dist/services/assistant/assistant.schemas.js.map +1 -1
  118. package/dist/services/assistant/assistant.types.d.ts +2 -2
  119. package/dist/services/auth/account-signer-auth.js +2 -2
  120. package/dist/services/auth/auth.js +1 -1
  121. package/dist/services/auth/profile/profile.js +2 -2
  122. package/dist/services/auto-withdraw/auto-withdraw.js +1 -1
  123. package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +22 -22
  124. package/dist/services/auto-withdraw/auto-withdraw.schemas.js +1 -1
  125. package/dist/services/balances/balances.js +1 -1
  126. package/dist/services/candles/candles.js +2 -2
  127. package/dist/services/chain-analytics/chain-analytics.js +1 -1
  128. package/dist/services/changelog/changelog.codecs.d.ts +1 -1
  129. package/dist/services/changelog/changelog.codecs.d.ts.map +1 -1
  130. package/dist/services/changelog/changelog.codecs.js +6 -3
  131. package/dist/services/changelog/changelog.codecs.js.map +1 -1
  132. package/dist/services/changelog/changelog.js +1 -1
  133. package/dist/services/changelog/changelog.schemas.d.ts +19 -19
  134. package/dist/services/checkpoints/checkpoints.js +1 -1
  135. package/dist/services/checkpoints/checkpoints.schemas.d.ts +1 -1
  136. package/dist/services/claims/claims.js +1 -1
  137. package/dist/services/claims/claims.schemas.js +1 -1
  138. package/dist/services/deposit/deposit.js +1 -1
  139. package/dist/services/fees/fees.js +1 -1
  140. package/dist/services/guard-signer/guard-signer.js +1 -1
  141. package/dist/services/guard-signer/guard-signer.schemas.js +1 -1
  142. package/dist/services/heatmap/heatmap.js +2 -2
  143. package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
  144. package/dist/services/internal-transfers/internal-transfers.js +1 -1
  145. package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +3 -3
  146. package/dist/services/lifecycle/lifecycle.js +3 -3
  147. package/dist/services/lifecycle/lifecycle.schemas.d.ts +15 -15
  148. package/dist/services/lifecycle/lifecycle.schemas.js +2 -2
  149. package/dist/services/market-data/market-data.js +2 -2
  150. package/dist/services/market-data/market-data.schemas.js +16 -1
  151. package/dist/services/market-data/market-data.schemas.js.map +1 -1
  152. package/dist/services/market-overview/market-overview.js +2 -2
  153. package/dist/services/market-overview/market-overview.schemas.js +1 -1
  154. package/dist/services/notifications/notifications.codecs.d.ts +16 -0
  155. package/dist/services/notifications/notifications.codecs.d.ts.map +1 -0
  156. package/dist/services/notifications/notifications.codecs.js +40 -0
  157. package/dist/services/notifications/notifications.codecs.js.map +1 -0
  158. package/dist/services/notifications/notifications.d.ts +41 -0
  159. package/dist/services/notifications/notifications.d.ts.map +1 -0
  160. package/dist/services/notifications/notifications.js +67 -0
  161. package/dist/services/notifications/notifications.js.map +1 -0
  162. package/dist/services/notifications/notifications.schemas.d.ts +162 -0
  163. package/dist/services/notifications/notifications.schemas.d.ts.map +1 -0
  164. package/dist/services/notifications/notifications.schemas.js +116 -0
  165. package/dist/services/notifications/notifications.schemas.js.map +1 -0
  166. package/dist/services/notifications/notifications.types.d.ts +3 -0
  167. package/dist/services/notifications/service.d.ts +8 -0
  168. package/dist/services/notifications/service.d.ts.map +1 -0
  169. package/dist/services/notifications/service.js +9 -0
  170. package/dist/services/notifications/service.js.map +1 -0
  171. package/dist/services/orderbook/orderbook.js +1 -1
  172. package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
  173. package/dist/services/orders/order-enums.codecs.js +12 -4
  174. package/dist/services/orders/order-enums.codecs.js.map +1 -1
  175. package/dist/services/orders/order-errors.schemas.d.ts +1 -1
  176. package/dist/services/orders/order-errors.schemas.js +1 -1
  177. package/dist/services/orders/orders-batch.schemas.d.ts +2688 -417
  178. package/dist/services/orders/orders-batch.schemas.d.ts.map +1 -1
  179. package/dist/services/orders/orders-batch.schemas.js +7 -5
  180. package/dist/services/orders/orders-batch.schemas.js.map +1 -1
  181. package/dist/services/orders/orders-input.schemas.d.ts +4827 -1264
  182. package/dist/services/orders/orders-input.schemas.d.ts.map +1 -1
  183. package/dist/services/orders/orders-input.schemas.js +105 -33
  184. package/dist/services/orders/orders-input.schemas.js.map +1 -1
  185. package/dist/services/orders/orders-modify.schemas.js +2 -2
  186. package/dist/services/orders/orders-output.schemas.d.ts +44 -26
  187. package/dist/services/orders/orders-output.schemas.d.ts.map +1 -1
  188. package/dist/services/orders/orders-output.schemas.js +9 -1
  189. package/dist/services/orders/orders-output.schemas.js.map +1 -1
  190. package/dist/services/orders/orders-risk.schemas.d.ts +1 -1
  191. package/dist/services/orders/orders-risk.schemas.d.ts.map +1 -1
  192. package/dist/services/orders/orders-risk.schemas.js +4 -4
  193. package/dist/services/orders/orders-risk.schemas.js.map +1 -1
  194. package/dist/services/orders/orders.codecs.js +3 -0
  195. package/dist/services/orders/orders.codecs.js.map +1 -1
  196. package/dist/services/orders/orders.d.ts +3 -1
  197. package/dist/services/orders/orders.d.ts.map +1 -1
  198. package/dist/services/orders/orders.js +7 -14
  199. package/dist/services/orders/orders.js.map +1 -1
  200. package/dist/services/policies/api-key-policies/api-key-policies.js +1 -1
  201. package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +15 -15
  202. package/dist/services/policies/shared.codecs.js +10 -4
  203. package/dist/services/policies/shared.codecs.js.map +1 -1
  204. package/dist/services/policies/shared.d.ts +1 -1
  205. package/dist/services/policies/subaccount-policies/subaccount-policies.js +2 -2
  206. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +3 -3
  207. package/dist/services/price-alerts/price-alerts.codecs.d.ts +1 -1
  208. package/dist/services/price-alerts/price-alerts.codecs.js +3 -3
  209. package/dist/services/price-alerts/price-alerts.codecs.js.map +1 -1
  210. package/dist/services/price-alerts/price-alerts.d.ts +11 -6
  211. package/dist/services/price-alerts/price-alerts.d.ts.map +1 -1
  212. package/dist/services/price-alerts/price-alerts.js +12 -7
  213. package/dist/services/price-alerts/price-alerts.js.map +1 -1
  214. package/dist/services/price-alerts/price-alerts.schemas.d.ts +11 -11
  215. package/dist/services/rate-limits/rate-limits.js +1 -1
  216. package/dist/services/rewards/rewards.js +1 -1
  217. package/dist/services/rewards/rewards.schemas.d.ts +4 -4
  218. package/dist/services/social-verification/social-verification.js +1 -1
  219. package/dist/services/social-verification/social-verification.schemas.js +1 -1
  220. package/dist/services/subaccounts/subaccounts.codecs.js +3 -1
  221. package/dist/services/subaccounts/subaccounts.codecs.js.map +1 -1
  222. package/dist/services/subaccounts/subaccounts.js +3 -3
  223. package/dist/services/subaccounts/subaccounts.schemas.d.ts +7 -7
  224. package/dist/services/system/system.js +1 -1
  225. package/dist/services/trades/trades.js +2 -2
  226. package/dist/services/trades/trades.schemas.d.ts +1 -1
  227. package/dist/services/trading-withdraws/trading-withdraws.js +1 -1
  228. package/dist/services/trading-withdraws/trading-withdraws.schemas.js +1 -1
  229. package/dist/services/trading-withdraws/wallet-message.js +1 -1
  230. package/dist/services/transfers/transfers.js +2 -2
  231. package/dist/services/triggers/trigger-child-order.schemas.js +3 -3
  232. package/dist/services/triggers/trigger-input.schemas.d.ts +272 -42
  233. package/dist/services/triggers/trigger-input.schemas.d.ts.map +1 -1
  234. package/dist/services/triggers/trigger-input.schemas.js +53 -5
  235. package/dist/services/triggers/trigger-input.schemas.js.map +1 -1
  236. package/dist/services/triggers/triggers-output.schemas.d.ts +240 -29
  237. package/dist/services/triggers/triggers-output.schemas.d.ts.map +1 -1
  238. package/dist/services/triggers/triggers-output.schemas.js +49 -2
  239. package/dist/services/triggers/triggers-output.schemas.js.map +1 -1
  240. package/dist/services/triggers/triggers.codecs.js +7 -2
  241. package/dist/services/triggers/triggers.codecs.js.map +1 -1
  242. package/dist/services/triggers/triggers.d.ts +25 -3
  243. package/dist/services/triggers/triggers.d.ts.map +1 -1
  244. package/dist/services/triggers/triggers.js +51 -5
  245. package/dist/services/triggers/triggers.js.map +1 -1
  246. package/dist/services/triggers/triggers.schemas.d.ts +3 -3
  247. package/dist/services/triggers/triggers.types.d.ts +3 -3
  248. package/dist/services/vip/vip.js +1 -1
  249. package/dist/services/vip/vip.schemas.js +1 -1
  250. package/dist/services/zipper/zipper.js +1 -1
  251. package/dist/services/zipper/zipper.schemas.js +1 -1
  252. package/dist/shared/catalog-config.d.ts +6 -0
  253. package/dist/shared/catalog-config.d.ts.map +1 -1
  254. package/dist/shared/catalog-config.js.map +1 -1
  255. package/dist/shared/error-detail.d.ts +6 -2
  256. package/dist/shared/error-detail.d.ts.map +1 -1
  257. package/dist/shared/error-detail.js +1 -0
  258. package/dist/shared/error-detail.js.map +1 -1
  259. package/dist/shared/error-details/alerts.js +1 -1
  260. package/dist/shared/error-details/assistant.js +1 -1
  261. package/dist/shared/error-details/auth.js +1 -1
  262. package/dist/shared/error-details/claims.js +1 -1
  263. package/dist/shared/error-details/internal-transfer.js +1 -1
  264. package/dist/shared/error-details/ledger.js +1 -1
  265. package/dist/shared/error-details/market-overview.js +1 -1
  266. package/dist/shared/error-details/notifications.js +15 -0
  267. package/dist/shared/error-details/notifications.js.map +1 -0
  268. package/dist/shared/error-details/orders.js +1 -1
  269. package/dist/shared/error-details/profile.js +1 -1
  270. package/dist/shared/error-details/rate-limit.js +1 -1
  271. package/dist/shared/error-details/withdraw.js +1 -1
  272. package/dist/shared/rate-limit.schemas.js +1 -1
  273. package/dist/shared/request-id.d.ts +6 -0
  274. package/dist/shared/request-id.d.ts.map +1 -0
  275. package/dist/shared/request-id.js +17 -0
  276. package/dist/shared/request-id.js.map +1 -0
  277. package/dist/utils/cookies.js +1 -1
  278. package/dist/wired-services.d.ts.map +1 -1
  279. package/dist/wired-services.js +19 -17
  280. package/dist/wired-services.js.map +1 -1
  281. package/package.json +1 -1
@@ -0,0 +1,162 @@
1
+ import { GetNotificationCountsResponse, Notification, NotificationCategory, ReadState } from "../../gen/notifications/v1/notifications_pb.js";
2
+ import * as v from "valibot";
3
+ //#region src/services/notifications/notifications.schemas.d.ts
4
+ declare const ListNotificationsInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
5
+ readonly categories: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["alerts", "security"], undefined>, undefined>, v.TransformAction<("alerts" | "security")[], (NotificationCategory.ALERTS | NotificationCategory.SECURITY)[]>]>, undefined>;
6
+ /** Only read or only unread notifications; omit for both. */
7
+ readonly readState: v.OptionalSchema<v.PicklistSchema<readonly ["unread", "read"], undefined>, undefined>;
8
+ /** Epoch ms, inclusive. */
9
+ readonly startTime: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
10
+ /** Epoch ms, exclusive; after `startTime` when both are set. */
11
+ readonly endTime: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
12
+ /** Page size: default 25, at most 100. */
13
+ readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 100, undefined>]>, undefined>;
14
+ /** Previous `nextPageToken`; reuse only with the same filters. */
15
+ readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>;
16
+ }, undefined>, v.CheckAction<{
17
+ categories?: (NotificationCategory.ALERTS | NotificationCategory.SECURITY)[] | undefined;
18
+ readState?: "unread" | "read" | undefined;
19
+ startTime?: number | undefined;
20
+ endTime?: number | undefined;
21
+ limit?: number | undefined;
22
+ pageToken?: string | undefined;
23
+ }, "endTime: must be after startTime">, v.TransformAction<{
24
+ categories?: (NotificationCategory.ALERTS | NotificationCategory.SECURITY)[] | undefined;
25
+ readState?: "unread" | "read" | undefined;
26
+ startTime?: number | undefined;
27
+ endTime?: number | undefined;
28
+ limit?: number | undefined;
29
+ pageToken?: string | undefined;
30
+ }, {
31
+ readState: ReadState.UNREAD | ReadState.READ | undefined;
32
+ startTime: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
33
+ endTime: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
34
+ categories?: (NotificationCategory.ALERTS | NotificationCategory.SECURITY)[] | undefined;
35
+ limit?: number | undefined;
36
+ pageToken?: string | undefined;
37
+ }>]>;
38
+ type ListNotificationsInput = v.InferInput<typeof ListNotificationsInputSchema>;
39
+ declare const GetNotificationInputSchema: v.StrictObjectSchema<{
40
+ readonly notificationId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>;
41
+ }, undefined>;
42
+ type GetNotificationInput = v.InferInput<typeof GetNotificationInputSchema>;
43
+ declare const MarkNotificationsInputSchema: v.StrictObjectSchema<{
44
+ /** One to 100 distinct notification IDs. */
45
+ readonly notificationIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>, undefined>, v.MinLengthAction<bigint[], 1, "At least one notification ID is required.">, v.MaxLengthAction<bigint[], 100, "At most 100 notification IDs are allowed.">, v.CheckAction<bigint[], "Notification IDs must be distinct.">]>;
46
+ }, undefined>;
47
+ type MarkNotificationsInput = v.InferInput<typeof MarkNotificationsInputSchema>;
48
+ declare const MarkAllNotificationsReadInputSchema: v.StrictObjectSchema<{
49
+ readonly categories: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["alerts", "security"], undefined>, undefined>, v.TransformAction<("alerts" | "security")[], (NotificationCategory.ALERTS | NotificationCategory.SECURITY)[]>]>, undefined>;
50
+ /**
51
+ * Mark only this notification and older ones. Pass the newest one shown, so one that arrives
52
+ * later stays unread; omit to mark every notification that exists when the call runs.
53
+ */
54
+ readonly throughNotificationId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>;
55
+ }, undefined>;
56
+ type MarkAllNotificationsReadInput = v.InferInput<typeof MarkAllNotificationsReadInputSchema>;
57
+ declare function formatNotification(notification: Notification): {
58
+ notificationId: string;
59
+ type: "unspecified" | "price_alert" | "telegram_approval";
60
+ category: "unspecified" | "alerts" | "security";
61
+ /** Plain-text title, the same for every notification of a type. */
62
+ title: string;
63
+ /** Plain-text summary; may span several lines. */
64
+ text: string;
65
+ createdAt: number | null;
66
+ /** Null while unread. */
67
+ readAt: number | null;
68
+ detail: {
69
+ type: "price_alert";
70
+ /** The alert's ID in `client.priceAlerts`. */
71
+ alertId: string;
72
+ symbolId: number;
73
+ direction: "unspecified" | "above" | "below";
74
+ priceSource: "unspecified" | "last_price" | "index_price";
75
+ /** Alert price, as a decimal string. */
76
+ price: string;
77
+ /** Price that fired the alert, as a decimal string. */
78
+ triggeredPrice: string;
79
+ triggeredAt: number | null;
80
+ /** The approval's ID in `client.assistant`. */
81
+ approvalId?: undefined;
82
+ action?: undefined;
83
+ /** Trading account (subaccount) the action acted on. */
84
+ accountId?: undefined;
85
+ summary?: undefined;
86
+ /** Key parameters in display order, such as market, side and quantity. */
87
+ parameters?: undefined;
88
+ approvedAt?: undefined;
89
+ } | {
90
+ type: "telegram_approval";
91
+ /** The approval's ID in `client.assistant`. */
92
+ approvalId: string;
93
+ action: "unspecified" | "place_order" | "place_orders" | "modify_orders" | "cancel_order" | "cancel_all_orders" | "modify_trigger" | "pause_trigger" | "resume_trigger" | "swap";
94
+ /** Trading account (subaccount) the action acted on. */
95
+ accountId: string;
96
+ summary: string;
97
+ /** Key parameters in display order, such as market, side and quantity. */
98
+ parameters: {
99
+ label: string;
100
+ value: string;
101
+ }[];
102
+ approvedAt: number | null;
103
+ /** The alert's ID in `client.priceAlerts`. */
104
+ alertId?: undefined;
105
+ symbolId?: undefined;
106
+ direction?: undefined;
107
+ priceSource?: undefined;
108
+ /** Alert price, as a decimal string. */
109
+ price?: undefined;
110
+ /** Price that fired the alert, as a decimal string. */
111
+ triggeredPrice?: undefined;
112
+ triggeredAt?: undefined;
113
+ } | {
114
+ type: "unspecified";
115
+ /** The alert's ID in `client.priceAlerts`. */
116
+ alertId?: undefined;
117
+ symbolId?: undefined;
118
+ direction?: undefined;
119
+ priceSource?: undefined;
120
+ /** Alert price, as a decimal string. */
121
+ price?: undefined;
122
+ /** Price that fired the alert, as a decimal string. */
123
+ triggeredPrice?: undefined;
124
+ triggeredAt?: undefined;
125
+ /** The approval's ID in `client.assistant`. */
126
+ approvalId?: undefined;
127
+ action?: undefined;
128
+ /** Trading account (subaccount) the action acted on. */
129
+ accountId?: undefined;
130
+ summary?: undefined;
131
+ /** Key parameters in display order, such as market, side and quantity. */
132
+ parameters?: undefined;
133
+ approvedAt?: undefined;
134
+ };
135
+ };
136
+ /**
137
+ * One notification. When `detail.type` is `"unspecified"` (a type this SDK build does not
138
+ * know), show `title` and `text` only.
139
+ */
140
+ type AccountNotification = ReturnType<typeof formatNotification>;
141
+ type AccountNotificationDetail = AccountNotification["detail"];
142
+ /** One page of notifications, newest first; an empty `nextPageToken` means no more. */
143
+ type ListNotificationsResult = {
144
+ notifications: AccountNotification[];
145
+ nextPageToken: string;
146
+ };
147
+ declare function formatNotificationCounts(counts: GetNotificationCountsResponse): {
148
+ total: number;
149
+ unread: number;
150
+ /** Every type in ascending enum order, including types with no notification. */
151
+ types: {
152
+ type: "unspecified" | "price_alert" | "telegram_approval";
153
+ category: "unspecified" | "alerts" | "security";
154
+ total: number;
155
+ unread: number;
156
+ }[];
157
+ };
158
+ /** Exact counts of the caller's notifications, as of one moment. */
159
+ type NotificationCounts = ReturnType<typeof formatNotificationCounts>;
160
+ //#endregion
161
+ export { AccountNotification, AccountNotificationDetail, GetNotificationInput, GetNotificationInputSchema, ListNotificationsInput, ListNotificationsInputSchema, ListNotificationsResult, MarkAllNotificationsReadInput, MarkAllNotificationsReadInputSchema, MarkNotificationsInput, MarkNotificationsInputSchema, NotificationCounts, formatNotification, formatNotificationCounts };
162
+ //# sourceMappingURL=notifications.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.schemas.d.ts","names":[],"sources":["../../../src/services/notifications/notifications.schemas.ts"],"mappings":";;;cAyCa,8BAA4B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2B7B,yBAAyB,EAAE,kBAAkB;cAE5C,4BAA0B,EAAA;;;KAI3B,uBAAuB,EAAE,kBAAkB;cAE1C,8BAA4B,EAAA;;;;KAU7B,yBAAyB,EAAE,kBAAkB;cAE5C,qCAAmC,EAAA;;;;;;;;KASpC,gCAAgC,EAAE,kBACnC;iBAoDK,mBAAmB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoBrC,sBAAsB,kBAAkB;KAExC,4BAA4B;;KAG5B;EACR,eAAe;EACf;;iBAGY,yBAAyB,QAAQ;;;;;;;;;;;;KAerC,qBAAqB,kBAAkB"}
@@ -0,0 +1,116 @@
1
+ import { formatId } from "../../utils/base58-id.js";
2
+ import { tsObjToMs } from "../../utils/time.js";
3
+ import { idInputSchema, optionalIdInputSchema } from "../../shared/schemas.js";
4
+ import { enumLabel } from "../../shared/proto-enum-codec.js";
5
+ import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
6
+ import { msToTimestamp } from "../../utils/timestamp.js";
7
+ import { PriceAlertDirectionCodec, PriceAlertPriceSourceCodec } from "../price-alerts/price-alerts.codecs.js";
8
+ import { NOTIFICATION_CATEGORY_VALUES, NOTIFICATION_READ_STATE_VALUES, NotificationCategoryCodec, NotificationReadStateCodec, NotificationTypeCodec, TelegramApprovalActionCodec } from "./notifications.codecs.js";
9
+ import * as v from "valibot";
10
+ //#region src/services/notifications/notifications.schemas.ts
11
+ const NotificationIdInputSchema = idInputSchema("notificationId");
12
+ /** Omit or pass empty for every category. */
13
+ const CategoriesInputSchema = v.optional(v.pipe(v.array(v.picklist(NOTIFICATION_CATEGORY_VALUES)), v.transform((categories) => categories.map((category) => NotificationCategoryCodec.inputToProto[category]))));
14
+ const TimestampMsInputSchema = v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(Number.MAX_SAFE_INTEGER));
15
+ const ListNotificationsInputSchema = v.pipe(v.strictObject({
16
+ categories: CategoriesInputSchema,
17
+ /** Only read or only unread notifications; omit for both. */
18
+ readState: v.optional(v.picklist(NOTIFICATION_READ_STATE_VALUES)),
19
+ /** Epoch ms, inclusive. */
20
+ startTime: v.optional(TimestampMsInputSchema),
21
+ /** Epoch ms, exclusive; after `startTime` when both are set. */
22
+ endTime: v.optional(TimestampMsInputSchema),
23
+ /** Page size: default 25, at most 100. */
24
+ limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(100))),
25
+ /** Previous `nextPageToken`; reuse only with the same filters. */
26
+ pageToken: v.optional(v.pipe(v.string(), v.trim()))
27
+ }), v.check(({ startTime, endTime }) => startTime === void 0 || endTime === void 0 || endTime > startTime, "endTime: must be after startTime"), v.transform(({ readState, startTime, endTime, ...input }) => ({
28
+ ...input,
29
+ readState: readState && NotificationReadStateCodec.inputToProto[readState],
30
+ startTime: startTime === void 0 ? void 0 : msToTimestamp(startTime),
31
+ endTime: endTime === void 0 ? void 0 : msToTimestamp(endTime)
32
+ })));
33
+ const GetNotificationInputSchema = v.strictObject({ notificationId: NotificationIdInputSchema });
34
+ const MarkNotificationsInputSchema = v.strictObject({
35
+ /** One to 100 distinct notification IDs. */
36
+ notificationIds: v.pipe(v.array(NotificationIdInputSchema), v.minLength(1, "At least one notification ID is required."), v.maxLength(100, "At most 100 notification IDs are allowed."), v.check((ids) => new Set(ids).size === ids.length, "Notification IDs must be distinct.")) });
37
+ const MarkAllNotificationsReadInputSchema = v.strictObject({
38
+ categories: CategoriesInputSchema,
39
+ /**
40
+ * Mark only this notification and older ones. Pass the newest one shown, so one that arrives
41
+ * later stays unread; omit to mark every notification that exists when the call runs.
42
+ */
43
+ throughNotificationId: optionalIdInputSchema("throughNotificationId")
44
+ });
45
+ const price = (ticks) => scaledToDecimalOutput(ticks, 9);
46
+ function formatDetail(detail) {
47
+ switch (detail.case) {
48
+ case "priceAlert": {
49
+ const notice = detail.value;
50
+ return {
51
+ type: "price_alert",
52
+ /** The alert's ID in `client.priceAlerts`. */
53
+ alertId: formatId(notice.alertId),
54
+ symbolId: notice.symbolId,
55
+ direction: enumLabel(PriceAlertDirectionCodec.protoToOutput, notice.direction),
56
+ priceSource: enumLabel(PriceAlertPriceSourceCodec.protoToOutput, notice.priceSource),
57
+ /** Alert price, as a decimal string. */
58
+ price: price(notice.priceTicks),
59
+ /** Price that fired the alert, as a decimal string. */
60
+ triggeredPrice: price(notice.triggeredPriceTicks),
61
+ triggeredAt: tsObjToMs(notice.triggeredAt) ?? null
62
+ };
63
+ }
64
+ case "telegramApproval": {
65
+ const notice = detail.value;
66
+ return {
67
+ type: "telegram_approval",
68
+ /** The approval's ID in `client.assistant`. */
69
+ approvalId: formatId(notice.approvalId),
70
+ action: enumLabel(TelegramApprovalActionCodec.protoToOutput, notice.action),
71
+ /** Trading account (subaccount) the action acted on. */
72
+ accountId: formatId(notice.accountId),
73
+ summary: notice.summary,
74
+ /** Key parameters in display order, such as market, side and quantity. */
75
+ parameters: notice.parameters.map(({ label, value }) => ({
76
+ label,
77
+ value
78
+ })),
79
+ approvedAt: tsObjToMs(notice.approvedAt) ?? null
80
+ };
81
+ }
82
+ default: return { type: "unspecified" };
83
+ }
84
+ }
85
+ function formatNotification(notification) {
86
+ return {
87
+ notificationId: formatId(notification.notificationId),
88
+ type: enumLabel(NotificationTypeCodec.protoToOutput, notification.type),
89
+ category: enumLabel(NotificationCategoryCodec.protoToOutput, notification.category),
90
+ /** Plain-text title, the same for every notification of a type. */
91
+ title: notification.title,
92
+ /** Plain-text summary; may span several lines. */
93
+ text: notification.text,
94
+ createdAt: tsObjToMs(notification.createdAt) ?? null,
95
+ /** Null while unread. */
96
+ readAt: tsObjToMs(notification.readAt) ?? null,
97
+ detail: formatDetail(notification.detail)
98
+ };
99
+ }
100
+ function formatNotificationCounts(counts) {
101
+ return {
102
+ total: Number(counts.total),
103
+ unread: Number(counts.unread),
104
+ /** Every type in ascending enum order, including types with no notification. */
105
+ types: counts.types.map((count) => ({
106
+ type: enumLabel(NotificationTypeCodec.protoToOutput, count.type),
107
+ category: enumLabel(NotificationCategoryCodec.protoToOutput, count.category),
108
+ total: Number(count.total),
109
+ unread: Number(count.unread)
110
+ }))
111
+ };
112
+ }
113
+ //#endregion
114
+ export { GetNotificationInputSchema, ListNotificationsInputSchema, MarkAllNotificationsReadInputSchema, MarkNotificationsInputSchema, formatNotification, formatNotificationCounts };
115
+
116
+ //# sourceMappingURL=notifications.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.schemas.js","names":[],"sources":["../../../src/services/notifications/notifications.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { PRICE_SCALE } from \"../../catalogs/readers.js\";\nimport type * as Proto from \"../../gen/notifications/v1/notifications_pb.js\";\nimport { scaledToDecimalOutput } from \"../../shared/decimal-surface.js\";\nimport { enumLabel } from \"../../shared/proto-enum-codec.js\";\nimport { idInputSchema, optionalIdInputSchema } from \"../../shared/schemas.js\";\nimport { formatId } from \"../../utils/base58-id.js\";\nimport { tsObjToMs } from \"../../utils/time.js\";\nimport { msToTimestamp } from \"../../utils/timestamp.js\";\nimport {\n PriceAlertDirectionCodec,\n PriceAlertPriceSourceCodec,\n} from \"../price-alerts/price-alerts.codecs.js\";\nimport {\n NOTIFICATION_CATEGORY_VALUES,\n NOTIFICATION_READ_STATE_VALUES,\n NotificationCategoryCodec,\n NotificationReadStateCodec,\n NotificationTypeCodec,\n TelegramApprovalActionCodec,\n} from \"./notifications.codecs.js\";\n\nconst NotificationIdInputSchema = idInputSchema(\"notificationId\");\n\n/** Omit or pass empty for every category. */\nconst CategoriesInputSchema = v.optional(\n v.pipe(\n v.array(v.picklist(NOTIFICATION_CATEGORY_VALUES)),\n v.transform((categories) =>\n categories.map((category) => NotificationCategoryCodec.inputToProto[category]),\n ),\n ),\n);\n\nconst TimestampMsInputSchema = v.pipe(\n v.number(),\n v.integer(),\n v.minValue(0),\n v.maxValue(Number.MAX_SAFE_INTEGER),\n);\n\nexport const ListNotificationsInputSchema = v.pipe(\n v.strictObject({\n categories: CategoriesInputSchema,\n /** Only read or only unread notifications; omit for both. */\n readState: v.optional(v.picklist(NOTIFICATION_READ_STATE_VALUES)),\n /** Epoch ms, inclusive. */\n startTime: v.optional(TimestampMsInputSchema),\n /** Epoch ms, exclusive; after `startTime` when both are set. */\n endTime: v.optional(TimestampMsInputSchema),\n /** Page size: default 25, at most 100. */\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(100))),\n /** Previous `nextPageToken`; reuse only with the same filters. */\n pageToken: v.optional(v.pipe(v.string(), v.trim())),\n }),\n v.check(\n ({ startTime, endTime }) =>\n startTime === undefined || endTime === undefined || endTime > startTime,\n \"endTime: must be after startTime\",\n ),\n v.transform(({ readState, startTime, endTime, ...input }) => ({\n ...input,\n readState: readState && NotificationReadStateCodec.inputToProto[readState],\n startTime: startTime === undefined ? undefined : msToTimestamp(startTime),\n endTime: endTime === undefined ? undefined : msToTimestamp(endTime),\n })),\n);\n\nexport type ListNotificationsInput = v.InferInput<typeof ListNotificationsInputSchema>;\n\nexport const GetNotificationInputSchema = v.strictObject({\n notificationId: NotificationIdInputSchema,\n});\n\nexport type GetNotificationInput = v.InferInput<typeof GetNotificationInputSchema>;\n\nexport const MarkNotificationsInputSchema = v.strictObject({\n /** One to 100 distinct notification IDs. */\n notificationIds: v.pipe(\n v.array(NotificationIdInputSchema),\n v.minLength(1, \"At least one notification ID is required.\"),\n v.maxLength(100, \"At most 100 notification IDs are allowed.\"),\n v.check((ids) => new Set(ids).size === ids.length, \"Notification IDs must be distinct.\"),\n ),\n});\n\nexport type MarkNotificationsInput = v.InferInput<typeof MarkNotificationsInputSchema>;\n\nexport const MarkAllNotificationsReadInputSchema = v.strictObject({\n categories: CategoriesInputSchema,\n /**\n * Mark only this notification and older ones. Pass the newest one shown, so one that arrives\n * later stays unread; omit to mark every notification that exists when the call runs.\n */\n throughNotificationId: optionalIdInputSchema(\"throughNotificationId\"),\n});\n\nexport type MarkAllNotificationsReadInput = v.InferInput<\n typeof MarkAllNotificationsReadInputSchema\n>;\n\n/*\n * Outputs are formatted straight from the decoded messages, like the assistant's run events.\n * The `detail` oneof becomes a `type`-tagged union; a case this build does not know becomes\n * `{ type: \"unspecified\" }`, and the notification's `title` and `text` describe it.\n */\n\nconst price = (ticks: bigint) => scaledToDecimalOutput(ticks, PRICE_SCALE);\n\nfunction formatDetail(detail: Proto.Notification[\"detail\"]) {\n switch (detail.case) {\n case \"priceAlert\": {\n const notice = detail.value;\n return {\n type: \"price_alert\" as const,\n /** The alert's ID in `client.priceAlerts`. */\n alertId: formatId(notice.alertId),\n symbolId: notice.symbolId,\n direction: enumLabel(PriceAlertDirectionCodec.protoToOutput, notice.direction),\n priceSource: enumLabel(\n PriceAlertPriceSourceCodec.protoToOutput,\n notice.priceSource,\n ),\n /** Alert price, as a decimal string. */\n price: price(notice.priceTicks),\n /** Price that fired the alert, as a decimal string. */\n triggeredPrice: price(notice.triggeredPriceTicks),\n triggeredAt: tsObjToMs(notice.triggeredAt) ?? null,\n };\n }\n case \"telegramApproval\": {\n const notice = detail.value;\n return {\n type: \"telegram_approval\" as const,\n /** The approval's ID in `client.assistant`. */\n approvalId: formatId(notice.approvalId),\n action: enumLabel(TelegramApprovalActionCodec.protoToOutput, notice.action),\n /** Trading account (subaccount) the action acted on. */\n accountId: formatId(notice.accountId),\n summary: notice.summary,\n /** Key parameters in display order, such as market, side and quantity. */\n parameters: notice.parameters.map(({ label, value }) => ({ label, value })),\n approvedAt: tsObjToMs(notice.approvedAt) ?? null,\n };\n }\n default:\n return { type: \"unspecified\" as const };\n }\n}\n\nexport function formatNotification(notification: Proto.Notification) {\n return {\n notificationId: formatId(notification.notificationId),\n type: enumLabel(NotificationTypeCodec.protoToOutput, notification.type),\n category: enumLabel(NotificationCategoryCodec.protoToOutput, notification.category),\n /** Plain-text title, the same for every notification of a type. */\n title: notification.title,\n /** Plain-text summary; may span several lines. */\n text: notification.text,\n createdAt: tsObjToMs(notification.createdAt) ?? null,\n /** Null while unread. */\n readAt: tsObjToMs(notification.readAt) ?? null,\n detail: formatDetail(notification.detail),\n };\n}\n\n/**\n * One notification. When `detail.type` is `\"unspecified\"` (a type this SDK build does not\n * know), show `title` and `text` only.\n */\nexport type AccountNotification = ReturnType<typeof formatNotification>;\n\nexport type AccountNotificationDetail = AccountNotification[\"detail\"];\n\n/** One page of notifications, newest first; an empty `nextPageToken` means no more. */\nexport type ListNotificationsResult = {\n notifications: AccountNotification[];\n nextPageToken: string;\n};\n\nexport function formatNotificationCounts(counts: Proto.GetNotificationCountsResponse) {\n return {\n total: Number(counts.total),\n unread: Number(counts.unread),\n /** Every type in ascending enum order, including types with no notification. */\n types: counts.types.map((count) => ({\n type: enumLabel(NotificationTypeCodec.protoToOutput, count.type),\n category: enumLabel(NotificationCategoryCodec.protoToOutput, count.category),\n total: Number(count.total),\n unread: Number(count.unread),\n })),\n };\n}\n\n/** Exact counts of the caller's notifications, as of one moment. */\nexport type NotificationCounts = ReturnType<typeof formatNotificationCounts>;\n"],"mappings":";;;;;;;;;;AAsBA,MAAM,4BAA4B,cAAc,gBAAgB;;AAGhE,MAAM,wBAAwB,EAAE,SAC5B,EAAE,KACE,EAAE,MAAM,EAAE,SAAS,4BAA4B,CAAC,GAChD,EAAE,WAAW,eACT,WAAW,KAAK,aAAa,0BAA0B,aAAa,SAAS,CACjF,CACJ,CACJ;AAEA,MAAM,yBAAyB,EAAE,KAC7B,EAAE,OAAO,GACT,EAAE,QAAQ,GACV,EAAE,SAAS,CAAC,GACZ,EAAE,SAAS,OAAO,gBAAgB,CACtC;AAEA,MAAa,+BAA+B,EAAE,KAC1C,EAAE,aAAa;CACX,YAAY;;CAEZ,WAAW,EAAE,SAAS,EAAE,SAAS,8BAA8B,CAAC;;CAEhE,WAAW,EAAE,SAAS,sBAAsB;;CAE5C,SAAS,EAAE,SAAS,sBAAsB;;CAE1C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CAAC;;CAEjF,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC,GACD,EAAE,OACG,EAAE,WAAW,cACV,cAAc,KAAA,KAAa,YAAY,KAAA,KAAa,UAAU,WAClE,kCACJ,GACA,EAAE,WAAW,EAAE,WAAW,WAAW,SAAS,GAAG,aAAa;CAC1D,GAAG;CACH,WAAW,aAAa,2BAA2B,aAAa;CAChE,WAAW,cAAc,KAAA,IAAY,KAAA,IAAY,cAAc,SAAS;CACxE,SAAS,YAAY,KAAA,IAAY,KAAA,IAAY,cAAc,OAAO;AACtE,EAAE,CACN;AAIA,MAAa,6BAA6B,EAAE,aAAa,EACrD,gBAAgB,0BACpB,CAAC;AAID,MAAa,+BAA+B,EAAE,aAAa;;AAEvD,iBAAiB,EAAE,KACf,EAAE,MAAM,yBAAyB,GACjC,EAAE,UAAU,GAAG,2CAA2C,GAC1D,EAAE,UAAU,KAAK,2CAA2C,GAC5D,EAAE,OAAO,QAAQ,IAAI,IAAI,GAAG,CAAC,CAAC,SAAS,IAAI,QAAQ,oCAAoC,CAC3F,EACJ,CAAC;AAID,MAAa,sCAAsC,EAAE,aAAa;CAC9D,YAAY;;;;;CAKZ,uBAAuB,sBAAsB,uBAAuB;AACxE,CAAC;AAYD,MAAM,SAAS,UAAkB,sBAAsB,OAAA,CAAkB;AAEzE,SAAS,aAAa,QAAsC;CACxD,QAAQ,OAAO,MAAf;EACI,KAAK,cAAc;GACf,MAAM,SAAS,OAAO;GACtB,OAAO;IACH,MAAM;;IAEN,SAAS,SAAS,OAAO,OAAO;IAChC,UAAU,OAAO;IACjB,WAAW,UAAU,yBAAyB,eAAe,OAAO,SAAS;IAC7E,aAAa,UACT,2BAA2B,eAC3B,OAAO,WACX;;IAEA,OAAO,MAAM,OAAO,UAAU;;IAE9B,gBAAgB,MAAM,OAAO,mBAAmB;IAChD,aAAa,UAAU,OAAO,WAAW,KAAK;GAClD;EACJ;EACA,KAAK,oBAAoB;GACrB,MAAM,SAAS,OAAO;GACtB,OAAO;IACH,MAAM;;IAEN,YAAY,SAAS,OAAO,UAAU;IACtC,QAAQ,UAAU,4BAA4B,eAAe,OAAO,MAAM;;IAE1E,WAAW,SAAS,OAAO,SAAS;IACpC,SAAS,OAAO;;IAEhB,YAAY,OAAO,WAAW,KAAK,EAAE,OAAO,aAAa;KAAE;KAAO;IAAM,EAAE;IAC1E,YAAY,UAAU,OAAO,UAAU,KAAK;GAChD;EACJ;EACA,SACI,OAAO,EAAE,MAAM,cAAuB;CAC9C;AACJ;AAEA,SAAgB,mBAAmB,cAAkC;CACjE,OAAO;EACH,gBAAgB,SAAS,aAAa,cAAc;EACpD,MAAM,UAAU,sBAAsB,eAAe,aAAa,IAAI;EACtE,UAAU,UAAU,0BAA0B,eAAe,aAAa,QAAQ;;EAElF,OAAO,aAAa;;EAEpB,MAAM,aAAa;EACnB,WAAW,UAAU,aAAa,SAAS,KAAK;;EAEhD,QAAQ,UAAU,aAAa,MAAM,KAAK;EAC1C,QAAQ,aAAa,aAAa,MAAM;CAC5C;AACJ;AAgBA,SAAgB,yBAAyB,QAA6C;CAClF,OAAO;EACH,OAAO,OAAO,OAAO,KAAK;EAC1B,QAAQ,OAAO,OAAO,MAAM;;EAE5B,OAAO,OAAO,MAAM,KAAK,WAAW;GAChC,MAAM,UAAU,sBAAsB,eAAe,MAAM,IAAI;GAC/D,UAAU,UAAU,0BAA0B,eAAe,MAAM,QAAQ;GAC3E,OAAO,OAAO,MAAM,KAAK;GACzB,QAAQ,OAAO,MAAM,MAAM;EAC/B,EAAE;CACN;AACJ"}
@@ -0,0 +1,3 @@
1
+ import { AccountNotification, AccountNotificationDetail, GetNotificationInput, ListNotificationsInput, ListNotificationsResult, MarkAllNotificationsReadInput, MarkNotificationsInput, NotificationCounts } from "./notifications.schemas.js";
2
+ import { NotificationCategory, NotificationReadState, NotificationType, TelegramApprovalAction } from "./notifications.codecs.js";
3
+ export type { AccountNotification, AccountNotificationDetail, GetNotificationInput, ListNotificationsInput, ListNotificationsResult, MarkAllNotificationsReadInput, MarkNotificationsInput, NotificationCategory, NotificationCounts, NotificationReadState, NotificationType, TelegramApprovalAction };
@@ -0,0 +1,8 @@
1
+ import { NotificationsService } from "./notifications.js";
2
+ import { PolyesterCore } from "../../core-client.js";
3
+ //#region src/services/notifications/service.d.ts
4
+ /** Returns the client's NotificationsService, creating it on first use. */
5
+ declare const notificationsService: (client: PolyesterCore) => NotificationsService;
6
+ //#endregion
7
+ export { notificationsService };
8
+ //# sourceMappingURL=service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.d.ts","names":[],"sources":["../../../src/services/notifications/service.ts"],"mappings":";;;;cAIa,uBAAoB,QAApB,kBAAoB"}
@@ -0,0 +1,9 @@
1
+ import { defineService } from "../../core-client.js";
2
+ import { NotificationsService } from "./notifications.js";
3
+ //#region src/services/notifications/service.ts
4
+ /** Returns the client's NotificationsService, creating it on first use. */
5
+ const notificationsService = defineService((context) => new NotificationsService(context.transports));
6
+ //#endregion
7
+ export { notificationsService };
8
+
9
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","names":[],"sources":["../../../src/services/notifications/service.ts"],"sourcesContent":["import { defineService } from \"../../core-client.js\";\nimport { NotificationsService } from \"./notifications.js\";\n\n/** Returns the client's NotificationsService, creating it on first use. */\nexport const notificationsService = defineService(\n (context) => new NotificationsService(context.transports),\n);\n"],"mappings":";;;;AAIA,MAAa,uBAAuB,eAC/B,YAAY,IAAI,qBAAqB,QAAQ,UAAU,CAC5D"}
@@ -1,3 +1,4 @@
1
+ import { GetOrderBookResponseSchema, OrderBookDeltaSchema, OrderbookService as OrderbookService$1 } from "../../gen/orderbook/v1/orderbook_pb.js";
1
2
  import { ServiceUnavailableError } from "../../shared/errors.js";
2
3
  import { parse } from "../../shared/validation.js";
3
4
  import { toConnectCallOptions } from "../../shared/request-options.js";
@@ -5,7 +6,6 @@ import { decimalInputToScaled } from "../../shared/decimal-surface.js";
5
6
  import { publicationHandlerErrorContext } from "../../shared/subscription-errors.js";
6
7
  import { isResourceNotFoundError } from "../../utils/errors.js";
7
8
  import { snapshotThenStream } from "../../realtime/snapshot-then-stream.js";
8
- import { GetOrderBookResponseSchema, OrderBookDeltaSchema, OrderbookService as OrderbookService$1 } from "../../gen/orderbook/v1/orderbook_pb.js";
9
9
  import { orderbookWsChannelDepth } from "./orderbook.codecs.js";
10
10
  import { GetOrderbookInputSchema, createOrderbookDataSchema, formatOrderbookLevel } from "./orderbook.schemas.js";
11
11
  import { create } from "@bufbuild/protobuf";
@@ -10,7 +10,7 @@ declare const GetOrderbookInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
10
10
  depth: number;
11
11
  }, {
12
12
  symbolId: number;
13
- depth: 1 | 5 | 10 | 20 | 100 | 200 | 500 | 1000 | 50;
13
+ depth: 1 | 10 | 5 | 20 | 100 | 200 | 500 | 1000 | 50;
14
14
  protoDepth: Depth;
15
15
  }>]>;
16
16
  type GetOrderbookInput = v.InferInput<typeof GetOrderbookInputSchema>;
@@ -6,8 +6,10 @@ const FEE_ASSET_VALUES = ["quote", "base"];
6
6
  const SELF_TRADE_PREVENTION_MODE_VALUES = [
7
7
  "expire_taker",
8
8
  "expire_maker",
9
- "expire_both"
9
+ "expire_both",
10
+ "decrement"
10
11
  ];
12
+ const PEG_REFERENCE_VALUES = ["best_bid", "best_ask"];
11
13
  const OrderSideCodec = {
12
14
  inputToProto: {
13
15
  buy: 1,
@@ -59,15 +61,21 @@ const SelfTradePreventionModeCodec = {
59
61
  inputToProto: {
60
62
  expire_taker: 2,
61
63
  expire_maker: 1,
62
- expire_both: 3
64
+ expire_both: 3,
65
+ decrement: 4
63
66
  },
64
67
  protoToOutput: {
65
68
  [0]: "unspecified",
66
69
  [2]: "expire_taker",
67
70
  [1]: "expire_maker",
68
- [3]: "expire_both"
71
+ [3]: "expire_both",
72
+ [4]: "decrement"
69
73
  }
70
74
  };
75
+ const PegReferenceCodec = { inputToProto: {
76
+ best_bid: 1,
77
+ best_ask: 2
78
+ } };
71
79
  const TriggerPriceSourceCodec = {
72
80
  inputToProto: {
73
81
  last: 1,
@@ -87,6 +95,6 @@ const TriggerPriceSourceCodec = {
87
95
  */
88
96
  const TriggerPriceSourceInputSchema = v.optional(v.pipe(v.picklist(["last", "index"]), v.transform((source) => TriggerPriceSourceCodec.inputToProto[source])));
89
97
  //#endregion
90
- export { FEE_ASSET_VALUES, FeeAssetCodec, ORDER_SIDE_VALUES, OrderSideCodec, OrderTypeCodec, SELF_TRADE_PREVENTION_MODE_VALUES, SelfTradePreventionModeCodec, TimeInForceCodec, TriggerPriceSourceCodec, TriggerPriceSourceInputSchema };
98
+ export { FEE_ASSET_VALUES, FeeAssetCodec, ORDER_SIDE_VALUES, OrderSideCodec, OrderTypeCodec, PEG_REFERENCE_VALUES, PegReferenceCodec, SELF_TRADE_PREVENTION_MODE_VALUES, SelfTradePreventionModeCodec, TimeInForceCodec, TriggerPriceSourceCodec, TriggerPriceSourceInputSchema };
91
99
 
92
100
  //# sourceMappingURL=order-enums.codecs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"order-enums.codecs.js","names":[],"sources":["../../../src/services/orders/order-enums.codecs.ts"],"sourcesContent":["import * as ProtoWrite from \"../../gen/orders/v1/orders_pb.js\";\nimport * as v from \"valibot\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const ORDER_SIDE_VALUES = [\"buy\", \"sell\"] as const;\nexport type OrderSideValue = (typeof ORDER_SIDE_VALUES)[number];\n\nexport const ORDER_TYPE_VALUES = [\"limit\", \"market\"] as const;\nexport type OrderTypeValue = (typeof ORDER_TYPE_VALUES)[number];\n\nexport const TIME_IN_FORCE_VALUES = [\"gtc\", \"ioc\", \"fok\"] as const;\nexport type TimeInForceValue = (typeof TIME_IN_FORCE_VALUES)[number];\nexport const TIME_IN_FORCE_OUTPUT_VALUES = [\"gtc\", \"ioc\", \"fok\", \"gtd\"] as const;\nexport type TimeInForceOutputValue = (typeof TIME_IN_FORCE_OUTPUT_VALUES)[number];\n\nexport const FEE_ASSET_VALUES = [\"quote\", \"base\"] as const;\nexport type FeeAssetValue = (typeof FEE_ASSET_VALUES)[number];\n\nexport const SELF_TRADE_PREVENTION_MODE_VALUES = [\n \"expire_taker\",\n \"expire_maker\",\n \"expire_both\",\n] as const;\nexport type SelfTradePreventionModeValue = (typeof SELF_TRADE_PREVENTION_MODE_VALUES)[number];\n\nexport const TRIGGER_PRICE_SOURCE_VALUES = [\"last\", \"index\", \"mark\"] as const;\nexport type TriggerPriceSourceValue = (typeof TRIGGER_PRICE_SOURCE_VALUES)[number];\n\nexport const OrderSideCodec = {\n inputToProto: {\n buy: ProtoWrite.Side.BUY,\n sell: ProtoWrite.Side.SELL,\n } satisfies InputToProto<OrderSideValue, ProtoWrite.Side>,\n protoToOutput: {\n [ProtoWrite.Side.SIDE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.Side.BUY]: \"buy\",\n [ProtoWrite.Side.SELL]: \"sell\",\n } satisfies ProtoToOutput<ProtoWrite.Side, OrderSideValue>,\n} as const;\n\nexport const OrderTypeCodec = {\n inputToProto: {\n limit: ProtoWrite.OrderType.LIMIT,\n market: ProtoWrite.OrderType.MARKET,\n } satisfies InputToProto<OrderTypeValue, ProtoWrite.OrderType>,\n protoToOutput: {\n [ProtoWrite.OrderType.ORDER_TYPE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.OrderType.LIMIT]: \"limit\",\n [ProtoWrite.OrderType.MARKET]: \"market\",\n } satisfies ProtoToOutput<ProtoWrite.OrderType, OrderTypeValue>,\n} as const;\n\nexport const TimeInForceCodec = {\n inputToProto: {\n gtc: ProtoWrite.TimeInForce.GTC,\n ioc: ProtoWrite.TimeInForce.IOC,\n fok: ProtoWrite.TimeInForce.FOK,\n } satisfies InputToProto<TimeInForceValue, ProtoWrite.TimeInForce>,\n protoToOutput: {\n [ProtoWrite.TimeInForce.TIME_IN_FORCE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.TimeInForce.GTC]: \"gtc\",\n [ProtoWrite.TimeInForce.IOC]: \"ioc\",\n [ProtoWrite.TimeInForce.FOK]: \"fok\",\n [ProtoWrite.TimeInForce.GTD]: \"gtd\",\n } satisfies ProtoToOutput<ProtoWrite.TimeInForce, TimeInForceOutputValue>,\n} as const;\n\nexport const FeeAssetCodec = {\n inputToProto: {\n quote: ProtoWrite.FeeAsset.QUOTE,\n base: ProtoWrite.FeeAsset.BASE,\n } satisfies InputToProto<FeeAssetValue, ProtoWrite.FeeAsset>,\n protoToOutput: {\n [ProtoWrite.FeeAsset.FEE_ASSET_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.FeeAsset.QUOTE]: \"quote\",\n [ProtoWrite.FeeAsset.BASE]: \"base\",\n } satisfies ProtoToOutput<ProtoWrite.FeeAsset, FeeAssetValue>,\n} as const;\n\nexport const SelfTradePreventionModeCodec = {\n inputToProto: {\n expire_taker: ProtoWrite.SelfTradePreventionMode.EXPIRE_TAKER,\n expire_maker: ProtoWrite.SelfTradePreventionMode.EXPIRE_MAKER,\n expire_both: ProtoWrite.SelfTradePreventionMode.EXPIRE_BOTH,\n } satisfies InputToProto<SelfTradePreventionModeValue, ProtoWrite.SelfTradePreventionMode>,\n protoToOutput: {\n [ProtoWrite.SelfTradePreventionMode.SELF_TRADE_PREVENTION_MODE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.SelfTradePreventionMode.EXPIRE_TAKER]: \"expire_taker\",\n [ProtoWrite.SelfTradePreventionMode.EXPIRE_MAKER]: \"expire_maker\",\n [ProtoWrite.SelfTradePreventionMode.EXPIRE_BOTH]: \"expire_both\",\n } satisfies ProtoToOutput<ProtoWrite.SelfTradePreventionMode, SelfTradePreventionModeValue>,\n} as const;\n\nexport const TriggerPriceSourceCodec = {\n inputToProto: {\n last: ProtoWrite.TriggerPriceSource.LAST_PRICE,\n index: ProtoWrite.TriggerPriceSource.INDEX_PRICE,\n mark: ProtoWrite.TriggerPriceSource.MARK_PRICE,\n } satisfies InputToProto<TriggerPriceSourceValue, ProtoWrite.TriggerPriceSource>,\n protoToOutput: {\n [ProtoWrite.TriggerPriceSource.TRIGGER_PRICE_SOURCE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.TriggerPriceSource.LAST_PRICE]: \"last\",\n [ProtoWrite.TriggerPriceSource.INDEX_PRICE]: \"index\",\n [ProtoWrite.TriggerPriceSource.MARK_PRICE]: \"mark\",\n } satisfies ProtoToOutput<ProtoWrite.TriggerPriceSource, TriggerPriceSourceValue>,\n} as const;\n\n/**\n * Price a trigger watches: `\"last\"` traded price (the default when omitted) or\n * the market's `\"index\"` price. Spot markets do not support the mark price.\n */\nexport const TriggerPriceSourceInputSchema = v.optional(\n v.pipe(\n v.picklist([\"last\", \"index\"]),\n v.transform((source) => TriggerPriceSourceCodec.inputToProto[source]),\n ),\n);\n"],"mappings":";;;AAIA,MAAa,oBAAoB,CAAC,OAAO,MAAM;AAW/C,MAAa,mBAAmB,CAAC,SAAS,MAAM;AAGhD,MAAa,oCAAoC;CAC7C;CACA;CACA;AACJ;AAMA,MAAa,iBAAiB;CAC1B,cAAc;EACV,KAAA;EACA,MAAA;CACJ;CACA,eAAe;GACyB,IAAA;GACb,IAAA;GACC,IAAA;CAC5B;AACJ;AAEA,MAAa,iBAAiB;CAC1B,cAAc;EACV,OAAA;EACA,QAAA;CACJ;CACA,eAAe;GACoC,IAAA;GACjB,IAAA;GACC,IAAA;CACnC;AACJ;AAEA,MAAa,mBAAmB;CAC5B,cAAc;EACV,KAAA;EACA,KAAA;EACA,KAAA;CACJ;CACA,eAAe;GACyC,IAAA;GACtB,IAAA;GACA,IAAA;GACA,IAAA;GACA,IAAA;CAClC;AACJ;AAEA,MAAa,gBAAgB;CACzB,cAAc;EACV,OAAA;EACA,MAAA;CACJ;CACA,eAAe;GACkC,IAAA;GAChB,IAAA;GACD,IAAA;CAChC;AACJ;AAEA,MAAa,+BAA+B;CACxC,cAAc;EACV,cAAA;EACA,cAAA;EACA,aAAA;CACJ;CACA,eAAe;GACkE,IAAA;GAC1B,IAAA;GACA,IAAA;GACD,IAAA;CACtD;AACJ;AAEA,MAAa,0BAA0B;CACnC,cAAc;EACV,MAAA;EACA,OAAA;EACA,MAAA;CACJ;CACA,eAAe;GACuD,IAAA;GACtB,IAAA;GACC,IAAA;GACD,IAAA;CAChD;AACJ;;;;;AAMA,MAAa,gCAAgC,EAAE,SAC3C,EAAE,KACE,EAAE,SAAS,CAAC,QAAQ,OAAO,CAAC,GAC5B,EAAE,WAAW,WAAW,wBAAwB,aAAa,OAAO,CACxE,CACJ"}
1
+ {"version":3,"file":"order-enums.codecs.js","names":[],"sources":["../../../src/services/orders/order-enums.codecs.ts"],"sourcesContent":["import * as ProtoWrite from \"../../gen/orders/v1/orders_pb.js\";\nimport * as v from \"valibot\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const ORDER_SIDE_VALUES = [\"buy\", \"sell\"] as const;\nexport type OrderSideValue = (typeof ORDER_SIDE_VALUES)[number];\n\nexport const ORDER_TYPE_VALUES = [\"limit\", \"market\"] as const;\nexport type OrderTypeValue = (typeof ORDER_TYPE_VALUES)[number];\n\nexport const TIME_IN_FORCE_VALUES = [\"gtc\", \"ioc\", \"fok\"] as const;\nexport type TimeInForceValue = (typeof TIME_IN_FORCE_VALUES)[number];\nexport const TIME_IN_FORCE_OUTPUT_VALUES = [\"gtc\", \"ioc\", \"fok\", \"gtd\"] as const;\nexport type TimeInForceOutputValue = (typeof TIME_IN_FORCE_OUTPUT_VALUES)[number];\n\nexport const FEE_ASSET_VALUES = [\"quote\", \"base\"] as const;\nexport type FeeAssetValue = (typeof FEE_ASSET_VALUES)[number];\n\nexport const SELF_TRADE_PREVENTION_MODE_VALUES = [\n \"expire_taker\",\n \"expire_maker\",\n \"expire_both\",\n \"decrement\",\n] as const;\nexport type SelfTradePreventionModeValue = (typeof SELF_TRADE_PREVENTION_MODE_VALUES)[number];\n\nexport const PEG_REFERENCE_VALUES = [\"best_bid\", \"best_ask\"] as const;\nexport type PegReferenceValue = (typeof PEG_REFERENCE_VALUES)[number];\n\nexport const TRIGGER_PRICE_SOURCE_VALUES = [\"last\", \"index\", \"mark\"] as const;\nexport type TriggerPriceSourceValue = (typeof TRIGGER_PRICE_SOURCE_VALUES)[number];\n\nexport const OrderSideCodec = {\n inputToProto: {\n buy: ProtoWrite.Side.BUY,\n sell: ProtoWrite.Side.SELL,\n } satisfies InputToProto<OrderSideValue, ProtoWrite.Side>,\n protoToOutput: {\n [ProtoWrite.Side.SIDE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.Side.BUY]: \"buy\",\n [ProtoWrite.Side.SELL]: \"sell\",\n } satisfies ProtoToOutput<ProtoWrite.Side, OrderSideValue>,\n} as const;\n\nexport const OrderTypeCodec = {\n inputToProto: {\n limit: ProtoWrite.OrderType.LIMIT,\n market: ProtoWrite.OrderType.MARKET,\n } satisfies InputToProto<OrderTypeValue, ProtoWrite.OrderType>,\n protoToOutput: {\n [ProtoWrite.OrderType.ORDER_TYPE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.OrderType.LIMIT]: \"limit\",\n [ProtoWrite.OrderType.MARKET]: \"market\",\n } satisfies ProtoToOutput<ProtoWrite.OrderType, OrderTypeValue>,\n} as const;\n\nexport const TimeInForceCodec = {\n inputToProto: {\n gtc: ProtoWrite.TimeInForce.GTC,\n ioc: ProtoWrite.TimeInForce.IOC,\n fok: ProtoWrite.TimeInForce.FOK,\n } satisfies InputToProto<TimeInForceValue, ProtoWrite.TimeInForce>,\n protoToOutput: {\n [ProtoWrite.TimeInForce.TIME_IN_FORCE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.TimeInForce.GTC]: \"gtc\",\n [ProtoWrite.TimeInForce.IOC]: \"ioc\",\n [ProtoWrite.TimeInForce.FOK]: \"fok\",\n [ProtoWrite.TimeInForce.GTD]: \"gtd\",\n } satisfies ProtoToOutput<ProtoWrite.TimeInForce, TimeInForceOutputValue>,\n} as const;\n\nexport const FeeAssetCodec = {\n inputToProto: {\n quote: ProtoWrite.FeeAsset.QUOTE,\n base: ProtoWrite.FeeAsset.BASE,\n } satisfies InputToProto<FeeAssetValue, ProtoWrite.FeeAsset>,\n protoToOutput: {\n [ProtoWrite.FeeAsset.FEE_ASSET_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.FeeAsset.QUOTE]: \"quote\",\n [ProtoWrite.FeeAsset.BASE]: \"base\",\n } satisfies ProtoToOutput<ProtoWrite.FeeAsset, FeeAssetValue>,\n} as const;\n\nexport const SelfTradePreventionModeCodec = {\n inputToProto: {\n expire_taker: ProtoWrite.SelfTradePreventionMode.EXPIRE_TAKER,\n expire_maker: ProtoWrite.SelfTradePreventionMode.EXPIRE_MAKER,\n expire_both: ProtoWrite.SelfTradePreventionMode.EXPIRE_BOTH,\n decrement: ProtoWrite.SelfTradePreventionMode.DECREMENT,\n } satisfies InputToProto<SelfTradePreventionModeValue, ProtoWrite.SelfTradePreventionMode>,\n protoToOutput: {\n [ProtoWrite.SelfTradePreventionMode.SELF_TRADE_PREVENTION_MODE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.SelfTradePreventionMode.EXPIRE_TAKER]: \"expire_taker\",\n [ProtoWrite.SelfTradePreventionMode.EXPIRE_MAKER]: \"expire_maker\",\n [ProtoWrite.SelfTradePreventionMode.EXPIRE_BOTH]: \"expire_both\",\n [ProtoWrite.SelfTradePreventionMode.DECREMENT]: \"decrement\",\n } satisfies ProtoToOutput<ProtoWrite.SelfTradePreventionMode, SelfTradePreventionModeValue>,\n} as const;\n\nexport const PegReferenceCodec = {\n inputToProto: {\n best_bid: ProtoWrite.PegReference.BEST_BID,\n best_ask: ProtoWrite.PegReference.BEST_ASK,\n } satisfies InputToProto<PegReferenceValue, ProtoWrite.PegReference>,\n} as const;\n\nexport const TriggerPriceSourceCodec = {\n inputToProto: {\n last: ProtoWrite.TriggerPriceSource.LAST_PRICE,\n index: ProtoWrite.TriggerPriceSource.INDEX_PRICE,\n mark: ProtoWrite.TriggerPriceSource.MARK_PRICE,\n } satisfies InputToProto<TriggerPriceSourceValue, ProtoWrite.TriggerPriceSource>,\n protoToOutput: {\n [ProtoWrite.TriggerPriceSource.TRIGGER_PRICE_SOURCE_UNSPECIFIED]: \"unspecified\",\n [ProtoWrite.TriggerPriceSource.LAST_PRICE]: \"last\",\n [ProtoWrite.TriggerPriceSource.INDEX_PRICE]: \"index\",\n [ProtoWrite.TriggerPriceSource.MARK_PRICE]: \"mark\",\n } satisfies ProtoToOutput<ProtoWrite.TriggerPriceSource, TriggerPriceSourceValue>,\n} as const;\n\n/**\n * Price a trigger watches: `\"last\"` traded price (the default when omitted) or\n * the market's `\"index\"` price. Spot markets do not support the mark price.\n */\nexport const TriggerPriceSourceInputSchema = v.optional(\n v.pipe(\n v.picklist([\"last\", \"index\"]),\n v.transform((source) => TriggerPriceSourceCodec.inputToProto[source]),\n ),\n);\n"],"mappings":";;;AAIA,MAAa,oBAAoB,CAAC,OAAO,MAAM;AAW/C,MAAa,mBAAmB,CAAC,SAAS,MAAM;AAGhD,MAAa,oCAAoC;CAC7C;CACA;CACA;CACA;AACJ;AAGA,MAAa,uBAAuB,CAAC,YAAY,UAAU;AAM3D,MAAa,iBAAiB;CAC1B,cAAc;EACV,KAAA;EACA,MAAA;CACJ;CACA,eAAe;GACyB,IAAA;GACb,IAAA;GACC,IAAA;CAC5B;AACJ;AAEA,MAAa,iBAAiB;CAC1B,cAAc;EACV,OAAA;EACA,QAAA;CACJ;CACA,eAAe;GACoC,IAAA;GACjB,IAAA;GACC,IAAA;CACnC;AACJ;AAEA,MAAa,mBAAmB;CAC5B,cAAc;EACV,KAAA;EACA,KAAA;EACA,KAAA;CACJ;CACA,eAAe;GACyC,IAAA;GACtB,IAAA;GACA,IAAA;GACA,IAAA;GACA,IAAA;CAClC;AACJ;AAEA,MAAa,gBAAgB;CACzB,cAAc;EACV,OAAA;EACA,MAAA;CACJ;CACA,eAAe;GACkC,IAAA;GAChB,IAAA;GACD,IAAA;CAChC;AACJ;AAEA,MAAa,+BAA+B;CACxC,cAAc;EACV,cAAA;EACA,cAAA;EACA,aAAA;EACA,WAAA;CACJ;CACA,eAAe;GACkE,IAAA;GAC1B,IAAA;GACA,IAAA;GACD,IAAA;GACF,IAAA;CACpD;AACJ;AAEA,MAAa,oBAAoB,EAC7B,cAAc;CACV,UAAA;CACA,UAAA;AACJ,EACJ;AAEA,MAAa,0BAA0B;CACnC,cAAc;EACV,MAAA;EACA,OAAA;EACA,MAAA;CACJ;CACA,eAAe;GACuD,IAAA;GACtB,IAAA;GACC,IAAA;GACD,IAAA;CAChD;AACJ;;;;;AAMA,MAAa,gCAAgC,EAAE,SAC3C,EAAE,KACE,EAAE,SAAS,CAAC,QAAQ,OAAO,CAAC,GAC5B,EAAE,WAAW,WAAW,wBAAwB,aAAa,OAAO,CACxE,CACJ"}
@@ -3,7 +3,7 @@ import * as v from "valibot";
3
3
  //#region src/services/orders/order-errors.schemas.d.ts
4
4
  type OrderErrorCode = keyof typeof ErrorCode;
5
5
  declare const OrderErrorDetailSchema: v.ObjectSchema<{
6
- readonly code: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ErrorCode, undefined>, v.TransformAction<ErrorCode, "STALE_QUOTE" | "UNSPECIFIED" | "UNAUTHENTICATED" | "RATE_LIMIT_EXCEEDED" | "INTERNAL_ERROR" | "PERMISSION_DENIED" | "SUBACCOUNT_INACTIVE" | "BAD_REQUEST" | "INVALID_ARGUMENT" | "INSUFFICIENT_FUNDS" | "UNKNOWN_SYMBOL" | "BAD_PRICE" | "BAD_QTY" | "MIN_NOTIONAL" | "QTY_STEP_SIZE" | "CONFLICT_DUPLICATE_CLIENT_ORDER_ID" | "UNAVAILABLE" | "NOT_FOUND" | "UPSTREAM_ERROR" | "FEE_ASSET_NOT_ALLOWED" | "PAIR_DISABLED" | "ORDER_UNKNOWN" | "POLICY_MARKET_DENY" | "POLICY_MAX_NOTIONAL" | "POLICY_TRADING_HALTED" | "POLICY_SPOT_TRADE_DENY" | "API_KEY_ROOT_SCOPE_ONLY" | "API_KEY_SUB_SCOPE_ONLY" | "API_KEY_SUBACCOUNT_MISMATCH" | "API_KEY_POLICY_REQUIRED" | "API_KEY_UNKNOWN" | "API_KEY_MARKET_DENY" | "PRICE_TICK_SIZE" | "MIN_QTY" | "POST_ONLY_LIMIT_ONLY" | "BATCH_TOO_LARGE" | "POLICY_MAX_OPEN_ORDERS" | "MODIFICATION_REQUIRES_REPLACE" | "CONFLICT_IDEMPOTENCY_KEY_REUSE" | "MARKET_PRICE_UNAVAILABLE" | "PAIR_NOT_LISTED_YET" | "PAIR_DELISTED" | "PAIR_CANCEL_ONLY" | "PAIR_POST_ONLY" | "PAIR_REDUCE_ONLY" | "RISK_LIMIT" | "MARKET_HALTED" | "ACCOUNT_UNKNOWN" | "POST_ONLY_CROSS" | "REDUCE_ONLY_BLOCKED" | "PRICE_BAND_VIOLATION" | "MARKET_CAP_VIOLATION" | "EMPTY_BOOK" | "FOK_INSUFFICIENT_LIQUIDITY" | "ORDER_ALREADY_TERMINAL" | "TRIGGER_PRICE_INVALID" | "TRIGGER_PRICE_SOURCE_UNSUPPORTED" | "TRAILING_DISTANCE_INVALID" | "TRIGGER_NOT_FOUND" | "TRIGGER_STATUS_INVALID" | "TRIGGER_NOT_MODIFIABLE" | "CONFLICT_DUPLICATE_CLIENT_TRIGGER_ID" | "MAX_SLIPPAGE_INVALID" | "VALIDATION_ERROR" | "OVERLOADED" | "MAX_QUOTE_DEBIT_TOO_SMALL" | "SUBACCOUNT_READ_FORBIDDEN" | "POLICY_SPOT_READ_DENY" | "API_KEY_SPOT_READ_DENY" | "CANCEL_REQUEST_EXPIRED" | "MAX_QTY" | "MAX_NOTIONAL" | "QTY_AT_OR_BELOW_FILLED" | "GATEWAY_MISCONFIGURED" | "INVALID_ORDER_ID" | "CHILD_QTY_RAISE_NOT_ALLOWED" | "ATTACHED_RISK_NOT_SUPPORTED" | "SETTLEMENT_BACKLOGGED" | "PRICE_LEVEL_QUANTITY_LIMIT" | "MARKET_QUOTE_STALE" | "MARKET_QUOTE_UNHEALTHY" | "INVALID_TIME_IN_FORCE" | "QUICKSWAP_NOT_PERMITTED" | "DUPLICATE_ORDER_ID" | "MAX_OPEN_ORDERS_TOTAL" | "STP_MODE_NOT_ALLOWED" | "PAIR_BACKLOGGED" | "PRICE_LEVELS_EXHAUSTED" | "CLIENT_ORDER_IDS_EXHAUSTED" | "ORDER_ID_CONFLICT" | "INVALID_SIDE" | "INVALID_ORDER_TYPE" | "INVALID_STP_MODE" | "INVALID_ORDER_FLAGS" | "BATCH_OTHER_ITEM_INVALID" | "REPLACE_ONTO_OWN_ID" | "INVALID_CLIENT_ORDER_ID" | "ORDER_SEQUENCE_EXHAUSTED" | "INVALID_HANDLING_MODE" | "FEE_SCHEDULE_UNAVAILABLE" | "POLICY_UNAVAILABLE" | "CANCEL_ALL_AFTER_TIMEOUT_INVALID" | "CANCEL_SCOPE_TOO_LARGE" | "RATE_LIMIT_POLICY_UNAVAILABLE" | "SYSTEM_RATE_LIMITED" | "ORDER_MODIFY_IN_PROGRESS" | "ORDER_PLACEMENT_PENDING" | "INVALID_MODIFY_BEHAVIOR" | "BATCH_REPLACE_ONLY_REQUIRED" | "BATCH_SINGLE_SYMBOL_REQUIRED" | "REQUEST_RECEIPTS_EXHAUSTED" | "INTENT_ID_INVALID" | "DRY_RUN_INVALID" | "CANCEL_ALL_AFTER_SCOPE_CONFLICT" | "NEW_ACCOUNT_CAPACITY_REACHED" | "TRIGGER_CHILD_PRICE_NOT_MODIFIABLE" | "TRIGGER_GENERATIONS_EXHAUSTED" | "TRIGGER_CONTROL_SHARE_EXHAUSTED" | "TRIGGER_CONTROLS_BUSY" | "TRIGGER_TYPE_NOT_SUPPORTED" | "INVALID_TRIGGER_TYPE" | "TRIGGER_DIRECTION_INVALID" | "TRIGGER_QTY_INVALID" | "TRIGGER_BUY_REQUIRES_LIMIT" | "ACCOUNT_ROUTING_INVALID" | "TRIGGER_LIMIT_EXCEEDED" | "TRIGGER_CONTROL_IN_PROGRESS" | "TRIGGER_PATCH_EMPTY" | "CLIENT_TRIGGER_ID_INVALID" | "TRIGGER_ACTIVATION_PRICE_INVALID" | "SLIPPAGE_TICKS_INVALID" | "SLIPPAGE_BPS_INVALID" | "TRIGGER_CONTROL_OUTCOME_UNKNOWN" | "TRIGGER_CAPACITY_REACHED" | "RESERVATION_CAPACITY_REACHED" | "CLIENT_ORDER_ID_CAPACITY_REACHED" | "ACCOUNT_RESERVATION_LIMIT_REACHED" | "INVALID_TRIGGER_CONTROL" | "TRIGGER_PATCH_NOT_ALLOWED" | "TRIGGER_PATCH_FIELD_UNKNOWN" | "TRIGGER_PATCH_VALUE_UNMASKED" | "TRIGGER_PATCH_PRICE_MODE_INVALID" | "ACCOUNT_ORDERS_SUSPENDED" | "TRAILING_SIDE_NOT_SUPPORTED" | "TRAILING_CHILD_NOT_MARKET" | "TWAP_DURATION_INVALID" | "LIMIT_CHILD_SLIPPAGE_SET" | "SLIPPAGE_BOUNDS_CONFLICT" | "TWAP_INTERVAL_INVALID" | "LADDER_LEVEL_REJECTED" | "LADDER_RANGE_TOO_NARROW" | "LADDER_LEVELS_INVALID" | "ORDER_LIMITS_UNAVAILABLE" | "ORDER_TYPE_NOT_ALLOWED_IN_AUCTION" | "POST_ONLY_NOT_ALLOWED_IN_AUCTION" | "QUICKSWAP_FEE_DETAILS_INCOMPLETE" | "QUICKSWAP_MARKET_NOT_PRICED" | "QUICKSWAP_BROKER_FEE_TERMS_MISMATCH" | "QUICKSWAP_FEE_RECIPIENT_IS_PAYER" | "QUICKSWAP_BROKER_FEE_TERMS_UNAVAILABLE" | "QUICKSWAP_BROKER_ACCOUNT_UNAVAILABLE" | "QUICKSWAP_ACCOUNT_OWNER_UNKNOWN" | "QUICKSWAP_DISABLED" | "QUICKSWAP_ATTACHED_RISK_NOT_ALLOWED" | "QUICKSWAP_ORDER_NOT_MODIFIABLE" | "QUICKSWAP_FEE_TOTAL_TOO_HIGH" | "QUICKSWAP_BROKER_FEE_TERMS_INVALID" | "QUICKSWAP_BROKER_INVALID" | "QUICKSWAP_FEE_SCHEDULE_INVALID" | "QUICKSWAP_MARKET_FEE_INVALID" | "QUICKSWAP_SETUP_INVALID" | "QUICKSWAP_CAPACITY_REACHED" | "ATTACHED_EXIT_WORKING" | "MARKET_TRIGGER_LIMIT_EXCEEDED" | "MARKET_TWAP_LIMIT_EXCEEDED" | "MARKET_LADDER_LIMIT_EXCEEDED" | "CHILD_QTY_EXCEEDS_REMAINING" | "ORDER_CANCEL_OUTCOME_UNKNOWN" | "ORDER_MODIFY_OUTCOME_UNKNOWN" | "ORDER_REPAIRING" | "ACCOUNT_REPAIRING" | "TRIGGER_WOULD_TRIGGER_IMMEDIATELY" | "ORDER_CREATE_OUTCOME_UNKNOWN" | "TRIGGER_CREATE_OUTCOME_UNKNOWN" | "TRIGGER_SYMBOL_MISMATCH" | "MAX_OPEN_ORDERS_PER_PAIR" | "SELF_TRADE_PREVENTED" | "ATTACHED_LEGS_EXCEEDED" | "FEE_ASSET_INVALID" | "FEE_CEILING_INVALID" | "UNSUPPORTED_FIELD_SET" | "TRIGGER_FIRE_LIMIT_REACHED" | "CONDITION_FLAGS_INVALID" | "CONDITION_PARAMETER_SET" | "TWAP_CAPACITY_REACHED" | "CHILD_ORDER_INCONSISTENT" | "PATH_BODY_ID_MISMATCH" | "REQUEST_DEADLINE_EXCEEDED">]>;
6
+ readonly code: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ErrorCode, undefined>, v.TransformAction<ErrorCode, "STALE_QUOTE" | "UNSPECIFIED" | "UNAUTHENTICATED" | "RATE_LIMIT_EXCEEDED" | "INTERNAL_ERROR" | "PERMISSION_DENIED" | "SUBACCOUNT_INACTIVE" | "BAD_REQUEST" | "INVALID_ARGUMENT" | "INSUFFICIENT_FUNDS" | "UNKNOWN_SYMBOL" | "BAD_PRICE" | "BAD_QTY" | "MIN_NOTIONAL" | "QTY_STEP_SIZE" | "CONFLICT_DUPLICATE_CLIENT_ORDER_ID" | "UNAVAILABLE" | "NOT_FOUND" | "UPSTREAM_ERROR" | "FEE_ASSET_NOT_ALLOWED" | "PAIR_DISABLED" | "ORDER_UNKNOWN" | "POLICY_MARKET_DENY" | "POLICY_MAX_NOTIONAL" | "POLICY_TRADING_HALTED" | "POLICY_SPOT_TRADE_DENY" | "API_KEY_ROOT_SCOPE_ONLY" | "API_KEY_SUB_SCOPE_ONLY" | "API_KEY_SUBACCOUNT_MISMATCH" | "API_KEY_POLICY_REQUIRED" | "API_KEY_UNKNOWN" | "API_KEY_MARKET_DENY" | "API_KEY_SPOT_TRADE_DENY" | "PRICE_TICK_SIZE" | "MIN_QTY" | "POST_ONLY_LIMIT_ONLY" | "BATCH_TOO_LARGE" | "POLICY_MAX_OPEN_ORDERS" | "MODIFICATION_REQUIRES_REPLACE" | "CONFLICT_IDEMPOTENCY_KEY_REUSE" | "MARKET_PRICE_UNAVAILABLE" | "PAIR_NOT_LISTED_YET" | "PAIR_DELISTED" | "PAIR_CANCEL_ONLY" | "PAIR_POST_ONLY" | "PAIR_REDUCE_ONLY" | "RISK_LIMIT" | "MARKET_HALTED" | "ACCOUNT_UNKNOWN" | "POST_ONLY_CROSS" | "REDUCE_ONLY_BLOCKED" | "PRICE_BAND_VIOLATION" | "MARKET_CAP_VIOLATION" | "EMPTY_BOOK" | "FOK_INSUFFICIENT_LIQUIDITY" | "ORDER_ALREADY_TERMINAL" | "TRIGGER_PRICE_INVALID" | "TRIGGER_PRICE_SOURCE_UNSUPPORTED" | "TRAILING_DISTANCE_INVALID" | "TRIGGER_NOT_FOUND" | "TRIGGER_STATUS_INVALID" | "TRIGGER_NOT_MODIFIABLE" | "CONFLICT_DUPLICATE_CLIENT_TRIGGER_ID" | "MAX_SLIPPAGE_INVALID" | "VALIDATION_ERROR" | "OVERLOADED" | "QUOTE_SIZE_TOO_SMALL" | "SUBACCOUNT_READ_FORBIDDEN" | "POLICY_SPOT_READ_DENY" | "API_KEY_SPOT_READ_DENY" | "CANCEL_REQUEST_EXPIRED" | "MAX_QTY" | "MAX_NOTIONAL" | "QTY_AT_OR_BELOW_FILLED" | "GATEWAY_MISCONFIGURED" | "INVALID_ORDER_ID" | "CHILD_QTY_RAISE_NOT_ALLOWED" | "ATTACHED_RISK_NOT_SUPPORTED" | "SETTLEMENT_BACKLOGGED" | "PRICE_LEVEL_QUANTITY_LIMIT" | "MARKET_QUOTE_STALE" | "MARKET_QUOTE_UNHEALTHY" | "INVALID_TIME_IN_FORCE" | "QUICKSWAP_NOT_PERMITTED" | "DUPLICATE_ORDER_ID" | "MAX_OPEN_ORDERS_TOTAL" | "STP_MODE_NOT_ALLOWED" | "PAIR_BACKLOGGED" | "PRICE_LEVELS_EXHAUSTED" | "CLIENT_ORDER_IDS_EXHAUSTED" | "ORDER_ID_CONFLICT" | "INVALID_SIDE" | "INVALID_ORDER_TYPE" | "INVALID_STP_MODE" | "INVALID_ORDER_FLAGS" | "BATCH_OTHER_ITEM_INVALID" | "REPLACE_ONTO_OWN_ID" | "INVALID_CLIENT_ORDER_ID" | "ORDER_SEQUENCE_EXHAUSTED" | "INVALID_HANDLING_MODE" | "FEE_SCHEDULE_UNAVAILABLE" | "POLICY_UNAVAILABLE" | "CANCEL_ALL_AFTER_TIMEOUT_INVALID" | "CANCEL_SCOPE_TOO_LARGE" | "RATE_LIMIT_POLICY_UNAVAILABLE" | "SYSTEM_RATE_LIMITED" | "ORDER_MODIFY_IN_PROGRESS" | "ORDER_PLACEMENT_PENDING" | "INVALID_MODIFY_BEHAVIOR" | "BATCH_REPLACE_ONLY_REQUIRED" | "BATCH_SINGLE_SYMBOL_REQUIRED" | "REQUEST_RECEIPTS_EXHAUSTED" | "INTENT_ID_INVALID" | "DRY_RUN_INVALID" | "CANCEL_ALL_AFTER_SCOPE_CONFLICT" | "NEW_ACCOUNT_CAPACITY_REACHED" | "TRIGGER_CHILD_PRICE_NOT_MODIFIABLE" | "TRIGGER_GENERATIONS_EXHAUSTED" | "TRIGGER_CONTROL_SHARE_EXHAUSTED" | "TRIGGER_CONTROLS_BUSY" | "TRIGGER_TYPE_NOT_SUPPORTED" | "INVALID_TRIGGER_TYPE" | "TRIGGER_DIRECTION_INVALID" | "TRIGGER_QTY_INVALID" | "TRIGGER_BUY_REQUIRES_LIMIT" | "ACCOUNT_ROUTING_INVALID" | "TRIGGER_LIMIT_EXCEEDED" | "TRIGGER_CONTROL_IN_PROGRESS" | "TRIGGER_PATCH_EMPTY" | "CLIENT_TRIGGER_ID_INVALID" | "TRIGGER_ACTIVATION_PRICE_INVALID" | "SLIPPAGE_TICKS_INVALID" | "SLIPPAGE_BPS_INVALID" | "TRIGGER_CONTROL_OUTCOME_UNKNOWN" | "TRIGGER_CAPACITY_REACHED" | "RESERVATION_CAPACITY_REACHED" | "CLIENT_ORDER_ID_CAPACITY_REACHED" | "ACCOUNT_RESERVATION_LIMIT_REACHED" | "INVALID_TRIGGER_CONTROL" | "TRIGGER_PATCH_NOT_ALLOWED" | "TRIGGER_PATCH_FIELD_UNKNOWN" | "TRIGGER_PATCH_VALUE_UNMASKED" | "TRIGGER_PATCH_PRICE_MODE_INVALID" | "ACCOUNT_ORDERS_SUSPENDED" | "TRAILING_SIDE_NOT_SUPPORTED" | "TRAILING_CHILD_NOT_MARKET" | "TWAP_DURATION_INVALID" | "LIMIT_CHILD_SLIPPAGE_SET" | "SLIPPAGE_BOUNDS_CONFLICT" | "TWAP_INTERVAL_INVALID" | "LADDER_LEVEL_REJECTED" | "LADDER_RANGE_TOO_NARROW" | "LADDER_LEVELS_INVALID" | "ORDER_LIMITS_UNAVAILABLE" | "ORDER_TYPE_NOT_ALLOWED_IN_AUCTION" | "POST_ONLY_NOT_ALLOWED_IN_AUCTION" | "QUICKSWAP_FEE_DETAILS_INCOMPLETE" | "QUICKSWAP_MARKET_NOT_PRICED" | "QUICKSWAP_BROKER_FEE_TERMS_MISMATCH" | "QUICKSWAP_FEE_RECIPIENT_IS_PAYER" | "QUICKSWAP_BROKER_FEE_TERMS_UNAVAILABLE" | "QUICKSWAP_BROKER_ACCOUNT_UNAVAILABLE" | "QUICKSWAP_ACCOUNT_OWNER_UNKNOWN" | "QUICKSWAP_DISABLED" | "QUICKSWAP_ATTACHED_RISK_NOT_ALLOWED" | "QUICKSWAP_ORDER_NOT_MODIFIABLE" | "QUICKSWAP_FEE_TOTAL_TOO_HIGH" | "QUICKSWAP_BROKER_FEE_TERMS_INVALID" | "QUICKSWAP_BROKER_INVALID" | "QUICKSWAP_FEE_SCHEDULE_INVALID" | "QUICKSWAP_MARKET_FEE_INVALID" | "QUICKSWAP_SETUP_INVALID" | "QUICKSWAP_CAPACITY_REACHED" | "ATTACHED_EXIT_WORKING" | "MARKET_TRIGGER_LIMIT_EXCEEDED" | "MARKET_TWAP_LIMIT_EXCEEDED" | "MARKET_LADDER_LIMIT_EXCEEDED" | "CHILD_QTY_EXCEEDS_REMAINING" | "ORDER_CANCEL_OUTCOME_UNKNOWN" | "ORDER_MODIFY_OUTCOME_UNKNOWN" | "ORDER_REPAIRING" | "ACCOUNT_REPAIRING" | "TRIGGER_WOULD_TRIGGER_IMMEDIATELY" | "ORDER_CREATE_OUTCOME_UNKNOWN" | "TRIGGER_CREATE_OUTCOME_UNKNOWN" | "TRIGGER_SYMBOL_MISMATCH" | "MAX_OPEN_ORDERS_PER_PAIR" | "SELF_TRADE_PREVENTED" | "ATTACHED_LEGS_EXCEEDED" | "FEE_ASSET_INVALID" | "FEE_CEILING_INVALID" | "UNSUPPORTED_FIELD_SET" | "TRIGGER_FIRE_LIMIT_REACHED" | "CONDITION_FLAGS_INVALID" | "CONDITION_PARAMETER_SET" | "TWAP_CAPACITY_REACHED" | "CHILD_ORDER_INCONSISTENT" | "PATH_BODY_ID_MISMATCH" | "REQUEST_DEADLINE_EXCEEDED" | "ICEBERG_NOT_ALLOWED" | "ICEBERG_DISPLAY_TOO_SMALL" | "ICEBERG_DISPLAY_INVALID" | "PEG_LIMIT_VIOLATION" | "PEG_REFERENCE_UNAVAILABLE" | "INVALID_PEG">]>;
7
7
  readonly violations: v.ArraySchema<v.ObjectSchema<{
8
8
  readonly fieldPath: v.StringSchema<undefined>;
9
9
  readonly ruleId: v.StringSchema<undefined>;
@@ -1,5 +1,5 @@
1
- import { OptionalPublicIdSchema } from "../../shared/schemas.js";
2
1
  import { ErrorCode } from "../../gen/orders/v1/orders_pb.js";
2
+ import { OptionalPublicIdSchema } from "../../shared/schemas.js";
3
3
  import { RateLimitDetailSchema } from "../../shared/rate-limit.schemas.js";
4
4
  import * as v from "valibot";
5
5
  //#region src/services/orders/order-errors.schemas.ts