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/Alert.mjs
CHANGED
@@ -749,7 +749,7 @@ export const Alert = {
|
|
749
749
|
set: props.updatedAt
|
750
750
|
} : undefined,
|
751
751
|
alpacaAccount: props.alpacaAccount ?
|
752
|
-
typeof props.alpacaAccount === 'object' && Object.keys(props.alpacaAccount).length === 1 && Object.keys(props.alpacaAccount)[0] === 'id'
|
752
|
+
typeof props.alpacaAccount === 'object' && Object.keys(props.alpacaAccount).length === 1 && (Object.keys(props.alpacaAccount)[0] === 'id' || Object.keys(props.alpacaAccount)[0] === 'symbol')
|
753
753
|
? {
|
754
754
|
connect: {
|
755
755
|
id: props.alpacaAccount.id
|
@@ -798,7 +798,7 @@ export const Alert = {
|
|
798
798
|
set: props.alpacaAccount.volumeThreshold
|
799
799
|
} : undefined,
|
800
800
|
user: props.alpacaAccount.user ?
|
801
|
-
typeof props.alpacaAccount.user === 'object' && Object.keys(props.alpacaAccount.user).length === 1 && Object.keys(props.alpacaAccount.user)[0] === 'id'
|
801
|
+
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')
|
802
802
|
? {
|
803
803
|
connect: {
|
804
804
|
id: props.alpacaAccount.user.id
|
@@ -856,7 +856,7 @@ export const Alert = {
|
|
856
856
|
set: props.alpacaAccount.user.openaiModel
|
857
857
|
} : undefined,
|
858
858
|
customer: props.alpacaAccount.user.customer ?
|
859
|
-
typeof props.alpacaAccount.user.customer === 'object' && Object.keys(props.alpacaAccount.user.customer).length === 1 && Object.keys(props.alpacaAccount.user.customer)[0] === 'id'
|
859
|
+
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')
|
860
860
|
? {
|
861
861
|
connect: {
|
862
862
|
id: props.alpacaAccount.user.customer.id
|
@@ -917,7 +917,7 @@ export const Alert = {
|
|
917
917
|
}
|
918
918
|
} : undefined,
|
919
919
|
accounts: props.alpacaAccount.user.accounts ?
|
920
|
-
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) ? {
|
920
|
+
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) ? {
|
921
921
|
connect: props.alpacaAccount.user.accounts.map((item) => ({
|
922
922
|
id: item.id
|
923
923
|
}))
|
@@ -981,7 +981,7 @@ export const Alert = {
|
|
981
981
|
}))
|
982
982
|
} : undefined,
|
983
983
|
sessions: props.alpacaAccount.user.sessions ?
|
984
|
-
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) ? {
|
984
|
+
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) ? {
|
985
985
|
connect: props.alpacaAccount.user.sessions.map((item) => ({
|
986
986
|
id: item.id
|
987
987
|
}))
|
@@ -1010,7 +1010,7 @@ export const Alert = {
|
|
1010
1010
|
}))
|
1011
1011
|
} : undefined,
|
1012
1012
|
authenticators: props.alpacaAccount.user.authenticators ?
|
1013
|
-
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) ? {
|
1013
|
+
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) ? {
|
1014
1014
|
connect: props.alpacaAccount.user.authenticators.map((item) => ({
|
1015
1015
|
id: item.id
|
1016
1016
|
}))
|
@@ -1160,7 +1160,7 @@ export const Alert = {
|
|
1160
1160
|
}
|
1161
1161
|
} : undefined,
|
1162
1162
|
trades: props.alpacaAccount.trades ?
|
1163
|
-
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) ? {
|
1163
|
+
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) ? {
|
1164
1164
|
connect: props.alpacaAccount.trades.map((item) => ({
|
1165
1165
|
id: item.id
|
1166
1166
|
}))
|
@@ -1212,7 +1212,7 @@ export const Alert = {
|
|
1212
1212
|
set: item.status
|
1213
1213
|
} : undefined,
|
1214
1214
|
asset: item.asset ?
|
1215
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
1215
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
1216
1216
|
? {
|
1217
1217
|
connect: {
|
1218
1218
|
id: item.asset.id
|
@@ -1459,7 +1459,7 @@ export const Alert = {
|
|
1459
1459
|
}
|
1460
1460
|
} : undefined,
|
1461
1461
|
actions: item.actions ?
|
1462
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
1462
|
+
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) ? {
|
1463
1463
|
connect: item.actions.map((item) => ({
|
1464
1464
|
id: item.id
|
1465
1465
|
}))
|
@@ -1632,7 +1632,7 @@ export const Alert = {
|
|
1632
1632
|
}))
|
1633
1633
|
} : undefined,
|
1634
1634
|
orders: props.alpacaAccount.orders ?
|
1635
|
-
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) ? {
|
1635
|
+
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) ? {
|
1636
1636
|
connect: props.alpacaAccount.orders.map((item) => ({
|
1637
1637
|
id: item.id
|
1638
1638
|
}))
|
@@ -1733,7 +1733,7 @@ export const Alert = {
|
|
1733
1733
|
set: item.takeProfitId
|
1734
1734
|
} : undefined,
|
1735
1735
|
stopLoss: item.stopLoss ?
|
1736
|
-
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && Object.keys(item.stopLoss)[0] === 'id'
|
1736
|
+
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && (Object.keys(item.stopLoss)[0] === 'id' || Object.keys(item.stopLoss)[0] === 'symbol')
|
1737
1737
|
? {
|
1738
1738
|
connect: {
|
1739
1739
|
id: item.stopLoss.id
|
@@ -1765,7 +1765,7 @@ export const Alert = {
|
|
1765
1765
|
}
|
1766
1766
|
} : undefined,
|
1767
1767
|
takeProfit: item.takeProfit ?
|
1768
|
-
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && Object.keys(item.takeProfit)[0] === 'id'
|
1768
|
+
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && (Object.keys(item.takeProfit)[0] === 'id' || Object.keys(item.takeProfit)[0] === 'symbol')
|
1769
1769
|
? {
|
1770
1770
|
connect: {
|
1771
1771
|
id: item.takeProfit.id
|
@@ -1797,7 +1797,7 @@ export const Alert = {
|
|
1797
1797
|
}
|
1798
1798
|
} : undefined,
|
1799
1799
|
action: item.action ?
|
1800
|
-
typeof item.action === 'object' && Object.keys(item.action).length === 1 && Object.keys(item.action)[0] === 'id'
|
1800
|
+
typeof item.action === 'object' && Object.keys(item.action).length === 1 && (Object.keys(item.action)[0] === 'id' || Object.keys(item.action)[0] === 'symbol')
|
1801
1801
|
? {
|
1802
1802
|
connect: {
|
1803
1803
|
id: item.action.id
|
@@ -1857,7 +1857,7 @@ export const Alert = {
|
|
1857
1857
|
}
|
1858
1858
|
} : undefined,
|
1859
1859
|
asset: item.asset ?
|
1860
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
1860
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
1861
1861
|
? {
|
1862
1862
|
connect: {
|
1863
1863
|
id: item.asset.id
|
@@ -2104,7 +2104,7 @@ export const Alert = {
|
|
2104
2104
|
}
|
2105
2105
|
} : undefined,
|
2106
2106
|
contract: item.contract ?
|
2107
|
-
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && Object.keys(item.contract)[0] === 'id'
|
2107
|
+
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && (Object.keys(item.contract)[0] === 'id' || Object.keys(item.contract)[0] === 'symbol')
|
2108
2108
|
? {
|
2109
2109
|
connect: {
|
2110
2110
|
id: item.contract.id
|
@@ -2429,7 +2429,7 @@ export const Alert = {
|
|
2429
2429
|
}))
|
2430
2430
|
} : undefined,
|
2431
2431
|
positions: props.alpacaAccount.positions ?
|
2432
|
-
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) ? {
|
2432
|
+
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) ? {
|
2433
2433
|
connect: props.alpacaAccount.positions.map((item) => ({
|
2434
2434
|
id: item.id
|
2435
2435
|
}))
|
@@ -2496,7 +2496,7 @@ export const Alert = {
|
|
2496
2496
|
set: item.closed
|
2497
2497
|
} : undefined,
|
2498
2498
|
asset: item.asset ?
|
2499
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
2499
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
2500
2500
|
? {
|
2501
2501
|
connect: {
|
2502
2502
|
id: item.asset.id
|
@@ -4103,7 +4103,7 @@ export const Alert = {
|
|
4103
4103
|
set: props.isRead
|
4104
4104
|
} : undefined,
|
4105
4105
|
alpacaAccount: props.alpacaAccount ?
|
4106
|
-
typeof props.alpacaAccount === 'object' && Object.keys(props.alpacaAccount).length === 1 && Object.keys(props.alpacaAccount)[0] === 'id'
|
4106
|
+
typeof props.alpacaAccount === 'object' && Object.keys(props.alpacaAccount).length === 1 && (Object.keys(props.alpacaAccount)[0] === 'id' || Object.keys(props.alpacaAccount)[0] === 'symbol')
|
4107
4107
|
? {
|
4108
4108
|
connect: {
|
4109
4109
|
id: props.alpacaAccount.id
|
@@ -4152,7 +4152,7 @@ export const Alert = {
|
|
4152
4152
|
set: props.alpacaAccount.volumeThreshold
|
4153
4153
|
} : undefined,
|
4154
4154
|
user: props.alpacaAccount.user ?
|
4155
|
-
typeof props.alpacaAccount.user === 'object' && Object.keys(props.alpacaAccount.user).length === 1 && Object.keys(props.alpacaAccount.user)[0] === 'id'
|
4155
|
+
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')
|
4156
4156
|
? {
|
4157
4157
|
connect: {
|
4158
4158
|
id: props.alpacaAccount.user.id
|
@@ -4210,7 +4210,7 @@ export const Alert = {
|
|
4210
4210
|
set: props.alpacaAccount.user.openaiModel
|
4211
4211
|
} : undefined,
|
4212
4212
|
customer: props.alpacaAccount.user.customer ?
|
4213
|
-
typeof props.alpacaAccount.user.customer === 'object' && Object.keys(props.alpacaAccount.user.customer).length === 1 && Object.keys(props.alpacaAccount.user.customer)[0] === 'id'
|
4213
|
+
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')
|
4214
4214
|
? {
|
4215
4215
|
connect: {
|
4216
4216
|
id: props.alpacaAccount.user.customer.id
|
@@ -4271,7 +4271,7 @@ export const Alert = {
|
|
4271
4271
|
}
|
4272
4272
|
} : undefined,
|
4273
4273
|
accounts: props.alpacaAccount.user.accounts ?
|
4274
|
-
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) ? {
|
4274
|
+
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) ? {
|
4275
4275
|
connect: props.alpacaAccount.user.accounts.map((item) => ({
|
4276
4276
|
id: item.id
|
4277
4277
|
}))
|
@@ -4335,7 +4335,7 @@ export const Alert = {
|
|
4335
4335
|
}))
|
4336
4336
|
} : undefined,
|
4337
4337
|
sessions: props.alpacaAccount.user.sessions ?
|
4338
|
-
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) ? {
|
4338
|
+
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) ? {
|
4339
4339
|
connect: props.alpacaAccount.user.sessions.map((item) => ({
|
4340
4340
|
id: item.id
|
4341
4341
|
}))
|
@@ -4364,7 +4364,7 @@ export const Alert = {
|
|
4364
4364
|
}))
|
4365
4365
|
} : undefined,
|
4366
4366
|
authenticators: props.alpacaAccount.user.authenticators ?
|
4367
|
-
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) ? {
|
4367
|
+
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) ? {
|
4368
4368
|
connect: props.alpacaAccount.user.authenticators.map((item) => ({
|
4369
4369
|
id: item.id
|
4370
4370
|
}))
|
@@ -4514,7 +4514,7 @@ export const Alert = {
|
|
4514
4514
|
}
|
4515
4515
|
} : undefined,
|
4516
4516
|
trades: props.alpacaAccount.trades ?
|
4517
|
-
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) ? {
|
4517
|
+
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) ? {
|
4518
4518
|
connect: props.alpacaAccount.trades.map((item) => ({
|
4519
4519
|
id: item.id
|
4520
4520
|
}))
|
@@ -4566,7 +4566,7 @@ export const Alert = {
|
|
4566
4566
|
set: item.status
|
4567
4567
|
} : undefined,
|
4568
4568
|
asset: item.asset ?
|
4569
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
4569
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
4570
4570
|
? {
|
4571
4571
|
connect: {
|
4572
4572
|
id: item.asset.id
|
@@ -4813,7 +4813,7 @@ export const Alert = {
|
|
4813
4813
|
}
|
4814
4814
|
} : undefined,
|
4815
4815
|
actions: item.actions ?
|
4816
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
4816
|
+
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) ? {
|
4817
4817
|
connect: item.actions.map((item) => ({
|
4818
4818
|
id: item.id
|
4819
4819
|
}))
|
@@ -4986,7 +4986,7 @@ export const Alert = {
|
|
4986
4986
|
}))
|
4987
4987
|
} : undefined,
|
4988
4988
|
orders: props.alpacaAccount.orders ?
|
4989
|
-
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) ? {
|
4989
|
+
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) ? {
|
4990
4990
|
connect: props.alpacaAccount.orders.map((item) => ({
|
4991
4991
|
id: item.id
|
4992
4992
|
}))
|
@@ -5087,7 +5087,7 @@ export const Alert = {
|
|
5087
5087
|
set: item.takeProfitId
|
5088
5088
|
} : undefined,
|
5089
5089
|
stopLoss: item.stopLoss ?
|
5090
|
-
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && Object.keys(item.stopLoss)[0] === 'id'
|
5090
|
+
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && (Object.keys(item.stopLoss)[0] === 'id' || Object.keys(item.stopLoss)[0] === 'symbol')
|
5091
5091
|
? {
|
5092
5092
|
connect: {
|
5093
5093
|
id: item.stopLoss.id
|
@@ -5119,7 +5119,7 @@ export const Alert = {
|
|
5119
5119
|
}
|
5120
5120
|
} : undefined,
|
5121
5121
|
takeProfit: item.takeProfit ?
|
5122
|
-
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && Object.keys(item.takeProfit)[0] === 'id'
|
5122
|
+
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && (Object.keys(item.takeProfit)[0] === 'id' || Object.keys(item.takeProfit)[0] === 'symbol')
|
5123
5123
|
? {
|
5124
5124
|
connect: {
|
5125
5125
|
id: item.takeProfit.id
|
@@ -5151,7 +5151,7 @@ export const Alert = {
|
|
5151
5151
|
}
|
5152
5152
|
} : undefined,
|
5153
5153
|
action: item.action ?
|
5154
|
-
typeof item.action === 'object' && Object.keys(item.action).length === 1 && Object.keys(item.action)[0] === 'id'
|
5154
|
+
typeof item.action === 'object' && Object.keys(item.action).length === 1 && (Object.keys(item.action)[0] === 'id' || Object.keys(item.action)[0] === 'symbol')
|
5155
5155
|
? {
|
5156
5156
|
connect: {
|
5157
5157
|
id: item.action.id
|
@@ -5211,7 +5211,7 @@ export const Alert = {
|
|
5211
5211
|
}
|
5212
5212
|
} : undefined,
|
5213
5213
|
asset: item.asset ?
|
5214
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
5214
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
5215
5215
|
? {
|
5216
5216
|
connect: {
|
5217
5217
|
id: item.asset.id
|
@@ -5458,7 +5458,7 @@ export const Alert = {
|
|
5458
5458
|
}
|
5459
5459
|
} : undefined,
|
5460
5460
|
contract: item.contract ?
|
5461
|
-
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && Object.keys(item.contract)[0] === 'id'
|
5461
|
+
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && (Object.keys(item.contract)[0] === 'id' || Object.keys(item.contract)[0] === 'symbol')
|
5462
5462
|
? {
|
5463
5463
|
connect: {
|
5464
5464
|
id: item.contract.id
|
@@ -5783,7 +5783,7 @@ export const Alert = {
|
|
5783
5783
|
}))
|
5784
5784
|
} : undefined,
|
5785
5785
|
positions: props.alpacaAccount.positions ?
|
5786
|
-
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) ? {
|
5786
|
+
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) ? {
|
5787
5787
|
connect: props.alpacaAccount.positions.map((item) => ({
|
5788
5788
|
id: item.id
|
5789
5789
|
}))
|
@@ -5850,7 +5850,7 @@ export const Alert = {
|
|
5850
5850
|
set: item.closed
|
5851
5851
|
} : undefined,
|
5852
5852
|
asset: item.asset ?
|
5853
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
5853
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
5854
5854
|
? {
|
5855
5855
|
connect: {
|
5856
5856
|
id: item.asset.id
|
@@ -6848,7 +6848,7 @@ export const Alert = {
|
|
6848
6848
|
set: prop.updatedAt
|
6849
6849
|
} : undefined,
|
6850
6850
|
alpacaAccount: prop.alpacaAccount ?
|
6851
|
-
typeof prop.alpacaAccount === 'object' && Object.keys(prop.alpacaAccount).length === 1 && Object.keys(prop.alpacaAccount)[0] === 'id'
|
6851
|
+
typeof prop.alpacaAccount === 'object' && Object.keys(prop.alpacaAccount).length === 1 && (Object.keys(prop.alpacaAccount)[0] === 'id' || Object.keys(prop.alpacaAccount)[0] === 'symbol')
|
6852
6852
|
? {
|
6853
6853
|
connect: {
|
6854
6854
|
id: prop.alpacaAccount.id
|
@@ -6897,7 +6897,7 @@ export const Alert = {
|
|
6897
6897
|
set: prop.alpacaAccount.volumeThreshold
|
6898
6898
|
} : undefined,
|
6899
6899
|
user: prop.alpacaAccount.user ?
|
6900
|
-
typeof prop.alpacaAccount.user === 'object' && Object.keys(prop.alpacaAccount.user).length === 1 && Object.keys(prop.alpacaAccount.user)[0] === 'id'
|
6900
|
+
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')
|
6901
6901
|
? {
|
6902
6902
|
connect: {
|
6903
6903
|
id: prop.alpacaAccount.user.id
|
@@ -6955,7 +6955,7 @@ export const Alert = {
|
|
6955
6955
|
set: prop.alpacaAccount.user.openaiModel
|
6956
6956
|
} : undefined,
|
6957
6957
|
customer: prop.alpacaAccount.user.customer ?
|
6958
|
-
typeof prop.alpacaAccount.user.customer === 'object' && Object.keys(prop.alpacaAccount.user.customer).length === 1 && Object.keys(prop.alpacaAccount.user.customer)[0] === 'id'
|
6958
|
+
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')
|
6959
6959
|
? {
|
6960
6960
|
connect: {
|
6961
6961
|
id: prop.alpacaAccount.user.customer.id
|
@@ -7016,7 +7016,7 @@ export const Alert = {
|
|
7016
7016
|
}
|
7017
7017
|
} : undefined,
|
7018
7018
|
accounts: prop.alpacaAccount.user.accounts ?
|
7019
|
-
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) ? {
|
7019
|
+
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) ? {
|
7020
7020
|
connect: prop.alpacaAccount.user.accounts.map((item) => ({
|
7021
7021
|
id: item.id
|
7022
7022
|
}))
|
@@ -7080,7 +7080,7 @@ export const Alert = {
|
|
7080
7080
|
}))
|
7081
7081
|
} : undefined,
|
7082
7082
|
sessions: prop.alpacaAccount.user.sessions ?
|
7083
|
-
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) ? {
|
7083
|
+
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) ? {
|
7084
7084
|
connect: prop.alpacaAccount.user.sessions.map((item) => ({
|
7085
7085
|
id: item.id
|
7086
7086
|
}))
|
@@ -7109,7 +7109,7 @@ export const Alert = {
|
|
7109
7109
|
}))
|
7110
7110
|
} : undefined,
|
7111
7111
|
authenticators: prop.alpacaAccount.user.authenticators ?
|
7112
|
-
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) ? {
|
7112
|
+
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) ? {
|
7113
7113
|
connect: prop.alpacaAccount.user.authenticators.map((item) => ({
|
7114
7114
|
id: item.id
|
7115
7115
|
}))
|
@@ -7259,7 +7259,7 @@ export const Alert = {
|
|
7259
7259
|
}
|
7260
7260
|
} : undefined,
|
7261
7261
|
trades: prop.alpacaAccount.trades ?
|
7262
|
-
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) ? {
|
7262
|
+
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) ? {
|
7263
7263
|
connect: prop.alpacaAccount.trades.map((item) => ({
|
7264
7264
|
id: item.id
|
7265
7265
|
}))
|
@@ -7311,7 +7311,7 @@ export const Alert = {
|
|
7311
7311
|
set: item.status
|
7312
7312
|
} : undefined,
|
7313
7313
|
asset: item.asset ?
|
7314
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
7314
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
7315
7315
|
? {
|
7316
7316
|
connect: {
|
7317
7317
|
id: item.asset.id
|
@@ -7558,7 +7558,7 @@ export const Alert = {
|
|
7558
7558
|
}
|
7559
7559
|
} : undefined,
|
7560
7560
|
actions: item.actions ?
|
7561
|
-
Array.isArray(item.actions) && item.actions.length > 0 && item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) ? {
|
7561
|
+
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) ? {
|
7562
7562
|
connect: item.actions.map((item) => ({
|
7563
7563
|
id: item.id
|
7564
7564
|
}))
|
@@ -7731,7 +7731,7 @@ export const Alert = {
|
|
7731
7731
|
}))
|
7732
7732
|
} : undefined,
|
7733
7733
|
orders: prop.alpacaAccount.orders ?
|
7734
|
-
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) ? {
|
7734
|
+
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) ? {
|
7735
7735
|
connect: prop.alpacaAccount.orders.map((item) => ({
|
7736
7736
|
id: item.id
|
7737
7737
|
}))
|
@@ -7832,7 +7832,7 @@ export const Alert = {
|
|
7832
7832
|
set: item.takeProfitId
|
7833
7833
|
} : undefined,
|
7834
7834
|
stopLoss: item.stopLoss ?
|
7835
|
-
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && Object.keys(item.stopLoss)[0] === 'id'
|
7835
|
+
typeof item.stopLoss === 'object' && Object.keys(item.stopLoss).length === 1 && (Object.keys(item.stopLoss)[0] === 'id' || Object.keys(item.stopLoss)[0] === 'symbol')
|
7836
7836
|
? {
|
7837
7837
|
connect: {
|
7838
7838
|
id: item.stopLoss.id
|
@@ -7864,7 +7864,7 @@ export const Alert = {
|
|
7864
7864
|
}
|
7865
7865
|
} : undefined,
|
7866
7866
|
takeProfit: item.takeProfit ?
|
7867
|
-
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && Object.keys(item.takeProfit)[0] === 'id'
|
7867
|
+
typeof item.takeProfit === 'object' && Object.keys(item.takeProfit).length === 1 && (Object.keys(item.takeProfit)[0] === 'id' || Object.keys(item.takeProfit)[0] === 'symbol')
|
7868
7868
|
? {
|
7869
7869
|
connect: {
|
7870
7870
|
id: item.takeProfit.id
|
@@ -7896,7 +7896,7 @@ export const Alert = {
|
|
7896
7896
|
}
|
7897
7897
|
} : undefined,
|
7898
7898
|
action: item.action ?
|
7899
|
-
typeof item.action === 'object' && Object.keys(item.action).length === 1 && Object.keys(item.action)[0] === 'id'
|
7899
|
+
typeof item.action === 'object' && Object.keys(item.action).length === 1 && (Object.keys(item.action)[0] === 'id' || Object.keys(item.action)[0] === 'symbol')
|
7900
7900
|
? {
|
7901
7901
|
connect: {
|
7902
7902
|
id: item.action.id
|
@@ -7956,7 +7956,7 @@ export const Alert = {
|
|
7956
7956
|
}
|
7957
7957
|
} : undefined,
|
7958
7958
|
asset: item.asset ?
|
7959
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
7959
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
7960
7960
|
? {
|
7961
7961
|
connect: {
|
7962
7962
|
id: item.asset.id
|
@@ -8203,7 +8203,7 @@ export const Alert = {
|
|
8203
8203
|
}
|
8204
8204
|
} : undefined,
|
8205
8205
|
contract: item.contract ?
|
8206
|
-
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && Object.keys(item.contract)[0] === 'id'
|
8206
|
+
typeof item.contract === 'object' && Object.keys(item.contract).length === 1 && (Object.keys(item.contract)[0] === 'id' || Object.keys(item.contract)[0] === 'symbol')
|
8207
8207
|
? {
|
8208
8208
|
connect: {
|
8209
8209
|
id: item.contract.id
|
@@ -8528,7 +8528,7 @@ export const Alert = {
|
|
8528
8528
|
}))
|
8529
8529
|
} : undefined,
|
8530
8530
|
positions: prop.alpacaAccount.positions ?
|
8531
|
-
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) ? {
|
8531
|
+
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) ? {
|
8532
8532
|
connect: prop.alpacaAccount.positions.map((item) => ({
|
8533
8533
|
id: item.id
|
8534
8534
|
}))
|
@@ -8595,7 +8595,7 @@ export const Alert = {
|
|
8595
8595
|
set: item.closed
|
8596
8596
|
} : undefined,
|
8597
8597
|
asset: item.asset ?
|
8598
|
-
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && Object.keys(item.asset)[0] === 'id'
|
8598
|
+
typeof item.asset === 'object' && Object.keys(item.asset).length === 1 && (Object.keys(item.asset)[0] === 'id' || Object.keys(item.asset)[0] === 'symbol')
|
8599
8599
|
? {
|
8600
8600
|
connect: {
|
8601
8601
|
id: item.asset.id
|