adaptic-backend 1.0.266 → 1.0.267
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/Account.cjs +27 -27
- package/Action.cjs +81 -81
- package/Alert.cjs +51 -51
- package/AlpacaAccount.cjs +99 -99
- package/Asset.cjs +111 -111
- package/Authenticator.cjs +27 -27
- package/Contract.cjs +90 -90
- package/Customer.cjs +27 -27
- package/Deliverable.cjs +36 -36
- package/NewsArticle.cjs +18 -18
- package/NewsArticleAssetSentiment.cjs +48 -48
- package/Order.cjs +108 -108
- package/Position.cjs +93 -93
- package/Session.cjs +27 -27
- package/StopLoss.cjs +51 -51
- package/TakeProfit.cjs +51 -51
- package/Trade.cjs +108 -108
- package/User.cjs +51 -51
- package/package.json +1 -1
- package/server/Account.js.map +1 -1
- package/server/Account.mjs +27 -27
- package/server/Action.js.map +1 -1
- package/server/Action.mjs +81 -81
- package/server/Alert.js.map +1 -1
- package/server/Alert.mjs +51 -51
- package/server/AlpacaAccount.js.map +1 -1
- package/server/AlpacaAccount.mjs +99 -99
- package/server/Asset.js.map +1 -1
- package/server/Asset.mjs +111 -111
- package/server/Authenticator.js.map +1 -1
- package/server/Authenticator.mjs +27 -27
- package/server/Contract.js.map +1 -1
- package/server/Contract.mjs +90 -90
- package/server/Customer.js.map +1 -1
- package/server/Customer.mjs +27 -27
- package/server/Deliverable.js.map +1 -1
- package/server/Deliverable.mjs +36 -36
- package/server/NewsArticle.js.map +1 -1
- package/server/NewsArticle.mjs +18 -18
- package/server/NewsArticleAssetSentiment.js.map +1 -1
- package/server/NewsArticleAssetSentiment.mjs +48 -48
- package/server/Order.js.map +1 -1
- package/server/Order.mjs +108 -108
- package/server/Position.js.map +1 -1
- package/server/Position.mjs +93 -93
- package/server/Session.js.map +1 -1
- package/server/Session.mjs +27 -27
- package/server/StopLoss.js.map +1 -1
- package/server/StopLoss.mjs +51 -51
- package/server/TakeProfit.js.map +1 -1
- package/server/TakeProfit.mjs +51 -51
- package/server/Trade.js.map +1 -1
- package/server/Trade.mjs +108 -108
- package/server/User.js.map +1 -1
- package/server/User.mjs +51 -51
package/server/Asset.mjs
CHANGED
@@ -1641,7 +1641,7 @@ export const Asset = {
|
|
1641
1641
|
set: props.updatedAt
|
1642
1642
|
} : undefined,
|
1643
1643
|
trades: props.trades ?
|
1644
|
-
Array.isArray(props.trades) && props.trades.length > 0 && props.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
1644
|
+
Array.isArray(props.trades) && props.trades.length > 0 && props.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
1645
1645
|
connect: props.trades.map((item) => ({
|
1646
1646
|
id: item.id
|
1647
1647
|
}))
|
@@ -1693,7 +1693,7 @@ export const Asset = {
|
|
1693
1693
|
set: item.status
|
1694
1694
|
} : undefined,
|
1695
1695
|
alpacaAccount: item.alpacaAccount ?
|
1696
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
1696
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
1697
1697
|
? {
|
1698
1698
|
connect: {
|
1699
1699
|
id: item.alpacaAccount.id
|
@@ -1742,7 +1742,7 @@ export const Asset = {
|
|
1742
1742
|
set: item.alpacaAccount.volumeThreshold
|
1743
1743
|
} : undefined,
|
1744
1744
|
user: item.alpacaAccount.user ?
|
1745
|
-
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && Object.keys(item.alpacaAccount.user)[0] === 'id'
|
1745
|
+
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && (Object.keys(item.alpacaAccount.user)[0] === 'id' || Object.keys(item.alpacaAccount.user)[0] === 'symbol')
|
1746
1746
|
? {
|
1747
1747
|
connect: {
|
1748
1748
|
id: item.alpacaAccount.user.id
|
@@ -1816,7 +1816,7 @@ export const Asset = {
|
|
1816
1816
|
}
|
1817
1817
|
} : undefined,
|
1818
1818
|
orders: item.alpacaAccount.orders ?
|
1819
|
-
Array.isArray(item.alpacaAccount.orders) && item.alpacaAccount.orders.length > 0 && item.alpacaAccount.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
1819
|
+
Array.isArray(item.alpacaAccount.orders) && item.alpacaAccount.orders.length > 0 && item.alpacaAccount.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
1820
1820
|
connect: item.alpacaAccount.orders.map((item) => ({
|
1821
1821
|
id: item.id
|
1822
1822
|
}))
|
@@ -1947,7 +1947,7 @@ export const Asset = {
|
|
1947
1947
|
}))
|
1948
1948
|
} : undefined,
|
1949
1949
|
positions: item.alpacaAccount.positions ?
|
1950
|
-
Array.isArray(item.alpacaAccount.positions) && item.alpacaAccount.positions.length > 0 && item.alpacaAccount.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
1950
|
+
Array.isArray(item.alpacaAccount.positions) && item.alpacaAccount.positions.length > 0 && item.alpacaAccount.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
1951
1951
|
connect: item.alpacaAccount.positions.map((item) => ({
|
1952
1952
|
id: item.id
|
1953
1953
|
}))
|
@@ -2034,7 +2034,7 @@ export const Asset = {
|
|
2034
2034
|
}))
|
2035
2035
|
} : undefined,
|
2036
2036
|
alerts: item.alpacaAccount.alerts ?
|
2037
|
-
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
2037
|
+
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
2038
2038
|
connect: item.alpacaAccount.alerts.map((item) => ({
|
2039
2039
|
id: item.id
|
2040
2040
|
}))
|
@@ -2212,7 +2212,7 @@ export const Asset = {
|
|
2212
2212
|
}
|
2213
2213
|
} : undefined,
|
2214
2214
|
actions: item.actions ?
|
2215
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
2215
|
+
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
2216
2216
|
connect: item.actions.map((item) => ({
|
2217
2217
|
id: item.id
|
2218
2218
|
}))
|
@@ -2252,7 +2252,7 @@ export const Asset = {
|
|
2252
2252
|
set: item.dependedOnBy
|
2253
2253
|
} : undefined,
|
2254
2254
|
order: item.order ?
|
2255
|
-
typeof item.order === 'object' && Object.keys(item.order).length === 1 && Object.keys(item.order)[0] === 'id'
|
2255
|
+
typeof item.order === 'object' && Object.keys(item.order).length === 1 && (Object.keys(item.order)[0] === 'id' || Object.keys(item.order)[0] === 'symbol')
|
2256
2256
|
? {
|
2257
2257
|
connect: {
|
2258
2258
|
id: item.order.id
|
@@ -2705,7 +2705,7 @@ export const Asset = {
|
|
2705
2705
|
}))
|
2706
2706
|
} : undefined,
|
2707
2707
|
orders: props.orders ?
|
2708
|
-
Array.isArray(props.orders) && props.orders.length > 0 && props.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
2708
|
+
Array.isArray(props.orders) && props.orders.length > 0 && props.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
2709
2709
|
connect: props.orders.map((item) => ({
|
2710
2710
|
id: item.id
|
2711
2711
|
}))
|
@@ -2806,7 +2806,7 @@ export const Asset = {
|
|
2806
2806
|
set: item.takeProfitId
|
2807
2807
|
} : undefined,
|
2808
2808
|
stopLoss: item.stopLoss ?
|
2809
|
-
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && Object.keys(item.stopLoss)[0] === 'id'
|
2809
|
+
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && (Object.keys(item.stopLoss)[0] === 'id' || Object.keys(item.stopLoss)[0] === 'symbol')
|
2810
2810
|
? {
|
2811
2811
|
connect: {
|
2812
2812
|
id: item.stopLoss.id
|
@@ -2838,7 +2838,7 @@ export const Asset = {
|
|
2838
2838
|
}
|
2839
2839
|
} : undefined,
|
2840
2840
|
takeProfit: item.takeProfit ?
|
2841
|
-
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && Object.keys(item.takeProfit)[0] === 'id'
|
2841
|
+
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && (Object.keys(item.takeProfit)[0] === 'id' || Object.keys(item.takeProfit)[0] === 'symbol')
|
2842
2842
|
? {
|
2843
2843
|
connect: {
|
2844
2844
|
id: item.takeProfit.id
|
@@ -2870,7 +2870,7 @@ export const Asset = {
|
|
2870
2870
|
}
|
2871
2871
|
} : undefined,
|
2872
2872
|
alpacaAccount: item.alpacaAccount ?
|
2873
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
2873
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
2874
2874
|
? {
|
2875
2875
|
connect: {
|
2876
2876
|
id: item.alpacaAccount.id
|
@@ -2919,7 +2919,7 @@ export const Asset = {
|
|
2919
2919
|
set: item.alpacaAccount.volumeThreshold
|
2920
2920
|
} : undefined,
|
2921
2921
|
user: item.alpacaAccount.user ?
|
2922
|
-
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && Object.keys(item.alpacaAccount.user)[0] === 'id'
|
2922
|
+
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && (Object.keys(item.alpacaAccount.user)[0] === 'id' || Object.keys(item.alpacaAccount.user)[0] === 'symbol')
|
2923
2923
|
? {
|
2924
2924
|
connect: {
|
2925
2925
|
id: item.alpacaAccount.user.id
|
@@ -2993,7 +2993,7 @@ export const Asset = {
|
|
2993
2993
|
}
|
2994
2994
|
} : undefined,
|
2995
2995
|
trades: item.alpacaAccount.trades ?
|
2996
|
-
Array.isArray(item.alpacaAccount.trades) && item.alpacaAccount.trades.length > 0 && item.alpacaAccount.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
2996
|
+
Array.isArray(item.alpacaAccount.trades) && item.alpacaAccount.trades.length > 0 && item.alpacaAccount.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
2997
2997
|
connect: item.alpacaAccount.trades.map((item) => ({
|
2998
2998
|
id: item.id
|
2999
2999
|
}))
|
@@ -3061,7 +3061,7 @@ export const Asset = {
|
|
3061
3061
|
}))
|
3062
3062
|
} : undefined,
|
3063
3063
|
positions: item.alpacaAccount.positions ?
|
3064
|
-
Array.isArray(item.alpacaAccount.positions) && item.alpacaAccount.positions.length > 0 && item.alpacaAccount.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
3064
|
+
Array.isArray(item.alpacaAccount.positions) && item.alpacaAccount.positions.length > 0 && item.alpacaAccount.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
3065
3065
|
connect: item.alpacaAccount.positions.map((item) => ({
|
3066
3066
|
id: item.id
|
3067
3067
|
}))
|
@@ -3148,7 +3148,7 @@ export const Asset = {
|
|
3148
3148
|
}))
|
3149
3149
|
} : undefined,
|
3150
3150
|
alerts: item.alpacaAccount.alerts ?
|
3151
|
-
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
3151
|
+
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
3152
3152
|
connect: item.alpacaAccount.alerts.map((item) => ({
|
3153
3153
|
id: item.id
|
3154
3154
|
}))
|
@@ -3308,7 +3308,7 @@ export const Asset = {
|
|
3308
3308
|
}
|
3309
3309
|
} : undefined,
|
3310
3310
|
action: item.action ?
|
3311
|
-
typeof item.action === 'object' && Object.keys(item.action).length === 1 && Object.keys(item.action)[0] === 'id'
|
3311
|
+
typeof item.action === 'object' && Object.keys(item.action).length === 1 && (Object.keys(item.action)[0] === 'id' || Object.keys(item.action)[0] === 'symbol')
|
3312
3312
|
? {
|
3313
3313
|
connect: {
|
3314
3314
|
id: item.action.id
|
@@ -3351,7 +3351,7 @@ export const Asset = {
|
|
3351
3351
|
set: item.action.dependedOnBy
|
3352
3352
|
} : undefined,
|
3353
3353
|
trade: item.action.trade ?
|
3354
|
-
typeof item.action.trade === 'object' && Object.keys(item.action.trade).length === 1 && Object.keys(item.action.trade)[0] === 'id'
|
3354
|
+
typeof item.action.trade === 'object' && Object.keys(item.action.trade).length === 1 && (Object.keys(item.action.trade)[0] === 'id' || Object.keys(item.action.trade)[0] === 'symbol')
|
3355
3355
|
? {
|
3356
3356
|
connect: {
|
3357
3357
|
id: item.action.trade.id
|
@@ -3467,7 +3467,7 @@ export const Asset = {
|
|
3467
3467
|
}
|
3468
3468
|
} : undefined,
|
3469
3469
|
contract: item.contract ?
|
3470
|
-
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && Object.keys(item.contract)[0] === 'id'
|
3470
|
+
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && (Object.keys(item.contract)[0] === 'id' || Object.keys(item.contract)[0] === 'symbol')
|
3471
3471
|
? {
|
3472
3472
|
connect: {
|
3473
3473
|
id: item.contract.id
|
@@ -3561,7 +3561,7 @@ export const Asset = {
|
|
3561
3561
|
set: item.contract.orderId
|
3562
3562
|
} : undefined,
|
3563
3563
|
deliverables: item.contract.deliverables ?
|
3564
|
-
Array.isArray(item.contract.deliverables) && item.contract.deliverables.length > 0 && item.contract.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
3564
|
+
Array.isArray(item.contract.deliverables) && item.contract.deliverables.length > 0 && item.contract.deliverables.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
3565
3565
|
connect: item.contract.deliverables.map((item) => ({
|
3566
3566
|
id: item.id
|
3567
3567
|
}))
|
@@ -3620,7 +3620,7 @@ export const Asset = {
|
|
3620
3620
|
}))
|
3621
3621
|
} : undefined,
|
3622
3622
|
asset: item.contract.asset ?
|
3623
|
-
typeof item.contract.asset === 'object' && Object.keys(item.contract.asset).length === 1 && Object.keys(item.contract.asset)[0] === 'id'
|
3623
|
+
typeof item.contract.asset === 'object' && Object.keys(item.contract.asset).length === 1 && (Object.keys(item.contract.asset)[0] === 'id' || Object.keys(item.contract.asset)[0] === 'symbol')
|
3624
3624
|
? {
|
3625
3625
|
connect: {
|
3626
3626
|
id: item.contract.asset.id
|
@@ -4392,7 +4392,7 @@ export const Asset = {
|
|
4392
4392
|
}))
|
4393
4393
|
} : undefined,
|
4394
4394
|
positions: props.positions ?
|
4395
|
-
Array.isArray(props.positions) && props.positions.length > 0 && props.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4395
|
+
Array.isArray(props.positions) && props.positions.length > 0 && props.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
4396
4396
|
connect: props.positions.map((item) => ({
|
4397
4397
|
id: item.id
|
4398
4398
|
}))
|
@@ -4459,7 +4459,7 @@ export const Asset = {
|
|
4459
4459
|
set: item.closed
|
4460
4460
|
} : undefined,
|
4461
4461
|
alpacaAccount: item.alpacaAccount ?
|
4462
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
4462
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
4463
4463
|
? {
|
4464
4464
|
connect: {
|
4465
4465
|
id: item.alpacaAccount.id
|
@@ -4508,7 +4508,7 @@ export const Asset = {
|
|
4508
4508
|
set: item.alpacaAccount.volumeThreshold
|
4509
4509
|
} : undefined,
|
4510
4510
|
user: item.alpacaAccount.user ?
|
4511
|
-
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && Object.keys(item.alpacaAccount.user)[0] === 'id'
|
4511
|
+
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && (Object.keys(item.alpacaAccount.user)[0] === 'id' || Object.keys(item.alpacaAccount.user)[0] === 'symbol')
|
4512
4512
|
? {
|
4513
4513
|
connect: {
|
4514
4514
|
id: item.alpacaAccount.user.id
|
@@ -4582,7 +4582,7 @@ export const Asset = {
|
|
4582
4582
|
}
|
4583
4583
|
} : undefined,
|
4584
4584
|
trades: item.alpacaAccount.trades ?
|
4585
|
-
Array.isArray(item.alpacaAccount.trades) && item.alpacaAccount.trades.length > 0 && item.alpacaAccount.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4585
|
+
Array.isArray(item.alpacaAccount.trades) && item.alpacaAccount.trades.length > 0 && item.alpacaAccount.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
4586
4586
|
connect: item.alpacaAccount.trades.map((item) => ({
|
4587
4587
|
id: item.id
|
4588
4588
|
}))
|
@@ -4650,7 +4650,7 @@ export const Asset = {
|
|
4650
4650
|
}))
|
4651
4651
|
} : undefined,
|
4652
4652
|
orders: item.alpacaAccount.orders ?
|
4653
|
-
Array.isArray(item.alpacaAccount.orders) && item.alpacaAccount.orders.length > 0 && item.alpacaAccount.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4653
|
+
Array.isArray(item.alpacaAccount.orders) && item.alpacaAccount.orders.length > 0 && item.alpacaAccount.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
4654
4654
|
connect: item.alpacaAccount.orders.map((item) => ({
|
4655
4655
|
id: item.id
|
4656
4656
|
}))
|
@@ -4781,7 +4781,7 @@ export const Asset = {
|
|
4781
4781
|
}))
|
4782
4782
|
} : undefined,
|
4783
4783
|
alerts: item.alpacaAccount.alerts ?
|
4784
|
-
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4784
|
+
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
4785
4785
|
connect: item.alpacaAccount.alerts.map((item) => ({
|
4786
4786
|
id: item.id
|
4787
4787
|
}))
|
@@ -5122,7 +5122,7 @@ export const Asset = {
|
|
5122
5122
|
}))
|
5123
5123
|
} : undefined,
|
5124
5124
|
newsMentions: props.newsMentions ?
|
5125
|
-
Array.isArray(props.newsMentions) && props.newsMentions.length > 0 && props.newsMentions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
5125
|
+
Array.isArray(props.newsMentions) && props.newsMentions.length > 0 && props.newsMentions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
5126
5126
|
connect: props.newsMentions.map((item) => ({
|
5127
5127
|
id: item.id
|
5128
5128
|
}))
|
@@ -5154,7 +5154,7 @@ export const Asset = {
|
|
5154
5154
|
set: item.sentimentLabel
|
5155
5155
|
} : undefined,
|
5156
5156
|
news: item.news ?
|
5157
|
-
typeof item.news === 'object' && Object.keys(item.news).length === 1 && Object.keys(item.news)[0] === 'id'
|
5157
|
+
typeof item.news === 'object' && Object.keys(item.news).length === 1 && (Object.keys(item.news)[0] === 'id' || Object.keys(item.news)[0] === 'symbol')
|
5158
5158
|
? {
|
5159
5159
|
connect: {
|
5160
5160
|
id: item.news.id
|
@@ -5281,7 +5281,7 @@ export const Asset = {
|
|
5281
5281
|
}))
|
5282
5282
|
} : undefined,
|
5283
5283
|
contracts: props.contracts ?
|
5284
|
-
Array.isArray(props.contracts) && props.contracts.length > 0 && props.contracts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
5284
|
+
Array.isArray(props.contracts) && props.contracts.length > 0 && props.contracts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
5285
5285
|
connect: props.contracts.map((item) => ({
|
5286
5286
|
id: item.id
|
5287
5287
|
}))
|
@@ -5368,7 +5368,7 @@ export const Asset = {
|
|
5368
5368
|
set: item.orderId
|
5369
5369
|
} : undefined,
|
5370
5370
|
deliverables: item.deliverables ?
|
5371
|
-
Array.isArray(item.deliverables) && item.deliverables.length > 0 && item.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
5371
|
+
Array.isArray(item.deliverables) && item.deliverables.length > 0 && item.deliverables.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
5372
5372
|
connect: item.deliverables.map((item) => ({
|
5373
5373
|
id: item.id
|
5374
5374
|
}))
|
@@ -5427,7 +5427,7 @@ export const Asset = {
|
|
5427
5427
|
}))
|
5428
5428
|
} : undefined,
|
5429
5429
|
order: item.order ?
|
5430
|
-
typeof item.order === 'object' && Object.keys(item.order).length === 1 && Object.keys(item.order)[0] === 'id'
|
5430
|
+
typeof item.order === 'object' && Object.keys(item.order).length === 1 && (Object.keys(item.order)[0] === 'id' || Object.keys(item.order)[0] === 'symbol')
|
5431
5431
|
? {
|
5432
5432
|
connect: {
|
5433
5433
|
id: item.order.id
|
@@ -5539,7 +5539,7 @@ export const Asset = {
|
|
5539
5539
|
set: item.order.takeProfitId
|
5540
5540
|
} : undefined,
|
5541
5541
|
stopLoss: item.order.stopLoss ?
|
5542
|
-
typeof item.order.stopLoss === 'object' && Object.keys(item.order.stopLoss).length === 1 && Object.keys(item.order.stopLoss)[0] === 'id'
|
5542
|
+
typeof item.order.stopLoss === 'object' && Object.keys(item.order.stopLoss).length === 1 && (Object.keys(item.order.stopLoss)[0] === 'id' || Object.keys(item.order.stopLoss)[0] === 'symbol')
|
5543
5543
|
? {
|
5544
5544
|
connect: {
|
5545
5545
|
id: item.order.stopLoss.id
|
@@ -5571,7 +5571,7 @@ export const Asset = {
|
|
5571
5571
|
}
|
5572
5572
|
} : undefined,
|
5573
5573
|
takeProfit: item.order.takeProfit ?
|
5574
|
-
typeof item.order.takeProfit === 'object' && Object.keys(item.order.takeProfit).length === 1 && Object.keys(item.order.takeProfit)[0] === 'id'
|
5574
|
+
typeof item.order.takeProfit === 'object' && Object.keys(item.order.takeProfit).length === 1 && (Object.keys(item.order.takeProfit)[0] === 'id' || Object.keys(item.order.takeProfit)[0] === 'symbol')
|
5575
5575
|
? {
|
5576
5576
|
connect: {
|
5577
5577
|
id: item.order.takeProfit.id
|
@@ -5603,7 +5603,7 @@ export const Asset = {
|
|
5603
5603
|
}
|
5604
5604
|
} : undefined,
|
5605
5605
|
alpacaAccount: item.order.alpacaAccount ?
|
5606
|
-
typeof item.order.alpacaAccount === 'object' && Object.keys(item.order.alpacaAccount).length === 1 && Object.keys(item.order.alpacaAccount)[0] === 'id'
|
5606
|
+
typeof item.order.alpacaAccount === 'object' && Object.keys(item.order.alpacaAccount).length === 1 && (Object.keys(item.order.alpacaAccount)[0] === 'id' || Object.keys(item.order.alpacaAccount)[0] === 'symbol')
|
5607
5607
|
? {
|
5608
5608
|
connect: {
|
5609
5609
|
id: item.order.alpacaAccount.id
|
@@ -5667,7 +5667,7 @@ export const Asset = {
|
|
5667
5667
|
}
|
5668
5668
|
} : undefined,
|
5669
5669
|
action: item.order.action ?
|
5670
|
-
typeof item.order.action === 'object' && Object.keys(item.order.action).length === 1 && Object.keys(item.order.action)[0] === 'id'
|
5670
|
+
typeof item.order.action === 'object' && Object.keys(item.order.action).length === 1 && (Object.keys(item.order.action)[0] === 'id' || Object.keys(item.order.action)[0] === 'symbol')
|
5671
5671
|
? {
|
5672
5672
|
connect: {
|
5673
5673
|
id: item.order.action.id
|
@@ -5727,7 +5727,7 @@ export const Asset = {
|
|
5727
5727
|
}
|
5728
5728
|
} : undefined,
|
5729
5729
|
asset: item.order.asset ?
|
5730
|
-
typeof item.order.asset === 'object' && Object.keys(item.order.asset).length === 1 && Object.keys(item.order.asset)[0] === 'id'
|
5730
|
+
typeof item.order.asset === 'object' && Object.keys(item.order.asset).length === 1 && (Object.keys(item.order.asset)[0] === 'id' || Object.keys(item.order.asset)[0] === 'symbol')
|
5731
5731
|
? {
|
5732
5732
|
connect: {
|
5733
5733
|
id: item.order.asset.id
|
@@ -7883,7 +7883,7 @@ export const Asset = {
|
|
7883
7883
|
set: props.bidPrice
|
7884
7884
|
} : undefined,
|
7885
7885
|
trades: props.trades ?
|
7886
|
-
Array.isArray(props.trades) && props.trades.length > 0 && props.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
7886
|
+
Array.isArray(props.trades) && props.trades.length > 0 && props.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
7887
7887
|
connect: props.trades.map((item) => ({
|
7888
7888
|
id: item.id
|
7889
7889
|
}))
|
@@ -7935,7 +7935,7 @@ export const Asset = {
|
|
7935
7935
|
set: item.status
|
7936
7936
|
} : undefined,
|
7937
7937
|
alpacaAccount: item.alpacaAccount ?
|
7938
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
7938
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
7939
7939
|
? {
|
7940
7940
|
connect: {
|
7941
7941
|
id: item.alpacaAccount.id
|
@@ -7984,7 +7984,7 @@ export const Asset = {
|
|
7984
7984
|
set: item.alpacaAccount.volumeThreshold
|
7985
7985
|
} : undefined,
|
7986
7986
|
user: item.alpacaAccount.user ?
|
7987
|
-
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && Object.keys(item.alpacaAccount.user)[0] === 'id'
|
7987
|
+
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && (Object.keys(item.alpacaAccount.user)[0] === 'id' || Object.keys(item.alpacaAccount.user)[0] === 'symbol')
|
7988
7988
|
? {
|
7989
7989
|
connect: {
|
7990
7990
|
id: item.alpacaAccount.user.id
|
@@ -8058,7 +8058,7 @@ export const Asset = {
|
|
8058
8058
|
}
|
8059
8059
|
} : undefined,
|
8060
8060
|
orders: item.alpacaAccount.orders ?
|
8061
|
-
Array.isArray(item.alpacaAccount.orders) && item.alpacaAccount.orders.length > 0 && item.alpacaAccount.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
8061
|
+
Array.isArray(item.alpacaAccount.orders) && item.alpacaAccount.orders.length > 0 && item.alpacaAccount.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
8062
8062
|
connect: item.alpacaAccount.orders.map((item) => ({
|
8063
8063
|
id: item.id
|
8064
8064
|
}))
|
@@ -8189,7 +8189,7 @@ export const Asset = {
|
|
8189
8189
|
}))
|
8190
8190
|
} : undefined,
|
8191
8191
|
positions: item.alpacaAccount.positions ?
|
8192
|
-
Array.isArray(item.alpacaAccount.positions) && item.alpacaAccount.positions.length > 0 && item.alpacaAccount.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
8192
|
+
Array.isArray(item.alpacaAccount.positions) && item.alpacaAccount.positions.length > 0 && item.alpacaAccount.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
8193
8193
|
connect: item.alpacaAccount.positions.map((item) => ({
|
8194
8194
|
id: item.id
|
8195
8195
|
}))
|
@@ -8276,7 +8276,7 @@ export const Asset = {
|
|
8276
8276
|
}))
|
8277
8277
|
} : undefined,
|
8278
8278
|
alerts: item.alpacaAccount.alerts ?
|
8279
|
-
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
8279
|
+
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
8280
8280
|
connect: item.alpacaAccount.alerts.map((item) => ({
|
8281
8281
|
id: item.id
|
8282
8282
|
}))
|
@@ -8454,7 +8454,7 @@ export const Asset = {
|
|
8454
8454
|
}
|
8455
8455
|
} : undefined,
|
8456
8456
|
actions: item.actions ?
|
8457
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
8457
|
+
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
8458
8458
|
connect: item.actions.map((item) => ({
|
8459
8459
|
id: item.id
|
8460
8460
|
}))
|
@@ -8494,7 +8494,7 @@ export const Asset = {
|
|
8494
8494
|
set: item.dependedOnBy
|
8495
8495
|
} : undefined,
|
8496
8496
|
order: item.order ?
|
8497
|
-
typeof item.order === 'object' && Object.keys(item.order).length === 1 && Object.keys(item.order)[0] === 'id'
|
8497
|
+
typeof item.order === 'object' && Object.keys(item.order).length === 1 && (Object.keys(item.order)[0] === 'id' || Object.keys(item.order)[0] === 'symbol')
|
8498
8498
|
? {
|
8499
8499
|
connect: {
|
8500
8500
|
id: item.order.id
|
@@ -8947,7 +8947,7 @@ export const Asset = {
|
|
8947
8947
|
}))
|
8948
8948
|
} : undefined,
|
8949
8949
|
orders: props.orders ?
|
8950
|
-
Array.isArray(props.orders) && props.orders.length > 0 && props.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
8950
|
+
Array.isArray(props.orders) && props.orders.length > 0 && props.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
8951
8951
|
connect: props.orders.map((item) => ({
|
8952
8952
|
id: item.id
|
8953
8953
|
}))
|
@@ -9048,7 +9048,7 @@ export const Asset = {
|
|
9048
9048
|
set: item.takeProfitId
|
9049
9049
|
} : undefined,
|
9050
9050
|
stopLoss: item.stopLoss ?
|
9051
|
-
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && Object.keys(item.stopLoss)[0] === 'id'
|
9051
|
+
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && (Object.keys(item.stopLoss)[0] === 'id' || Object.keys(item.stopLoss)[0] === 'symbol')
|
9052
9052
|
? {
|
9053
9053
|
connect: {
|
9054
9054
|
id: item.stopLoss.id
|
@@ -9080,7 +9080,7 @@ export const Asset = {
|
|
9080
9080
|
}
|
9081
9081
|
} : undefined,
|
9082
9082
|
takeProfit: item.takeProfit ?
|
9083
|
-
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && Object.keys(item.takeProfit)[0] === 'id'
|
9083
|
+
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && (Object.keys(item.takeProfit)[0] === 'id' || Object.keys(item.takeProfit)[0] === 'symbol')
|
9084
9084
|
? {
|
9085
9085
|
connect: {
|
9086
9086
|
id: item.takeProfit.id
|
@@ -9112,7 +9112,7 @@ export const Asset = {
|
|
9112
9112
|
}
|
9113
9113
|
} : undefined,
|
9114
9114
|
alpacaAccount: item.alpacaAccount ?
|
9115
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
9115
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
9116
9116
|
? {
|
9117
9117
|
connect: {
|
9118
9118
|
id: item.alpacaAccount.id
|
@@ -9161,7 +9161,7 @@ export const Asset = {
|
|
9161
9161
|
set: item.alpacaAccount.volumeThreshold
|
9162
9162
|
} : undefined,
|
9163
9163
|
user: item.alpacaAccount.user ?
|
9164
|
-
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && Object.keys(item.alpacaAccount.user)[0] === 'id'
|
9164
|
+
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && (Object.keys(item.alpacaAccount.user)[0] === 'id' || Object.keys(item.alpacaAccount.user)[0] === 'symbol')
|
9165
9165
|
? {
|
9166
9166
|
connect: {
|
9167
9167
|
id: item.alpacaAccount.user.id
|
@@ -9235,7 +9235,7 @@ export const Asset = {
|
|
9235
9235
|
}
|
9236
9236
|
} : undefined,
|
9237
9237
|
trades: item.alpacaAccount.trades ?
|
9238
|
-
Array.isArray(item.alpacaAccount.trades) && item.alpacaAccount.trades.length > 0 && item.alpacaAccount.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
9238
|
+
Array.isArray(item.alpacaAccount.trades) && item.alpacaAccount.trades.length > 0 && item.alpacaAccount.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
9239
9239
|
connect: item.alpacaAccount.trades.map((item) => ({
|
9240
9240
|
id: item.id
|
9241
9241
|
}))
|
@@ -9303,7 +9303,7 @@ export const Asset = {
|
|
9303
9303
|
}))
|
9304
9304
|
} : undefined,
|
9305
9305
|
positions: item.alpacaAccount.positions ?
|
9306
|
-
Array.isArray(item.alpacaAccount.positions) && item.alpacaAccount.positions.length > 0 && item.alpacaAccount.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
9306
|
+
Array.isArray(item.alpacaAccount.positions) && item.alpacaAccount.positions.length > 0 && item.alpacaAccount.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
9307
9307
|
connect: item.alpacaAccount.positions.map((item) => ({
|
9308
9308
|
id: item.id
|
9309
9309
|
}))
|
@@ -9390,7 +9390,7 @@ export const Asset = {
|
|
9390
9390
|
}))
|
9391
9391
|
} : undefined,
|
9392
9392
|
alerts: item.alpacaAccount.alerts ?
|
9393
|
-
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
9393
|
+
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
9394
9394
|
connect: item.alpacaAccount.alerts.map((item) => ({
|
9395
9395
|
id: item.id
|
9396
9396
|
}))
|
@@ -9550,7 +9550,7 @@ export const Asset = {
|
|
9550
9550
|
}
|
9551
9551
|
} : undefined,
|
9552
9552
|
action: item.action ?
|
9553
|
-
typeof item.action === 'object' && Object.keys(item.action).length === 1 && Object.keys(item.action)[0] === 'id'
|
9553
|
+
typeof item.action === 'object' && Object.keys(item.action).length === 1 && (Object.keys(item.action)[0] === 'id' || Object.keys(item.action)[0] === 'symbol')
|
9554
9554
|
? {
|
9555
9555
|
connect: {
|
9556
9556
|
id: item.action.id
|
@@ -9593,7 +9593,7 @@ export const Asset = {
|
|
9593
9593
|
set: item.action.dependedOnBy
|
9594
9594
|
} : undefined,
|
9595
9595
|
trade: item.action.trade ?
|
9596
|
-
typeof item.action.trade === 'object' && Object.keys(item.action.trade).length === 1 && Object.keys(item.action.trade)[0] === 'id'
|
9596
|
+
typeof item.action.trade === 'object' && Object.keys(item.action.trade).length === 1 && (Object.keys(item.action.trade)[0] === 'id' || Object.keys(item.action.trade)[0] === 'symbol')
|
9597
9597
|
? {
|
9598
9598
|
connect: {
|
9599
9599
|
id: item.action.trade.id
|
@@ -9709,7 +9709,7 @@ export const Asset = {
|
|
9709
9709
|
}
|
9710
9710
|
} : undefined,
|
9711
9711
|
contract: item.contract ?
|
9712
|
-
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && Object.keys(item.contract)[0] === 'id'
|
9712
|
+
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && (Object.keys(item.contract)[0] === 'id' || Object.keys(item.contract)[0] === 'symbol')
|
9713
9713
|
? {
|
9714
9714
|
connect: {
|
9715
9715
|
id: item.contract.id
|
@@ -9803,7 +9803,7 @@ export const Asset = {
|
|
9803
9803
|
set: item.contract.orderId
|
9804
9804
|
} : undefined,
|
9805
9805
|
deliverables: item.contract.deliverables ?
|
9806
|
-
Array.isArray(item.contract.deliverables) && item.contract.deliverables.length > 0 && item.contract.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
9806
|
+
Array.isArray(item.contract.deliverables) && item.contract.deliverables.length > 0 && item.contract.deliverables.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
9807
9807
|
connect: item.contract.deliverables.map((item) => ({
|
9808
9808
|
id: item.id
|
9809
9809
|
}))
|
@@ -9862,7 +9862,7 @@ export const Asset = {
|
|
9862
9862
|
}))
|
9863
9863
|
} : undefined,
|
9864
9864
|
asset: item.contract.asset ?
|
9865
|
-
typeof item.contract.asset === 'object' && Object.keys(item.contract.asset).length === 1 && Object.keys(item.contract.asset)[0] === 'id'
|
9865
|
+
typeof item.contract.asset === 'object' && Object.keys(item.contract.asset).length === 1 && (Object.keys(item.contract.asset)[0] === 'id' || Object.keys(item.contract.asset)[0] === 'symbol')
|
9866
9866
|
? {
|
9867
9867
|
connect: {
|
9868
9868
|
id: item.contract.asset.id
|
@@ -10634,7 +10634,7 @@ export const Asset = {
|
|
10634
10634
|
}))
|
10635
10635
|
} : undefined,
|
10636
10636
|
positions: props.positions ?
|
10637
|
-
Array.isArray(props.positions) && props.positions.length > 0 && props.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
10637
|
+
Array.isArray(props.positions) && props.positions.length > 0 && props.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
10638
10638
|
connect: props.positions.map((item) => ({
|
10639
10639
|
id: item.id
|
10640
10640
|
}))
|
@@ -10701,7 +10701,7 @@ export const Asset = {
|
|
10701
10701
|
set: item.closed
|
10702
10702
|
} : undefined,
|
10703
10703
|
alpacaAccount: item.alpacaAccount ?
|
10704
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
10704
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
10705
10705
|
? {
|
10706
10706
|
connect: {
|
10707
10707
|
id: item.alpacaAccount.id
|
@@ -10750,7 +10750,7 @@ export const Asset = {
|
|
10750
10750
|
set: item.alpacaAccount.volumeThreshold
|
10751
10751
|
} : undefined,
|
10752
10752
|
user: item.alpacaAccount.user ?
|
10753
|
-
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && Object.keys(item.alpacaAccount.user)[0] === 'id'
|
10753
|
+
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && (Object.keys(item.alpacaAccount.user)[0] === 'id' || Object.keys(item.alpacaAccount.user)[0] === 'symbol')
|
10754
10754
|
? {
|
10755
10755
|
connect: {
|
10756
10756
|
id: item.alpacaAccount.user.id
|
@@ -10824,7 +10824,7 @@ export const Asset = {
|
|
10824
10824
|
}
|
10825
10825
|
} : undefined,
|
10826
10826
|
trades: item.alpacaAccount.trades ?
|
10827
|
-
Array.isArray(item.alpacaAccount.trades) && item.alpacaAccount.trades.length > 0 && item.alpacaAccount.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
10827
|
+
Array.isArray(item.alpacaAccount.trades) && item.alpacaAccount.trades.length > 0 && item.alpacaAccount.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
10828
10828
|
connect: item.alpacaAccount.trades.map((item) => ({
|
10829
10829
|
id: item.id
|
10830
10830
|
}))
|
@@ -10892,7 +10892,7 @@ export const Asset = {
|
|
10892
10892
|
}))
|
10893
10893
|
} : undefined,
|
10894
10894
|
orders: item.alpacaAccount.orders ?
|
10895
|
-
Array.isArray(item.alpacaAccount.orders) && item.alpacaAccount.orders.length > 0 && item.alpacaAccount.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
10895
|
+
Array.isArray(item.alpacaAccount.orders) && item.alpacaAccount.orders.length > 0 && item.alpacaAccount.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
10896
10896
|
connect: item.alpacaAccount.orders.map((item) => ({
|
10897
10897
|
id: item.id
|
10898
10898
|
}))
|
@@ -11023,7 +11023,7 @@ export const Asset = {
|
|
11023
11023
|
}))
|
11024
11024
|
} : undefined,
|
11025
11025
|
alerts: item.alpacaAccount.alerts ?
|
11026
|
-
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
11026
|
+
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
11027
11027
|
connect: item.alpacaAccount.alerts.map((item) => ({
|
11028
11028
|
id: item.id
|
11029
11029
|
}))
|
@@ -11364,7 +11364,7 @@ export const Asset = {
|
|
11364
11364
|
}))
|
11365
11365
|
} : undefined,
|
11366
11366
|
newsMentions: props.newsMentions ?
|
11367
|
-
Array.isArray(props.newsMentions) && props.newsMentions.length > 0 && props.newsMentions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
11367
|
+
Array.isArray(props.newsMentions) && props.newsMentions.length > 0 && props.newsMentions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
11368
11368
|
connect: props.newsMentions.map((item) => ({
|
11369
11369
|
id: item.id
|
11370
11370
|
}))
|
@@ -11396,7 +11396,7 @@ export const Asset = {
|
|
11396
11396
|
set: item.sentimentLabel
|
11397
11397
|
} : undefined,
|
11398
11398
|
news: item.news ?
|
11399
|
-
typeof item.news === 'object' && Object.keys(item.news).length === 1 && Object.keys(item.news)[0] === 'id'
|
11399
|
+
typeof item.news === 'object' && Object.keys(item.news).length === 1 && (Object.keys(item.news)[0] === 'id' || Object.keys(item.news)[0] === 'symbol')
|
11400
11400
|
? {
|
11401
11401
|
connect: {
|
11402
11402
|
id: item.news.id
|
@@ -11523,7 +11523,7 @@ export const Asset = {
|
|
11523
11523
|
}))
|
11524
11524
|
} : undefined,
|
11525
11525
|
contracts: props.contracts ?
|
11526
|
-
Array.isArray(props.contracts) && props.contracts.length > 0 && props.contracts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
11526
|
+
Array.isArray(props.contracts) && props.contracts.length > 0 && props.contracts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
11527
11527
|
connect: props.contracts.map((item) => ({
|
11528
11528
|
id: item.id
|
11529
11529
|
}))
|
@@ -11610,7 +11610,7 @@ export const Asset = {
|
|
11610
11610
|
set: item.orderId
|
11611
11611
|
} : undefined,
|
11612
11612
|
deliverables: item.deliverables ?
|
11613
|
-
Array.isArray(item.deliverables) && item.deliverables.length > 0 && item.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
11613
|
+
Array.isArray(item.deliverables) && item.deliverables.length > 0 && item.deliverables.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
11614
11614
|
connect: item.deliverables.map((item) => ({
|
11615
11615
|
id: item.id
|
11616
11616
|
}))
|
@@ -11669,7 +11669,7 @@ export const Asset = {
|
|
11669
11669
|
}))
|
11670
11670
|
} : undefined,
|
11671
11671
|
order: item.order ?
|
11672
|
-
typeof item.order === 'object' && Object.keys(item.order).length === 1 && Object.keys(item.order)[0] === 'id'
|
11672
|
+
typeof item.order === 'object' && Object.keys(item.order).length === 1 && (Object.keys(item.order)[0] === 'id' || Object.keys(item.order)[0] === 'symbol')
|
11673
11673
|
? {
|
11674
11674
|
connect: {
|
11675
11675
|
id: item.order.id
|
@@ -11781,7 +11781,7 @@ export const Asset = {
|
|
11781
11781
|
set: item.order.takeProfitId
|
11782
11782
|
} : undefined,
|
11783
11783
|
stopLoss: item.order.stopLoss ?
|
11784
|
-
typeof item.order.stopLoss === 'object' && Object.keys(item.order.stopLoss).length === 1 && Object.keys(item.order.stopLoss)[0] === 'id'
|
11784
|
+
typeof item.order.stopLoss === 'object' && Object.keys(item.order.stopLoss).length === 1 && (Object.keys(item.order.stopLoss)[0] === 'id' || Object.keys(item.order.stopLoss)[0] === 'symbol')
|
11785
11785
|
? {
|
11786
11786
|
connect: {
|
11787
11787
|
id: item.order.stopLoss.id
|
@@ -11813,7 +11813,7 @@ export const Asset = {
|
|
11813
11813
|
}
|
11814
11814
|
} : undefined,
|
11815
11815
|
takeProfit: item.order.takeProfit ?
|
11816
|
-
typeof item.order.takeProfit === 'object' && Object.keys(item.order.takeProfit).length === 1 && Object.keys(item.order.takeProfit)[0] === 'id'
|
11816
|
+
typeof item.order.takeProfit === 'object' && Object.keys(item.order.takeProfit).length === 1 && (Object.keys(item.order.takeProfit)[0] === 'id' || Object.keys(item.order.takeProfit)[0] === 'symbol')
|
11817
11817
|
? {
|
11818
11818
|
connect: {
|
11819
11819
|
id: item.order.takeProfit.id
|
@@ -11845,7 +11845,7 @@ export const Asset = {
|
|
11845
11845
|
}
|
11846
11846
|
} : undefined,
|
11847
11847
|
alpacaAccount: item.order.alpacaAccount ?
|
11848
|
-
typeof item.order.alpacaAccount === 'object' && Object.keys(item.order.alpacaAccount).length === 1 && Object.keys(item.order.alpacaAccount)[0] === 'id'
|
11848
|
+
typeof item.order.alpacaAccount === 'object' && Object.keys(item.order.alpacaAccount).length === 1 && (Object.keys(item.order.alpacaAccount)[0] === 'id' || Object.keys(item.order.alpacaAccount)[0] === 'symbol')
|
11849
11849
|
? {
|
11850
11850
|
connect: {
|
11851
11851
|
id: item.order.alpacaAccount.id
|
@@ -11909,7 +11909,7 @@ export const Asset = {
|
|
11909
11909
|
}
|
11910
11910
|
} : undefined,
|
11911
11911
|
action: item.order.action ?
|
11912
|
-
typeof item.order.action === 'object' && Object.keys(item.order.action).length === 1 && Object.keys(item.order.action)[0] === 'id'
|
11912
|
+
typeof item.order.action === 'object' && Object.keys(item.order.action).length === 1 && (Object.keys(item.order.action)[0] === 'id' || Object.keys(item.order.action)[0] === 'symbol')
|
11913
11913
|
? {
|
11914
11914
|
connect: {
|
11915
11915
|
id: item.order.action.id
|
@@ -11969,7 +11969,7 @@ export const Asset = {
|
|
11969
11969
|
}
|
11970
11970
|
} : undefined,
|
11971
11971
|
asset: item.order.asset ?
|
11972
|
-
typeof item.order.asset === 'object' && Object.keys(item.order.asset).length === 1 && Object.keys(item.order.asset)[0] === 'id'
|
11972
|
+
typeof item.order.asset === 'object' && Object.keys(item.order.asset).length === 1 && (Object.keys(item.order.asset)[0] === 'id' || Object.keys(item.order.asset)[0] === 'symbol')
|
11973
11973
|
? {
|
11974
11974
|
connect: {
|
11975
11975
|
id: item.order.asset.id
|
@@ -12881,7 +12881,7 @@ export const Asset = {
|
|
12881
12881
|
set: prop.updatedAt
|
12882
12882
|
} : undefined,
|
12883
12883
|
trades: prop.trades ?
|
12884
|
-
Array.isArray(prop.trades) && prop.trades.length > 0 && prop.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
12884
|
+
Array.isArray(prop.trades) && prop.trades.length > 0 && prop.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
12885
12885
|
connect: prop.trades.map((item) => ({
|
12886
12886
|
id: item.id
|
12887
12887
|
}))
|
@@ -12933,7 +12933,7 @@ export const Asset = {
|
|
12933
12933
|
set: item.status
|
12934
12934
|
} : undefined,
|
12935
12935
|
alpacaAccount: item.alpacaAccount ?
|
12936
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
12936
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
12937
12937
|
? {
|
12938
12938
|
connect: {
|
12939
12939
|
id: item.alpacaAccount.id
|
@@ -12982,7 +12982,7 @@ export const Asset = {
|
|
12982
12982
|
set: item.alpacaAccount.volumeThreshold
|
12983
12983
|
} : undefined,
|
12984
12984
|
user: item.alpacaAccount.user ?
|
12985
|
-
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && Object.keys(item.alpacaAccount.user)[0] === 'id'
|
12985
|
+
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && (Object.keys(item.alpacaAccount.user)[0] === 'id' || Object.keys(item.alpacaAccount.user)[0] === 'symbol')
|
12986
12986
|
? {
|
12987
12987
|
connect: {
|
12988
12988
|
id: item.alpacaAccount.user.id
|
@@ -13056,7 +13056,7 @@ export const Asset = {
|
|
13056
13056
|
}
|
13057
13057
|
} : undefined,
|
13058
13058
|
orders: item.alpacaAccount.orders ?
|
13059
|
-
Array.isArray(item.alpacaAccount.orders) && item.alpacaAccount.orders.length > 0 && item.alpacaAccount.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
13059
|
+
Array.isArray(item.alpacaAccount.orders) && item.alpacaAccount.orders.length > 0 && item.alpacaAccount.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
13060
13060
|
connect: item.alpacaAccount.orders.map((item) => ({
|
13061
13061
|
id: item.id
|
13062
13062
|
}))
|
@@ -13187,7 +13187,7 @@ export const Asset = {
|
|
13187
13187
|
}))
|
13188
13188
|
} : undefined,
|
13189
13189
|
positions: item.alpacaAccount.positions ?
|
13190
|
-
Array.isArray(item.alpacaAccount.positions) && item.alpacaAccount.positions.length > 0 && item.alpacaAccount.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
13190
|
+
Array.isArray(item.alpacaAccount.positions) && item.alpacaAccount.positions.length > 0 && item.alpacaAccount.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
13191
13191
|
connect: item.alpacaAccount.positions.map((item) => ({
|
13192
13192
|
id: item.id
|
13193
13193
|
}))
|
@@ -13274,7 +13274,7 @@ export const Asset = {
|
|
13274
13274
|
}))
|
13275
13275
|
} : undefined,
|
13276
13276
|
alerts: item.alpacaAccount.alerts ?
|
13277
|
-
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
13277
|
+
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
13278
13278
|
connect: item.alpacaAccount.alerts.map((item) => ({
|
13279
13279
|
id: item.id
|
13280
13280
|
}))
|
@@ -13452,7 +13452,7 @@ export const Asset = {
|
|
13452
13452
|
}
|
13453
13453
|
} : undefined,
|
13454
13454
|
actions: item.actions ?
|
13455
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
13455
|
+
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
13456
13456
|
connect: item.actions.map((item) => ({
|
13457
13457
|
id: item.id
|
13458
13458
|
}))
|
@@ -13492,7 +13492,7 @@ export const Asset = {
|
|
13492
13492
|
set: item.dependedOnBy
|
13493
13493
|
} : undefined,
|
13494
13494
|
order: item.order ?
|
13495
|
-
typeof item.order === 'object' && Object.keys(item.order).length === 1 && Object.keys(item.order)[0] === 'id'
|
13495
|
+
typeof item.order === 'object' && Object.keys(item.order).length === 1 && (Object.keys(item.order)[0] === 'id' || Object.keys(item.order)[0] === 'symbol')
|
13496
13496
|
? {
|
13497
13497
|
connect: {
|
13498
13498
|
id: item.order.id
|
@@ -13945,7 +13945,7 @@ export const Asset = {
|
|
13945
13945
|
}))
|
13946
13946
|
} : undefined,
|
13947
13947
|
orders: prop.orders ?
|
13948
|
-
Array.isArray(prop.orders) && prop.orders.length > 0 && prop.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
13948
|
+
Array.isArray(prop.orders) && prop.orders.length > 0 && prop.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
13949
13949
|
connect: prop.orders.map((item) => ({
|
13950
13950
|
id: item.id
|
13951
13951
|
}))
|
@@ -14046,7 +14046,7 @@ export const Asset = {
|
|
14046
14046
|
set: item.takeProfitId
|
14047
14047
|
} : undefined,
|
14048
14048
|
stopLoss: item.stopLoss ?
|
14049
|
-
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && Object.keys(item.stopLoss)[0] === 'id'
|
14049
|
+
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && (Object.keys(item.stopLoss)[0] === 'id' || Object.keys(item.stopLoss)[0] === 'symbol')
|
14050
14050
|
? {
|
14051
14051
|
connect: {
|
14052
14052
|
id: item.stopLoss.id
|
@@ -14078,7 +14078,7 @@ export const Asset = {
|
|
14078
14078
|
}
|
14079
14079
|
} : undefined,
|
14080
14080
|
takeProfit: item.takeProfit ?
|
14081
|
-
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && Object.keys(item.takeProfit)[0] === 'id'
|
14081
|
+
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && (Object.keys(item.takeProfit)[0] === 'id' || Object.keys(item.takeProfit)[0] === 'symbol')
|
14082
14082
|
? {
|
14083
14083
|
connect: {
|
14084
14084
|
id: item.takeProfit.id
|
@@ -14110,7 +14110,7 @@ export const Asset = {
|
|
14110
14110
|
}
|
14111
14111
|
} : undefined,
|
14112
14112
|
alpacaAccount: item.alpacaAccount ?
|
14113
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
14113
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
14114
14114
|
? {
|
14115
14115
|
connect: {
|
14116
14116
|
id: item.alpacaAccount.id
|
@@ -14159,7 +14159,7 @@ export const Asset = {
|
|
14159
14159
|
set: item.alpacaAccount.volumeThreshold
|
14160
14160
|
} : undefined,
|
14161
14161
|
user: item.alpacaAccount.user ?
|
14162
|
-
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && Object.keys(item.alpacaAccount.user)[0] === 'id'
|
14162
|
+
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && (Object.keys(item.alpacaAccount.user)[0] === 'id' || Object.keys(item.alpacaAccount.user)[0] === 'symbol')
|
14163
14163
|
? {
|
14164
14164
|
connect: {
|
14165
14165
|
id: item.alpacaAccount.user.id
|
@@ -14233,7 +14233,7 @@ export const Asset = {
|
|
14233
14233
|
}
|
14234
14234
|
} : undefined,
|
14235
14235
|
trades: item.alpacaAccount.trades ?
|
14236
|
-
Array.isArray(item.alpacaAccount.trades) && item.alpacaAccount.trades.length > 0 && item.alpacaAccount.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
14236
|
+
Array.isArray(item.alpacaAccount.trades) && item.alpacaAccount.trades.length > 0 && item.alpacaAccount.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
14237
14237
|
connect: item.alpacaAccount.trades.map((item) => ({
|
14238
14238
|
id: item.id
|
14239
14239
|
}))
|
@@ -14301,7 +14301,7 @@ export const Asset = {
|
|
14301
14301
|
}))
|
14302
14302
|
} : undefined,
|
14303
14303
|
positions: item.alpacaAccount.positions ?
|
14304
|
-
Array.isArray(item.alpacaAccount.positions) && item.alpacaAccount.positions.length > 0 && item.alpacaAccount.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
14304
|
+
Array.isArray(item.alpacaAccount.positions) && item.alpacaAccount.positions.length > 0 && item.alpacaAccount.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
14305
14305
|
connect: item.alpacaAccount.positions.map((item) => ({
|
14306
14306
|
id: item.id
|
14307
14307
|
}))
|
@@ -14388,7 +14388,7 @@ export const Asset = {
|
|
14388
14388
|
}))
|
14389
14389
|
} : undefined,
|
14390
14390
|
alerts: item.alpacaAccount.alerts ?
|
14391
|
-
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
14391
|
+
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
14392
14392
|
connect: item.alpacaAccount.alerts.map((item) => ({
|
14393
14393
|
id: item.id
|
14394
14394
|
}))
|
@@ -14548,7 +14548,7 @@ export const Asset = {
|
|
14548
14548
|
}
|
14549
14549
|
} : undefined,
|
14550
14550
|
action: item.action ?
|
14551
|
-
typeof item.action === 'object' && Object.keys(item.action).length === 1 && Object.keys(item.action)[0] === 'id'
|
14551
|
+
typeof item.action === 'object' && Object.keys(item.action).length === 1 && (Object.keys(item.action)[0] === 'id' || Object.keys(item.action)[0] === 'symbol')
|
14552
14552
|
? {
|
14553
14553
|
connect: {
|
14554
14554
|
id: item.action.id
|
@@ -14591,7 +14591,7 @@ export const Asset = {
|
|
14591
14591
|
set: item.action.dependedOnBy
|
14592
14592
|
} : undefined,
|
14593
14593
|
trade: item.action.trade ?
|
14594
|
-
typeof item.action.trade === 'object' && Object.keys(item.action.trade).length === 1 && Object.keys(item.action.trade)[0] === 'id'
|
14594
|
+
typeof item.action.trade === 'object' && Object.keys(item.action.trade).length === 1 && (Object.keys(item.action.trade)[0] === 'id' || Object.keys(item.action.trade)[0] === 'symbol')
|
14595
14595
|
? {
|
14596
14596
|
connect: {
|
14597
14597
|
id: item.action.trade.id
|
@@ -14707,7 +14707,7 @@ export const Asset = {
|
|
14707
14707
|
}
|
14708
14708
|
} : undefined,
|
14709
14709
|
contract: item.contract ?
|
14710
|
-
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && Object.keys(item.contract)[0] === 'id'
|
14710
|
+
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && (Object.keys(item.contract)[0] === 'id' || Object.keys(item.contract)[0] === 'symbol')
|
14711
14711
|
? {
|
14712
14712
|
connect: {
|
14713
14713
|
id: item.contract.id
|
@@ -14801,7 +14801,7 @@ export const Asset = {
|
|
14801
14801
|
set: item.contract.orderId
|
14802
14802
|
} : undefined,
|
14803
14803
|
deliverables: item.contract.deliverables ?
|
14804
|
-
Array.isArray(item.contract.deliverables) && item.contract.deliverables.length > 0 && item.contract.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
14804
|
+
Array.isArray(item.contract.deliverables) && item.contract.deliverables.length > 0 && item.contract.deliverables.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
14805
14805
|
connect: item.contract.deliverables.map((item) => ({
|
14806
14806
|
id: item.id
|
14807
14807
|
}))
|
@@ -14860,7 +14860,7 @@ export const Asset = {
|
|
14860
14860
|
}))
|
14861
14861
|
} : undefined,
|
14862
14862
|
asset: item.contract.asset ?
|
14863
|
-
typeof item.contract.asset === 'object' && Object.keys(item.contract.asset).length === 1 && Object.keys(item.contract.asset)[0] === 'id'
|
14863
|
+
typeof item.contract.asset === 'object' && Object.keys(item.contract.asset).length === 1 && (Object.keys(item.contract.asset)[0] === 'id' || Object.keys(item.contract.asset)[0] === 'symbol')
|
14864
14864
|
? {
|
14865
14865
|
connect: {
|
14866
14866
|
id: item.contract.asset.id
|
@@ -15632,7 +15632,7 @@ export const Asset = {
|
|
15632
15632
|
}))
|
15633
15633
|
} : undefined,
|
15634
15634
|
positions: prop.positions ?
|
15635
|
-
Array.isArray(prop.positions) && prop.positions.length > 0 && prop.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
15635
|
+
Array.isArray(prop.positions) && prop.positions.length > 0 && prop.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
15636
15636
|
connect: prop.positions.map((item) => ({
|
15637
15637
|
id: item.id
|
15638
15638
|
}))
|
@@ -15699,7 +15699,7 @@ export const Asset = {
|
|
15699
15699
|
set: item.closed
|
15700
15700
|
} : undefined,
|
15701
15701
|
alpacaAccount: item.alpacaAccount ?
|
15702
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
15702
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
15703
15703
|
? {
|
15704
15704
|
connect: {
|
15705
15705
|
id: item.alpacaAccount.id
|
@@ -15748,7 +15748,7 @@ export const Asset = {
|
|
15748
15748
|
set: item.alpacaAccount.volumeThreshold
|
15749
15749
|
} : undefined,
|
15750
15750
|
user: item.alpacaAccount.user ?
|
15751
|
-
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && Object.keys(item.alpacaAccount.user)[0] === 'id'
|
15751
|
+
typeof item.alpacaAccount.user === 'object' && Object.keys(item.alpacaAccount.user).length === 1 && (Object.keys(item.alpacaAccount.user)[0] === 'id' || Object.keys(item.alpacaAccount.user)[0] === 'symbol')
|
15752
15752
|
? {
|
15753
15753
|
connect: {
|
15754
15754
|
id: item.alpacaAccount.user.id
|
@@ -15822,7 +15822,7 @@ export const Asset = {
|
|
15822
15822
|
}
|
15823
15823
|
} : undefined,
|
15824
15824
|
trades: item.alpacaAccount.trades ?
|
15825
|
-
Array.isArray(item.alpacaAccount.trades) && item.alpacaAccount.trades.length > 0 && item.alpacaAccount.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
15825
|
+
Array.isArray(item.alpacaAccount.trades) && item.alpacaAccount.trades.length > 0 && item.alpacaAccount.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
15826
15826
|
connect: item.alpacaAccount.trades.map((item) => ({
|
15827
15827
|
id: item.id
|
15828
15828
|
}))
|
@@ -15890,7 +15890,7 @@ export const Asset = {
|
|
15890
15890
|
}))
|
15891
15891
|
} : undefined,
|
15892
15892
|
orders: item.alpacaAccount.orders ?
|
15893
|
-
Array.isArray(item.alpacaAccount.orders) && item.alpacaAccount.orders.length > 0 && item.alpacaAccount.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
15893
|
+
Array.isArray(item.alpacaAccount.orders) && item.alpacaAccount.orders.length > 0 && item.alpacaAccount.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
15894
15894
|
connect: item.alpacaAccount.orders.map((item) => ({
|
15895
15895
|
id: item.id
|
15896
15896
|
}))
|
@@ -16021,7 +16021,7 @@ export const Asset = {
|
|
16021
16021
|
}))
|
16022
16022
|
} : undefined,
|
16023
16023
|
alerts: item.alpacaAccount.alerts ?
|
16024
|
-
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
16024
|
+
Array.isArray(item.alpacaAccount.alerts) && item.alpacaAccount.alerts.length > 0 && item.alpacaAccount.alerts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
16025
16025
|
connect: item.alpacaAccount.alerts.map((item) => ({
|
16026
16026
|
id: item.id
|
16027
16027
|
}))
|
@@ -16362,7 +16362,7 @@ export const Asset = {
|
|
16362
16362
|
}))
|
16363
16363
|
} : undefined,
|
16364
16364
|
newsMentions: prop.newsMentions ?
|
16365
|
-
Array.isArray(prop.newsMentions) && prop.newsMentions.length > 0 && prop.newsMentions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
16365
|
+
Array.isArray(prop.newsMentions) && prop.newsMentions.length > 0 && prop.newsMentions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
16366
16366
|
connect: prop.newsMentions.map((item) => ({
|
16367
16367
|
id: item.id
|
16368
16368
|
}))
|
@@ -16394,7 +16394,7 @@ export const Asset = {
|
|
16394
16394
|
set: item.sentimentLabel
|
16395
16395
|
} : undefined,
|
16396
16396
|
news: item.news ?
|
16397
|
-
typeof item.news === 'object' && Object.keys(item.news).length === 1 && Object.keys(item.news)[0] === 'id'
|
16397
|
+
typeof item.news === 'object' && Object.keys(item.news).length === 1 && (Object.keys(item.news)[0] === 'id' || Object.keys(item.news)[0] === 'symbol')
|
16398
16398
|
? {
|
16399
16399
|
connect: {
|
16400
16400
|
id: item.news.id
|
@@ -16521,7 +16521,7 @@ export const Asset = {
|
|
16521
16521
|
}))
|
16522
16522
|
} : undefined,
|
16523
16523
|
contracts: prop.contracts ?
|
16524
|
-
Array.isArray(prop.contracts) && prop.contracts.length > 0 && prop.contracts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
16524
|
+
Array.isArray(prop.contracts) && prop.contracts.length > 0 && prop.contracts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
16525
16525
|
connect: prop.contracts.map((item) => ({
|
16526
16526
|
id: item.id
|
16527
16527
|
}))
|
@@ -16608,7 +16608,7 @@ export const Asset = {
|
|
16608
16608
|
set: item.orderId
|
16609
16609
|
} : undefined,
|
16610
16610
|
deliverables: item.deliverables ?
|
16611
|
-
Array.isArray(item.deliverables) && item.deliverables.length > 0 && item.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
16611
|
+
Array.isArray(item.deliverables) && item.deliverables.length > 0 && item.deliverables.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
16612
16612
|
connect: item.deliverables.map((item) => ({
|
16613
16613
|
id: item.id
|
16614
16614
|
}))
|
@@ -16667,7 +16667,7 @@ export const Asset = {
|
|
16667
16667
|
}))
|
16668
16668
|
} : undefined,
|
16669
16669
|
order: item.order ?
|
16670
|
-
typeof item.order === 'object' && Object.keys(item.order).length === 1 && Object.keys(item.order)[0] === 'id'
|
16670
|
+
typeof item.order === 'object' && Object.keys(item.order).length === 1 && (Object.keys(item.order)[0] === 'id' || Object.keys(item.order)[0] === 'symbol')
|
16671
16671
|
? {
|
16672
16672
|
connect: {
|
16673
16673
|
id: item.order.id
|
@@ -16779,7 +16779,7 @@ export const Asset = {
|
|
16779
16779
|
set: item.order.takeProfitId
|
16780
16780
|
} : undefined,
|
16781
16781
|
stopLoss: item.order.stopLoss ?
|
16782
|
-
typeof item.order.stopLoss === 'object' && Object.keys(item.order.stopLoss).length === 1 && Object.keys(item.order.stopLoss)[0] === 'id'
|
16782
|
+
typeof item.order.stopLoss === 'object' && Object.keys(item.order.stopLoss).length === 1 && (Object.keys(item.order.stopLoss)[0] === 'id' || Object.keys(item.order.stopLoss)[0] === 'symbol')
|
16783
16783
|
? {
|
16784
16784
|
connect: {
|
16785
16785
|
id: item.order.stopLoss.id
|
@@ -16811,7 +16811,7 @@ export const Asset = {
|
|
16811
16811
|
}
|
16812
16812
|
} : undefined,
|
16813
16813
|
takeProfit: item.order.takeProfit ?
|
16814
|
-
typeof item.order.takeProfit === 'object' && Object.keys(item.order.takeProfit).length === 1 && Object.keys(item.order.takeProfit)[0] === 'id'
|
16814
|
+
typeof item.order.takeProfit === 'object' && Object.keys(item.order.takeProfit).length === 1 && (Object.keys(item.order.takeProfit)[0] === 'id' || Object.keys(item.order.takeProfit)[0] === 'symbol')
|
16815
16815
|
? {
|
16816
16816
|
connect: {
|
16817
16817
|
id: item.order.takeProfit.id
|
@@ -16843,7 +16843,7 @@ export const Asset = {
|
|
16843
16843
|
}
|
16844
16844
|
} : undefined,
|
16845
16845
|
alpacaAccount: item.order.alpacaAccount ?
|
16846
|
-
typeof item.order.alpacaAccount === 'object' && Object.keys(item.order.alpacaAccount).length === 1 && Object.keys(item.order.alpacaAccount)[0] === 'id'
|
16846
|
+
typeof item.order.alpacaAccount === 'object' && Object.keys(item.order.alpacaAccount).length === 1 && (Object.keys(item.order.alpacaAccount)[0] === 'id' || Object.keys(item.order.alpacaAccount)[0] === 'symbol')
|
16847
16847
|
? {
|
16848
16848
|
connect: {
|
16849
16849
|
id: item.order.alpacaAccount.id
|
@@ -16907,7 +16907,7 @@ export const Asset = {
|
|
16907
16907
|
}
|
16908
16908
|
} : undefined,
|
16909
16909
|
action: item.order.action ?
|
16910
|
-
typeof item.order.action === 'object' && Object.keys(item.order.action).length === 1 && Object.keys(item.order.action)[0] === 'id'
|
16910
|
+
typeof item.order.action === 'object' && Object.keys(item.order.action).length === 1 && (Object.keys(item.order.action)[0] === 'id' || Object.keys(item.order.action)[0] === 'symbol')
|
16911
16911
|
? {
|
16912
16912
|
connect: {
|
16913
16913
|
id: item.order.action.id
|
@@ -16967,7 +16967,7 @@ export const Asset = {
|
|
16967
16967
|
}
|
16968
16968
|
} : undefined,
|
16969
16969
|
asset: item.order.asset ?
|
16970
|
-
typeof item.order.asset === 'object' && Object.keys(item.order.asset).length === 1 && Object.keys(item.order.asset)[0] === 'id'
|
16970
|
+
typeof item.order.asset === 'object' && Object.keys(item.order.asset).length === 1 && (Object.keys(item.order.asset)[0] === 'id' || Object.keys(item.order.asset)[0] === 'symbol')
|
16971
16971
|
? {
|
16972
16972
|
connect: {
|
16973
16973
|
id: item.order.asset.id
|