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/Position.mjs
CHANGED
@@ -1306,7 +1306,7 @@ export const Position = {
|
|
1306
1306
|
set: props.updatedAt
|
1307
1307
|
} : undefined,
|
1308
1308
|
asset: props.asset ?
|
1309
|
-
typeof props.asset === 'object' && Object.keys(props.asset).length === 1 && Object.keys(props.asset)[0] === 'id'
|
1309
|
+
typeof props.asset === 'object' && Object.keys(props.asset).length === 1 && (Object.keys(props.asset)[0] === 'id' || Object.keys(props.asset)[0] === 'symbol')
|
1310
1310
|
? {
|
1311
1311
|
connect: {
|
1312
1312
|
id: props.asset.id
|
@@ -1493,7 +1493,7 @@ export const Position = {
|
|
1493
1493
|
set: props.asset.bidPrice
|
1494
1494
|
} : undefined,
|
1495
1495
|
trades: props.asset.trades ?
|
1496
|
-
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) ? {
|
1496
|
+
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) ? {
|
1497
1497
|
connect: props.asset.trades.map((item) => ({
|
1498
1498
|
id: item.id
|
1499
1499
|
}))
|
@@ -1545,7 +1545,7 @@ export const Position = {
|
|
1545
1545
|
set: item.status
|
1546
1546
|
} : undefined,
|
1547
1547
|
alpacaAccount: item.alpacaAccount ?
|
1548
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
1548
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
1549
1549
|
? {
|
1550
1550
|
connect: {
|
1551
1551
|
id: item.alpacaAccount.id
|
@@ -1609,7 +1609,7 @@ export const Position = {
|
|
1609
1609
|
}
|
1610
1610
|
} : undefined,
|
1611
1611
|
actions: item.actions ?
|
1612
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
1612
|
+
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) ? {
|
1613
1613
|
connect: item.actions.map((item) => ({
|
1614
1614
|
id: item.id
|
1615
1615
|
}))
|
@@ -1738,7 +1738,7 @@ export const Position = {
|
|
1738
1738
|
}))
|
1739
1739
|
} : undefined,
|
1740
1740
|
orders: props.asset.orders ?
|
1741
|
-
Array.isArray(props.asset.orders) && props.asset.orders.length > 0 && props.asset.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
1741
|
+
Array.isArray(props.asset.orders) && props.asset.orders.length > 0 && props.asset.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
1742
1742
|
connect: props.asset.orders.map((item) => ({
|
1743
1743
|
id: item.id
|
1744
1744
|
}))
|
@@ -1839,7 +1839,7 @@ export const Position = {
|
|
1839
1839
|
set: item.takeProfitId
|
1840
1840
|
} : undefined,
|
1841
1841
|
stopLoss: item.stopLoss ?
|
1842
|
-
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && Object.keys(item.stopLoss)[0] === 'id'
|
1842
|
+
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && (Object.keys(item.stopLoss)[0] === 'id' || Object.keys(item.stopLoss)[0] === 'symbol')
|
1843
1843
|
? {
|
1844
1844
|
connect: {
|
1845
1845
|
id: item.stopLoss.id
|
@@ -1871,7 +1871,7 @@ export const Position = {
|
|
1871
1871
|
}
|
1872
1872
|
} : undefined,
|
1873
1873
|
takeProfit: item.takeProfit ?
|
1874
|
-
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && Object.keys(item.takeProfit)[0] === 'id'
|
1874
|
+
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && (Object.keys(item.takeProfit)[0] === 'id' || Object.keys(item.takeProfit)[0] === 'symbol')
|
1875
1875
|
? {
|
1876
1876
|
connect: {
|
1877
1877
|
id: item.takeProfit.id
|
@@ -1903,7 +1903,7 @@ export const Position = {
|
|
1903
1903
|
}
|
1904
1904
|
} : undefined,
|
1905
1905
|
alpacaAccount: item.alpacaAccount ?
|
1906
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
1906
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
1907
1907
|
? {
|
1908
1908
|
connect: {
|
1909
1909
|
id: item.alpacaAccount.id
|
@@ -1967,7 +1967,7 @@ export const Position = {
|
|
1967
1967
|
}
|
1968
1968
|
} : undefined,
|
1969
1969
|
action: item.action ?
|
1970
|
-
typeof item.action === 'object' && Object.keys(item.action).length === 1 && Object.keys(item.action)[0] === 'id'
|
1970
|
+
typeof item.action === 'object' && Object.keys(item.action).length === 1 && (Object.keys(item.action)[0] === 'id' || Object.keys(item.action)[0] === 'symbol')
|
1971
1971
|
? {
|
1972
1972
|
connect: {
|
1973
1973
|
id: item.action.id
|
@@ -2027,7 +2027,7 @@ export const Position = {
|
|
2027
2027
|
}
|
2028
2028
|
} : undefined,
|
2029
2029
|
contract: item.contract ?
|
2030
|
-
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && Object.keys(item.contract)[0] === 'id'
|
2030
|
+
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && (Object.keys(item.contract)[0] === 'id' || Object.keys(item.contract)[0] === 'symbol')
|
2031
2031
|
? {
|
2032
2032
|
connect: {
|
2033
2033
|
id: item.contract.id
|
@@ -2308,7 +2308,7 @@ export const Position = {
|
|
2308
2308
|
}))
|
2309
2309
|
} : undefined,
|
2310
2310
|
newsMentions: props.asset.newsMentions ?
|
2311
|
-
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) ? {
|
2311
|
+
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) ? {
|
2312
2312
|
connect: props.asset.newsMentions.map((item) => ({
|
2313
2313
|
id: item.id
|
2314
2314
|
}))
|
@@ -2340,7 +2340,7 @@ export const Position = {
|
|
2340
2340
|
set: item.sentimentLabel
|
2341
2341
|
} : undefined,
|
2342
2342
|
news: item.news ?
|
2343
|
-
typeof item.news === 'object' && Object.keys(item.news).length === 1 && Object.keys(item.news)[0] === 'id'
|
2343
|
+
typeof item.news === 'object' && Object.keys(item.news).length === 1 && (Object.keys(item.news)[0] === 'id' || Object.keys(item.news)[0] === 'symbol')
|
2344
2344
|
? {
|
2345
2345
|
connect: {
|
2346
2346
|
id: item.news.id
|
@@ -2467,7 +2467,7 @@ export const Position = {
|
|
2467
2467
|
}))
|
2468
2468
|
} : undefined,
|
2469
2469
|
contracts: props.asset.contracts ?
|
2470
|
-
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) ? {
|
2470
|
+
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) ? {
|
2471
2471
|
connect: props.asset.contracts.map((item) => ({
|
2472
2472
|
id: item.id
|
2473
2473
|
}))
|
@@ -2554,7 +2554,7 @@ export const Position = {
|
|
2554
2554
|
set: item.orderId
|
2555
2555
|
} : undefined,
|
2556
2556
|
deliverables: item.deliverables ?
|
2557
|
-
Array.isArray(item.deliverables) && item.deliverables.length > 0 && item.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
2557
|
+
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) ? {
|
2558
2558
|
connect: item.deliverables.map((item) => ({
|
2559
2559
|
id: item.id
|
2560
2560
|
}))
|
@@ -2613,7 +2613,7 @@ export const Position = {
|
|
2613
2613
|
}))
|
2614
2614
|
} : undefined,
|
2615
2615
|
order: item.order ?
|
2616
|
-
typeof item.order === 'object' && Object.keys(item.order).length === 1 && Object.keys(item.order)[0] === 'id'
|
2616
|
+
typeof item.order === 'object' && Object.keys(item.order).length === 1 && (Object.keys(item.order)[0] === 'id' || Object.keys(item.order)[0] === 'symbol')
|
2617
2617
|
? {
|
2618
2618
|
connect: {
|
2619
2619
|
id: item.order.id
|
@@ -3349,7 +3349,7 @@ export const Position = {
|
|
3349
3349
|
}
|
3350
3350
|
} : undefined,
|
3351
3351
|
alpacaAccount: props.alpacaAccount ?
|
3352
|
-
typeof props.alpacaAccount === 'object' && Object.keys(props.alpacaAccount).length === 1 && Object.keys(props.alpacaAccount)[0] === 'id'
|
3352
|
+
typeof props.alpacaAccount === 'object' && Object.keys(props.alpacaAccount).length === 1 && (Object.keys(props.alpacaAccount)[0] === 'id' || Object.keys(props.alpacaAccount)[0] === 'symbol')
|
3353
3353
|
? {
|
3354
3354
|
connect: {
|
3355
3355
|
id: props.alpacaAccount.id
|
@@ -3398,7 +3398,7 @@ export const Position = {
|
|
3398
3398
|
set: props.alpacaAccount.volumeThreshold
|
3399
3399
|
} : undefined,
|
3400
3400
|
user: props.alpacaAccount.user ?
|
3401
|
-
typeof props.alpacaAccount.user === 'object' && Object.keys(props.alpacaAccount.user).length === 1 && Object.keys(props.alpacaAccount.user)[0] === 'id'
|
3401
|
+
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')
|
3402
3402
|
? {
|
3403
3403
|
connect: {
|
3404
3404
|
id: props.alpacaAccount.user.id
|
@@ -3456,7 +3456,7 @@ export const Position = {
|
|
3456
3456
|
set: props.alpacaAccount.user.openaiModel
|
3457
3457
|
} : undefined,
|
3458
3458
|
customer: props.alpacaAccount.user.customer ?
|
3459
|
-
typeof props.alpacaAccount.user.customer === 'object' && Object.keys(props.alpacaAccount.user.customer).length === 1 && Object.keys(props.alpacaAccount.user.customer)[0] === 'id'
|
3459
|
+
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')
|
3460
3460
|
? {
|
3461
3461
|
connect: {
|
3462
3462
|
id: props.alpacaAccount.user.customer.id
|
@@ -3517,7 +3517,7 @@ export const Position = {
|
|
3517
3517
|
}
|
3518
3518
|
} : undefined,
|
3519
3519
|
accounts: props.alpacaAccount.user.accounts ?
|
3520
|
-
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) ? {
|
3520
|
+
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) ? {
|
3521
3521
|
connect: props.alpacaAccount.user.accounts.map((item) => ({
|
3522
3522
|
id: item.id
|
3523
3523
|
}))
|
@@ -3581,7 +3581,7 @@ export const Position = {
|
|
3581
3581
|
}))
|
3582
3582
|
} : undefined,
|
3583
3583
|
sessions: props.alpacaAccount.user.sessions ?
|
3584
|
-
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) ? {
|
3584
|
+
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) ? {
|
3585
3585
|
connect: props.alpacaAccount.user.sessions.map((item) => ({
|
3586
3586
|
id: item.id
|
3587
3587
|
}))
|
@@ -3610,7 +3610,7 @@ export const Position = {
|
|
3610
3610
|
}))
|
3611
3611
|
} : undefined,
|
3612
3612
|
authenticators: props.alpacaAccount.user.authenticators ?
|
3613
|
-
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) ? {
|
3613
|
+
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) ? {
|
3614
3614
|
connect: props.alpacaAccount.user.authenticators.map((item) => ({
|
3615
3615
|
id: item.id
|
3616
3616
|
}))
|
@@ -3760,7 +3760,7 @@ export const Position = {
|
|
3760
3760
|
}
|
3761
3761
|
} : undefined,
|
3762
3762
|
trades: props.alpacaAccount.trades ?
|
3763
|
-
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) ? {
|
3763
|
+
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) ? {
|
3764
3764
|
connect: props.alpacaAccount.trades.map((item) => ({
|
3765
3765
|
id: item.id
|
3766
3766
|
}))
|
@@ -3812,7 +3812,7 @@ export const Position = {
|
|
3812
3812
|
set: item.status
|
3813
3813
|
} : undefined,
|
3814
3814
|
asset: item.asset ?
|
3815
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
3815
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
3816
3816
|
? {
|
3817
3817
|
connect: {
|
3818
3818
|
id: item.asset.id
|
@@ -4059,7 +4059,7 @@ export const Position = {
|
|
4059
4059
|
}
|
4060
4060
|
} : undefined,
|
4061
4061
|
actions: item.actions ?
|
4062
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4062
|
+
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) ? {
|
4063
4063
|
connect: item.actions.map((item) => ({
|
4064
4064
|
id: item.id
|
4065
4065
|
}))
|
@@ -4232,7 +4232,7 @@ export const Position = {
|
|
4232
4232
|
}))
|
4233
4233
|
} : undefined,
|
4234
4234
|
orders: props.alpacaAccount.orders ?
|
4235
|
-
Array.isArray(props.alpacaAccount.orders) && props.alpacaAccount.orders.length > 0 && props.alpacaAccount.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4235
|
+
Array.isArray(props.alpacaAccount.orders) && props.alpacaAccount.orders.length > 0 && props.alpacaAccount.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
4236
4236
|
connect: props.alpacaAccount.orders.map((item) => ({
|
4237
4237
|
id: item.id
|
4238
4238
|
}))
|
@@ -4333,7 +4333,7 @@ export const Position = {
|
|
4333
4333
|
set: item.takeProfitId
|
4334
4334
|
} : undefined,
|
4335
4335
|
stopLoss: item.stopLoss ?
|
4336
|
-
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && Object.keys(item.stopLoss)[0] === 'id'
|
4336
|
+
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && (Object.keys(item.stopLoss)[0] === 'id' || Object.keys(item.stopLoss)[0] === 'symbol')
|
4337
4337
|
? {
|
4338
4338
|
connect: {
|
4339
4339
|
id: item.stopLoss.id
|
@@ -4365,7 +4365,7 @@ export const Position = {
|
|
4365
4365
|
}
|
4366
4366
|
} : undefined,
|
4367
4367
|
takeProfit: item.takeProfit ?
|
4368
|
-
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && Object.keys(item.takeProfit)[0] === 'id'
|
4368
|
+
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && (Object.keys(item.takeProfit)[0] === 'id' || Object.keys(item.takeProfit)[0] === 'symbol')
|
4369
4369
|
? {
|
4370
4370
|
connect: {
|
4371
4371
|
id: item.takeProfit.id
|
@@ -4397,7 +4397,7 @@ export const Position = {
|
|
4397
4397
|
}
|
4398
4398
|
} : undefined,
|
4399
4399
|
action: item.action ?
|
4400
|
-
typeof item.action === 'object' && Object.keys(item.action).length === 1 && Object.keys(item.action)[0] === 'id'
|
4400
|
+
typeof item.action === 'object' && Object.keys(item.action).length === 1 && (Object.keys(item.action)[0] === 'id' || Object.keys(item.action)[0] === 'symbol')
|
4401
4401
|
? {
|
4402
4402
|
connect: {
|
4403
4403
|
id: item.action.id
|
@@ -4457,7 +4457,7 @@ export const Position = {
|
|
4457
4457
|
}
|
4458
4458
|
} : undefined,
|
4459
4459
|
asset: item.asset ?
|
4460
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
4460
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
4461
4461
|
? {
|
4462
4462
|
connect: {
|
4463
4463
|
id: item.asset.id
|
@@ -4704,7 +4704,7 @@ export const Position = {
|
|
4704
4704
|
}
|
4705
4705
|
} : undefined,
|
4706
4706
|
contract: item.contract ?
|
4707
|
-
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && Object.keys(item.contract)[0] === 'id'
|
4707
|
+
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && (Object.keys(item.contract)[0] === 'id' || Object.keys(item.contract)[0] === 'symbol')
|
4708
4708
|
? {
|
4709
4709
|
connect: {
|
4710
4710
|
id: item.contract.id
|
@@ -5029,7 +5029,7 @@ export const Position = {
|
|
5029
5029
|
}))
|
5030
5030
|
} : undefined,
|
5031
5031
|
alerts: props.alpacaAccount.alerts ?
|
5032
|
-
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) ? {
|
5032
|
+
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) ? {
|
5033
5033
|
connect: props.alpacaAccount.alerts.map((item) => ({
|
5034
5034
|
id: item.id
|
5035
5035
|
}))
|
@@ -6716,7 +6716,7 @@ export const Position = {
|
|
6716
6716
|
set: props.closed
|
6717
6717
|
} : undefined,
|
6718
6718
|
asset: props.asset ?
|
6719
|
-
typeof props.asset === 'object' && Object.keys(props.asset).length === 1 && Object.keys(props.asset)[0] === 'id'
|
6719
|
+
typeof props.asset === 'object' && Object.keys(props.asset).length === 1 && (Object.keys(props.asset)[0] === 'id' || Object.keys(props.asset)[0] === 'symbol')
|
6720
6720
|
? {
|
6721
6721
|
connect: {
|
6722
6722
|
id: props.asset.id
|
@@ -6903,7 +6903,7 @@ export const Position = {
|
|
6903
6903
|
set: props.asset.bidPrice
|
6904
6904
|
} : undefined,
|
6905
6905
|
trades: props.asset.trades ?
|
6906
|
-
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) ? {
|
6906
|
+
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) ? {
|
6907
6907
|
connect: props.asset.trades.map((item) => ({
|
6908
6908
|
id: item.id
|
6909
6909
|
}))
|
@@ -6955,7 +6955,7 @@ export const Position = {
|
|
6955
6955
|
set: item.status
|
6956
6956
|
} : undefined,
|
6957
6957
|
alpacaAccount: item.alpacaAccount ?
|
6958
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
6958
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
6959
6959
|
? {
|
6960
6960
|
connect: {
|
6961
6961
|
id: item.alpacaAccount.id
|
@@ -7019,7 +7019,7 @@ export const Position = {
|
|
7019
7019
|
}
|
7020
7020
|
} : undefined,
|
7021
7021
|
actions: item.actions ?
|
7022
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
7022
|
+
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) ? {
|
7023
7023
|
connect: item.actions.map((item) => ({
|
7024
7024
|
id: item.id
|
7025
7025
|
}))
|
@@ -7148,7 +7148,7 @@ export const Position = {
|
|
7148
7148
|
}))
|
7149
7149
|
} : undefined,
|
7150
7150
|
orders: props.asset.orders ?
|
7151
|
-
Array.isArray(props.asset.orders) && props.asset.orders.length > 0 && props.asset.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
7151
|
+
Array.isArray(props.asset.orders) && props.asset.orders.length > 0 && props.asset.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
7152
7152
|
connect: props.asset.orders.map((item) => ({
|
7153
7153
|
id: item.id
|
7154
7154
|
}))
|
@@ -7249,7 +7249,7 @@ export const Position = {
|
|
7249
7249
|
set: item.takeProfitId
|
7250
7250
|
} : undefined,
|
7251
7251
|
stopLoss: item.stopLoss ?
|
7252
|
-
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && Object.keys(item.stopLoss)[0] === 'id'
|
7252
|
+
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && (Object.keys(item.stopLoss)[0] === 'id' || Object.keys(item.stopLoss)[0] === 'symbol')
|
7253
7253
|
? {
|
7254
7254
|
connect: {
|
7255
7255
|
id: item.stopLoss.id
|
@@ -7281,7 +7281,7 @@ export const Position = {
|
|
7281
7281
|
}
|
7282
7282
|
} : undefined,
|
7283
7283
|
takeProfit: item.takeProfit ?
|
7284
|
-
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && Object.keys(item.takeProfit)[0] === 'id'
|
7284
|
+
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && (Object.keys(item.takeProfit)[0] === 'id' || Object.keys(item.takeProfit)[0] === 'symbol')
|
7285
7285
|
? {
|
7286
7286
|
connect: {
|
7287
7287
|
id: item.takeProfit.id
|
@@ -7313,7 +7313,7 @@ export const Position = {
|
|
7313
7313
|
}
|
7314
7314
|
} : undefined,
|
7315
7315
|
alpacaAccount: item.alpacaAccount ?
|
7316
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
7316
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
7317
7317
|
? {
|
7318
7318
|
connect: {
|
7319
7319
|
id: item.alpacaAccount.id
|
@@ -7377,7 +7377,7 @@ export const Position = {
|
|
7377
7377
|
}
|
7378
7378
|
} : undefined,
|
7379
7379
|
action: item.action ?
|
7380
|
-
typeof item.action === 'object' && Object.keys(item.action).length === 1 && Object.keys(item.action)[0] === 'id'
|
7380
|
+
typeof item.action === 'object' && Object.keys(item.action).length === 1 && (Object.keys(item.action)[0] === 'id' || Object.keys(item.action)[0] === 'symbol')
|
7381
7381
|
? {
|
7382
7382
|
connect: {
|
7383
7383
|
id: item.action.id
|
@@ -7437,7 +7437,7 @@ export const Position = {
|
|
7437
7437
|
}
|
7438
7438
|
} : undefined,
|
7439
7439
|
contract: item.contract ?
|
7440
|
-
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && Object.keys(item.contract)[0] === 'id'
|
7440
|
+
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && (Object.keys(item.contract)[0] === 'id' || Object.keys(item.contract)[0] === 'symbol')
|
7441
7441
|
? {
|
7442
7442
|
connect: {
|
7443
7443
|
id: item.contract.id
|
@@ -7718,7 +7718,7 @@ export const Position = {
|
|
7718
7718
|
}))
|
7719
7719
|
} : undefined,
|
7720
7720
|
newsMentions: props.asset.newsMentions ?
|
7721
|
-
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) ? {
|
7721
|
+
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) ? {
|
7722
7722
|
connect: props.asset.newsMentions.map((item) => ({
|
7723
7723
|
id: item.id
|
7724
7724
|
}))
|
@@ -7750,7 +7750,7 @@ export const Position = {
|
|
7750
7750
|
set: item.sentimentLabel
|
7751
7751
|
} : undefined,
|
7752
7752
|
news: item.news ?
|
7753
|
-
typeof item.news === 'object' && Object.keys(item.news).length === 1 && Object.keys(item.news)[0] === 'id'
|
7753
|
+
typeof item.news === 'object' && Object.keys(item.news).length === 1 && (Object.keys(item.news)[0] === 'id' || Object.keys(item.news)[0] === 'symbol')
|
7754
7754
|
? {
|
7755
7755
|
connect: {
|
7756
7756
|
id: item.news.id
|
@@ -7877,7 +7877,7 @@ export const Position = {
|
|
7877
7877
|
}))
|
7878
7878
|
} : undefined,
|
7879
7879
|
contracts: props.asset.contracts ?
|
7880
|
-
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) ? {
|
7880
|
+
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) ? {
|
7881
7881
|
connect: props.asset.contracts.map((item) => ({
|
7882
7882
|
id: item.id
|
7883
7883
|
}))
|
@@ -7964,7 +7964,7 @@ export const Position = {
|
|
7964
7964
|
set: item.orderId
|
7965
7965
|
} : undefined,
|
7966
7966
|
deliverables: item.deliverables ?
|
7967
|
-
Array.isArray(item.deliverables) && item.deliverables.length > 0 && item.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
7967
|
+
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) ? {
|
7968
7968
|
connect: item.deliverables.map((item) => ({
|
7969
7969
|
id: item.id
|
7970
7970
|
}))
|
@@ -8023,7 +8023,7 @@ export const Position = {
|
|
8023
8023
|
}))
|
8024
8024
|
} : undefined,
|
8025
8025
|
order: item.order ?
|
8026
|
-
typeof item.order === 'object' && Object.keys(item.order).length === 1 && Object.keys(item.order)[0] === 'id'
|
8026
|
+
typeof item.order === 'object' && Object.keys(item.order).length === 1 && (Object.keys(item.order)[0] === 'id' || Object.keys(item.order)[0] === 'symbol')
|
8027
8027
|
? {
|
8028
8028
|
connect: {
|
8029
8029
|
id: item.order.id
|
@@ -8759,7 +8759,7 @@ export const Position = {
|
|
8759
8759
|
}
|
8760
8760
|
} : undefined,
|
8761
8761
|
alpacaAccount: props.alpacaAccount ?
|
8762
|
-
typeof props.alpacaAccount === 'object' && Object.keys(props.alpacaAccount).length === 1 && Object.keys(props.alpacaAccount)[0] === 'id'
|
8762
|
+
typeof props.alpacaAccount === 'object' && Object.keys(props.alpacaAccount).length === 1 && (Object.keys(props.alpacaAccount)[0] === 'id' || Object.keys(props.alpacaAccount)[0] === 'symbol')
|
8763
8763
|
? {
|
8764
8764
|
connect: {
|
8765
8765
|
id: props.alpacaAccount.id
|
@@ -8808,7 +8808,7 @@ export const Position = {
|
|
8808
8808
|
set: props.alpacaAccount.volumeThreshold
|
8809
8809
|
} : undefined,
|
8810
8810
|
user: props.alpacaAccount.user ?
|
8811
|
-
typeof props.alpacaAccount.user === 'object' && Object.keys(props.alpacaAccount.user).length === 1 && Object.keys(props.alpacaAccount.user)[0] === 'id'
|
8811
|
+
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')
|
8812
8812
|
? {
|
8813
8813
|
connect: {
|
8814
8814
|
id: props.alpacaAccount.user.id
|
@@ -8866,7 +8866,7 @@ export const Position = {
|
|
8866
8866
|
set: props.alpacaAccount.user.openaiModel
|
8867
8867
|
} : undefined,
|
8868
8868
|
customer: props.alpacaAccount.user.customer ?
|
8869
|
-
typeof props.alpacaAccount.user.customer === 'object' && Object.keys(props.alpacaAccount.user.customer).length === 1 && Object.keys(props.alpacaAccount.user.customer)[0] === 'id'
|
8869
|
+
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')
|
8870
8870
|
? {
|
8871
8871
|
connect: {
|
8872
8872
|
id: props.alpacaAccount.user.customer.id
|
@@ -8927,7 +8927,7 @@ export const Position = {
|
|
8927
8927
|
}
|
8928
8928
|
} : undefined,
|
8929
8929
|
accounts: props.alpacaAccount.user.accounts ?
|
8930
|
-
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) ? {
|
8930
|
+
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) ? {
|
8931
8931
|
connect: props.alpacaAccount.user.accounts.map((item) => ({
|
8932
8932
|
id: item.id
|
8933
8933
|
}))
|
@@ -8991,7 +8991,7 @@ export const Position = {
|
|
8991
8991
|
}))
|
8992
8992
|
} : undefined,
|
8993
8993
|
sessions: props.alpacaAccount.user.sessions ?
|
8994
|
-
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) ? {
|
8994
|
+
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) ? {
|
8995
8995
|
connect: props.alpacaAccount.user.sessions.map((item) => ({
|
8996
8996
|
id: item.id
|
8997
8997
|
}))
|
@@ -9020,7 +9020,7 @@ export const Position = {
|
|
9020
9020
|
}))
|
9021
9021
|
} : undefined,
|
9022
9022
|
authenticators: props.alpacaAccount.user.authenticators ?
|
9023
|
-
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) ? {
|
9023
|
+
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) ? {
|
9024
9024
|
connect: props.alpacaAccount.user.authenticators.map((item) => ({
|
9025
9025
|
id: item.id
|
9026
9026
|
}))
|
@@ -9170,7 +9170,7 @@ export const Position = {
|
|
9170
9170
|
}
|
9171
9171
|
} : undefined,
|
9172
9172
|
trades: props.alpacaAccount.trades ?
|
9173
|
-
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) ? {
|
9173
|
+
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) ? {
|
9174
9174
|
connect: props.alpacaAccount.trades.map((item) => ({
|
9175
9175
|
id: item.id
|
9176
9176
|
}))
|
@@ -9222,7 +9222,7 @@ export const Position = {
|
|
9222
9222
|
set: item.status
|
9223
9223
|
} : undefined,
|
9224
9224
|
asset: item.asset ?
|
9225
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
9225
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
9226
9226
|
? {
|
9227
9227
|
connect: {
|
9228
9228
|
id: item.asset.id
|
@@ -9469,7 +9469,7 @@ export const Position = {
|
|
9469
9469
|
}
|
9470
9470
|
} : undefined,
|
9471
9471
|
actions: item.actions ?
|
9472
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
9472
|
+
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) ? {
|
9473
9473
|
connect: item.actions.map((item) => ({
|
9474
9474
|
id: item.id
|
9475
9475
|
}))
|
@@ -9642,7 +9642,7 @@ export const Position = {
|
|
9642
9642
|
}))
|
9643
9643
|
} : undefined,
|
9644
9644
|
orders: props.alpacaAccount.orders ?
|
9645
|
-
Array.isArray(props.alpacaAccount.orders) && props.alpacaAccount.orders.length > 0 && props.alpacaAccount.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
9645
|
+
Array.isArray(props.alpacaAccount.orders) && props.alpacaAccount.orders.length > 0 && props.alpacaAccount.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
9646
9646
|
connect: props.alpacaAccount.orders.map((item) => ({
|
9647
9647
|
id: item.id
|
9648
9648
|
}))
|
@@ -9743,7 +9743,7 @@ export const Position = {
|
|
9743
9743
|
set: item.takeProfitId
|
9744
9744
|
} : undefined,
|
9745
9745
|
stopLoss: item.stopLoss ?
|
9746
|
-
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && Object.keys(item.stopLoss)[0] === 'id'
|
9746
|
+
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && (Object.keys(item.stopLoss)[0] === 'id' || Object.keys(item.stopLoss)[0] === 'symbol')
|
9747
9747
|
? {
|
9748
9748
|
connect: {
|
9749
9749
|
id: item.stopLoss.id
|
@@ -9775,7 +9775,7 @@ export const Position = {
|
|
9775
9775
|
}
|
9776
9776
|
} : undefined,
|
9777
9777
|
takeProfit: item.takeProfit ?
|
9778
|
-
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && Object.keys(item.takeProfit)[0] === 'id'
|
9778
|
+
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && (Object.keys(item.takeProfit)[0] === 'id' || Object.keys(item.takeProfit)[0] === 'symbol')
|
9779
9779
|
? {
|
9780
9780
|
connect: {
|
9781
9781
|
id: item.takeProfit.id
|
@@ -9807,7 +9807,7 @@ export const Position = {
|
|
9807
9807
|
}
|
9808
9808
|
} : undefined,
|
9809
9809
|
action: item.action ?
|
9810
|
-
typeof item.action === 'object' && Object.keys(item.action).length === 1 && Object.keys(item.action)[0] === 'id'
|
9810
|
+
typeof item.action === 'object' && Object.keys(item.action).length === 1 && (Object.keys(item.action)[0] === 'id' || Object.keys(item.action)[0] === 'symbol')
|
9811
9811
|
? {
|
9812
9812
|
connect: {
|
9813
9813
|
id: item.action.id
|
@@ -9867,7 +9867,7 @@ export const Position = {
|
|
9867
9867
|
}
|
9868
9868
|
} : undefined,
|
9869
9869
|
asset: item.asset ?
|
9870
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
9870
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
9871
9871
|
? {
|
9872
9872
|
connect: {
|
9873
9873
|
id: item.asset.id
|
@@ -10114,7 +10114,7 @@ export const Position = {
|
|
10114
10114
|
}
|
10115
10115
|
} : undefined,
|
10116
10116
|
contract: item.contract ?
|
10117
|
-
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && Object.keys(item.contract)[0] === 'id'
|
10117
|
+
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && (Object.keys(item.contract)[0] === 'id' || Object.keys(item.contract)[0] === 'symbol')
|
10118
10118
|
? {
|
10119
10119
|
connect: {
|
10120
10120
|
id: item.contract.id
|
@@ -10439,7 +10439,7 @@ export const Position = {
|
|
10439
10439
|
}))
|
10440
10440
|
} : undefined,
|
10441
10441
|
alerts: props.alpacaAccount.alerts ?
|
10442
|
-
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) ? {
|
10442
|
+
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) ? {
|
10443
10443
|
connect: props.alpacaAccount.alerts.map((item) => ({
|
10444
10444
|
id: item.id
|
10445
10445
|
}))
|
@@ -11085,7 +11085,7 @@ export const Position = {
|
|
11085
11085
|
set: prop.updatedAt
|
11086
11086
|
} : undefined,
|
11087
11087
|
asset: prop.asset ?
|
11088
|
-
typeof prop.asset === 'object' && Object.keys(prop.asset).length === 1 && Object.keys(prop.asset)[0] === 'id'
|
11088
|
+
typeof prop.asset === 'object' && Object.keys(prop.asset).length === 1 && (Object.keys(prop.asset)[0] === 'id' || Object.keys(prop.asset)[0] === 'symbol')
|
11089
11089
|
? {
|
11090
11090
|
connect: {
|
11091
11091
|
id: prop.asset.id
|
@@ -11272,7 +11272,7 @@ export const Position = {
|
|
11272
11272
|
set: prop.asset.bidPrice
|
11273
11273
|
} : undefined,
|
11274
11274
|
trades: prop.asset.trades ?
|
11275
|
-
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) ? {
|
11275
|
+
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) ? {
|
11276
11276
|
connect: prop.asset.trades.map((item) => ({
|
11277
11277
|
id: item.id
|
11278
11278
|
}))
|
@@ -11324,7 +11324,7 @@ export const Position = {
|
|
11324
11324
|
set: item.status
|
11325
11325
|
} : undefined,
|
11326
11326
|
alpacaAccount: item.alpacaAccount ?
|
11327
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
11327
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
11328
11328
|
? {
|
11329
11329
|
connect: {
|
11330
11330
|
id: item.alpacaAccount.id
|
@@ -11388,7 +11388,7 @@ export const Position = {
|
|
11388
11388
|
}
|
11389
11389
|
} : undefined,
|
11390
11390
|
actions: item.actions ?
|
11391
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
11391
|
+
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) ? {
|
11392
11392
|
connect: item.actions.map((item) => ({
|
11393
11393
|
id: item.id
|
11394
11394
|
}))
|
@@ -11517,7 +11517,7 @@ export const Position = {
|
|
11517
11517
|
}))
|
11518
11518
|
} : undefined,
|
11519
11519
|
orders: prop.asset.orders ?
|
11520
|
-
Array.isArray(prop.asset.orders) && prop.asset.orders.length > 0 && prop.asset.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
11520
|
+
Array.isArray(prop.asset.orders) && prop.asset.orders.length > 0 && prop.asset.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
11521
11521
|
connect: prop.asset.orders.map((item) => ({
|
11522
11522
|
id: item.id
|
11523
11523
|
}))
|
@@ -11618,7 +11618,7 @@ export const Position = {
|
|
11618
11618
|
set: item.takeProfitId
|
11619
11619
|
} : undefined,
|
11620
11620
|
stopLoss: item.stopLoss ?
|
11621
|
-
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && Object.keys(item.stopLoss)[0] === 'id'
|
11621
|
+
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && (Object.keys(item.stopLoss)[0] === 'id' || Object.keys(item.stopLoss)[0] === 'symbol')
|
11622
11622
|
? {
|
11623
11623
|
connect: {
|
11624
11624
|
id: item.stopLoss.id
|
@@ -11650,7 +11650,7 @@ export const Position = {
|
|
11650
11650
|
}
|
11651
11651
|
} : undefined,
|
11652
11652
|
takeProfit: item.takeProfit ?
|
11653
|
-
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && Object.keys(item.takeProfit)[0] === 'id'
|
11653
|
+
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && (Object.keys(item.takeProfit)[0] === 'id' || Object.keys(item.takeProfit)[0] === 'symbol')
|
11654
11654
|
? {
|
11655
11655
|
connect: {
|
11656
11656
|
id: item.takeProfit.id
|
@@ -11682,7 +11682,7 @@ export const Position = {
|
|
11682
11682
|
}
|
11683
11683
|
} : undefined,
|
11684
11684
|
alpacaAccount: item.alpacaAccount ?
|
11685
|
-
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && Object.keys(item.alpacaAccount)[0] === 'id'
|
11685
|
+
typeof item.alpacaAccount === 'object' && Object.keys(item.alpacaAccount).length === 1 && (Object.keys(item.alpacaAccount)[0] === 'id' || Object.keys(item.alpacaAccount)[0] === 'symbol')
|
11686
11686
|
? {
|
11687
11687
|
connect: {
|
11688
11688
|
id: item.alpacaAccount.id
|
@@ -11746,7 +11746,7 @@ export const Position = {
|
|
11746
11746
|
}
|
11747
11747
|
} : undefined,
|
11748
11748
|
action: item.action ?
|
11749
|
-
typeof item.action === 'object' && Object.keys(item.action).length === 1 && Object.keys(item.action)[0] === 'id'
|
11749
|
+
typeof item.action === 'object' && Object.keys(item.action).length === 1 && (Object.keys(item.action)[0] === 'id' || Object.keys(item.action)[0] === 'symbol')
|
11750
11750
|
? {
|
11751
11751
|
connect: {
|
11752
11752
|
id: item.action.id
|
@@ -11806,7 +11806,7 @@ export const Position = {
|
|
11806
11806
|
}
|
11807
11807
|
} : undefined,
|
11808
11808
|
contract: item.contract ?
|
11809
|
-
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && Object.keys(item.contract)[0] === 'id'
|
11809
|
+
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && (Object.keys(item.contract)[0] === 'id' || Object.keys(item.contract)[0] === 'symbol')
|
11810
11810
|
? {
|
11811
11811
|
connect: {
|
11812
11812
|
id: item.contract.id
|
@@ -12087,7 +12087,7 @@ export const Position = {
|
|
12087
12087
|
}))
|
12088
12088
|
} : undefined,
|
12089
12089
|
newsMentions: prop.asset.newsMentions ?
|
12090
|
-
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) ? {
|
12090
|
+
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) ? {
|
12091
12091
|
connect: prop.asset.newsMentions.map((item) => ({
|
12092
12092
|
id: item.id
|
12093
12093
|
}))
|
@@ -12119,7 +12119,7 @@ export const Position = {
|
|
12119
12119
|
set: item.sentimentLabel
|
12120
12120
|
} : undefined,
|
12121
12121
|
news: item.news ?
|
12122
|
-
typeof item.news === 'object' && Object.keys(item.news).length === 1 && Object.keys(item.news)[0] === 'id'
|
12122
|
+
typeof item.news === 'object' && Object.keys(item.news).length === 1 && (Object.keys(item.news)[0] === 'id' || Object.keys(item.news)[0] === 'symbol')
|
12123
12123
|
? {
|
12124
12124
|
connect: {
|
12125
12125
|
id: item.news.id
|
@@ -12246,7 +12246,7 @@ export const Position = {
|
|
12246
12246
|
}))
|
12247
12247
|
} : undefined,
|
12248
12248
|
contracts: prop.asset.contracts ?
|
12249
|
-
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) ? {
|
12249
|
+
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) ? {
|
12250
12250
|
connect: prop.asset.contracts.map((item) => ({
|
12251
12251
|
id: item.id
|
12252
12252
|
}))
|
@@ -12333,7 +12333,7 @@ export const Position = {
|
|
12333
12333
|
set: item.orderId
|
12334
12334
|
} : undefined,
|
12335
12335
|
deliverables: item.deliverables ?
|
12336
|
-
Array.isArray(item.deliverables) && item.deliverables.length > 0 && item.deliverables.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
12336
|
+
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) ? {
|
12337
12337
|
connect: item.deliverables.map((item) => ({
|
12338
12338
|
id: item.id
|
12339
12339
|
}))
|
@@ -12392,7 +12392,7 @@ export const Position = {
|
|
12392
12392
|
}))
|
12393
12393
|
} : undefined,
|
12394
12394
|
order: item.order ?
|
12395
|
-
typeof item.order === 'object' && Object.keys(item.order).length === 1 && Object.keys(item.order)[0] === 'id'
|
12395
|
+
typeof item.order === 'object' && Object.keys(item.order).length === 1 && (Object.keys(item.order)[0] === 'id' || Object.keys(item.order)[0] === 'symbol')
|
12396
12396
|
? {
|
12397
12397
|
connect: {
|
12398
12398
|
id: item.order.id
|
@@ -13128,7 +13128,7 @@ export const Position = {
|
|
13128
13128
|
}
|
13129
13129
|
} : undefined,
|
13130
13130
|
alpacaAccount: prop.alpacaAccount ?
|
13131
|
-
typeof prop.alpacaAccount === 'object' && Object.keys(prop.alpacaAccount).length === 1 && Object.keys(prop.alpacaAccount)[0] === 'id'
|
13131
|
+
typeof prop.alpacaAccount === 'object' && Object.keys(prop.alpacaAccount).length === 1 && (Object.keys(prop.alpacaAccount)[0] === 'id' || Object.keys(prop.alpacaAccount)[0] === 'symbol')
|
13132
13132
|
? {
|
13133
13133
|
connect: {
|
13134
13134
|
id: prop.alpacaAccount.id
|
@@ -13177,7 +13177,7 @@ export const Position = {
|
|
13177
13177
|
set: prop.alpacaAccount.volumeThreshold
|
13178
13178
|
} : undefined,
|
13179
13179
|
user: prop.alpacaAccount.user ?
|
13180
|
-
typeof prop.alpacaAccount.user === 'object' && Object.keys(prop.alpacaAccount.user).length === 1 && Object.keys(prop.alpacaAccount.user)[0] === 'id'
|
13180
|
+
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')
|
13181
13181
|
? {
|
13182
13182
|
connect: {
|
13183
13183
|
id: prop.alpacaAccount.user.id
|
@@ -13235,7 +13235,7 @@ export const Position = {
|
|
13235
13235
|
set: prop.alpacaAccount.user.openaiModel
|
13236
13236
|
} : undefined,
|
13237
13237
|
customer: prop.alpacaAccount.user.customer ?
|
13238
|
-
typeof prop.alpacaAccount.user.customer === 'object' && Object.keys(prop.alpacaAccount.user.customer).length === 1 && Object.keys(prop.alpacaAccount.user.customer)[0] === 'id'
|
13238
|
+
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')
|
13239
13239
|
? {
|
13240
13240
|
connect: {
|
13241
13241
|
id: prop.alpacaAccount.user.customer.id
|
@@ -13296,7 +13296,7 @@ export const Position = {
|
|
13296
13296
|
}
|
13297
13297
|
} : undefined,
|
13298
13298
|
accounts: prop.alpacaAccount.user.accounts ?
|
13299
|
-
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) ? {
|
13299
|
+
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) ? {
|
13300
13300
|
connect: prop.alpacaAccount.user.accounts.map((item) => ({
|
13301
13301
|
id: item.id
|
13302
13302
|
}))
|
@@ -13360,7 +13360,7 @@ export const Position = {
|
|
13360
13360
|
}))
|
13361
13361
|
} : undefined,
|
13362
13362
|
sessions: prop.alpacaAccount.user.sessions ?
|
13363
|
-
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) ? {
|
13363
|
+
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) ? {
|
13364
13364
|
connect: prop.alpacaAccount.user.sessions.map((item) => ({
|
13365
13365
|
id: item.id
|
13366
13366
|
}))
|
@@ -13389,7 +13389,7 @@ export const Position = {
|
|
13389
13389
|
}))
|
13390
13390
|
} : undefined,
|
13391
13391
|
authenticators: prop.alpacaAccount.user.authenticators ?
|
13392
|
-
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) ? {
|
13392
|
+
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) ? {
|
13393
13393
|
connect: prop.alpacaAccount.user.authenticators.map((item) => ({
|
13394
13394
|
id: item.id
|
13395
13395
|
}))
|
@@ -13539,7 +13539,7 @@ export const Position = {
|
|
13539
13539
|
}
|
13540
13540
|
} : undefined,
|
13541
13541
|
trades: prop.alpacaAccount.trades ?
|
13542
|
-
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) ? {
|
13542
|
+
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) ? {
|
13543
13543
|
connect: prop.alpacaAccount.trades.map((item) => ({
|
13544
13544
|
id: item.id
|
13545
13545
|
}))
|
@@ -13591,7 +13591,7 @@ export const Position = {
|
|
13591
13591
|
set: item.status
|
13592
13592
|
} : undefined,
|
13593
13593
|
asset: item.asset ?
|
13594
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
13594
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
13595
13595
|
? {
|
13596
13596
|
connect: {
|
13597
13597
|
id: item.asset.id
|
@@ -13838,7 +13838,7 @@ export const Position = {
|
|
13838
13838
|
}
|
13839
13839
|
} : undefined,
|
13840
13840
|
actions: item.actions ?
|
13841
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
13841
|
+
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) ? {
|
13842
13842
|
connect: item.actions.map((item) => ({
|
13843
13843
|
id: item.id
|
13844
13844
|
}))
|
@@ -14011,7 +14011,7 @@ export const Position = {
|
|
14011
14011
|
}))
|
14012
14012
|
} : undefined,
|
14013
14013
|
orders: prop.alpacaAccount.orders ?
|
14014
|
-
Array.isArray(prop.alpacaAccount.orders) && prop.alpacaAccount.orders.length > 0 && prop.alpacaAccount.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
14014
|
+
Array.isArray(prop.alpacaAccount.orders) && prop.alpacaAccount.orders.length > 0 && prop.alpacaAccount.orders.every((item) => typeof item === 'object' && ('id' in item || 'symbol' in item) && Object.keys(item).length === 1) ? {
|
14015
14015
|
connect: prop.alpacaAccount.orders.map((item) => ({
|
14016
14016
|
id: item.id
|
14017
14017
|
}))
|
@@ -14112,7 +14112,7 @@ export const Position = {
|
|
14112
14112
|
set: item.takeProfitId
|
14113
14113
|
} : undefined,
|
14114
14114
|
stopLoss: item.stopLoss ?
|
14115
|
-
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && Object.keys(item.stopLoss)[0] === 'id'
|
14115
|
+
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && (Object.keys(item.stopLoss)[0] === 'id' || Object.keys(item.stopLoss)[0] === 'symbol')
|
14116
14116
|
? {
|
14117
14117
|
connect: {
|
14118
14118
|
id: item.stopLoss.id
|
@@ -14144,7 +14144,7 @@ export const Position = {
|
|
14144
14144
|
}
|
14145
14145
|
} : undefined,
|
14146
14146
|
takeProfit: item.takeProfit ?
|
14147
|
-
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && Object.keys(item.takeProfit)[0] === 'id'
|
14147
|
+
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && (Object.keys(item.takeProfit)[0] === 'id' || Object.keys(item.takeProfit)[0] === 'symbol')
|
14148
14148
|
? {
|
14149
14149
|
connect: {
|
14150
14150
|
id: item.takeProfit.id
|
@@ -14176,7 +14176,7 @@ export const Position = {
|
|
14176
14176
|
}
|
14177
14177
|
} : undefined,
|
14178
14178
|
action: item.action ?
|
14179
|
-
typeof item.action === 'object' && Object.keys(item.action).length === 1 && Object.keys(item.action)[0] === 'id'
|
14179
|
+
typeof item.action === 'object' && Object.keys(item.action).length === 1 && (Object.keys(item.action)[0] === 'id' || Object.keys(item.action)[0] === 'symbol')
|
14180
14180
|
? {
|
14181
14181
|
connect: {
|
14182
14182
|
id: item.action.id
|
@@ -14236,7 +14236,7 @@ export const Position = {
|
|
14236
14236
|
}
|
14237
14237
|
} : undefined,
|
14238
14238
|
asset: item.asset ?
|
14239
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
14239
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
14240
14240
|
? {
|
14241
14241
|
connect: {
|
14242
14242
|
id: item.asset.id
|
@@ -14483,7 +14483,7 @@ export const Position = {
|
|
14483
14483
|
}
|
14484
14484
|
} : undefined,
|
14485
14485
|
contract: item.contract ?
|
14486
|
-
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && Object.keys(item.contract)[0] === 'id'
|
14486
|
+
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && (Object.keys(item.contract)[0] === 'id' || Object.keys(item.contract)[0] === 'symbol')
|
14487
14487
|
? {
|
14488
14488
|
connect: {
|
14489
14489
|
id: item.contract.id
|
@@ -14808,7 +14808,7 @@ export const Position = {
|
|
14808
14808
|
}))
|
14809
14809
|
} : undefined,
|
14810
14810
|
alerts: prop.alpacaAccount.alerts ?
|
14811
|
-
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) ? {
|
14811
|
+
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) ? {
|
14812
14812
|
connect: prop.alpacaAccount.alerts.map((item) => ({
|
14813
14813
|
id: item.id
|
14814
14814
|
}))
|