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/Order.mjs
CHANGED
@@ -1630,7 +1630,7 @@ export const Order = {
|
|
1630
1630
|
set: props.takeProfitId
|
1631
1631
|
} : undefined,
|
1632
1632
|
stopLoss: props.stopLoss ?
|
1633
|
-
typeof props.stopLoss === 'object' && Object.keys(props.stopLoss).length === 1 && Object.keys(props.stopLoss)[0] === 'id'
|
1633
|
+
typeof props.stopLoss === 'object' && Object.keys(props.stopLoss).length === 1 && (Object.keys(props.stopLoss)[0] === 'id' || Object.keys(props.stopLoss)[0] === 'symbol')
|
1634
1634
|
? {
|
1635
1635
|
connect: {
|
1636
1636
|
id: props.stopLoss.id
|
@@ -1662,7 +1662,7 @@ export const Order = {
|
|
1662
1662
|
}
|
1663
1663
|
} : undefined,
|
1664
1664
|
takeProfit: props.takeProfit ?
|
1665
|
-
typeof props.takeProfit === 'object' && Object.keys(props.takeProfit).length === 1 && Object.keys(props.takeProfit)[0] === 'id'
|
1665
|
+
typeof props.takeProfit === 'object' && Object.keys(props.takeProfit).length === 1 && (Object.keys(props.takeProfit)[0] === 'id' || Object.keys(props.takeProfit)[0] === 'symbol')
|
1666
1666
|
? {
|
1667
1667
|
connect: {
|
1668
1668
|
id: props.takeProfit.id
|
@@ -1694,7 +1694,7 @@ export const Order = {
|
|
1694
1694
|
}
|
1695
1695
|
} : undefined,
|
1696
1696
|
alpacaAccount: props.alpacaAccount ?
|
1697
|
-
typeof props.alpacaAccount === 'object' && Object.keys(props.alpacaAccount).length === 1 && Object.keys(props.alpacaAccount)[0] === 'id'
|
1697
|
+
typeof props.alpacaAccount === 'object' && Object.keys(props.alpacaAccount).length === 1 && (Object.keys(props.alpacaAccount)[0] === 'id' || Object.keys(props.alpacaAccount)[0] === 'symbol')
|
1698
1698
|
? {
|
1699
1699
|
connect: {
|
1700
1700
|
id: props.alpacaAccount.id
|
@@ -1743,7 +1743,7 @@ export const Order = {
|
|
1743
1743
|
set: props.alpacaAccount.volumeThreshold
|
1744
1744
|
} : undefined,
|
1745
1745
|
user: props.alpacaAccount.user ?
|
1746
|
-
typeof props.alpacaAccount.user === 'object' && Object.keys(props.alpacaAccount.user).length === 1 && Object.keys(props.alpacaAccount.user)[0] === 'id'
|
1746
|
+
typeof props.alpacaAccount.user === 'object' && Object.keys(props.alpacaAccount.user).length === 1 && (Object.keys(props.alpacaAccount.user)[0] === 'id' || Object.keys(props.alpacaAccount.user)[0] === 'symbol')
|
1747
1747
|
? {
|
1748
1748
|
connect: {
|
1749
1749
|
id: props.alpacaAccount.user.id
|
@@ -1801,7 +1801,7 @@ export const Order = {
|
|
1801
1801
|
set: props.alpacaAccount.user.openaiModel
|
1802
1802
|
} : undefined,
|
1803
1803
|
customer: props.alpacaAccount.user.customer ?
|
1804
|
-
typeof props.alpacaAccount.user.customer === 'object' && Object.keys(props.alpacaAccount.user.customer).length === 1 && Object.keys(props.alpacaAccount.user.customer)[0] === 'id'
|
1804
|
+
typeof props.alpacaAccount.user.customer === 'object' && Object.keys(props.alpacaAccount.user.customer).length === 1 && (Object.keys(props.alpacaAccount.user.customer)[0] === 'id' || Object.keys(props.alpacaAccount.user.customer)[0] === 'symbol')
|
1805
1805
|
? {
|
1806
1806
|
connect: {
|
1807
1807
|
id: props.alpacaAccount.user.customer.id
|
@@ -1862,7 +1862,7 @@ export const Order = {
|
|
1862
1862
|
}
|
1863
1863
|
} : undefined,
|
1864
1864
|
accounts: props.alpacaAccount.user.accounts ?
|
1865
|
-
Array.isArray(props.alpacaAccount.user.accounts) && props.alpacaAccount.user.accounts.length > 0 && props.alpacaAccount.user.accounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
1865
|
+
Array.isArray(props.alpacaAccount.user.accounts) && props.alpacaAccount.user.accounts.length > 0 && props.alpacaAccount.user.accounts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
1866
1866
|
connect: props.alpacaAccount.user.accounts.map((item) => ({
|
1867
1867
|
id: item.id
|
1868
1868
|
}))
|
@@ -1926,7 +1926,7 @@ export const Order = {
|
|
1926
1926
|
}))
|
1927
1927
|
} : undefined,
|
1928
1928
|
sessions: props.alpacaAccount.user.sessions ?
|
1929
|
-
Array.isArray(props.alpacaAccount.user.sessions) && props.alpacaAccount.user.sessions.length > 0 && props.alpacaAccount.user.sessions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
1929
|
+
Array.isArray(props.alpacaAccount.user.sessions) && props.alpacaAccount.user.sessions.length > 0 && props.alpacaAccount.user.sessions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
1930
1930
|
connect: props.alpacaAccount.user.sessions.map((item) => ({
|
1931
1931
|
id: item.id
|
1932
1932
|
}))
|
@@ -1955,7 +1955,7 @@ export const Order = {
|
|
1955
1955
|
}))
|
1956
1956
|
} : undefined,
|
1957
1957
|
authenticators: props.alpacaAccount.user.authenticators ?
|
1958
|
-
Array.isArray(props.alpacaAccount.user.authenticators) && props.alpacaAccount.user.authenticators.length > 0 && props.alpacaAccount.user.authenticators.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
1958
|
+
Array.isArray(props.alpacaAccount.user.authenticators) && props.alpacaAccount.user.authenticators.length > 0 && props.alpacaAccount.user.authenticators.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
1959
1959
|
connect: props.alpacaAccount.user.authenticators.map((item) => ({
|
1960
1960
|
id: item.id
|
1961
1961
|
}))
|
@@ -2105,7 +2105,7 @@ export const Order = {
|
|
2105
2105
|
}
|
2106
2106
|
} : undefined,
|
2107
2107
|
trades: props.alpacaAccount.trades ?
|
2108
|
-
Array.isArray(props.alpacaAccount.trades) && props.alpacaAccount.trades.length > 0 && props.alpacaAccount.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
2108
|
+
Array.isArray(props.alpacaAccount.trades) && props.alpacaAccount.trades.length > 0 && props.alpacaAccount.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
2109
2109
|
connect: props.alpacaAccount.trades.map((item) => ({
|
2110
2110
|
id: item.id
|
2111
2111
|
}))
|
@@ -2157,7 +2157,7 @@ export const Order = {
|
|
2157
2157
|
set: item.status
|
2158
2158
|
} : undefined,
|
2159
2159
|
asset: item.asset ?
|
2160
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
2160
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
2161
2161
|
? {
|
2162
2162
|
connect: {
|
2163
2163
|
id: item.asset.id
|
@@ -2404,7 +2404,7 @@ export const Order = {
|
|
2404
2404
|
}
|
2405
2405
|
} : undefined,
|
2406
2406
|
actions: item.actions ?
|
2407
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
2407
|
+
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) ? {
|
2408
2408
|
connect: item.actions.map((item) => ({
|
2409
2409
|
id: item.id
|
2410
2410
|
}))
|
@@ -2577,7 +2577,7 @@ export const Order = {
|
|
2577
2577
|
}))
|
2578
2578
|
} : undefined,
|
2579
2579
|
positions: props.alpacaAccount.positions ?
|
2580
|
-
Array.isArray(props.alpacaAccount.positions) && props.alpacaAccount.positions.length > 0 && props.alpacaAccount.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
2580
|
+
Array.isArray(props.alpacaAccount.positions) && props.alpacaAccount.positions.length > 0 && props.alpacaAccount.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
2581
2581
|
connect: props.alpacaAccount.positions.map((item) => ({
|
2582
2582
|
id: item.id
|
2583
2583
|
}))
|
@@ -2644,7 +2644,7 @@ export const Order = {
|
|
2644
2644
|
set: item.closed
|
2645
2645
|
} : undefined,
|
2646
2646
|
asset: item.asset ?
|
2647
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
2647
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
2648
2648
|
? {
|
2649
2649
|
connect: {
|
2650
2650
|
id: item.asset.id
|
@@ -2982,7 +2982,7 @@ export const Order = {
|
|
2982
2982
|
}))
|
2983
2983
|
} : undefined,
|
2984
2984
|
alerts: props.alpacaAccount.alerts ?
|
2985
|
-
Array.isArray(props.alpacaAccount.alerts) && props.alpacaAccount.alerts.length > 0 && props.alpacaAccount.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
2985
|
+
Array.isArray(props.alpacaAccount.alerts) && props.alpacaAccount.alerts.length > 0 && props.alpacaAccount.alerts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
2986
2986
|
connect: props.alpacaAccount.alerts.map((item) => ({
|
2987
2987
|
id: item.id
|
2988
2988
|
}))
|
@@ -3414,7 +3414,7 @@ export const Order = {
|
|
3414
3414
|
}
|
3415
3415
|
} : undefined,
|
3416
3416
|
action: props.action ?
|
3417
|
-
typeof props.action === 'object' && Object.keys(props.action).length === 1 && Object.keys(props.action)[0] === 'id'
|
3417
|
+
typeof props.action === 'object' && Object.keys(props.action).length === 1 && (Object.keys(props.action)[0] === 'id' || Object.keys(props.action)[0] === 'symbol')
|
3418
3418
|
? {
|
3419
3419
|
connect: {
|
3420
3420
|
id: props.action.id
|
@@ -3457,7 +3457,7 @@ export const Order = {
|
|
3457
3457
|
set: props.action.dependedOnBy
|
3458
3458
|
} : undefined,
|
3459
3459
|
trade: props.action.trade ?
|
3460
|
-
typeof props.action.trade === 'object' && Object.keys(props.action.trade).length === 1 && Object.keys(props.action.trade)[0] === 'id'
|
3460
|
+
typeof props.action.trade === 'object' && Object.keys(props.action.trade).length === 1 && (Object.keys(props.action.trade)[0] === 'id' || Object.keys(props.action.trade)[0] === 'symbol')
|
3461
3461
|
? {
|
3462
3462
|
connect: {
|
3463
3463
|
id: props.action.trade.id
|
@@ -3512,7 +3512,7 @@ export const Order = {
|
|
3512
3512
|
set: props.action.trade.status
|
3513
3513
|
} : undefined,
|
3514
3514
|
alpacaAccount: props.action.trade.alpacaAccount ?
|
3515
|
-
typeof props.action.trade.alpacaAccount === 'object' && Object.keys(props.action.trade.alpacaAccount).length === 1 && Object.keys(props.action.trade.alpacaAccount)[0] === 'id'
|
3515
|
+
typeof props.action.trade.alpacaAccount === 'object' && Object.keys(props.action.trade.alpacaAccount).length === 1 && (Object.keys(props.action.trade.alpacaAccount)[0] === 'id' || Object.keys(props.action.trade.alpacaAccount)[0] === 'symbol')
|
3516
3516
|
? {
|
3517
3517
|
connect: {
|
3518
3518
|
id: props.action.trade.alpacaAccount.id
|
@@ -3576,7 +3576,7 @@ export const Order = {
|
|
3576
3576
|
}
|
3577
3577
|
} : undefined,
|
3578
3578
|
asset: props.action.trade.asset ?
|
3579
|
-
typeof props.action.trade.asset === 'object' && Object.keys(props.action.trade.asset).length === 1 && Object.keys(props.action.trade.asset)[0] === 'id'
|
3579
|
+
typeof props.action.trade.asset === 'object' && Object.keys(props.action.trade.asset).length === 1 && (Object.keys(props.action.trade.asset)[0] === 'id' || Object.keys(props.action.trade.asset)[0] === 'symbol')
|
3580
3580
|
? {
|
3581
3581
|
connect: {
|
3582
3582
|
id: props.action.trade.asset.id
|
@@ -4080,7 +4080,7 @@ export const Order = {
|
|
4080
4080
|
}
|
4081
4081
|
} : undefined,
|
4082
4082
|
asset: props.asset ?
|
4083
|
-
typeof props.asset === 'object' && Object.keys(props.asset).length === 1 && Object.keys(props.asset)[0] === 'id'
|
4083
|
+
typeof props.asset === 'object' && Object.keys(props.asset).length === 1 && (Object.keys(props.asset)[0] === 'id' || Object.keys(props.asset)[0] === 'symbol')
|
4084
4084
|
? {
|
4085
4085
|
connect: {
|
4086
4086
|
id: props.asset.id
|
@@ -4267,7 +4267,7 @@ export const Order = {
|
|
4267
4267
|
set: props.asset.bidPrice
|
4268
4268
|
} : undefined,
|
4269
4269
|
trades: props.asset.trades ?
|
4270
|
-
Array.isArray(props.asset.trades) && props.asset.trades.length > 0 && props.asset.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4270
|
+
Array.isArray(props.asset.trades) && props.asset.trades.length > 0 && props.asset.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
4271
4271
|
connect: props.asset.trades.map((item) => ({
|
4272
4272
|
id: item.id
|
4273
4273
|
}))
|
@@ -4319,7 +4319,7 @@ export const Order = {
|
|
4319
4319
|
set: item.status
|
4320
4320
|
} : undefined,
|
4321
4321
|
alpacaAccount: item.alpacaAccount ?
|
4322
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
4322
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
4323
4323
|
? {
|
4324
4324
|
connect: {
|
4325
4325
|
id: item.alpacaAccount.id
|
@@ -4383,7 +4383,7 @@ export const Order = {
|
|
4383
4383
|
}
|
4384
4384
|
} : undefined,
|
4385
4385
|
actions: item.actions ?
|
4386
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4386
|
+
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) ? {
|
4387
4387
|
connect: item.actions.map((item) => ({
|
4388
4388
|
id: item.id
|
4389
4389
|
}))
|
@@ -4512,7 +4512,7 @@ export const Order = {
|
|
4512
4512
|
}))
|
4513
4513
|
} : undefined,
|
4514
4514
|
positions: props.asset.positions ?
|
4515
|
-
Array.isArray(props.asset.positions) && props.asset.positions.length > 0 && props.asset.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4515
|
+
Array.isArray(props.asset.positions) && props.asset.positions.length > 0 && props.asset.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
4516
4516
|
connect: props.asset.positions.map((item) => ({
|
4517
4517
|
id: item.id
|
4518
4518
|
}))
|
@@ -4579,7 +4579,7 @@ export const Order = {
|
|
4579
4579
|
set: item.closed
|
4580
4580
|
} : undefined,
|
4581
4581
|
alpacaAccount: item.alpacaAccount ?
|
4582
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
4582
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
4583
4583
|
? {
|
4584
4584
|
connect: {
|
4585
4585
|
id: item.alpacaAccount.id
|
@@ -4690,7 +4690,7 @@ export const Order = {
|
|
4690
4690
|
}))
|
4691
4691
|
} : undefined,
|
4692
4692
|
newsMentions: props.asset.newsMentions ?
|
4693
|
-
Array.isArray(props.asset.newsMentions) && props.asset.newsMentions.length > 0 && props.asset.newsMentions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4693
|
+
Array.isArray(props.asset.newsMentions) && props.asset.newsMentions.length > 0 && props.asset.newsMentions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
4694
4694
|
connect: props.asset.newsMentions.map((item) => ({
|
4695
4695
|
id: item.id
|
4696
4696
|
}))
|
@@ -4722,7 +4722,7 @@ export const Order = {
|
|
4722
4722
|
set: item.sentimentLabel
|
4723
4723
|
} : undefined,
|
4724
4724
|
news: item.news ?
|
4725
|
-
typeof item.news === 'object' && Object.keys(item.news).length === 1 && Object.keys(item.news)[0] === 'id'
|
4725
|
+
typeof item.news === 'object' && Object.keys(item.news).length === 1 && (Object.keys(item.news)[0] === 'id' || Object.keys(item.news)[0] === 'symbol')
|
4726
4726
|
? {
|
4727
4727
|
connect: {
|
4728
4728
|
id: item.news.id
|
@@ -4849,7 +4849,7 @@ export const Order = {
|
|
4849
4849
|
}))
|
4850
4850
|
} : undefined,
|
4851
4851
|
contracts: props.asset.contracts ?
|
4852
|
-
Array.isArray(props.asset.contracts) && props.asset.contracts.length > 0 && props.asset.contracts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4852
|
+
Array.isArray(props.asset.contracts) && props.asset.contracts.length > 0 && props.asset.contracts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
4853
4853
|
connect: props.asset.contracts.map((item) => ({
|
4854
4854
|
id: item.id
|
4855
4855
|
}))
|
@@ -4936,7 +4936,7 @@ export const Order = {
|
|
4936
4936
|
set: item.orderId
|
4937
4937
|
} : undefined,
|
4938
4938
|
deliverables: item.deliverables ?
|
4939
|
-
Array.isArray(item.deliverables) && item.deliverables.length > 0 && item.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4939
|
+
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) ? {
|
4940
4940
|
connect: item.deliverables.map((item) => ({
|
4941
4941
|
id: item.id
|
4942
4942
|
}))
|
@@ -4995,7 +4995,7 @@ export const Order = {
|
|
4995
4995
|
}))
|
4996
4996
|
} : undefined,
|
4997
4997
|
order: item.order ?
|
4998
|
-
typeof item.order === 'object' && Object.keys(item.order).length === 1 && Object.keys(item.order)[0] === 'id'
|
4998
|
+
typeof item.order === 'object' && Object.keys(item.order).length === 1 && (Object.keys(item.order)[0] === 'id' || Object.keys(item.order)[0] === 'symbol')
|
4999
4999
|
? {
|
5000
5000
|
connect: {
|
5001
5001
|
id: item.order.id
|
@@ -5615,7 +5615,7 @@ export const Order = {
|
|
5615
5615
|
}
|
5616
5616
|
} : undefined,
|
5617
5617
|
contract: props.contract ?
|
5618
|
-
typeof props.contract === 'object' && Object.keys(props.contract).length === 1 && Object.keys(props.contract)[0] === 'id'
|
5618
|
+
typeof props.contract === 'object' && Object.keys(props.contract).length === 1 && (Object.keys(props.contract)[0] === 'id' || Object.keys(props.contract)[0] === 'symbol')
|
5619
5619
|
? {
|
5620
5620
|
connect: {
|
5621
5621
|
id: props.contract.id
|
@@ -5709,7 +5709,7 @@ export const Order = {
|
|
5709
5709
|
set: props.contract.orderId
|
5710
5710
|
} : undefined,
|
5711
5711
|
deliverables: props.contract.deliverables ?
|
5712
|
-
Array.isArray(props.contract.deliverables) && props.contract.deliverables.length > 0 && props.contract.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
5712
|
+
Array.isArray(props.contract.deliverables) && props.contract.deliverables.length > 0 && props.contract.deliverables.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
5713
5713
|
connect: props.contract.deliverables.map((item) => ({
|
5714
5714
|
id: item.id
|
5715
5715
|
}))
|
@@ -5768,7 +5768,7 @@ export const Order = {
|
|
5768
5768
|
}))
|
5769
5769
|
} : undefined,
|
5770
5770
|
asset: props.contract.asset ?
|
5771
|
-
typeof props.contract.asset === 'object' && Object.keys(props.contract.asset).length === 1 && Object.keys(props.contract.asset)[0] === 'id'
|
5771
|
+
typeof props.contract.asset === 'object' && Object.keys(props.contract.asset).length === 1 && (Object.keys(props.contract.asset)[0] === 'id' || Object.keys(props.contract.asset)[0] === 'symbol')
|
5772
5772
|
? {
|
5773
5773
|
connect: {
|
5774
5774
|
id: props.contract.asset.id
|
@@ -5955,7 +5955,7 @@ export const Order = {
|
|
5955
5955
|
set: props.contract.asset.bidPrice
|
5956
5956
|
} : undefined,
|
5957
5957
|
trades: props.contract.asset.trades ?
|
5958
|
-
Array.isArray(props.contract.asset.trades) && props.contract.asset.trades.length > 0 && props.contract.asset.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
5958
|
+
Array.isArray(props.contract.asset.trades) && props.contract.asset.trades.length > 0 && props.contract.asset.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
5959
5959
|
connect: props.contract.asset.trades.map((item) => ({
|
5960
5960
|
id: item.id
|
5961
5961
|
}))
|
@@ -6023,7 +6023,7 @@ export const Order = {
|
|
6023
6023
|
}))
|
6024
6024
|
} : undefined,
|
6025
6025
|
orders: props.contract.asset.orders ?
|
6026
|
-
Array.isArray(props.contract.asset.orders) && props.contract.asset.orders.length > 0 && props.contract.asset.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
6026
|
+
Array.isArray(props.contract.asset.orders) && props.contract.asset.orders.length > 0 && props.contract.asset.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
6027
6027
|
connect: props.contract.asset.orders.map((item) => ({
|
6028
6028
|
id: item.id
|
6029
6029
|
}))
|
@@ -6154,7 +6154,7 @@ export const Order = {
|
|
6154
6154
|
}))
|
6155
6155
|
} : undefined,
|
6156
6156
|
positions: props.contract.asset.positions ?
|
6157
|
-
Array.isArray(props.contract.asset.positions) && props.contract.asset.positions.length > 0 && props.contract.asset.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
6157
|
+
Array.isArray(props.contract.asset.positions) && props.contract.asset.positions.length > 0 && props.contract.asset.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
6158
6158
|
connect: props.contract.asset.positions.map((item) => ({
|
6159
6159
|
id: item.id
|
6160
6160
|
}))
|
@@ -6241,7 +6241,7 @@ export const Order = {
|
|
6241
6241
|
}))
|
6242
6242
|
} : undefined,
|
6243
6243
|
newsMentions: props.contract.asset.newsMentions ?
|
6244
|
-
Array.isArray(props.contract.asset.newsMentions) && props.contract.asset.newsMentions.length > 0 && props.contract.asset.newsMentions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
6244
|
+
Array.isArray(props.contract.asset.newsMentions) && props.contract.asset.newsMentions.length > 0 && props.contract.asset.newsMentions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
6245
6245
|
connect: props.contract.asset.newsMentions.map((item) => ({
|
6246
6246
|
id: item.id
|
6247
6247
|
}))
|
@@ -8137,7 +8137,7 @@ export const Order = {
|
|
8137
8137
|
set: props.takeProfitId
|
8138
8138
|
} : undefined,
|
8139
8139
|
stopLoss: props.stopLoss ?
|
8140
|
-
typeof props.stopLoss === 'object' && Object.keys(props.stopLoss).length === 1 && Object.keys(props.stopLoss)[0] === 'id'
|
8140
|
+
typeof props.stopLoss === 'object' && Object.keys(props.stopLoss).length === 1 && (Object.keys(props.stopLoss)[0] === 'id' || Object.keys(props.stopLoss)[0] === 'symbol')
|
8141
8141
|
? {
|
8142
8142
|
connect: {
|
8143
8143
|
id: props.stopLoss.id
|
@@ -8169,7 +8169,7 @@ export const Order = {
|
|
8169
8169
|
}
|
8170
8170
|
} : undefined,
|
8171
8171
|
takeProfit: props.takeProfit ?
|
8172
|
-
typeof props.takeProfit === 'object' && Object.keys(props.takeProfit).length === 1 && Object.keys(props.takeProfit)[0] === 'id'
|
8172
|
+
typeof props.takeProfit === 'object' && Object.keys(props.takeProfit).length === 1 && (Object.keys(props.takeProfit)[0] === 'id' || Object.keys(props.takeProfit)[0] === 'symbol')
|
8173
8173
|
? {
|
8174
8174
|
connect: {
|
8175
8175
|
id: props.takeProfit.id
|
@@ -8201,7 +8201,7 @@ export const Order = {
|
|
8201
8201
|
}
|
8202
8202
|
} : undefined,
|
8203
8203
|
alpacaAccount: props.alpacaAccount ?
|
8204
|
-
typeof props.alpacaAccount === 'object' && Object.keys(props.alpacaAccount).length === 1 && Object.keys(props.alpacaAccount)[0] === 'id'
|
8204
|
+
typeof props.alpacaAccount === 'object' && Object.keys(props.alpacaAccount).length === 1 && (Object.keys(props.alpacaAccount)[0] === 'id' || Object.keys(props.alpacaAccount)[0] === 'symbol')
|
8205
8205
|
? {
|
8206
8206
|
connect: {
|
8207
8207
|
id: props.alpacaAccount.id
|
@@ -8250,7 +8250,7 @@ export const Order = {
|
|
8250
8250
|
set: props.alpacaAccount.volumeThreshold
|
8251
8251
|
} : undefined,
|
8252
8252
|
user: props.alpacaAccount.user ?
|
8253
|
-
typeof props.alpacaAccount.user === 'object' && Object.keys(props.alpacaAccount.user).length === 1 && Object.keys(props.alpacaAccount.user)[0] === 'id'
|
8253
|
+
typeof props.alpacaAccount.user === 'object' && Object.keys(props.alpacaAccount.user).length === 1 && (Object.keys(props.alpacaAccount.user)[0] === 'id' || Object.keys(props.alpacaAccount.user)[0] === 'symbol')
|
8254
8254
|
? {
|
8255
8255
|
connect: {
|
8256
8256
|
id: props.alpacaAccount.user.id
|
@@ -8308,7 +8308,7 @@ export const Order = {
|
|
8308
8308
|
set: props.alpacaAccount.user.openaiModel
|
8309
8309
|
} : undefined,
|
8310
8310
|
customer: props.alpacaAccount.user.customer ?
|
8311
|
-
typeof props.alpacaAccount.user.customer === 'object' && Object.keys(props.alpacaAccount.user.customer).length === 1 && Object.keys(props.alpacaAccount.user.customer)[0] === 'id'
|
8311
|
+
typeof props.alpacaAccount.user.customer === 'object' && Object.keys(props.alpacaAccount.user.customer).length === 1 && (Object.keys(props.alpacaAccount.user.customer)[0] === 'id' || Object.keys(props.alpacaAccount.user.customer)[0] === 'symbol')
|
8312
8312
|
? {
|
8313
8313
|
connect: {
|
8314
8314
|
id: props.alpacaAccount.user.customer.id
|
@@ -8369,7 +8369,7 @@ export const Order = {
|
|
8369
8369
|
}
|
8370
8370
|
} : undefined,
|
8371
8371
|
accounts: props.alpacaAccount.user.accounts ?
|
8372
|
-
Array.isArray(props.alpacaAccount.user.accounts) && props.alpacaAccount.user.accounts.length > 0 && props.alpacaAccount.user.accounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
8372
|
+
Array.isArray(props.alpacaAccount.user.accounts) && props.alpacaAccount.user.accounts.length > 0 && props.alpacaAccount.user.accounts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
8373
8373
|
connect: props.alpacaAccount.user.accounts.map((item) => ({
|
8374
8374
|
id: item.id
|
8375
8375
|
}))
|
@@ -8433,7 +8433,7 @@ export const Order = {
|
|
8433
8433
|
}))
|
8434
8434
|
} : undefined,
|
8435
8435
|
sessions: props.alpacaAccount.user.sessions ?
|
8436
|
-
Array.isArray(props.alpacaAccount.user.sessions) && props.alpacaAccount.user.sessions.length > 0 && props.alpacaAccount.user.sessions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
8436
|
+
Array.isArray(props.alpacaAccount.user.sessions) && props.alpacaAccount.user.sessions.length > 0 && props.alpacaAccount.user.sessions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
8437
8437
|
connect: props.alpacaAccount.user.sessions.map((item) => ({
|
8438
8438
|
id: item.id
|
8439
8439
|
}))
|
@@ -8462,7 +8462,7 @@ export const Order = {
|
|
8462
8462
|
}))
|
8463
8463
|
} : undefined,
|
8464
8464
|
authenticators: props.alpacaAccount.user.authenticators ?
|
8465
|
-
Array.isArray(props.alpacaAccount.user.authenticators) && props.alpacaAccount.user.authenticators.length > 0 && props.alpacaAccount.user.authenticators.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
8465
|
+
Array.isArray(props.alpacaAccount.user.authenticators) && props.alpacaAccount.user.authenticators.length > 0 && props.alpacaAccount.user.authenticators.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
8466
8466
|
connect: props.alpacaAccount.user.authenticators.map((item) => ({
|
8467
8467
|
id: item.id
|
8468
8468
|
}))
|
@@ -8612,7 +8612,7 @@ export const Order = {
|
|
8612
8612
|
}
|
8613
8613
|
} : undefined,
|
8614
8614
|
trades: props.alpacaAccount.trades ?
|
8615
|
-
Array.isArray(props.alpacaAccount.trades) && props.alpacaAccount.trades.length > 0 && props.alpacaAccount.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
8615
|
+
Array.isArray(props.alpacaAccount.trades) && props.alpacaAccount.trades.length > 0 && props.alpacaAccount.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
8616
8616
|
connect: props.alpacaAccount.trades.map((item) => ({
|
8617
8617
|
id: item.id
|
8618
8618
|
}))
|
@@ -8664,7 +8664,7 @@ export const Order = {
|
|
8664
8664
|
set: item.status
|
8665
8665
|
} : undefined,
|
8666
8666
|
asset: item.asset ?
|
8667
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
8667
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
8668
8668
|
? {
|
8669
8669
|
connect: {
|
8670
8670
|
id: item.asset.id
|
@@ -8911,7 +8911,7 @@ export const Order = {
|
|
8911
8911
|
}
|
8912
8912
|
} : undefined,
|
8913
8913
|
actions: item.actions ?
|
8914
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
8914
|
+
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) ? {
|
8915
8915
|
connect: item.actions.map((item) => ({
|
8916
8916
|
id: item.id
|
8917
8917
|
}))
|
@@ -9084,7 +9084,7 @@ export const Order = {
|
|
9084
9084
|
}))
|
9085
9085
|
} : undefined,
|
9086
9086
|
positions: props.alpacaAccount.positions ?
|
9087
|
-
Array.isArray(props.alpacaAccount.positions) && props.alpacaAccount.positions.length > 0 && props.alpacaAccount.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
9087
|
+
Array.isArray(props.alpacaAccount.positions) && props.alpacaAccount.positions.length > 0 && props.alpacaAccount.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
9088
9088
|
connect: props.alpacaAccount.positions.map((item) => ({
|
9089
9089
|
id: item.id
|
9090
9090
|
}))
|
@@ -9151,7 +9151,7 @@ export const Order = {
|
|
9151
9151
|
set: item.closed
|
9152
9152
|
} : undefined,
|
9153
9153
|
asset: item.asset ?
|
9154
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
9154
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
9155
9155
|
? {
|
9156
9156
|
connect: {
|
9157
9157
|
id: item.asset.id
|
@@ -9489,7 +9489,7 @@ export const Order = {
|
|
9489
9489
|
}))
|
9490
9490
|
} : undefined,
|
9491
9491
|
alerts: props.alpacaAccount.alerts ?
|
9492
|
-
Array.isArray(props.alpacaAccount.alerts) && props.alpacaAccount.alerts.length > 0 && props.alpacaAccount.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
9492
|
+
Array.isArray(props.alpacaAccount.alerts) && props.alpacaAccount.alerts.length > 0 && props.alpacaAccount.alerts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
9493
9493
|
connect: props.alpacaAccount.alerts.map((item) => ({
|
9494
9494
|
id: item.id
|
9495
9495
|
}))
|
@@ -9921,7 +9921,7 @@ export const Order = {
|
|
9921
9921
|
}
|
9922
9922
|
} : undefined,
|
9923
9923
|
action: props.action ?
|
9924
|
-
typeof props.action === 'object' && Object.keys(props.action).length === 1 && Object.keys(props.action)[0] === 'id'
|
9924
|
+
typeof props.action === 'object' && Object.keys(props.action).length === 1 && (Object.keys(props.action)[0] === 'id' || Object.keys(props.action)[0] === 'symbol')
|
9925
9925
|
? {
|
9926
9926
|
connect: {
|
9927
9927
|
id: props.action.id
|
@@ -9964,7 +9964,7 @@ export const Order = {
|
|
9964
9964
|
set: props.action.dependedOnBy
|
9965
9965
|
} : undefined,
|
9966
9966
|
trade: props.action.trade ?
|
9967
|
-
typeof props.action.trade === 'object' && Object.keys(props.action.trade).length === 1 && Object.keys(props.action.trade)[0] === 'id'
|
9967
|
+
typeof props.action.trade === 'object' && Object.keys(props.action.trade).length === 1 && (Object.keys(props.action.trade)[0] === 'id' || Object.keys(props.action.trade)[0] === 'symbol')
|
9968
9968
|
? {
|
9969
9969
|
connect: {
|
9970
9970
|
id: props.action.trade.id
|
@@ -10019,7 +10019,7 @@ export const Order = {
|
|
10019
10019
|
set: props.action.trade.status
|
10020
10020
|
} : undefined,
|
10021
10021
|
alpacaAccount: props.action.trade.alpacaAccount ?
|
10022
|
-
typeof props.action.trade.alpacaAccount === 'object' && Object.keys(props.action.trade.alpacaAccount).length === 1 && Object.keys(props.action.trade.alpacaAccount)[0] === 'id'
|
10022
|
+
typeof props.action.trade.alpacaAccount === 'object' && Object.keys(props.action.trade.alpacaAccount).length === 1 && (Object.keys(props.action.trade.alpacaAccount)[0] === 'id' || Object.keys(props.action.trade.alpacaAccount)[0] === 'symbol')
|
10023
10023
|
? {
|
10024
10024
|
connect: {
|
10025
10025
|
id: props.action.trade.alpacaAccount.id
|
@@ -10083,7 +10083,7 @@ export const Order = {
|
|
10083
10083
|
}
|
10084
10084
|
} : undefined,
|
10085
10085
|
asset: props.action.trade.asset ?
|
10086
|
-
typeof props.action.trade.asset === 'object' && Object.keys(props.action.trade.asset).length === 1 && Object.keys(props.action.trade.asset)[0] === 'id'
|
10086
|
+
typeof props.action.trade.asset === 'object' && Object.keys(props.action.trade.asset).length === 1 && (Object.keys(props.action.trade.asset)[0] === 'id' || Object.keys(props.action.trade.asset)[0] === 'symbol')
|
10087
10087
|
? {
|
10088
10088
|
connect: {
|
10089
10089
|
id: props.action.trade.asset.id
|
@@ -10587,7 +10587,7 @@ export const Order = {
|
|
10587
10587
|
}
|
10588
10588
|
} : undefined,
|
10589
10589
|
asset: props.asset ?
|
10590
|
-
typeof props.asset === 'object' && Object.keys(props.asset).length === 1 && Object.keys(props.asset)[0] === 'id'
|
10590
|
+
typeof props.asset === 'object' && Object.keys(props.asset).length === 1 && (Object.keys(props.asset)[0] === 'id' || Object.keys(props.asset)[0] === 'symbol')
|
10591
10591
|
? {
|
10592
10592
|
connect: {
|
10593
10593
|
id: props.asset.id
|
@@ -10774,7 +10774,7 @@ export const Order = {
|
|
10774
10774
|
set: props.asset.bidPrice
|
10775
10775
|
} : undefined,
|
10776
10776
|
trades: props.asset.trades ?
|
10777
|
-
Array.isArray(props.asset.trades) && props.asset.trades.length > 0 && props.asset.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
10777
|
+
Array.isArray(props.asset.trades) && props.asset.trades.length > 0 && props.asset.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
10778
10778
|
connect: props.asset.trades.map((item) => ({
|
10779
10779
|
id: item.id
|
10780
10780
|
}))
|
@@ -10826,7 +10826,7 @@ export const Order = {
|
|
10826
10826
|
set: item.status
|
10827
10827
|
} : undefined,
|
10828
10828
|
alpacaAccount: item.alpacaAccount ?
|
10829
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
10829
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
10830
10830
|
? {
|
10831
10831
|
connect: {
|
10832
10832
|
id: item.alpacaAccount.id
|
@@ -10890,7 +10890,7 @@ export const Order = {
|
|
10890
10890
|
}
|
10891
10891
|
} : undefined,
|
10892
10892
|
actions: item.actions ?
|
10893
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
10893
|
+
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) ? {
|
10894
10894
|
connect: item.actions.map((item) => ({
|
10895
10895
|
id: item.id
|
10896
10896
|
}))
|
@@ -11019,7 +11019,7 @@ export const Order = {
|
|
11019
11019
|
}))
|
11020
11020
|
} : undefined,
|
11021
11021
|
positions: props.asset.positions ?
|
11022
|
-
Array.isArray(props.asset.positions) && props.asset.positions.length > 0 && props.asset.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
11022
|
+
Array.isArray(props.asset.positions) && props.asset.positions.length > 0 && props.asset.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
11023
11023
|
connect: props.asset.positions.map((item) => ({
|
11024
11024
|
id: item.id
|
11025
11025
|
}))
|
@@ -11086,7 +11086,7 @@ export const Order = {
|
|
11086
11086
|
set: item.closed
|
11087
11087
|
} : undefined,
|
11088
11088
|
alpacaAccount: item.alpacaAccount ?
|
11089
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
11089
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
11090
11090
|
? {
|
11091
11091
|
connect: {
|
11092
11092
|
id: item.alpacaAccount.id
|
@@ -11197,7 +11197,7 @@ export const Order = {
|
|
11197
11197
|
}))
|
11198
11198
|
} : undefined,
|
11199
11199
|
newsMentions: props.asset.newsMentions ?
|
11200
|
-
Array.isArray(props.asset.newsMentions) && props.asset.newsMentions.length > 0 && props.asset.newsMentions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
11200
|
+
Array.isArray(props.asset.newsMentions) && props.asset.newsMentions.length > 0 && props.asset.newsMentions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
11201
11201
|
connect: props.asset.newsMentions.map((item) => ({
|
11202
11202
|
id: item.id
|
11203
11203
|
}))
|
@@ -11229,7 +11229,7 @@ export const Order = {
|
|
11229
11229
|
set: item.sentimentLabel
|
11230
11230
|
} : undefined,
|
11231
11231
|
news: item.news ?
|
11232
|
-
typeof item.news === 'object' && Object.keys(item.news).length === 1 && Object.keys(item.news)[0] === 'id'
|
11232
|
+
typeof item.news === 'object' && Object.keys(item.news).length === 1 && (Object.keys(item.news)[0] === 'id' || Object.keys(item.news)[0] === 'symbol')
|
11233
11233
|
? {
|
11234
11234
|
connect: {
|
11235
11235
|
id: item.news.id
|
@@ -11356,7 +11356,7 @@ export const Order = {
|
|
11356
11356
|
}))
|
11357
11357
|
} : undefined,
|
11358
11358
|
contracts: props.asset.contracts ?
|
11359
|
-
Array.isArray(props.asset.contracts) && props.asset.contracts.length > 0 && props.asset.contracts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
11359
|
+
Array.isArray(props.asset.contracts) && props.asset.contracts.length > 0 && props.asset.contracts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
11360
11360
|
connect: props.asset.contracts.map((item) => ({
|
11361
11361
|
id: item.id
|
11362
11362
|
}))
|
@@ -11443,7 +11443,7 @@ export const Order = {
|
|
11443
11443
|
set: item.orderId
|
11444
11444
|
} : undefined,
|
11445
11445
|
deliverables: item.deliverables ?
|
11446
|
-
Array.isArray(item.deliverables) && item.deliverables.length > 0 && item.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
11446
|
+
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) ? {
|
11447
11447
|
connect: item.deliverables.map((item) => ({
|
11448
11448
|
id: item.id
|
11449
11449
|
}))
|
@@ -11502,7 +11502,7 @@ export const Order = {
|
|
11502
11502
|
}))
|
11503
11503
|
} : undefined,
|
11504
11504
|
order: item.order ?
|
11505
|
-
typeof item.order === 'object' && Object.keys(item.order).length === 1 && Object.keys(item.order)[0] === 'id'
|
11505
|
+
typeof item.order === 'object' && Object.keys(item.order).length === 1 && (Object.keys(item.order)[0] === 'id' || Object.keys(item.order)[0] === 'symbol')
|
11506
11506
|
? {
|
11507
11507
|
connect: {
|
11508
11508
|
id: item.order.id
|
@@ -12122,7 +12122,7 @@ export const Order = {
|
|
12122
12122
|
}
|
12123
12123
|
} : undefined,
|
12124
12124
|
contract: props.contract ?
|
12125
|
-
typeof props.contract === 'object' && Object.keys(props.contract).length === 1 && Object.keys(props.contract)[0] === 'id'
|
12125
|
+
typeof props.contract === 'object' && Object.keys(props.contract).length === 1 && (Object.keys(props.contract)[0] === 'id' || Object.keys(props.contract)[0] === 'symbol')
|
12126
12126
|
? {
|
12127
12127
|
connect: {
|
12128
12128
|
id: props.contract.id
|
@@ -12216,7 +12216,7 @@ export const Order = {
|
|
12216
12216
|
set: props.contract.orderId
|
12217
12217
|
} : undefined,
|
12218
12218
|
deliverables: props.contract.deliverables ?
|
12219
|
-
Array.isArray(props.contract.deliverables) && props.contract.deliverables.length > 0 && props.contract.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
12219
|
+
Array.isArray(props.contract.deliverables) && props.contract.deliverables.length > 0 && props.contract.deliverables.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
12220
12220
|
connect: props.contract.deliverables.map((item) => ({
|
12221
12221
|
id: item.id
|
12222
12222
|
}))
|
@@ -12275,7 +12275,7 @@ export const Order = {
|
|
12275
12275
|
}))
|
12276
12276
|
} : undefined,
|
12277
12277
|
asset: props.contract.asset ?
|
12278
|
-
typeof props.contract.asset === 'object' && Object.keys(props.contract.asset).length === 1 && Object.keys(props.contract.asset)[0] === 'id'
|
12278
|
+
typeof props.contract.asset === 'object' && Object.keys(props.contract.asset).length === 1 && (Object.keys(props.contract.asset)[0] === 'id' || Object.keys(props.contract.asset)[0] === 'symbol')
|
12279
12279
|
? {
|
12280
12280
|
connect: {
|
12281
12281
|
id: props.contract.asset.id
|
@@ -12462,7 +12462,7 @@ export const Order = {
|
|
12462
12462
|
set: props.contract.asset.bidPrice
|
12463
12463
|
} : undefined,
|
12464
12464
|
trades: props.contract.asset.trades ?
|
12465
|
-
Array.isArray(props.contract.asset.trades) && props.contract.asset.trades.length > 0 && props.contract.asset.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
12465
|
+
Array.isArray(props.contract.asset.trades) && props.contract.asset.trades.length > 0 && props.contract.asset.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
12466
12466
|
connect: props.contract.asset.trades.map((item) => ({
|
12467
12467
|
id: item.id
|
12468
12468
|
}))
|
@@ -12530,7 +12530,7 @@ export const Order = {
|
|
12530
12530
|
}))
|
12531
12531
|
} : undefined,
|
12532
12532
|
orders: props.contract.asset.orders ?
|
12533
|
-
Array.isArray(props.contract.asset.orders) && props.contract.asset.orders.length > 0 && props.contract.asset.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
12533
|
+
Array.isArray(props.contract.asset.orders) && props.contract.asset.orders.length > 0 && props.contract.asset.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
12534
12534
|
connect: props.contract.asset.orders.map((item) => ({
|
12535
12535
|
id: item.id
|
12536
12536
|
}))
|
@@ -12661,7 +12661,7 @@ export const Order = {
|
|
12661
12661
|
}))
|
12662
12662
|
} : undefined,
|
12663
12663
|
positions: props.contract.asset.positions ?
|
12664
|
-
Array.isArray(props.contract.asset.positions) && props.contract.asset.positions.length > 0 && props.contract.asset.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
12664
|
+
Array.isArray(props.contract.asset.positions) && props.contract.asset.positions.length > 0 && props.contract.asset.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
12665
12665
|
connect: props.contract.asset.positions.map((item) => ({
|
12666
12666
|
id: item.id
|
12667
12667
|
}))
|
@@ -12748,7 +12748,7 @@ export const Order = {
|
|
12748
12748
|
}))
|
12749
12749
|
} : undefined,
|
12750
12750
|
newsMentions: props.contract.asset.newsMentions ?
|
12751
|
-
Array.isArray(props.contract.asset.newsMentions) && props.contract.asset.newsMentions.length > 0 && props.contract.asset.newsMentions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
12751
|
+
Array.isArray(props.contract.asset.newsMentions) && props.contract.asset.newsMentions.length > 0 && props.contract.asset.newsMentions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
12752
12752
|
connect: props.contract.asset.newsMentions.map((item) => ({
|
12753
12753
|
id: item.id
|
12754
12754
|
}))
|
@@ -13364,7 +13364,7 @@ export const Order = {
|
|
13364
13364
|
set: prop.takeProfitId
|
13365
13365
|
} : undefined,
|
13366
13366
|
stopLoss: prop.stopLoss ?
|
13367
|
-
typeof prop.stopLoss === 'object' && Object.keys(prop.stopLoss).length === 1 && Object.keys(prop.stopLoss)[0] === 'id'
|
13367
|
+
typeof prop.stopLoss === 'object' && Object.keys(prop.stopLoss).length === 1 && (Object.keys(prop.stopLoss)[0] === 'id' || Object.keys(prop.stopLoss)[0] === 'symbol')
|
13368
13368
|
? {
|
13369
13369
|
connect: {
|
13370
13370
|
id: prop.stopLoss.id
|
@@ -13396,7 +13396,7 @@ export const Order = {
|
|
13396
13396
|
}
|
13397
13397
|
} : undefined,
|
13398
13398
|
takeProfit: prop.takeProfit ?
|
13399
|
-
typeof prop.takeProfit === 'object' && Object.keys(prop.takeProfit).length === 1 && Object.keys(prop.takeProfit)[0] === 'id'
|
13399
|
+
typeof prop.takeProfit === 'object' && Object.keys(prop.takeProfit).length === 1 && (Object.keys(prop.takeProfit)[0] === 'id' || Object.keys(prop.takeProfit)[0] === 'symbol')
|
13400
13400
|
? {
|
13401
13401
|
connect: {
|
13402
13402
|
id: prop.takeProfit.id
|
@@ -13428,7 +13428,7 @@ export const Order = {
|
|
13428
13428
|
}
|
13429
13429
|
} : undefined,
|
13430
13430
|
alpacaAccount: prop.alpacaAccount ?
|
13431
|
-
typeof prop.alpacaAccount === 'object' && Object.keys(prop.alpacaAccount).length === 1 && Object.keys(prop.alpacaAccount)[0] === 'id'
|
13431
|
+
typeof prop.alpacaAccount === 'object' && Object.keys(prop.alpacaAccount).length === 1 && (Object.keys(prop.alpacaAccount)[0] === 'id' || Object.keys(prop.alpacaAccount)[0] === 'symbol')
|
13432
13432
|
? {
|
13433
13433
|
connect: {
|
13434
13434
|
id: prop.alpacaAccount.id
|
@@ -13477,7 +13477,7 @@ export const Order = {
|
|
13477
13477
|
set: prop.alpacaAccount.volumeThreshold
|
13478
13478
|
} : undefined,
|
13479
13479
|
user: prop.alpacaAccount.user ?
|
13480
|
-
typeof prop.alpacaAccount.user === 'object' && Object.keys(prop.alpacaAccount.user).length === 1 && Object.keys(prop.alpacaAccount.user)[0] === 'id'
|
13480
|
+
typeof prop.alpacaAccount.user === 'object' && Object.keys(prop.alpacaAccount.user).length === 1 && (Object.keys(prop.alpacaAccount.user)[0] === 'id' || Object.keys(prop.alpacaAccount.user)[0] === 'symbol')
|
13481
13481
|
? {
|
13482
13482
|
connect: {
|
13483
13483
|
id: prop.alpacaAccount.user.id
|
@@ -13535,7 +13535,7 @@ export const Order = {
|
|
13535
13535
|
set: prop.alpacaAccount.user.openaiModel
|
13536
13536
|
} : undefined,
|
13537
13537
|
customer: prop.alpacaAccount.user.customer ?
|
13538
|
-
typeof prop.alpacaAccount.user.customer === 'object' && Object.keys(prop.alpacaAccount.user.customer).length === 1 && Object.keys(prop.alpacaAccount.user.customer)[0] === 'id'
|
13538
|
+
typeof prop.alpacaAccount.user.customer === 'object' && Object.keys(prop.alpacaAccount.user.customer).length === 1 && (Object.keys(prop.alpacaAccount.user.customer)[0] === 'id' || Object.keys(prop.alpacaAccount.user.customer)[0] === 'symbol')
|
13539
13539
|
? {
|
13540
13540
|
connect: {
|
13541
13541
|
id: prop.alpacaAccount.user.customer.id
|
@@ -13596,7 +13596,7 @@ export const Order = {
|
|
13596
13596
|
}
|
13597
13597
|
} : undefined,
|
13598
13598
|
accounts: prop.alpacaAccount.user.accounts ?
|
13599
|
-
Array.isArray(prop.alpacaAccount.user.accounts) && prop.alpacaAccount.user.accounts.length > 0 && prop.alpacaAccount.user.accounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
13599
|
+
Array.isArray(prop.alpacaAccount.user.accounts) && prop.alpacaAccount.user.accounts.length > 0 && prop.alpacaAccount.user.accounts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
13600
13600
|
connect: prop.alpacaAccount.user.accounts.map((item) => ({
|
13601
13601
|
id: item.id
|
13602
13602
|
}))
|
@@ -13660,7 +13660,7 @@ export const Order = {
|
|
13660
13660
|
}))
|
13661
13661
|
} : undefined,
|
13662
13662
|
sessions: prop.alpacaAccount.user.sessions ?
|
13663
|
-
Array.isArray(prop.alpacaAccount.user.sessions) && prop.alpacaAccount.user.sessions.length > 0 && prop.alpacaAccount.user.sessions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
13663
|
+
Array.isArray(prop.alpacaAccount.user.sessions) && prop.alpacaAccount.user.sessions.length > 0 && prop.alpacaAccount.user.sessions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
13664
13664
|
connect: prop.alpacaAccount.user.sessions.map((item) => ({
|
13665
13665
|
id: item.id
|
13666
13666
|
}))
|
@@ -13689,7 +13689,7 @@ export const Order = {
|
|
13689
13689
|
}))
|
13690
13690
|
} : undefined,
|
13691
13691
|
authenticators: prop.alpacaAccount.user.authenticators ?
|
13692
|
-
Array.isArray(prop.alpacaAccount.user.authenticators) && prop.alpacaAccount.user.authenticators.length > 0 && prop.alpacaAccount.user.authenticators.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
13692
|
+
Array.isArray(prop.alpacaAccount.user.authenticators) && prop.alpacaAccount.user.authenticators.length > 0 && prop.alpacaAccount.user.authenticators.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
13693
13693
|
connect: prop.alpacaAccount.user.authenticators.map((item) => ({
|
13694
13694
|
id: item.id
|
13695
13695
|
}))
|
@@ -13839,7 +13839,7 @@ export const Order = {
|
|
13839
13839
|
}
|
13840
13840
|
} : undefined,
|
13841
13841
|
trades: prop.alpacaAccount.trades ?
|
13842
|
-
Array.isArray(prop.alpacaAccount.trades) && prop.alpacaAccount.trades.length > 0 && prop.alpacaAccount.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
13842
|
+
Array.isArray(prop.alpacaAccount.trades) && prop.alpacaAccount.trades.length > 0 && prop.alpacaAccount.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
13843
13843
|
connect: prop.alpacaAccount.trades.map((item) => ({
|
13844
13844
|
id: item.id
|
13845
13845
|
}))
|
@@ -13891,7 +13891,7 @@ export const Order = {
|
|
13891
13891
|
set: item.status
|
13892
13892
|
} : undefined,
|
13893
13893
|
asset: item.asset ?
|
13894
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
13894
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
13895
13895
|
? {
|
13896
13896
|
connect: {
|
13897
13897
|
id: item.asset.id
|
@@ -14138,7 +14138,7 @@ export const Order = {
|
|
14138
14138
|
}
|
14139
14139
|
} : undefined,
|
14140
14140
|
actions: item.actions ?
|
14141
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
14141
|
+
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) ? {
|
14142
14142
|
connect: item.actions.map((item) => ({
|
14143
14143
|
id: item.id
|
14144
14144
|
}))
|
@@ -14311,7 +14311,7 @@ export const Order = {
|
|
14311
14311
|
}))
|
14312
14312
|
} : undefined,
|
14313
14313
|
positions: prop.alpacaAccount.positions ?
|
14314
|
-
Array.isArray(prop.alpacaAccount.positions) && prop.alpacaAccount.positions.length > 0 && prop.alpacaAccount.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
14314
|
+
Array.isArray(prop.alpacaAccount.positions) && prop.alpacaAccount.positions.length > 0 && prop.alpacaAccount.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
14315
14315
|
connect: prop.alpacaAccount.positions.map((item) => ({
|
14316
14316
|
id: item.id
|
14317
14317
|
}))
|
@@ -14378,7 +14378,7 @@ export const Order = {
|
|
14378
14378
|
set: item.closed
|
14379
14379
|
} : undefined,
|
14380
14380
|
asset: item.asset ?
|
14381
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
14381
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
14382
14382
|
? {
|
14383
14383
|
connect: {
|
14384
14384
|
id: item.asset.id
|
@@ -14716,7 +14716,7 @@ export const Order = {
|
|
14716
14716
|
}))
|
14717
14717
|
} : undefined,
|
14718
14718
|
alerts: prop.alpacaAccount.alerts ?
|
14719
|
-
Array.isArray(prop.alpacaAccount.alerts) && prop.alpacaAccount.alerts.length > 0 && prop.alpacaAccount.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
14719
|
+
Array.isArray(prop.alpacaAccount.alerts) && prop.alpacaAccount.alerts.length > 0 && prop.alpacaAccount.alerts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
14720
14720
|
connect: prop.alpacaAccount.alerts.map((item) => ({
|
14721
14721
|
id: item.id
|
14722
14722
|
}))
|
@@ -15148,7 +15148,7 @@ export const Order = {
|
|
15148
15148
|
}
|
15149
15149
|
} : undefined,
|
15150
15150
|
action: prop.action ?
|
15151
|
-
typeof prop.action === 'object' && Object.keys(prop.action).length === 1 && Object.keys(prop.action)[0] === 'id'
|
15151
|
+
typeof prop.action === 'object' && Object.keys(prop.action).length === 1 && (Object.keys(prop.action)[0] === 'id' || Object.keys(prop.action)[0] === 'symbol')
|
15152
15152
|
? {
|
15153
15153
|
connect: {
|
15154
15154
|
id: prop.action.id
|
@@ -15191,7 +15191,7 @@ export const Order = {
|
|
15191
15191
|
set: prop.action.dependedOnBy
|
15192
15192
|
} : undefined,
|
15193
15193
|
trade: prop.action.trade ?
|
15194
|
-
typeof prop.action.trade === 'object' && Object.keys(prop.action.trade).length === 1 && Object.keys(prop.action.trade)[0] === 'id'
|
15194
|
+
typeof prop.action.trade === 'object' && Object.keys(prop.action.trade).length === 1 && (Object.keys(prop.action.trade)[0] === 'id' || Object.keys(prop.action.trade)[0] === 'symbol')
|
15195
15195
|
? {
|
15196
15196
|
connect: {
|
15197
15197
|
id: prop.action.trade.id
|
@@ -15246,7 +15246,7 @@ export const Order = {
|
|
15246
15246
|
set: prop.action.trade.status
|
15247
15247
|
} : undefined,
|
15248
15248
|
alpacaAccount: prop.action.trade.alpacaAccount ?
|
15249
|
-
typeof prop.action.trade.alpacaAccount === 'object' && Object.keys(prop.action.trade.alpacaAccount).length === 1 && Object.keys(prop.action.trade.alpacaAccount)[0] === 'id'
|
15249
|
+
typeof prop.action.trade.alpacaAccount === 'object' && Object.keys(prop.action.trade.alpacaAccount).length === 1 && (Object.keys(prop.action.trade.alpacaAccount)[0] === 'id' || Object.keys(prop.action.trade.alpacaAccount)[0] === 'symbol')
|
15250
15250
|
? {
|
15251
15251
|
connect: {
|
15252
15252
|
id: prop.action.trade.alpacaAccount.id
|
@@ -15310,7 +15310,7 @@ export const Order = {
|
|
15310
15310
|
}
|
15311
15311
|
} : undefined,
|
15312
15312
|
asset: prop.action.trade.asset ?
|
15313
|
-
typeof prop.action.trade.asset === 'object' && Object.keys(prop.action.trade.asset).length === 1 && Object.keys(prop.action.trade.asset)[0] === 'id'
|
15313
|
+
typeof prop.action.trade.asset === 'object' && Object.keys(prop.action.trade.asset).length === 1 && (Object.keys(prop.action.trade.asset)[0] === 'id' || Object.keys(prop.action.trade.asset)[0] === 'symbol')
|
15314
15314
|
? {
|
15315
15315
|
connect: {
|
15316
15316
|
id: prop.action.trade.asset.id
|
@@ -15814,7 +15814,7 @@ export const Order = {
|
|
15814
15814
|
}
|
15815
15815
|
} : undefined,
|
15816
15816
|
asset: prop.asset ?
|
15817
|
-
typeof prop.asset === 'object' && Object.keys(prop.asset).length === 1 && Object.keys(prop.asset)[0] === 'id'
|
15817
|
+
typeof prop.asset === 'object' && Object.keys(prop.asset).length === 1 && (Object.keys(prop.asset)[0] === 'id' || Object.keys(prop.asset)[0] === 'symbol')
|
15818
15818
|
? {
|
15819
15819
|
connect: {
|
15820
15820
|
id: prop.asset.id
|
@@ -16001,7 +16001,7 @@ export const Order = {
|
|
16001
16001
|
set: prop.asset.bidPrice
|
16002
16002
|
} : undefined,
|
16003
16003
|
trades: prop.asset.trades ?
|
16004
|
-
Array.isArray(prop.asset.trades) && prop.asset.trades.length > 0 && prop.asset.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
16004
|
+
Array.isArray(prop.asset.trades) && prop.asset.trades.length > 0 && prop.asset.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
16005
16005
|
connect: prop.asset.trades.map((item) => ({
|
16006
16006
|
id: item.id
|
16007
16007
|
}))
|
@@ -16053,7 +16053,7 @@ export const Order = {
|
|
16053
16053
|
set: item.status
|
16054
16054
|
} : undefined,
|
16055
16055
|
alpacaAccount: item.alpacaAccount ?
|
16056
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
16056
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
16057
16057
|
? {
|
16058
16058
|
connect: {
|
16059
16059
|
id: item.alpacaAccount.id
|
@@ -16117,7 +16117,7 @@ export const Order = {
|
|
16117
16117
|
}
|
16118
16118
|
} : undefined,
|
16119
16119
|
actions: item.actions ?
|
16120
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
16120
|
+
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) ? {
|
16121
16121
|
connect: item.actions.map((item) => ({
|
16122
16122
|
id: item.id
|
16123
16123
|
}))
|
@@ -16246,7 +16246,7 @@ export const Order = {
|
|
16246
16246
|
}))
|
16247
16247
|
} : undefined,
|
16248
16248
|
positions: prop.asset.positions ?
|
16249
|
-
Array.isArray(prop.asset.positions) && prop.asset.positions.length > 0 && prop.asset.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
16249
|
+
Array.isArray(prop.asset.positions) && prop.asset.positions.length > 0 && prop.asset.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
16250
16250
|
connect: prop.asset.positions.map((item) => ({
|
16251
16251
|
id: item.id
|
16252
16252
|
}))
|
@@ -16313,7 +16313,7 @@ export const Order = {
|
|
16313
16313
|
set: item.closed
|
16314
16314
|
} : undefined,
|
16315
16315
|
alpacaAccount: item.alpacaAccount ?
|
16316
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
16316
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
16317
16317
|
? {
|
16318
16318
|
connect: {
|
16319
16319
|
id: item.alpacaAccount.id
|
@@ -16424,7 +16424,7 @@ export const Order = {
|
|
16424
16424
|
}))
|
16425
16425
|
} : undefined,
|
16426
16426
|
newsMentions: prop.asset.newsMentions ?
|
16427
|
-
Array.isArray(prop.asset.newsMentions) && prop.asset.newsMentions.length > 0 && prop.asset.newsMentions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
16427
|
+
Array.isArray(prop.asset.newsMentions) && prop.asset.newsMentions.length > 0 && prop.asset.newsMentions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
16428
16428
|
connect: prop.asset.newsMentions.map((item) => ({
|
16429
16429
|
id: item.id
|
16430
16430
|
}))
|
@@ -16456,7 +16456,7 @@ export const Order = {
|
|
16456
16456
|
set: item.sentimentLabel
|
16457
16457
|
} : undefined,
|
16458
16458
|
news: item.news ?
|
16459
|
-
typeof item.news === 'object' && Object.keys(item.news).length === 1 && Object.keys(item.news)[0] === 'id'
|
16459
|
+
typeof item.news === 'object' && Object.keys(item.news).length === 1 && (Object.keys(item.news)[0] === 'id' || Object.keys(item.news)[0] === 'symbol')
|
16460
16460
|
? {
|
16461
16461
|
connect: {
|
16462
16462
|
id: item.news.id
|
@@ -16583,7 +16583,7 @@ export const Order = {
|
|
16583
16583
|
}))
|
16584
16584
|
} : undefined,
|
16585
16585
|
contracts: prop.asset.contracts ?
|
16586
|
-
Array.isArray(prop.asset.contracts) && prop.asset.contracts.length > 0 && prop.asset.contracts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
16586
|
+
Array.isArray(prop.asset.contracts) && prop.asset.contracts.length > 0 && prop.asset.contracts.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
16587
16587
|
connect: prop.asset.contracts.map((item) => ({
|
16588
16588
|
id: item.id
|
16589
16589
|
}))
|
@@ -16670,7 +16670,7 @@ export const Order = {
|
|
16670
16670
|
set: item.orderId
|
16671
16671
|
} : undefined,
|
16672
16672
|
deliverables: item.deliverables ?
|
16673
|
-
Array.isArray(item.deliverables) && item.deliverables.length > 0 && item.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
16673
|
+
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) ? {
|
16674
16674
|
connect: item.deliverables.map((item) => ({
|
16675
16675
|
id: item.id
|
16676
16676
|
}))
|
@@ -16729,7 +16729,7 @@ export const Order = {
|
|
16729
16729
|
}))
|
16730
16730
|
} : undefined,
|
16731
16731
|
order: item.order ?
|
16732
|
-
typeof item.order === 'object' && Object.keys(item.order).length === 1 && Object.keys(item.order)[0] === 'id'
|
16732
|
+
typeof item.order === 'object' && Object.keys(item.order).length === 1 && (Object.keys(item.order)[0] === 'id' || Object.keys(item.order)[0] === 'symbol')
|
16733
16733
|
? {
|
16734
16734
|
connect: {
|
16735
16735
|
id: item.order.id
|
@@ -17349,7 +17349,7 @@ export const Order = {
|
|
17349
17349
|
}
|
17350
17350
|
} : undefined,
|
17351
17351
|
contract: prop.contract ?
|
17352
|
-
typeof prop.contract === 'object' && Object.keys(prop.contract).length === 1 && Object.keys(prop.contract)[0] === 'id'
|
17352
|
+
typeof prop.contract === 'object' && Object.keys(prop.contract).length === 1 && (Object.keys(prop.contract)[0] === 'id' || Object.keys(prop.contract)[0] === 'symbol')
|
17353
17353
|
? {
|
17354
17354
|
connect: {
|
17355
17355
|
id: prop.contract.id
|
@@ -17443,7 +17443,7 @@ export const Order = {
|
|
17443
17443
|
set: prop.contract.orderId
|
17444
17444
|
} : undefined,
|
17445
17445
|
deliverables: prop.contract.deliverables ?
|
17446
|
-
Array.isArray(prop.contract.deliverables) && prop.contract.deliverables.length > 0 && prop.contract.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
17446
|
+
Array.isArray(prop.contract.deliverables) && prop.contract.deliverables.length > 0 && prop.contract.deliverables.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
17447
17447
|
connect: prop.contract.deliverables.map((item) => ({
|
17448
17448
|
id: item.id
|
17449
17449
|
}))
|
@@ -17502,7 +17502,7 @@ export const Order = {
|
|
17502
17502
|
}))
|
17503
17503
|
} : undefined,
|
17504
17504
|
asset: prop.contract.asset ?
|
17505
|
-
typeof prop.contract.asset === 'object' && Object.keys(prop.contract.asset).length === 1 && Object.keys(prop.contract.asset)[0] === 'id'
|
17505
|
+
typeof prop.contract.asset === 'object' && Object.keys(prop.contract.asset).length === 1 && (Object.keys(prop.contract.asset)[0] === 'id' || Object.keys(prop.contract.asset)[0] === 'symbol')
|
17506
17506
|
? {
|
17507
17507
|
connect: {
|
17508
17508
|
id: prop.contract.asset.id
|
@@ -17689,7 +17689,7 @@ export const Order = {
|
|
17689
17689
|
set: prop.contract.asset.bidPrice
|
17690
17690
|
} : undefined,
|
17691
17691
|
trades: prop.contract.asset.trades ?
|
17692
|
-
Array.isArray(prop.contract.asset.trades) && prop.contract.asset.trades.length > 0 && prop.contract.asset.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
17692
|
+
Array.isArray(prop.contract.asset.trades) && prop.contract.asset.trades.length > 0 && prop.contract.asset.trades.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
17693
17693
|
connect: prop.contract.asset.trades.map((item) => ({
|
17694
17694
|
id: item.id
|
17695
17695
|
}))
|
@@ -17757,7 +17757,7 @@ export const Order = {
|
|
17757
17757
|
}))
|
17758
17758
|
} : undefined,
|
17759
17759
|
orders: prop.contract.asset.orders ?
|
17760
|
-
Array.isArray(prop.contract.asset.orders) && prop.contract.asset.orders.length > 0 && prop.contract.asset.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
17760
|
+
Array.isArray(prop.contract.asset.orders) && prop.contract.asset.orders.length > 0 && prop.contract.asset.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
17761
17761
|
connect: prop.contract.asset.orders.map((item) => ({
|
17762
17762
|
id: item.id
|
17763
17763
|
}))
|
@@ -17888,7 +17888,7 @@ export const Order = {
|
|
17888
17888
|
}))
|
17889
17889
|
} : undefined,
|
17890
17890
|
positions: prop.contract.asset.positions ?
|
17891
|
-
Array.isArray(prop.contract.asset.positions) && prop.contract.asset.positions.length > 0 && prop.contract.asset.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
17891
|
+
Array.isArray(prop.contract.asset.positions) && prop.contract.asset.positions.length > 0 && prop.contract.asset.positions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
17892
17892
|
connect: prop.contract.asset.positions.map((item) => ({
|
17893
17893
|
id: item.id
|
17894
17894
|
}))
|
@@ -17975,7 +17975,7 @@ export const Order = {
|
|
17975
17975
|
}))
|
17976
17976
|
} : undefined,
|
17977
17977
|
newsMentions: prop.contract.asset.newsMentions ?
|
17978
|
-
Array.isArray(prop.contract.asset.newsMentions) && prop.contract.asset.newsMentions.length > 0 && prop.contract.asset.newsMentions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
17978
|
+
Array.isArray(prop.contract.asset.newsMentions) && prop.contract.asset.newsMentions.length > 0 && prop.contract.asset.newsMentions.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
17979
17979
|
connect: prop.contract.asset.newsMentions.map((item) => ({
|
17980
17980
|
id: item.id
|
17981
17981
|
}))
|