@nadohq/engine-client 0.14.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EngineBaseClient-DOOXIhnZ.d.ts +75 -0
- package/dist/EngineBaseClient-DOOXIhnZ.d.ts.map +1 -0
- package/dist/EngineBaseClient-L1ue7jBx.d.cts +75 -0
- package/dist/EngineBaseClient-L1ue7jBx.d.cts.map +1 -0
- package/dist/EngineBaseClient-Uc1D8ftx.cjs +150 -0
- package/dist/EngineBaseClient-Uc1D8ftx.cjs.map +1 -0
- package/dist/EngineBaseClient.cjs +3 -167
- package/dist/EngineBaseClient.d.cts +2 -75
- package/dist/EngineBaseClient.d.ts +2 -75
- package/dist/EngineBaseClient.js +112 -131
- package/dist/EngineBaseClient.js.map +1 -1
- package/dist/EngineClient.cjs +13 -38
- package/dist/EngineClient.cjs.map +1 -1
- package/dist/EngineClient.d.cts +8 -18
- package/dist/EngineClient.d.cts.map +1 -0
- package/dist/EngineClient.d.ts +8 -18
- package/dist/EngineClient.d.ts.map +1 -0
- package/dist/EngineClient.js +9 -11
- package/dist/EngineClient.js.map +1 -1
- package/dist/EngineExecuteBuilder-VLrEndhv.d.cts +105 -0
- package/dist/EngineExecuteBuilder-VLrEndhv.d.cts.map +1 -0
- package/dist/EngineExecuteBuilder-t8EQ5Rmp.d.ts +105 -0
- package/dist/EngineExecuteBuilder-t8EQ5Rmp.d.ts.map +1 -0
- package/dist/EngineExecuteBuilder.cjs +232 -277
- package/dist/EngineExecuteBuilder.cjs.map +1 -1
- package/dist/EngineExecuteBuilder.d.cts +2 -108
- package/dist/EngineExecuteBuilder.d.ts +2 -108
- package/dist/EngineExecuteBuilder.js +230 -256
- package/dist/EngineExecuteBuilder.js.map +1 -1
- package/dist/EngineExecuteClient-0EBoXRd7.d.ts +24 -0
- package/dist/EngineExecuteClient-0EBoXRd7.d.ts.map +1 -0
- package/dist/EngineExecuteClient-BGlNK5Le.d.cts +24 -0
- package/dist/EngineExecuteClient-BGlNK5Le.d.cts.map +1 -0
- package/dist/EngineExecuteClient.cjs +57 -110
- package/dist/EngineExecuteClient.cjs.map +1 -1
- package/dist/EngineExecuteClient.d.cts +2 -28
- package/dist/EngineExecuteClient.d.ts +2 -28
- package/dist/EngineExecuteClient.js +54 -83
- package/dist/EngineExecuteClient.js.map +1 -1
- package/dist/EngineQueryClient-C_7p1oRx.d.cts +147 -0
- package/dist/EngineQueryClient-C_7p1oRx.d.cts.map +1 -0
- package/dist/EngineQueryClient-DQwCRaYl.d.ts +147 -0
- package/dist/EngineQueryClient-DQwCRaYl.d.ts.map +1 -0
- package/dist/EngineQueryClient.cjs +354 -447
- package/dist/EngineQueryClient.cjs.map +1 -1
- package/dist/EngineQueryClient.d.cts +2 -149
- package/dist/EngineQueryClient.d.ts +2 -149
- package/dist/EngineQueryClient.js +351 -440
- package/dist/EngineQueryClient.js.map +1 -1
- package/dist/EngineServerFailureError-CDabRrF4.d.ts +11 -0
- package/dist/EngineServerFailureError-CDabRrF4.d.ts.map +1 -0
- package/dist/EngineServerFailureError-DpPY0--L.d.cts +11 -0
- package/dist/EngineServerFailureError-DpPY0--L.d.cts.map +1 -0
- package/dist/EngineWebClient-CEwqgd4t.d.ts +35 -0
- package/dist/EngineWebClient-CEwqgd4t.d.ts.map +1 -0
- package/dist/EngineWebClient-DajZqKAQ.d.cts +35 -0
- package/dist/EngineWebClient-DajZqKAQ.d.cts.map +1 -0
- package/dist/EngineWebClient.cjs +49 -86
- package/dist/EngineWebClient.cjs.map +1 -1
- package/dist/EngineWebClient.d.cts +2 -39
- package/dist/EngineWebClient.d.ts +2 -39
- package/dist/EngineWebClient.js +47 -60
- package/dist/EngineWebClient.js.map +1 -1
- package/dist/clientExecuteTypes-BlJOgCL_.d.cts +91 -0
- package/dist/clientExecuteTypes-BlJOgCL_.d.cts.map +1 -0
- package/dist/clientExecuteTypes-CJ08_c4q.d.ts +91 -0
- package/dist/clientExecuteTypes-CJ08_c4q.d.ts.map +1 -0
- package/dist/clientQueryTypes-DlTtS_mX.d.cts +221 -0
- package/dist/clientQueryTypes-DlTtS_mX.d.cts.map +1 -0
- package/dist/clientQueryTypes-DuRgEeBT.d.ts +221 -0
- package/dist/clientQueryTypes-DuRgEeBT.d.ts.map +1 -0
- package/dist/endpoints.cjs +19 -45
- package/dist/endpoints.cjs.map +1 -1
- package/dist/endpoints.d.cts +4 -2
- package/dist/endpoints.d.cts.map +1 -0
- package/dist/endpoints.d.ts +4 -2
- package/dist/endpoints.d.ts.map +1 -0
- package/dist/endpoints.js +16 -18
- package/dist/endpoints.js.map +1 -1
- package/dist/index-CmCelmEL.d.cts +1 -0
- package/dist/index-D0E78WnU.d.ts +1 -0
- package/dist/index.cjs +26 -31
- package/dist/index.d.cts +12 -20
- package/dist/index.d.ts +12 -20
- package/dist/index.js +8 -6
- package/dist/queryDataMappers-BguxA579.d.ts +21 -0
- package/dist/queryDataMappers-BguxA579.d.ts.map +1 -0
- package/dist/queryDataMappers-DO9yWdLo.d.cts +21 -0
- package/dist/queryDataMappers-DO9yWdLo.d.cts.map +1 -0
- package/dist/serverExecuteTypes-CgbHjnWM.d.ts +92 -0
- package/dist/serverExecuteTypes-CgbHjnWM.d.ts.map +1 -0
- package/dist/serverExecuteTypes-DejTR8Is.d.cts +92 -0
- package/dist/serverExecuteTypes-DejTR8Is.d.cts.map +1 -0
- package/dist/serverQueryModelTypes-85xnbU-a.d.cts +98 -0
- package/dist/serverQueryModelTypes-85xnbU-a.d.cts.map +1 -0
- package/dist/serverQueryModelTypes-CENoy5Hm.d.ts +98 -0
- package/dist/serverQueryModelTypes-CENoy5Hm.d.ts.map +1 -0
- package/dist/serverQueryTypes-B3vC8vxT.d.ts +301 -0
- package/dist/serverQueryTypes-B3vC8vxT.d.ts.map +1 -0
- package/dist/serverQueryTypes-Dva9R2tV.d.cts +301 -0
- package/dist/serverQueryTypes-Dva9R2tV.d.cts.map +1 -0
- package/dist/serverSubscriptionEventTypes-BMUrTkTg.d.cts +135 -0
- package/dist/serverSubscriptionEventTypes-BMUrTkTg.d.cts.map +1 -0
- package/dist/serverSubscriptionEventTypes-UCYAjmt7.d.ts +135 -0
- package/dist/serverSubscriptionEventTypes-UCYAjmt7.d.ts.map +1 -0
- package/dist/serverSubscriptionTypes-BSuYa6z_.d.cts +82 -0
- package/dist/serverSubscriptionTypes-BSuYa6z_.d.cts.map +1 -0
- package/dist/serverSubscriptionTypes-DoMWeKgY.d.ts +82 -0
- package/dist/serverSubscriptionTypes-DoMWeKgY.d.ts.map +1 -0
- package/dist/types/EngineServerFailureError.cjs +9 -33
- package/dist/types/EngineServerFailureError.cjs.map +1 -1
- package/dist/types/EngineServerFailureError.d.cts +2 -11
- package/dist/types/EngineServerFailureError.d.ts +2 -11
- package/dist/types/EngineServerFailureError.js +8 -8
- package/dist/types/EngineServerFailureError.js.map +1 -1
- package/dist/types/clientExecuteTypes.cjs +0 -19
- package/dist/types/clientExecuteTypes.d.cts +2 -91
- package/dist/types/clientExecuteTypes.d.ts +2 -91
- package/dist/types/clientExecuteTypes.js +1 -1
- package/dist/types/clientQueryTypes.cjs +0 -19
- package/dist/types/clientQueryTypes.d.cts +2 -219
- package/dist/types/clientQueryTypes.d.ts +2 -219
- package/dist/types/clientQueryTypes.js +1 -1
- package/dist/types/index.cjs +5 -39
- package/dist/types/index.d.cts +9 -10
- package/dist/types/index.d.ts +9 -10
- package/dist/types/index.js +3 -10
- package/dist/types/serverExecuteTypes.cjs +0 -19
- package/dist/types/serverExecuteTypes.d.cts +2 -93
- package/dist/types/serverExecuteTypes.d.ts +2 -93
- package/dist/types/serverExecuteTypes.js +1 -1
- package/dist/types/serverQueryModelTypes.cjs +0 -19
- package/dist/types/serverQueryModelTypes.d.cts +2 -96
- package/dist/types/serverQueryModelTypes.d.ts +2 -96
- package/dist/types/serverQueryModelTypes.js +1 -1
- package/dist/types/serverQueryTypes.cjs +12 -36
- package/dist/types/serverQueryTypes.cjs.map +1 -1
- package/dist/types/serverQueryTypes.d.cts +2 -309
- package/dist/types/serverQueryTypes.d.ts +2 -309
- package/dist/types/serverQueryTypes.js +11 -11
- package/dist/types/serverQueryTypes.js.map +1 -1
- package/dist/types/serverSubscriptionEventTypes.cjs +0 -19
- package/dist/types/serverSubscriptionEventTypes.d.cts +2 -135
- package/dist/types/serverSubscriptionEventTypes.d.ts +2 -135
- package/dist/types/serverSubscriptionEventTypes.js +1 -1
- package/dist/types/serverSubscriptionTypes.cjs +0 -19
- package/dist/types/serverSubscriptionTypes.d.cts +2 -80
- package/dist/types/serverSubscriptionTypes.d.ts +2 -80
- package/dist/types/serverSubscriptionTypes.js +1 -1
- package/dist/utils/index.cjs +14 -25
- package/dist/utils/index.d.cts +2 -6
- package/dist/utils/index.d.ts +2 -6
- package/dist/utils/index.js +2 -3
- package/dist/utils/productEngineTypeMappers.cjs +16 -44
- package/dist/utils/productEngineTypeMappers.cjs.map +1 -1
- package/dist/utils/productEngineTypeMappers.d.cts +5 -3
- package/dist/utils/productEngineTypeMappers.d.cts.map +1 -0
- package/dist/utils/productEngineTypeMappers.d.ts +5 -3
- package/dist/utils/productEngineTypeMappers.d.ts.map +1 -0
- package/dist/utils/productEngineTypeMappers.js +12 -17
- package/dist/utils/productEngineTypeMappers.js.map +1 -1
- package/dist/utils/queryDataMappers.cjs +204 -292
- package/dist/utils/queryDataMappers.cjs.map +1 -1
- package/dist/utils/queryDataMappers.d.cts +2 -20
- package/dist/utils/queryDataMappers.d.ts +2 -20
- package/dist/utils/queryDataMappers.js +190 -264
- package/dist/utils/queryDataMappers.js.map +1 -1
- package/package.json +9 -9
- package/src/EngineQueryClient.ts +4 -0
- package/src/types/clientQueryTypes.ts +3 -0
- package/src/types/serverQueryTypes.ts +3 -0
- package/dist/EngineBaseClient.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/types/clientExecuteTypes.cjs.map +0 -1
- package/dist/types/clientExecuteTypes.js.map +0 -1
- package/dist/types/clientQueryTypes.cjs.map +0 -1
- package/dist/types/clientQueryTypes.js.map +0 -1
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/serverExecuteTypes.cjs.map +0 -1
- package/dist/types/serverExecuteTypes.js.map +0 -1
- package/dist/types/serverQueryModelTypes.cjs.map +0 -1
- package/dist/types/serverQueryModelTypes.js.map +0 -1
- package/dist/types/serverSubscriptionEventTypes.cjs.map +0 -1
- package/dist/types/serverSubscriptionEventTypes.js.map +0 -1
- package/dist/types/serverSubscriptionTypes.cjs.map +0 -1
- package/dist/types/serverSubscriptionTypes.js.map +0 -1
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.js.map +0 -1
|
@@ -1,135 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import './serverQueryModelTypes.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Reasons that can trigger position change events.
|
|
7
|
-
*/
|
|
8
|
-
type PositionChangeReason = 'deposit_collateral' | 'match_orders' | 'withdraw_collateral' | 'transfer_quote' | 'settle_pnl' | 'mint_nlp' | 'burn_nlp' | 'liquidate_subaccount';
|
|
9
|
-
/**
|
|
10
|
-
* Possible reasons for order updates.
|
|
11
|
-
*/
|
|
12
|
-
type OrderUpdateReason = 'cancelled' | 'filled' | 'placed';
|
|
13
|
-
type EngineServerSubscriptionEventType = 'trade' | 'best_bid_offer' | 'book_depth' | 'fill' | 'position_change' | 'order_update' | 'liquidation' | 'latest_candlestick' | 'funding_payment';
|
|
14
|
-
interface EngineServerSubscriptionBaseEvent<T extends EngineServerSubscriptionEventType = EngineServerSubscriptionEventType> {
|
|
15
|
-
type: T;
|
|
16
|
-
product_id: number;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Event from subscribing to a `trade` stream.
|
|
20
|
-
*/
|
|
21
|
-
interface EngineServerSubscriptionTradeEvent extends EngineServerSubscriptionBaseEvent<'trade'> {
|
|
22
|
-
timestamp: string;
|
|
23
|
-
price: string;
|
|
24
|
-
taker_qty: string;
|
|
25
|
-
maker_qty: string;
|
|
26
|
-
is_taker_buyer: boolean;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Event from subscribing to a `best_bid_offer` stream.
|
|
30
|
-
*/
|
|
31
|
-
interface EngineServerSubscriptionBestBidOfferEvent extends EngineServerSubscriptionBaseEvent<'best_bid_offer'> {
|
|
32
|
-
timestamp: string;
|
|
33
|
-
bid_price: string;
|
|
34
|
-
bid_qty: string;
|
|
35
|
-
ask_price: string;
|
|
36
|
-
ask_qty: string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Event from subscribing to a `book_depth` stream.
|
|
40
|
-
*/
|
|
41
|
-
interface EngineServerSubscriptionBookDepthEvent extends EngineServerSubscriptionBaseEvent<'book_depth'> {
|
|
42
|
-
last_max_timestamp: string;
|
|
43
|
-
min_timestamp: string;
|
|
44
|
-
max_timestamp: string;
|
|
45
|
-
bids: EngineServerPriceTickLiquidity[];
|
|
46
|
-
asks: EngineServerPriceTickLiquidity[];
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Event from subscribing to a `fill` stream.
|
|
50
|
-
*/
|
|
51
|
-
interface EngineServerSubscriptionFillEvent extends EngineServerSubscriptionBaseEvent<'fill'> {
|
|
52
|
-
timestamp: string;
|
|
53
|
-
subaccount: string;
|
|
54
|
-
order_digest: string;
|
|
55
|
-
filled_qty: string;
|
|
56
|
-
remaining_qty: string;
|
|
57
|
-
original_qty: string;
|
|
58
|
-
price: string;
|
|
59
|
-
is_taker: boolean;
|
|
60
|
-
is_bid: boolean;
|
|
61
|
-
fee: string;
|
|
62
|
-
submission_idx: string;
|
|
63
|
-
appendix: string;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Event from subscribing to a `position_change` stream.
|
|
67
|
-
*/
|
|
68
|
-
interface EngineServerSubscriptionPositionChangeEvent extends EngineServerSubscriptionBaseEvent<'position_change'> {
|
|
69
|
-
timestamp: string;
|
|
70
|
-
subaccount: string;
|
|
71
|
-
amount: string;
|
|
72
|
-
/** Zero for everything except perps */
|
|
73
|
-
v_quote_amount: string;
|
|
74
|
-
reason: PositionChangeReason;
|
|
75
|
-
/**
|
|
76
|
-
* True if the position change was for an isolated position
|
|
77
|
-
*/
|
|
78
|
-
isolated: boolean;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Event from subscribing to an `order_update` stream.
|
|
82
|
-
*/
|
|
83
|
-
interface EngineServerSubscriptionOrderUpdateEvent extends EngineServerSubscriptionBaseEvent<'order_update'> {
|
|
84
|
-
timestamp: string;
|
|
85
|
-
digest: string;
|
|
86
|
-
amount: string;
|
|
87
|
-
reason: OrderUpdateReason;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Event from subscribing to a `liquidation` stream.
|
|
91
|
-
*/
|
|
92
|
-
interface EngineServerSubscriptionLiquidationEvent extends EngineServerSubscriptionBaseEvent<'liquidation'> {
|
|
93
|
-
timestamp: string;
|
|
94
|
-
/** Single element for regular liquidations, two elements for spread liquidations [spotId, perpId] */
|
|
95
|
-
product_ids: number[];
|
|
96
|
-
liquidator: string;
|
|
97
|
-
liquidatee: string;
|
|
98
|
-
/** Amount liquidated (positive for long, negative for short) */
|
|
99
|
-
amount: string;
|
|
100
|
-
/** Price at which liquidation occurred */
|
|
101
|
-
price: string;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Event from subscribing to a `latest_candlestick` stream.
|
|
105
|
-
*/
|
|
106
|
-
interface EngineServerSubscriptionLatestCandlestickEvent extends EngineServerSubscriptionBaseEvent<'latest_candlestick'> {
|
|
107
|
-
timestamp: string;
|
|
108
|
-
granularity: number;
|
|
109
|
-
open_x18: string;
|
|
110
|
-
high_x18: string;
|
|
111
|
-
low_x18: string;
|
|
112
|
-
close_x18: string;
|
|
113
|
-
volume: string;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Event from subscribing to a `funding_payment` stream.
|
|
117
|
-
*/
|
|
118
|
-
interface EngineServerSubscriptionFundingPaymentEvent extends EngineServerSubscriptionBaseEvent<'funding_payment'> {
|
|
119
|
-
timestamp: string;
|
|
120
|
-
/** Funding payment amount (positive = receive, negative = pay) */
|
|
121
|
-
payment_amount: string;
|
|
122
|
-
/** Open interest at time of funding */
|
|
123
|
-
open_interest: string;
|
|
124
|
-
/** Current cumulative funding values */
|
|
125
|
-
cumulative_funding_long_x18: string;
|
|
126
|
-
cumulative_funding_short_x18: string;
|
|
127
|
-
/** Time delta over which the funding payment was calculated */
|
|
128
|
-
dt: string;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Union type for all engine server subscription events.
|
|
132
|
-
*/
|
|
133
|
-
type EngineServerSubscriptionEvent = EngineServerSubscriptionTradeEvent | EngineServerSubscriptionBestBidOfferEvent | EngineServerSubscriptionBookDepthEvent | EngineServerSubscriptionFillEvent | EngineServerSubscriptionPositionChangeEvent | EngineServerSubscriptionOrderUpdateEvent | EngineServerSubscriptionLiquidationEvent | EngineServerSubscriptionLatestCandlestickEvent | EngineServerSubscriptionFundingPaymentEvent;
|
|
134
|
-
|
|
135
|
-
export type { EngineServerSubscriptionBaseEvent, EngineServerSubscriptionBestBidOfferEvent, EngineServerSubscriptionBookDepthEvent, EngineServerSubscriptionEvent, EngineServerSubscriptionEventType, EngineServerSubscriptionFillEvent, EngineServerSubscriptionFundingPaymentEvent, EngineServerSubscriptionLatestCandlestickEvent, EngineServerSubscriptionLiquidationEvent, EngineServerSubscriptionOrderUpdateEvent, EngineServerSubscriptionPositionChangeEvent, EngineServerSubscriptionTradeEvent, OrderUpdateReason, PositionChangeReason };
|
|
1
|
+
import { a as EngineServerSubscriptionEventType, c as EngineServerSubscriptionLatestCandlestickEvent, d as EngineServerSubscriptionPositionChangeEvent, f as EngineServerSubscriptionTradeEvent, i as EngineServerSubscriptionEvent, l as EngineServerSubscriptionLiquidationEvent, m as PositionChangeReason, n as EngineServerSubscriptionBestBidOfferEvent, o as EngineServerSubscriptionFillEvent, p as OrderUpdateReason, r as EngineServerSubscriptionBookDepthEvent, s as EngineServerSubscriptionFundingPaymentEvent, t as EngineServerSubscriptionBaseEvent, u as EngineServerSubscriptionOrderUpdateEvent } from "../serverSubscriptionEventTypes-UCYAjmt7.js";
|
|
2
|
+
export { EngineServerSubscriptionBaseEvent, EngineServerSubscriptionBestBidOfferEvent, EngineServerSubscriptionBookDepthEvent, EngineServerSubscriptionEvent, EngineServerSubscriptionEventType, EngineServerSubscriptionFillEvent, EngineServerSubscriptionFundingPaymentEvent, EngineServerSubscriptionLatestCandlestickEvent, EngineServerSubscriptionLiquidationEvent, EngineServerSubscriptionOrderUpdateEvent, EngineServerSubscriptionPositionChangeEvent, EngineServerSubscriptionTradeEvent, OrderUpdateReason, PositionChangeReason };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/serverSubscriptionTypes.ts
|
|
17
|
-
var serverSubscriptionTypes_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(serverSubscriptionTypes_exports);
|
|
19
|
-
//# sourceMappingURL=serverSubscriptionTypes.cjs.map
|
|
@@ -1,80 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
product_id?: number;
|
|
4
|
-
subaccount: string;
|
|
5
|
-
}
|
|
6
|
-
interface EngineServerTradeStreamParams {
|
|
7
|
-
product_id: number;
|
|
8
|
-
}
|
|
9
|
-
interface EngineServerBestBidOfferStreamParams {
|
|
10
|
-
product_id: number;
|
|
11
|
-
}
|
|
12
|
-
interface EngineServerFillStreamParams {
|
|
13
|
-
/** when not provided, subscribes to all products */
|
|
14
|
-
product_id?: number;
|
|
15
|
-
subaccount: string;
|
|
16
|
-
}
|
|
17
|
-
interface EngineServerPositionChangeStreamParams {
|
|
18
|
-
/** when not provided, subscribes to all products */
|
|
19
|
-
product_id?: number;
|
|
20
|
-
subaccount: string;
|
|
21
|
-
}
|
|
22
|
-
interface EngineServerBookDepthStreamParams {
|
|
23
|
-
product_id: number;
|
|
24
|
-
}
|
|
25
|
-
interface EngineServerLatestCandlestickStreamParams {
|
|
26
|
-
product_id: number;
|
|
27
|
-
granularity: number;
|
|
28
|
-
}
|
|
29
|
-
interface EngineServerLiquidationStreamParams {
|
|
30
|
-
/** when not provided, subscribes to all products */
|
|
31
|
-
product_id?: number;
|
|
32
|
-
}
|
|
33
|
-
interface EngineServerFundingPaymentStreamParams {
|
|
34
|
-
product_id: number;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Available subscription streams
|
|
38
|
-
*/
|
|
39
|
-
interface EngineServerSubscriptionStreamParamsByType {
|
|
40
|
-
order_update: EngineServerOrderUpdateStreamParams;
|
|
41
|
-
trade: EngineServerTradeStreamParams;
|
|
42
|
-
best_bid_offer: EngineServerBestBidOfferStreamParams;
|
|
43
|
-
fill: EngineServerFillStreamParams;
|
|
44
|
-
position_change: EngineServerPositionChangeStreamParams;
|
|
45
|
-
book_depth: EngineServerBookDepthStreamParams;
|
|
46
|
-
liquidation: EngineServerLiquidationStreamParams;
|
|
47
|
-
latest_candlestick: EngineServerLatestCandlestickStreamParams;
|
|
48
|
-
funding_payment: EngineServerFundingPaymentStreamParams;
|
|
49
|
-
}
|
|
50
|
-
type EngineServerSubscriptionStreamParamsType = keyof EngineServerSubscriptionStreamParamsByType;
|
|
51
|
-
/**
|
|
52
|
-
* Describes a stream that can be subscribed to.
|
|
53
|
-
*/
|
|
54
|
-
type EngineServerSubscriptionStream<TStreamType extends EngineServerSubscriptionStreamParamsType> = {
|
|
55
|
-
type: TStreamType;
|
|
56
|
-
} & EngineServerSubscriptionStreamParamsByType[TStreamType];
|
|
57
|
-
/**
|
|
58
|
-
* Params to provide to a `subscribe` / `unsubscribe` action.
|
|
59
|
-
*/
|
|
60
|
-
interface EngineServerSubscriptionParams {
|
|
61
|
-
stream: EngineServerSubscriptionStream<EngineServerSubscriptionStreamParamsType>;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Available actions on the subscription API.
|
|
65
|
-
*/
|
|
66
|
-
interface EngineServerSubscriptionRequestByType {
|
|
67
|
-
subscribe: EngineServerSubscriptionParams;
|
|
68
|
-
unsubscribe: EngineServerSubscriptionParams;
|
|
69
|
-
list: Record<string, never>;
|
|
70
|
-
}
|
|
71
|
-
type EngineServerSubscriptionRequestType = keyof EngineServerSubscriptionRequestByType;
|
|
72
|
-
/**
|
|
73
|
-
* Top level request to send to the server.
|
|
74
|
-
*/
|
|
75
|
-
type EngineServerSubscriptionRequest<TRequestType extends EngineServerSubscriptionRequestType> = {
|
|
76
|
-
id: number;
|
|
77
|
-
method: TRequestType;
|
|
78
|
-
} & EngineServerSubscriptionRequestByType[TRequestType];
|
|
79
|
-
|
|
80
|
-
export type { EngineServerBestBidOfferStreamParams, EngineServerBookDepthStreamParams, EngineServerFillStreamParams, EngineServerFundingPaymentStreamParams, EngineServerLatestCandlestickStreamParams, EngineServerLiquidationStreamParams, EngineServerOrderUpdateStreamParams, EngineServerPositionChangeStreamParams, EngineServerSubscriptionParams, EngineServerSubscriptionRequest, EngineServerSubscriptionRequestByType, EngineServerSubscriptionRequestType, EngineServerSubscriptionStream, EngineServerSubscriptionStreamParamsByType, EngineServerSubscriptionStreamParamsType, EngineServerTradeStreamParams };
|
|
1
|
+
import { a as EngineServerLatestCandlestickStreamParams, c as EngineServerPositionChangeStreamParams, d as EngineServerSubscriptionRequestByType, f as EngineServerSubscriptionRequestType, g as EngineServerTradeStreamParams, h as EngineServerSubscriptionStreamParamsType, i as EngineServerFundingPaymentStreamParams, l as EngineServerSubscriptionParams, m as EngineServerSubscriptionStreamParamsByType, n as EngineServerBookDepthStreamParams, o as EngineServerLiquidationStreamParams, p as EngineServerSubscriptionStream, r as EngineServerFillStreamParams, s as EngineServerOrderUpdateStreamParams, t as EngineServerBestBidOfferStreamParams, u as EngineServerSubscriptionRequest } from "../serverSubscriptionTypes-BSuYa6z_.cjs";
|
|
2
|
+
export { EngineServerBestBidOfferStreamParams, EngineServerBookDepthStreamParams, EngineServerFillStreamParams, EngineServerFundingPaymentStreamParams, EngineServerLatestCandlestickStreamParams, EngineServerLiquidationStreamParams, EngineServerOrderUpdateStreamParams, EngineServerPositionChangeStreamParams, EngineServerSubscriptionParams, EngineServerSubscriptionRequest, EngineServerSubscriptionRequestByType, EngineServerSubscriptionRequestType, EngineServerSubscriptionStream, EngineServerSubscriptionStreamParamsByType, EngineServerSubscriptionStreamParamsType, EngineServerTradeStreamParams };
|
|
@@ -1,80 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
product_id?: number;
|
|
4
|
-
subaccount: string;
|
|
5
|
-
}
|
|
6
|
-
interface EngineServerTradeStreamParams {
|
|
7
|
-
product_id: number;
|
|
8
|
-
}
|
|
9
|
-
interface EngineServerBestBidOfferStreamParams {
|
|
10
|
-
product_id: number;
|
|
11
|
-
}
|
|
12
|
-
interface EngineServerFillStreamParams {
|
|
13
|
-
/** when not provided, subscribes to all products */
|
|
14
|
-
product_id?: number;
|
|
15
|
-
subaccount: string;
|
|
16
|
-
}
|
|
17
|
-
interface EngineServerPositionChangeStreamParams {
|
|
18
|
-
/** when not provided, subscribes to all products */
|
|
19
|
-
product_id?: number;
|
|
20
|
-
subaccount: string;
|
|
21
|
-
}
|
|
22
|
-
interface EngineServerBookDepthStreamParams {
|
|
23
|
-
product_id: number;
|
|
24
|
-
}
|
|
25
|
-
interface EngineServerLatestCandlestickStreamParams {
|
|
26
|
-
product_id: number;
|
|
27
|
-
granularity: number;
|
|
28
|
-
}
|
|
29
|
-
interface EngineServerLiquidationStreamParams {
|
|
30
|
-
/** when not provided, subscribes to all products */
|
|
31
|
-
product_id?: number;
|
|
32
|
-
}
|
|
33
|
-
interface EngineServerFundingPaymentStreamParams {
|
|
34
|
-
product_id: number;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Available subscription streams
|
|
38
|
-
*/
|
|
39
|
-
interface EngineServerSubscriptionStreamParamsByType {
|
|
40
|
-
order_update: EngineServerOrderUpdateStreamParams;
|
|
41
|
-
trade: EngineServerTradeStreamParams;
|
|
42
|
-
best_bid_offer: EngineServerBestBidOfferStreamParams;
|
|
43
|
-
fill: EngineServerFillStreamParams;
|
|
44
|
-
position_change: EngineServerPositionChangeStreamParams;
|
|
45
|
-
book_depth: EngineServerBookDepthStreamParams;
|
|
46
|
-
liquidation: EngineServerLiquidationStreamParams;
|
|
47
|
-
latest_candlestick: EngineServerLatestCandlestickStreamParams;
|
|
48
|
-
funding_payment: EngineServerFundingPaymentStreamParams;
|
|
49
|
-
}
|
|
50
|
-
type EngineServerSubscriptionStreamParamsType = keyof EngineServerSubscriptionStreamParamsByType;
|
|
51
|
-
/**
|
|
52
|
-
* Describes a stream that can be subscribed to.
|
|
53
|
-
*/
|
|
54
|
-
type EngineServerSubscriptionStream<TStreamType extends EngineServerSubscriptionStreamParamsType> = {
|
|
55
|
-
type: TStreamType;
|
|
56
|
-
} & EngineServerSubscriptionStreamParamsByType[TStreamType];
|
|
57
|
-
/**
|
|
58
|
-
* Params to provide to a `subscribe` / `unsubscribe` action.
|
|
59
|
-
*/
|
|
60
|
-
interface EngineServerSubscriptionParams {
|
|
61
|
-
stream: EngineServerSubscriptionStream<EngineServerSubscriptionStreamParamsType>;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Available actions on the subscription API.
|
|
65
|
-
*/
|
|
66
|
-
interface EngineServerSubscriptionRequestByType {
|
|
67
|
-
subscribe: EngineServerSubscriptionParams;
|
|
68
|
-
unsubscribe: EngineServerSubscriptionParams;
|
|
69
|
-
list: Record<string, never>;
|
|
70
|
-
}
|
|
71
|
-
type EngineServerSubscriptionRequestType = keyof EngineServerSubscriptionRequestByType;
|
|
72
|
-
/**
|
|
73
|
-
* Top level request to send to the server.
|
|
74
|
-
*/
|
|
75
|
-
type EngineServerSubscriptionRequest<TRequestType extends EngineServerSubscriptionRequestType> = {
|
|
76
|
-
id: number;
|
|
77
|
-
method: TRequestType;
|
|
78
|
-
} & EngineServerSubscriptionRequestByType[TRequestType];
|
|
79
|
-
|
|
80
|
-
export type { EngineServerBestBidOfferStreamParams, EngineServerBookDepthStreamParams, EngineServerFillStreamParams, EngineServerFundingPaymentStreamParams, EngineServerLatestCandlestickStreamParams, EngineServerLiquidationStreamParams, EngineServerOrderUpdateStreamParams, EngineServerPositionChangeStreamParams, EngineServerSubscriptionParams, EngineServerSubscriptionRequest, EngineServerSubscriptionRequestByType, EngineServerSubscriptionRequestType, EngineServerSubscriptionStream, EngineServerSubscriptionStreamParamsByType, EngineServerSubscriptionStreamParamsType, EngineServerTradeStreamParams };
|
|
1
|
+
import { a as EngineServerLatestCandlestickStreamParams, c as EngineServerPositionChangeStreamParams, d as EngineServerSubscriptionRequestByType, f as EngineServerSubscriptionRequestType, g as EngineServerTradeStreamParams, h as EngineServerSubscriptionStreamParamsType, i as EngineServerFundingPaymentStreamParams, l as EngineServerSubscriptionParams, m as EngineServerSubscriptionStreamParamsByType, n as EngineServerBookDepthStreamParams, o as EngineServerLiquidationStreamParams, p as EngineServerSubscriptionStream, r as EngineServerFillStreamParams, s as EngineServerOrderUpdateStreamParams, t as EngineServerBestBidOfferStreamParams, u as EngineServerSubscriptionRequest } from "../serverSubscriptionTypes-DoMWeKgY.js";
|
|
2
|
+
export { EngineServerBestBidOfferStreamParams, EngineServerBookDepthStreamParams, EngineServerFillStreamParams, EngineServerFundingPaymentStreamParams, EngineServerLatestCandlestickStreamParams, EngineServerLiquidationStreamParams, EngineServerOrderUpdateStreamParams, EngineServerPositionChangeStreamParams, EngineServerSubscriptionParams, EngineServerSubscriptionRequest, EngineServerSubscriptionRequestByType, EngineServerSubscriptionRequestType, EngineServerSubscriptionStream, EngineServerSubscriptionStreamParamsByType, EngineServerSubscriptionStreamParamsType, EngineServerTradeStreamParams };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
package/dist/utils/index.cjs
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
|
|
17
|
-
// src/utils/index.ts
|
|
18
|
-
var utils_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(utils_exports);
|
|
20
|
-
__reExport(utils_exports, require("./queryDataMappers.cjs"), module.exports);
|
|
21
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
-
0 && (module.exports = {
|
|
23
|
-
...require("./queryDataMappers.cjs")
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_utils_queryDataMappers = require("./queryDataMappers.cjs");
|
|
3
|
+
exports.mapEngineMarketPrice = require_utils_queryDataMappers.mapEngineMarketPrice;
|
|
4
|
+
exports.mapEngineServerBalanceHealthContributions = require_utils_queryDataMappers.mapEngineServerBalanceHealthContributions;
|
|
5
|
+
exports.mapEngineServerIsolatedPositions = require_utils_queryDataMappers.mapEngineServerIsolatedPositions;
|
|
6
|
+
exports.mapEngineServerNlpLockedBalances = require_utils_queryDataMappers.mapEngineServerNlpLockedBalances;
|
|
7
|
+
exports.mapEngineServerNlpPoolInfo = require_utils_queryDataMappers.mapEngineServerNlpPoolInfo;
|
|
8
|
+
exports.mapEngineServerOrder = require_utils_queryDataMappers.mapEngineServerOrder;
|
|
9
|
+
exports.mapEngineServerPerpProduct = require_utils_queryDataMappers.mapEngineServerPerpProduct;
|
|
10
|
+
exports.mapEngineServerSpotProduct = require_utils_queryDataMappers.mapEngineServerSpotProduct;
|
|
11
|
+
exports.mapEngineServerSymbol = require_utils_queryDataMappers.mapEngineServerSymbol;
|
|
12
|
+
exports.mapEngineServerSymbols = require_utils_queryDataMappers.mapEngineServerSymbols;
|
|
13
|
+
exports.mapEngineServerTickLiquidity = require_utils_queryDataMappers.mapEngineServerTickLiquidity;
|
|
14
|
+
exports.mapSubaccountSummary = require_utils_queryDataMappers.mapSubaccountSummary;
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../types/serverQueryTypes.cjs';
|
|
4
|
-
import '../types/serverQueryModelTypes.cjs';
|
|
5
|
-
import '../types/clientQueryTypes.cjs';
|
|
6
|
-
import 'bignumber.js';
|
|
1
|
+
import { a as mapEngineServerNlpPoolInfo, c as mapEngineServerSpotProduct, d as mapEngineServerTickLiquidity, f as mapSubaccountSummary, i as mapEngineServerNlpLockedBalances, l as mapEngineServerSymbol, n as mapEngineServerBalanceHealthContributions, o as mapEngineServerOrder, r as mapEngineServerIsolatedPositions, s as mapEngineServerPerpProduct, t as mapEngineMarketPrice, u as mapEngineServerSymbols } from "../queryDataMappers-DO9yWdLo.cjs";
|
|
2
|
+
export { mapEngineMarketPrice, mapEngineServerBalanceHealthContributions, mapEngineServerIsolatedPositions, mapEngineServerNlpLockedBalances, mapEngineServerNlpPoolInfo, mapEngineServerOrder, mapEngineServerPerpProduct, mapEngineServerSpotProduct, mapEngineServerSymbol, mapEngineServerSymbols, mapEngineServerTickLiquidity, mapSubaccountSummary };
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../types/serverQueryTypes.js';
|
|
4
|
-
import '../types/serverQueryModelTypes.js';
|
|
5
|
-
import '../types/clientQueryTypes.js';
|
|
6
|
-
import 'bignumber.js';
|
|
1
|
+
import { a as mapEngineServerNlpPoolInfo, c as mapEngineServerSpotProduct, d as mapEngineServerTickLiquidity, f as mapSubaccountSummary, i as mapEngineServerNlpLockedBalances, l as mapEngineServerSymbol, n as mapEngineServerBalanceHealthContributions, o as mapEngineServerOrder, r as mapEngineServerIsolatedPositions, s as mapEngineServerPerpProduct, t as mapEngineMarketPrice, u as mapEngineServerSymbols } from "../queryDataMappers-BguxA579.js";
|
|
2
|
+
export { mapEngineMarketPrice, mapEngineServerBalanceHealthContributions, mapEngineServerIsolatedPositions, mapEngineServerNlpLockedBalances, mapEngineServerNlpPoolInfo, mapEngineServerOrder, mapEngineServerPerpProduct, mapEngineServerSpotProduct, mapEngineServerSymbol, mapEngineServerSymbols, mapEngineServerTickLiquidity, mapSubaccountSummary };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { mapEngineMarketPrice, mapEngineServerBalanceHealthContributions, mapEngineServerIsolatedPositions, mapEngineServerNlpLockedBalances, mapEngineServerNlpPoolInfo, mapEngineServerOrder, mapEngineServerPerpProduct, mapEngineServerSpotProduct, mapEngineServerSymbol, mapEngineServerSymbols, mapEngineServerTickLiquidity, mapSubaccountSummary } from "./queryDataMappers.js";
|
|
2
|
+
export { mapEngineMarketPrice, mapEngineServerBalanceHealthContributions, mapEngineServerIsolatedPositions, mapEngineServerNlpLockedBalances, mapEngineServerNlpPoolInfo, mapEngineServerOrder, mapEngineServerPerpProduct, mapEngineServerSpotProduct, mapEngineServerSymbol, mapEngineServerSymbols, mapEngineServerTickLiquidity, mapSubaccountSummary };
|
|
@@ -1,49 +1,21 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/utils/productEngineTypeMappers.ts
|
|
21
|
-
var productEngineTypeMappers_exports = {};
|
|
22
|
-
__export(productEngineTypeMappers_exports, {
|
|
23
|
-
mapEngineServerProductType: () => mapEngineServerProductType,
|
|
24
|
-
mapProductEngineType: () => mapProductEngineType
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(productEngineTypeMappers_exports);
|
|
27
|
-
var import_shared = require("@nadohq/shared");
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../EngineBaseClient-Uc1D8ftx.cjs");
|
|
3
|
+
let _nadohq_shared = require("@nadohq/shared");
|
|
4
|
+
//#region src/utils/productEngineTypeMappers.ts
|
|
28
5
|
function mapProductEngineType(productEngineType) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return "perp";
|
|
34
|
-
}
|
|
6
|
+
switch (productEngineType) {
|
|
7
|
+
case _nadohq_shared.ProductEngineType.SPOT: return "spot";
|
|
8
|
+
case _nadohq_shared.ProductEngineType.PERP: return "perp";
|
|
9
|
+
}
|
|
35
10
|
}
|
|
36
11
|
function mapEngineServerProductType(productEngineServerType) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return import_shared.ProductEngineType.PERP;
|
|
42
|
-
}
|
|
12
|
+
switch (productEngineServerType) {
|
|
13
|
+
case "spot": return _nadohq_shared.ProductEngineType.SPOT;
|
|
14
|
+
case "perp": return _nadohq_shared.ProductEngineType.PERP;
|
|
15
|
+
}
|
|
43
16
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
});
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.mapEngineServerProductType = mapEngineServerProductType;
|
|
19
|
+
exports.mapProductEngineType = mapProductEngineType;
|
|
20
|
+
|
|
49
21
|
//# sourceMappingURL=productEngineTypeMappers.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/productEngineTypeMappers.ts"],"sourcesContent":["import { ProductEngineType } from '@nadohq/shared';\nimport { EngineServerProductType } from '../types';\n\nexport function mapProductEngineType(\n productEngineType: ProductEngineType,\n): EngineServerProductType {\n switch (productEngineType) {\n case ProductEngineType.SPOT:\n return 'spot';\n case ProductEngineType.PERP:\n return 'perp';\n }\n}\n\nexport function mapEngineServerProductType(\n productEngineServerType: EngineServerProductType,\n): ProductEngineType {\n switch (productEngineServerType) {\n case 'spot':\n return ProductEngineType.SPOT;\n case 'perp':\n return ProductEngineType.PERP;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"productEngineTypeMappers.cjs","names":["ProductEngineType"],"sources":["../../src/utils/productEngineTypeMappers.ts"],"sourcesContent":["import { ProductEngineType } from '@nadohq/shared';\nimport { EngineServerProductType } from '../types';\n\nexport function mapProductEngineType(\n productEngineType: ProductEngineType,\n): EngineServerProductType {\n switch (productEngineType) {\n case ProductEngineType.SPOT:\n return 'spot';\n case ProductEngineType.PERP:\n return 'perp';\n }\n}\n\nexport function mapEngineServerProductType(\n productEngineServerType: EngineServerProductType,\n): ProductEngineType {\n switch (productEngineServerType) {\n case 'spot':\n return ProductEngineType.SPOT;\n case 'perp':\n return ProductEngineType.PERP;\n }\n}\n"],"mappings":";;;;AAGA,SAAgB,qBACd,mBACyB;CACzB,QAAQ,mBAAR;EACE,KAAKA,eAAAA,kBAAkB,MACrB,OAAO;EACT,KAAKA,eAAAA,kBAAkB,MACrB,OAAO;CACX;AACF;AAEA,SAAgB,2BACd,yBACmB;CACnB,QAAQ,yBAAR;EACE,KAAK,QACH,OAAOA,eAAAA,kBAAkB;EAC3B,KAAK,QACH,OAAOA,eAAAA,kBAAkB;CAC7B;AACF"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { u as EngineServerProductType } from "../serverQueryModelTypes-85xnbU-a.cjs";
|
|
2
|
+
import { ProductEngineType } from "@nadohq/shared";
|
|
3
3
|
|
|
4
|
+
//#region src/utils/productEngineTypeMappers.d.ts
|
|
4
5
|
declare function mapProductEngineType(productEngineType: ProductEngineType): EngineServerProductType;
|
|
5
6
|
declare function mapEngineServerProductType(productEngineServerType: EngineServerProductType): ProductEngineType;
|
|
6
|
-
|
|
7
|
+
//#endregion
|
|
7
8
|
export { mapEngineServerProductType, mapProductEngineType };
|
|
9
|
+
//# sourceMappingURL=productEngineTypeMappers.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productEngineTypeMappers.d.cts","names":[],"sources":["../../src/utils/src/utils/productEngineTypeMappers.ts"],"mappings":";;;;iBAGgB,oBAAA,CACd,iBAAA,EAAmB,iBAAA,GAClB,uBAAuB;AAAA,iBASV,0BAAA,CACd,uBAAA,EAAyB,uBAAA,GACxB,iBAAiB"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { u as EngineServerProductType } from "../serverQueryModelTypes-CENoy5Hm.js";
|
|
2
|
+
import { ProductEngineType } from "@nadohq/shared";
|
|
3
3
|
|
|
4
|
+
//#region src/utils/productEngineTypeMappers.d.ts
|
|
4
5
|
declare function mapProductEngineType(productEngineType: ProductEngineType): EngineServerProductType;
|
|
5
6
|
declare function mapEngineServerProductType(productEngineServerType: EngineServerProductType): ProductEngineType;
|
|
6
|
-
|
|
7
|
+
//#endregion
|
|
7
8
|
export { mapEngineServerProductType, mapProductEngineType };
|
|
9
|
+
//# sourceMappingURL=productEngineTypeMappers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productEngineTypeMappers.d.ts","names":[],"sources":["../../src/utils/src/utils/productEngineTypeMappers.ts"],"mappings":";;;;iBAGgB,oBAAA,CACd,iBAAA,EAAmB,iBAAA,GAClB,uBAAuB;AAAA,iBASV,0BAAA,CACd,uBAAA,EAAyB,uBAAA,GACxB,iBAAiB"}
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
// src/utils/productEngineTypeMappers.ts
|
|
2
1
|
import { ProductEngineType } from "@nadohq/shared";
|
|
2
|
+
//#region src/utils/productEngineTypeMappers.ts
|
|
3
3
|
function mapProductEngineType(productEngineType) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return "perp";
|
|
9
|
-
}
|
|
4
|
+
switch (productEngineType) {
|
|
5
|
+
case ProductEngineType.SPOT: return "spot";
|
|
6
|
+
case ProductEngineType.PERP: return "perp";
|
|
7
|
+
}
|
|
10
8
|
}
|
|
11
9
|
function mapEngineServerProductType(productEngineServerType) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return ProductEngineType.PERP;
|
|
17
|
-
}
|
|
10
|
+
switch (productEngineServerType) {
|
|
11
|
+
case "spot": return ProductEngineType.SPOT;
|
|
12
|
+
case "perp": return ProductEngineType.PERP;
|
|
13
|
+
}
|
|
18
14
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { mapEngineServerProductType, mapProductEngineType };
|
|
17
|
+
|
|
23
18
|
//# sourceMappingURL=productEngineTypeMappers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/productEngineTypeMappers.ts"],"sourcesContent":["import { ProductEngineType } from '@nadohq/shared';\nimport { EngineServerProductType } from '../types';\n\nexport function mapProductEngineType(\n productEngineType: ProductEngineType,\n): EngineServerProductType {\n switch (productEngineType) {\n case ProductEngineType.SPOT:\n return 'spot';\n case ProductEngineType.PERP:\n return 'perp';\n }\n}\n\nexport function mapEngineServerProductType(\n productEngineServerType: EngineServerProductType,\n): ProductEngineType {\n switch (productEngineServerType) {\n case 'spot':\n return ProductEngineType.SPOT;\n case 'perp':\n return ProductEngineType.PERP;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"productEngineTypeMappers.js","names":[],"sources":["../../src/utils/productEngineTypeMappers.ts"],"sourcesContent":["import { ProductEngineType } from '@nadohq/shared';\nimport { EngineServerProductType } from '../types';\n\nexport function mapProductEngineType(\n productEngineType: ProductEngineType,\n): EngineServerProductType {\n switch (productEngineType) {\n case ProductEngineType.SPOT:\n return 'spot';\n case ProductEngineType.PERP:\n return 'perp';\n }\n}\n\nexport function mapEngineServerProductType(\n productEngineServerType: EngineServerProductType,\n): ProductEngineType {\n switch (productEngineServerType) {\n case 'spot':\n return ProductEngineType.SPOT;\n case 'perp':\n return ProductEngineType.PERP;\n }\n}\n"],"mappings":";;AAGA,SAAgB,qBACd,mBACyB;CACzB,QAAQ,mBAAR;EACE,KAAK,kBAAkB,MACrB,OAAO;EACT,KAAK,kBAAkB,MACrB,OAAO;CACX;AACF;AAEA,SAAgB,2BACd,yBACmB;CACnB,QAAQ,yBAAR;EACE,KAAK,QACH,OAAO,kBAAkB;EAC3B,KAAK,QACH,OAAO,kBAAkB;CAC7B;AACF"}
|