adaptic-backend 1.0.160 → 1.0.161
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 +50 -150
- package/Action.cjs +117 -351
- package/Alert.cjs +85 -255
- package/AlpacaAccount.cjs +130 -390
- package/Asset.cjs +129 -387
- package/Authenticator.cjs +50 -150
- package/Customer.cjs +54 -162
- package/EconomicEvent.cjs +3 -9
- package/NewsArticle.cjs +30 -90
- package/NewsArticleAssetSentiment.cjs +57 -171
- package/Order.cjs +119 -357
- package/Position.cjs +133 -399
- package/Session.cjs +50 -150
- package/StopLoss.cjs +68 -204
- package/TakeProfit.cjs +68 -204
- package/Trade.cjs +145 -435
- package/User.cjs +73 -219
- package/VerificationToken.cjs +3 -9
- package/package.json +1 -1
- package/server/Account.d.ts.map +1 -1
- package/server/Account.js.map +1 -1
- package/server/Account.mjs +50 -150
- package/server/Action.d.ts.map +1 -1
- package/server/Action.js.map +1 -1
- package/server/Action.mjs +117 -351
- package/server/Alert.d.ts.map +1 -1
- package/server/Alert.js.map +1 -1
- package/server/Alert.mjs +85 -255
- package/server/AlpacaAccount.d.ts.map +1 -1
- package/server/AlpacaAccount.js.map +1 -1
- package/server/AlpacaAccount.mjs +130 -390
- package/server/Asset.d.ts.map +1 -1
- package/server/Asset.js.map +1 -1
- package/server/Asset.mjs +129 -387
- package/server/Authenticator.d.ts.map +1 -1
- package/server/Authenticator.js.map +1 -1
- package/server/Authenticator.mjs +50 -150
- package/server/Customer.d.ts.map +1 -1
- package/server/Customer.js.map +1 -1
- package/server/Customer.mjs +54 -162
- package/server/EconomicEvent.d.ts.map +1 -1
- package/server/EconomicEvent.js.map +1 -1
- package/server/EconomicEvent.mjs +3 -9
- package/server/NewsArticle.d.ts.map +1 -1
- package/server/NewsArticle.js.map +1 -1
- package/server/NewsArticle.mjs +30 -90
- package/server/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/server/NewsArticleAssetSentiment.js.map +1 -1
- package/server/NewsArticleAssetSentiment.mjs +57 -171
- package/server/Order.d.ts.map +1 -1
- package/server/Order.js.map +1 -1
- package/server/Order.mjs +119 -357
- package/server/Position.d.ts.map +1 -1
- package/server/Position.js.map +1 -1
- package/server/Position.mjs +133 -399
- package/server/Session.d.ts.map +1 -1
- package/server/Session.js.map +1 -1
- package/server/Session.mjs +50 -150
- package/server/StopLoss.d.ts.map +1 -1
- package/server/StopLoss.js.map +1 -1
- package/server/StopLoss.mjs +68 -204
- package/server/TakeProfit.d.ts.map +1 -1
- package/server/TakeProfit.js.map +1 -1
- package/server/TakeProfit.mjs +68 -204
- package/server/Trade.d.ts.map +1 -1
- package/server/Trade.js.map +1 -1
- package/server/Trade.mjs +145 -435
- package/server/User.d.ts.map +1 -1
- package/server/User.js.map +1 -1
- package/server/User.mjs +73 -219
- package/server/VerificationToken.d.ts.map +1 -1
- package/server/VerificationToken.js.map +1 -1
- package/server/VerificationToken.mjs +3 -9
package/server/Action.mjs
CHANGED
@@ -194,9 +194,7 @@ export const Action = {
|
|
194
194
|
}
|
195
195
|
: { connectOrCreate: {
|
196
196
|
where: {
|
197
|
-
id: props.trade.id !== undefined ?
|
198
|
-
equals: props.trade.id
|
199
|
-
} : undefined,
|
197
|
+
id: props.trade.id !== undefined ? props.trade.id : undefined,
|
200
198
|
alpacaAccountId: props.trade.alpacaAccountId !== undefined ? {
|
201
199
|
equals: props.trade.alpacaAccountId
|
202
200
|
} : undefined,
|
@@ -224,9 +222,7 @@ export const Action = {
|
|
224
222
|
}
|
225
223
|
: { connectOrCreate: {
|
226
224
|
where: {
|
227
|
-
id: props.trade.alpacaAccount.id !== undefined ?
|
228
|
-
equals: props.trade.alpacaAccount.id
|
229
|
-
} : undefined,
|
225
|
+
id: props.trade.alpacaAccount.id !== undefined ? props.trade.alpacaAccount.id : undefined,
|
230
226
|
userId: props.trade.alpacaAccount.userId !== undefined ? {
|
231
227
|
equals: props.trade.alpacaAccount.userId
|
232
228
|
} : undefined,
|
@@ -249,9 +245,7 @@ export const Action = {
|
|
249
245
|
}
|
250
246
|
: { connectOrCreate: {
|
251
247
|
where: {
|
252
|
-
id: props.trade.alpacaAccount.user.id !== undefined ?
|
253
|
-
equals: props.trade.alpacaAccount.user.id
|
254
|
-
} : undefined,
|
248
|
+
id: props.trade.alpacaAccount.user.id !== undefined ? props.trade.alpacaAccount.user.id : undefined,
|
255
249
|
email: props.trade.alpacaAccount.user.email !== undefined ? props.trade.alpacaAccount.user.email : undefined,
|
256
250
|
name: props.trade.alpacaAccount.user.name !== undefined ? {
|
257
251
|
equals: props.trade.alpacaAccount.user.name
|
@@ -280,9 +274,7 @@ export const Action = {
|
|
280
274
|
}
|
281
275
|
: { connectOrCreate: props.trade.alpacaAccount.orders.map((item) => ({
|
282
276
|
where: {
|
283
|
-
id: item.id !== undefined ?
|
284
|
-
equals: item.id
|
285
|
-
} : undefined,
|
277
|
+
id: item.id !== undefined ? item.id : undefined,
|
286
278
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
287
279
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
288
280
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -327,9 +319,7 @@ export const Action = {
|
|
327
319
|
}
|
328
320
|
: { connectOrCreate: props.trade.alpacaAccount.positions.map((item) => ({
|
329
321
|
where: {
|
330
|
-
id: item.id !== undefined ?
|
331
|
-
equals: item.id
|
332
|
-
} : undefined,
|
322
|
+
id: item.id !== undefined ? item.id : undefined,
|
333
323
|
assetId: item.assetId !== undefined ? {
|
334
324
|
equals: item.assetId
|
335
325
|
} : undefined,
|
@@ -362,9 +352,7 @@ export const Action = {
|
|
362
352
|
}
|
363
353
|
: { connectOrCreate: props.trade.alpacaAccount.alerts.map((item) => ({
|
364
354
|
where: {
|
365
|
-
id: item.id !== undefined ?
|
366
|
-
equals: item.id
|
367
|
-
} : undefined,
|
355
|
+
id: item.id !== undefined ? item.id : undefined,
|
368
356
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
369
357
|
equals: item.alpacaAccountId
|
370
358
|
} : undefined,
|
@@ -387,9 +375,7 @@ export const Action = {
|
|
387
375
|
}
|
388
376
|
: { connectOrCreate: {
|
389
377
|
where: {
|
390
|
-
id: props.trade.asset.id !== undefined ?
|
391
|
-
equals: props.trade.asset.id
|
392
|
-
} : undefined,
|
378
|
+
id: props.trade.asset.id !== undefined ? props.trade.asset.id : undefined,
|
393
379
|
symbol: props.trade.asset.symbol !== undefined ? props.trade.asset.symbol : undefined,
|
394
380
|
name: props.trade.asset.name !== undefined ? props.trade.asset.name : undefined,
|
395
381
|
},
|
@@ -457,9 +443,7 @@ export const Action = {
|
|
457
443
|
}
|
458
444
|
: { connectOrCreate: props.trade.asset.orders.map((item) => ({
|
459
445
|
where: {
|
460
|
-
id: item.id !== undefined ?
|
461
|
-
equals: item.id
|
462
|
-
} : undefined,
|
446
|
+
id: item.id !== undefined ? item.id : undefined,
|
463
447
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
464
448
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
465
449
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -504,9 +488,7 @@ export const Action = {
|
|
504
488
|
}
|
505
489
|
: { connectOrCreate: props.trade.asset.positions.map((item) => ({
|
506
490
|
where: {
|
507
|
-
id: item.id !== undefined ?
|
508
|
-
equals: item.id
|
509
|
-
} : undefined,
|
491
|
+
id: item.id !== undefined ? item.id : undefined,
|
510
492
|
assetId: item.assetId !== undefined ? {
|
511
493
|
equals: item.assetId
|
512
494
|
} : undefined,
|
@@ -539,9 +521,7 @@ export const Action = {
|
|
539
521
|
}
|
540
522
|
: { connectOrCreate: props.trade.asset.newsMentions.map((item) => ({
|
541
523
|
where: {
|
542
|
-
id: item.id !== undefined ?
|
543
|
-
equals: item.id
|
544
|
-
} : undefined,
|
524
|
+
id: item.id !== undefined ? item.id : undefined,
|
545
525
|
url: item.url !== undefined ? item.url : undefined,
|
546
526
|
assetId: item.assetId !== undefined ? {
|
547
527
|
equals: item.assetId
|
@@ -572,9 +552,7 @@ export const Action = {
|
|
572
552
|
}
|
573
553
|
: { connectOrCreate: {
|
574
554
|
where: {
|
575
|
-
id: props.order.id !== undefined ?
|
576
|
-
equals: props.order.id
|
577
|
-
} : undefined,
|
555
|
+
id: props.order.id !== undefined ? props.order.id : undefined,
|
578
556
|
clientOrderId: props.order.clientOrderId !== undefined ? props.order.clientOrderId : undefined,
|
579
557
|
actionId: props.order.actionId !== undefined ? props.order.actionId : undefined,
|
580
558
|
stopLossId: props.order.stopLossId !== undefined ? props.order.stopLossId : undefined,
|
@@ -616,9 +594,7 @@ export const Action = {
|
|
616
594
|
}
|
617
595
|
: { connectOrCreate: {
|
618
596
|
where: {
|
619
|
-
id: props.order.stopLoss.id !== undefined ?
|
620
|
-
equals: props.order.stopLoss.id
|
621
|
-
} : undefined,
|
597
|
+
id: props.order.stopLoss.id !== undefined ? props.order.stopLoss.id : undefined,
|
622
598
|
orderId: props.order.stopLoss.orderId !== undefined ? props.order.stopLoss.orderId : undefined,
|
623
599
|
},
|
624
600
|
create: {
|
@@ -635,9 +611,7 @@ export const Action = {
|
|
635
611
|
}
|
636
612
|
: { connectOrCreate: {
|
637
613
|
where: {
|
638
|
-
id: props.order.takeProfit.id !== undefined ?
|
639
|
-
equals: props.order.takeProfit.id
|
640
|
-
} : undefined,
|
614
|
+
id: props.order.takeProfit.id !== undefined ? props.order.takeProfit.id : undefined,
|
641
615
|
orderId: props.order.takeProfit.orderId !== undefined ? props.order.takeProfit.orderId : undefined,
|
642
616
|
},
|
643
617
|
create: {
|
@@ -654,9 +628,7 @@ export const Action = {
|
|
654
628
|
}
|
655
629
|
: { connectOrCreate: {
|
656
630
|
where: {
|
657
|
-
id: props.order.alpacaAccount.id !== undefined ?
|
658
|
-
equals: props.order.alpacaAccount.id
|
659
|
-
} : undefined,
|
631
|
+
id: props.order.alpacaAccount.id !== undefined ? props.order.alpacaAccount.id : undefined,
|
660
632
|
userId: props.order.alpacaAccount.userId !== undefined ? {
|
661
633
|
equals: props.order.alpacaAccount.userId
|
662
634
|
} : undefined,
|
@@ -679,9 +651,7 @@ export const Action = {
|
|
679
651
|
}
|
680
652
|
: { connectOrCreate: {
|
681
653
|
where: {
|
682
|
-
id: props.order.alpacaAccount.user.id !== undefined ?
|
683
|
-
equals: props.order.alpacaAccount.user.id
|
684
|
-
} : undefined,
|
654
|
+
id: props.order.alpacaAccount.user.id !== undefined ? props.order.alpacaAccount.user.id : undefined,
|
685
655
|
email: props.order.alpacaAccount.user.email !== undefined ? props.order.alpacaAccount.user.email : undefined,
|
686
656
|
name: props.order.alpacaAccount.user.name !== undefined ? {
|
687
657
|
equals: props.order.alpacaAccount.user.name
|
@@ -710,9 +680,7 @@ export const Action = {
|
|
710
680
|
}
|
711
681
|
: { connectOrCreate: props.order.alpacaAccount.trades.map((item) => ({
|
712
682
|
where: {
|
713
|
-
id: item.id !== undefined ?
|
714
|
-
equals: item.id
|
715
|
-
} : undefined,
|
683
|
+
id: item.id !== undefined ? item.id : undefined,
|
716
684
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
717
685
|
equals: item.alpacaAccountId
|
718
686
|
} : undefined,
|
@@ -743,9 +711,7 @@ export const Action = {
|
|
743
711
|
}
|
744
712
|
: { connectOrCreate: props.order.alpacaAccount.positions.map((item) => ({
|
745
713
|
where: {
|
746
|
-
id: item.id !== undefined ?
|
747
|
-
equals: item.id
|
748
|
-
} : undefined,
|
714
|
+
id: item.id !== undefined ? item.id : undefined,
|
749
715
|
assetId: item.assetId !== undefined ? {
|
750
716
|
equals: item.assetId
|
751
717
|
} : undefined,
|
@@ -778,9 +744,7 @@ export const Action = {
|
|
778
744
|
}
|
779
745
|
: { connectOrCreate: props.order.alpacaAccount.alerts.map((item) => ({
|
780
746
|
where: {
|
781
|
-
id: item.id !== undefined ?
|
782
|
-
equals: item.id
|
783
|
-
} : undefined,
|
747
|
+
id: item.id !== undefined ? item.id : undefined,
|
784
748
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
785
749
|
equals: item.alpacaAccountId
|
786
750
|
} : undefined,
|
@@ -803,9 +767,7 @@ export const Action = {
|
|
803
767
|
}
|
804
768
|
: { connectOrCreate: {
|
805
769
|
where: {
|
806
|
-
id: props.order.asset.id !== undefined ?
|
807
|
-
equals: props.order.asset.id
|
808
|
-
} : undefined,
|
770
|
+
id: props.order.asset.id !== undefined ? props.order.asset.id : undefined,
|
809
771
|
symbol: props.order.asset.symbol !== undefined ? props.order.asset.symbol : undefined,
|
810
772
|
name: props.order.asset.name !== undefined ? props.order.asset.name : undefined,
|
811
773
|
},
|
@@ -873,9 +835,7 @@ export const Action = {
|
|
873
835
|
}
|
874
836
|
: { connectOrCreate: props.order.asset.trades.map((item) => ({
|
875
837
|
where: {
|
876
|
-
id: item.id !== undefined ?
|
877
|
-
equals: item.id
|
878
|
-
} : undefined,
|
838
|
+
id: item.id !== undefined ? item.id : undefined,
|
879
839
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
880
840
|
equals: item.alpacaAccountId
|
881
841
|
} : undefined,
|
@@ -906,9 +866,7 @@ export const Action = {
|
|
906
866
|
}
|
907
867
|
: { connectOrCreate: props.order.asset.positions.map((item) => ({
|
908
868
|
where: {
|
909
|
-
id: item.id !== undefined ?
|
910
|
-
equals: item.id
|
911
|
-
} : undefined,
|
869
|
+
id: item.id !== undefined ? item.id : undefined,
|
912
870
|
assetId: item.assetId !== undefined ? {
|
913
871
|
equals: item.assetId
|
914
872
|
} : undefined,
|
@@ -941,9 +899,7 @@ export const Action = {
|
|
941
899
|
}
|
942
900
|
: { connectOrCreate: props.order.asset.newsMentions.map((item) => ({
|
943
901
|
where: {
|
944
|
-
id: item.id !== undefined ?
|
945
|
-
equals: item.id
|
946
|
-
} : undefined,
|
902
|
+
id: item.id !== undefined ? item.id : undefined,
|
947
903
|
url: item.url !== undefined ? item.url : undefined,
|
948
904
|
assetId: item.assetId !== undefined ? {
|
949
905
|
equals: item.assetId
|
@@ -1040,9 +996,7 @@ export const Action = {
|
|
1040
996
|
}`;
|
1041
997
|
const variables = {
|
1042
998
|
where: {
|
1043
|
-
id: props.id !== undefined ?
|
1044
|
-
equals: props.id
|
1045
|
-
} : undefined,
|
999
|
+
id: props.id !== undefined ? props.id : undefined,
|
1046
1000
|
sequence: props.sequence !== undefined ? props.sequence : undefined,
|
1047
1001
|
tradeId: props.tradeId !== undefined ? {
|
1048
1002
|
equals: props.tradeId
|
@@ -1230,9 +1184,7 @@ export const Action = {
|
|
1230
1184
|
orders: props.trade.alpacaAccount.orders ? {
|
1231
1185
|
upsert: props.trade.alpacaAccount.orders.map((item) => ({
|
1232
1186
|
where: {
|
1233
|
-
id: item.id !== undefined ?
|
1234
|
-
equals: item.id
|
1235
|
-
} : undefined,
|
1187
|
+
id: item.id !== undefined ? item.id : undefined,
|
1236
1188
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1237
1189
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1238
1190
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -1343,9 +1295,7 @@ export const Action = {
|
|
1343
1295
|
positions: props.trade.alpacaAccount.positions ? {
|
1344
1296
|
upsert: props.trade.alpacaAccount.positions.map((item) => ({
|
1345
1297
|
where: {
|
1346
|
-
id: item.id !== undefined ?
|
1347
|
-
equals: item.id
|
1348
|
-
} : undefined,
|
1298
|
+
id: item.id !== undefined ? item.id : undefined,
|
1349
1299
|
assetId: item.assetId !== undefined ? {
|
1350
1300
|
equals: item.assetId
|
1351
1301
|
} : undefined,
|
@@ -1417,9 +1367,7 @@ export const Action = {
|
|
1417
1367
|
alerts: props.trade.alpacaAccount.alerts ? {
|
1418
1368
|
upsert: props.trade.alpacaAccount.alerts.map((item) => ({
|
1419
1369
|
where: {
|
1420
|
-
id: item.id !== undefined ?
|
1421
|
-
equals: item.id
|
1422
|
-
} : undefined,
|
1370
|
+
id: item.id !== undefined ? item.id : undefined,
|
1423
1371
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1424
1372
|
equals: item.alpacaAccountId
|
1425
1373
|
} : undefined,
|
@@ -1464,9 +1412,7 @@ export const Action = {
|
|
1464
1412
|
}
|
1465
1413
|
: { connectOrCreate: {
|
1466
1414
|
where: {
|
1467
|
-
id: props.trade.alpacaAccount.user.id !== undefined ?
|
1468
|
-
equals: props.trade.alpacaAccount.user.id
|
1469
|
-
} : undefined,
|
1415
|
+
id: props.trade.alpacaAccount.user.id !== undefined ? props.trade.alpacaAccount.user.id : undefined,
|
1470
1416
|
email: props.trade.alpacaAccount.user.email !== undefined ? props.trade.alpacaAccount.user.email : undefined,
|
1471
1417
|
name: props.trade.alpacaAccount.user.name !== undefined ? {
|
1472
1418
|
equals: props.trade.alpacaAccount.user.name
|
@@ -1495,9 +1441,7 @@ export const Action = {
|
|
1495
1441
|
}
|
1496
1442
|
: { connectOrCreate: props.trade.alpacaAccount.orders.map((item) => ({
|
1497
1443
|
where: {
|
1498
|
-
id: item.id !== undefined ?
|
1499
|
-
equals: item.id
|
1500
|
-
} : undefined,
|
1444
|
+
id: item.id !== undefined ? item.id : undefined,
|
1501
1445
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1502
1446
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1503
1447
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -1542,9 +1486,7 @@ export const Action = {
|
|
1542
1486
|
}
|
1543
1487
|
: { connectOrCreate: props.trade.alpacaAccount.positions.map((item) => ({
|
1544
1488
|
where: {
|
1545
|
-
id: item.id !== undefined ?
|
1546
|
-
equals: item.id
|
1547
|
-
} : undefined,
|
1489
|
+
id: item.id !== undefined ? item.id : undefined,
|
1548
1490
|
assetId: item.assetId !== undefined ? {
|
1549
1491
|
equals: item.assetId
|
1550
1492
|
} : undefined,
|
@@ -1577,9 +1519,7 @@ export const Action = {
|
|
1577
1519
|
}
|
1578
1520
|
: { connectOrCreate: props.trade.alpacaAccount.alerts.map((item) => ({
|
1579
1521
|
where: {
|
1580
|
-
id: item.id !== undefined ?
|
1581
|
-
equals: item.id
|
1582
|
-
} : undefined,
|
1522
|
+
id: item.id !== undefined ? item.id : undefined,
|
1583
1523
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1584
1524
|
equals: item.alpacaAccountId
|
1585
1525
|
} : undefined,
|
@@ -1779,9 +1719,7 @@ export const Action = {
|
|
1779
1719
|
orders: props.trade.asset.orders ? {
|
1780
1720
|
upsert: props.trade.asset.orders.map((item) => ({
|
1781
1721
|
where: {
|
1782
|
-
id: item.id !== undefined ?
|
1783
|
-
equals: item.id
|
1784
|
-
} : undefined,
|
1722
|
+
id: item.id !== undefined ? item.id : undefined,
|
1785
1723
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1786
1724
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1787
1725
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -1892,9 +1830,7 @@ export const Action = {
|
|
1892
1830
|
positions: props.trade.asset.positions ? {
|
1893
1831
|
upsert: props.trade.asset.positions.map((item) => ({
|
1894
1832
|
where: {
|
1895
|
-
id: item.id !== undefined ?
|
1896
|
-
equals: item.id
|
1897
|
-
} : undefined,
|
1833
|
+
id: item.id !== undefined ? item.id : undefined,
|
1898
1834
|
assetId: item.assetId !== undefined ? {
|
1899
1835
|
equals: item.assetId
|
1900
1836
|
} : undefined,
|
@@ -1966,9 +1902,7 @@ export const Action = {
|
|
1966
1902
|
newsMentions: props.trade.asset.newsMentions ? {
|
1967
1903
|
upsert: props.trade.asset.newsMentions.map((item) => ({
|
1968
1904
|
where: {
|
1969
|
-
id: item.id !== undefined ?
|
1970
|
-
equals: item.id
|
1971
|
-
} : undefined,
|
1905
|
+
id: item.id !== undefined ? item.id : undefined,
|
1972
1906
|
url: item.url !== undefined ? item.url : undefined,
|
1973
1907
|
assetId: item.assetId !== undefined ? {
|
1974
1908
|
equals: item.assetId
|
@@ -2067,9 +2001,7 @@ export const Action = {
|
|
2067
2001
|
}
|
2068
2002
|
: { connectOrCreate: props.trade.asset.orders.map((item) => ({
|
2069
2003
|
where: {
|
2070
|
-
id: item.id !== undefined ?
|
2071
|
-
equals: item.id
|
2072
|
-
} : undefined,
|
2004
|
+
id: item.id !== undefined ? item.id : undefined,
|
2073
2005
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2074
2006
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2075
2007
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -2114,9 +2046,7 @@ export const Action = {
|
|
2114
2046
|
}
|
2115
2047
|
: { connectOrCreate: props.trade.asset.positions.map((item) => ({
|
2116
2048
|
where: {
|
2117
|
-
id: item.id !== undefined ?
|
2118
|
-
equals: item.id
|
2119
|
-
} : undefined,
|
2049
|
+
id: item.id !== undefined ? item.id : undefined,
|
2120
2050
|
assetId: item.assetId !== undefined ? {
|
2121
2051
|
equals: item.assetId
|
2122
2052
|
} : undefined,
|
@@ -2149,9 +2079,7 @@ export const Action = {
|
|
2149
2079
|
}
|
2150
2080
|
: { connectOrCreate: props.trade.asset.newsMentions.map((item) => ({
|
2151
2081
|
where: {
|
2152
|
-
id: item.id !== undefined ?
|
2153
|
-
equals: item.id
|
2154
|
-
} : undefined,
|
2082
|
+
id: item.id !== undefined ? item.id : undefined,
|
2155
2083
|
url: item.url !== undefined ? item.url : undefined,
|
2156
2084
|
assetId: item.assetId !== undefined ? {
|
2157
2085
|
equals: item.assetId
|
@@ -2192,9 +2120,7 @@ export const Action = {
|
|
2192
2120
|
}
|
2193
2121
|
: { connectOrCreate: {
|
2194
2122
|
where: {
|
2195
|
-
id: props.trade.alpacaAccount.id !== undefined ?
|
2196
|
-
equals: props.trade.alpacaAccount.id
|
2197
|
-
} : undefined,
|
2123
|
+
id: props.trade.alpacaAccount.id !== undefined ? props.trade.alpacaAccount.id : undefined,
|
2198
2124
|
userId: props.trade.alpacaAccount.userId !== undefined ? {
|
2199
2125
|
equals: props.trade.alpacaAccount.userId
|
2200
2126
|
} : undefined,
|
@@ -2217,9 +2143,7 @@ export const Action = {
|
|
2217
2143
|
}
|
2218
2144
|
: { connectOrCreate: {
|
2219
2145
|
where: {
|
2220
|
-
id: props.trade.alpacaAccount.user.id !== undefined ?
|
2221
|
-
equals: props.trade.alpacaAccount.user.id
|
2222
|
-
} : undefined,
|
2146
|
+
id: props.trade.alpacaAccount.user.id !== undefined ? props.trade.alpacaAccount.user.id : undefined,
|
2223
2147
|
email: props.trade.alpacaAccount.user.email !== undefined ? props.trade.alpacaAccount.user.email : undefined,
|
2224
2148
|
name: props.trade.alpacaAccount.user.name !== undefined ? {
|
2225
2149
|
equals: props.trade.alpacaAccount.user.name
|
@@ -2248,9 +2172,7 @@ export const Action = {
|
|
2248
2172
|
}
|
2249
2173
|
: { connectOrCreate: props.trade.alpacaAccount.orders.map((item) => ({
|
2250
2174
|
where: {
|
2251
|
-
id: item.id !== undefined ?
|
2252
|
-
equals: item.id
|
2253
|
-
} : undefined,
|
2175
|
+
id: item.id !== undefined ? item.id : undefined,
|
2254
2176
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2255
2177
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2256
2178
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -2295,9 +2217,7 @@ export const Action = {
|
|
2295
2217
|
}
|
2296
2218
|
: { connectOrCreate: props.trade.alpacaAccount.positions.map((item) => ({
|
2297
2219
|
where: {
|
2298
|
-
id: item.id !== undefined ?
|
2299
|
-
equals: item.id
|
2300
|
-
} : undefined,
|
2220
|
+
id: item.id !== undefined ? item.id : undefined,
|
2301
2221
|
assetId: item.assetId !== undefined ? {
|
2302
2222
|
equals: item.assetId
|
2303
2223
|
} : undefined,
|
@@ -2330,9 +2250,7 @@ export const Action = {
|
|
2330
2250
|
}
|
2331
2251
|
: { connectOrCreate: props.trade.alpacaAccount.alerts.map((item) => ({
|
2332
2252
|
where: {
|
2333
|
-
id: item.id !== undefined ?
|
2334
|
-
equals: item.id
|
2335
|
-
} : undefined,
|
2253
|
+
id: item.id !== undefined ? item.id : undefined,
|
2336
2254
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2337
2255
|
equals: item.alpacaAccountId
|
2338
2256
|
} : undefined,
|
@@ -2355,9 +2273,7 @@ export const Action = {
|
|
2355
2273
|
}
|
2356
2274
|
: { connectOrCreate: {
|
2357
2275
|
where: {
|
2358
|
-
id: props.trade.asset.id !== undefined ?
|
2359
|
-
equals: props.trade.asset.id
|
2360
|
-
} : undefined,
|
2276
|
+
id: props.trade.asset.id !== undefined ? props.trade.asset.id : undefined,
|
2361
2277
|
symbol: props.trade.asset.symbol !== undefined ? props.trade.asset.symbol : undefined,
|
2362
2278
|
name: props.trade.asset.name !== undefined ? props.trade.asset.name : undefined,
|
2363
2279
|
},
|
@@ -2425,9 +2341,7 @@ export const Action = {
|
|
2425
2341
|
}
|
2426
2342
|
: { connectOrCreate: props.trade.asset.orders.map((item) => ({
|
2427
2343
|
where: {
|
2428
|
-
id: item.id !== undefined ?
|
2429
|
-
equals: item.id
|
2430
|
-
} : undefined,
|
2344
|
+
id: item.id !== undefined ? item.id : undefined,
|
2431
2345
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2432
2346
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2433
2347
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -2472,9 +2386,7 @@ export const Action = {
|
|
2472
2386
|
}
|
2473
2387
|
: { connectOrCreate: props.trade.asset.positions.map((item) => ({
|
2474
2388
|
where: {
|
2475
|
-
id: item.id !== undefined ?
|
2476
|
-
equals: item.id
|
2477
|
-
} : undefined,
|
2389
|
+
id: item.id !== undefined ? item.id : undefined,
|
2478
2390
|
assetId: item.assetId !== undefined ? {
|
2479
2391
|
equals: item.assetId
|
2480
2392
|
} : undefined,
|
@@ -2507,9 +2419,7 @@ export const Action = {
|
|
2507
2419
|
}
|
2508
2420
|
: { connectOrCreate: props.trade.asset.newsMentions.map((item) => ({
|
2509
2421
|
where: {
|
2510
|
-
id: item.id !== undefined ?
|
2511
|
-
equals: item.id
|
2512
|
-
} : undefined,
|
2422
|
+
id: item.id !== undefined ? item.id : undefined,
|
2513
2423
|
url: item.url !== undefined ? item.url : undefined,
|
2514
2424
|
assetId: item.assetId !== undefined ? {
|
2515
2425
|
equals: item.assetId
|
@@ -2785,9 +2695,7 @@ export const Action = {
|
|
2785
2695
|
trades: props.order.alpacaAccount.trades ? {
|
2786
2696
|
upsert: props.order.alpacaAccount.trades.map((item) => ({
|
2787
2697
|
where: {
|
2788
|
-
id: item.id !== undefined ?
|
2789
|
-
equals: item.id
|
2790
|
-
} : undefined,
|
2698
|
+
id: item.id !== undefined ? item.id : undefined,
|
2791
2699
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2792
2700
|
equals: item.alpacaAccountId
|
2793
2701
|
} : undefined,
|
@@ -2851,9 +2759,7 @@ export const Action = {
|
|
2851
2759
|
positions: props.order.alpacaAccount.positions ? {
|
2852
2760
|
upsert: props.order.alpacaAccount.positions.map((item) => ({
|
2853
2761
|
where: {
|
2854
|
-
id: item.id !== undefined ?
|
2855
|
-
equals: item.id
|
2856
|
-
} : undefined,
|
2762
|
+
id: item.id !== undefined ? item.id : undefined,
|
2857
2763
|
assetId: item.assetId !== undefined ? {
|
2858
2764
|
equals: item.assetId
|
2859
2765
|
} : undefined,
|
@@ -2925,9 +2831,7 @@ export const Action = {
|
|
2925
2831
|
alerts: props.order.alpacaAccount.alerts ? {
|
2926
2832
|
upsert: props.order.alpacaAccount.alerts.map((item) => ({
|
2927
2833
|
where: {
|
2928
|
-
id: item.id !== undefined ?
|
2929
|
-
equals: item.id
|
2930
|
-
} : undefined,
|
2834
|
+
id: item.id !== undefined ? item.id : undefined,
|
2931
2835
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2932
2836
|
equals: item.alpacaAccountId
|
2933
2837
|
} : undefined,
|
@@ -2972,9 +2876,7 @@ export const Action = {
|
|
2972
2876
|
}
|
2973
2877
|
: { connectOrCreate: {
|
2974
2878
|
where: {
|
2975
|
-
id: props.order.alpacaAccount.user.id !== undefined ?
|
2976
|
-
equals: props.order.alpacaAccount.user.id
|
2977
|
-
} : undefined,
|
2879
|
+
id: props.order.alpacaAccount.user.id !== undefined ? props.order.alpacaAccount.user.id : undefined,
|
2978
2880
|
email: props.order.alpacaAccount.user.email !== undefined ? props.order.alpacaAccount.user.email : undefined,
|
2979
2881
|
name: props.order.alpacaAccount.user.name !== undefined ? {
|
2980
2882
|
equals: props.order.alpacaAccount.user.name
|
@@ -3003,9 +2905,7 @@ export const Action = {
|
|
3003
2905
|
}
|
3004
2906
|
: { connectOrCreate: props.order.alpacaAccount.trades.map((item) => ({
|
3005
2907
|
where: {
|
3006
|
-
id: item.id !== undefined ?
|
3007
|
-
equals: item.id
|
3008
|
-
} : undefined,
|
2908
|
+
id: item.id !== undefined ? item.id : undefined,
|
3009
2909
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3010
2910
|
equals: item.alpacaAccountId
|
3011
2911
|
} : undefined,
|
@@ -3036,9 +2936,7 @@ export const Action = {
|
|
3036
2936
|
}
|
3037
2937
|
: { connectOrCreate: props.order.alpacaAccount.positions.map((item) => ({
|
3038
2938
|
where: {
|
3039
|
-
id: item.id !== undefined ?
|
3040
|
-
equals: item.id
|
3041
|
-
} : undefined,
|
2939
|
+
id: item.id !== undefined ? item.id : undefined,
|
3042
2940
|
assetId: item.assetId !== undefined ? {
|
3043
2941
|
equals: item.assetId
|
3044
2942
|
} : undefined,
|
@@ -3071,9 +2969,7 @@ export const Action = {
|
|
3071
2969
|
}
|
3072
2970
|
: { connectOrCreate: props.order.alpacaAccount.alerts.map((item) => ({
|
3073
2971
|
where: {
|
3074
|
-
id: item.id !== undefined ?
|
3075
|
-
equals: item.id
|
3076
|
-
} : undefined,
|
2972
|
+
id: item.id !== undefined ? item.id : undefined,
|
3077
2973
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3078
2974
|
equals: item.alpacaAccountId
|
3079
2975
|
} : undefined,
|
@@ -3273,9 +3169,7 @@ export const Action = {
|
|
3273
3169
|
trades: props.order.asset.trades ? {
|
3274
3170
|
upsert: props.order.asset.trades.map((item) => ({
|
3275
3171
|
where: {
|
3276
|
-
id: item.id !== undefined ?
|
3277
|
-
equals: item.id
|
3278
|
-
} : undefined,
|
3172
|
+
id: item.id !== undefined ? item.id : undefined,
|
3279
3173
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3280
3174
|
equals: item.alpacaAccountId
|
3281
3175
|
} : undefined,
|
@@ -3339,9 +3233,7 @@ export const Action = {
|
|
3339
3233
|
positions: props.order.asset.positions ? {
|
3340
3234
|
upsert: props.order.asset.positions.map((item) => ({
|
3341
3235
|
where: {
|
3342
|
-
id: item.id !== undefined ?
|
3343
|
-
equals: item.id
|
3344
|
-
} : undefined,
|
3236
|
+
id: item.id !== undefined ? item.id : undefined,
|
3345
3237
|
assetId: item.assetId !== undefined ? {
|
3346
3238
|
equals: item.assetId
|
3347
3239
|
} : undefined,
|
@@ -3413,9 +3305,7 @@ export const Action = {
|
|
3413
3305
|
newsMentions: props.order.asset.newsMentions ? {
|
3414
3306
|
upsert: props.order.asset.newsMentions.map((item) => ({
|
3415
3307
|
where: {
|
3416
|
-
id: item.id !== undefined ?
|
3417
|
-
equals: item.id
|
3418
|
-
} : undefined,
|
3308
|
+
id: item.id !== undefined ? item.id : undefined,
|
3419
3309
|
url: item.url !== undefined ? item.url : undefined,
|
3420
3310
|
assetId: item.assetId !== undefined ? {
|
3421
3311
|
equals: item.assetId
|
@@ -3514,9 +3404,7 @@ export const Action = {
|
|
3514
3404
|
}
|
3515
3405
|
: { connectOrCreate: props.order.asset.trades.map((item) => ({
|
3516
3406
|
where: {
|
3517
|
-
id: item.id !== undefined ?
|
3518
|
-
equals: item.id
|
3519
|
-
} : undefined,
|
3407
|
+
id: item.id !== undefined ? item.id : undefined,
|
3520
3408
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3521
3409
|
equals: item.alpacaAccountId
|
3522
3410
|
} : undefined,
|
@@ -3547,9 +3435,7 @@ export const Action = {
|
|
3547
3435
|
}
|
3548
3436
|
: { connectOrCreate: props.order.asset.positions.map((item) => ({
|
3549
3437
|
where: {
|
3550
|
-
id: item.id !== undefined ?
|
3551
|
-
equals: item.id
|
3552
|
-
} : undefined,
|
3438
|
+
id: item.id !== undefined ? item.id : undefined,
|
3553
3439
|
assetId: item.assetId !== undefined ? {
|
3554
3440
|
equals: item.assetId
|
3555
3441
|
} : undefined,
|
@@ -3582,9 +3468,7 @@ export const Action = {
|
|
3582
3468
|
}
|
3583
3469
|
: { connectOrCreate: props.order.asset.newsMentions.map((item) => ({
|
3584
3470
|
where: {
|
3585
|
-
id: item.id !== undefined ?
|
3586
|
-
equals: item.id
|
3587
|
-
} : undefined,
|
3471
|
+
id: item.id !== undefined ? item.id : undefined,
|
3588
3472
|
url: item.url !== undefined ? item.url : undefined,
|
3589
3473
|
assetId: item.assetId !== undefined ? {
|
3590
3474
|
equals: item.assetId
|
@@ -3636,9 +3520,7 @@ export const Action = {
|
|
3636
3520
|
}
|
3637
3521
|
: { connectOrCreate: {
|
3638
3522
|
where: {
|
3639
|
-
id: props.order.stopLoss.id !== undefined ?
|
3640
|
-
equals: props.order.stopLoss.id
|
3641
|
-
} : undefined,
|
3523
|
+
id: props.order.stopLoss.id !== undefined ? props.order.stopLoss.id : undefined,
|
3642
3524
|
orderId: props.order.stopLoss.orderId !== undefined ? props.order.stopLoss.orderId : undefined,
|
3643
3525
|
},
|
3644
3526
|
create: {
|
@@ -3655,9 +3537,7 @@ export const Action = {
|
|
3655
3537
|
}
|
3656
3538
|
: { connectOrCreate: {
|
3657
3539
|
where: {
|
3658
|
-
id: props.order.takeProfit.id !== undefined ?
|
3659
|
-
equals: props.order.takeProfit.id
|
3660
|
-
} : undefined,
|
3540
|
+
id: props.order.takeProfit.id !== undefined ? props.order.takeProfit.id : undefined,
|
3661
3541
|
orderId: props.order.takeProfit.orderId !== undefined ? props.order.takeProfit.orderId : undefined,
|
3662
3542
|
},
|
3663
3543
|
create: {
|
@@ -3674,9 +3554,7 @@ export const Action = {
|
|
3674
3554
|
}
|
3675
3555
|
: { connectOrCreate: {
|
3676
3556
|
where: {
|
3677
|
-
id: props.order.alpacaAccount.id !== undefined ?
|
3678
|
-
equals: props.order.alpacaAccount.id
|
3679
|
-
} : undefined,
|
3557
|
+
id: props.order.alpacaAccount.id !== undefined ? props.order.alpacaAccount.id : undefined,
|
3680
3558
|
userId: props.order.alpacaAccount.userId !== undefined ? {
|
3681
3559
|
equals: props.order.alpacaAccount.userId
|
3682
3560
|
} : undefined,
|
@@ -3699,9 +3577,7 @@ export const Action = {
|
|
3699
3577
|
}
|
3700
3578
|
: { connectOrCreate: {
|
3701
3579
|
where: {
|
3702
|
-
id: props.order.alpacaAccount.user.id !== undefined ?
|
3703
|
-
equals: props.order.alpacaAccount.user.id
|
3704
|
-
} : undefined,
|
3580
|
+
id: props.order.alpacaAccount.user.id !== undefined ? props.order.alpacaAccount.user.id : undefined,
|
3705
3581
|
email: props.order.alpacaAccount.user.email !== undefined ? props.order.alpacaAccount.user.email : undefined,
|
3706
3582
|
name: props.order.alpacaAccount.user.name !== undefined ? {
|
3707
3583
|
equals: props.order.alpacaAccount.user.name
|
@@ -3730,9 +3606,7 @@ export const Action = {
|
|
3730
3606
|
}
|
3731
3607
|
: { connectOrCreate: props.order.alpacaAccount.trades.map((item) => ({
|
3732
3608
|
where: {
|
3733
|
-
id: item.id !== undefined ?
|
3734
|
-
equals: item.id
|
3735
|
-
} : undefined,
|
3609
|
+
id: item.id !== undefined ? item.id : undefined,
|
3736
3610
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3737
3611
|
equals: item.alpacaAccountId
|
3738
3612
|
} : undefined,
|
@@ -3763,9 +3637,7 @@ export const Action = {
|
|
3763
3637
|
}
|
3764
3638
|
: { connectOrCreate: props.order.alpacaAccount.positions.map((item) => ({
|
3765
3639
|
where: {
|
3766
|
-
id: item.id !== undefined ?
|
3767
|
-
equals: item.id
|
3768
|
-
} : undefined,
|
3640
|
+
id: item.id !== undefined ? item.id : undefined,
|
3769
3641
|
assetId: item.assetId !== undefined ? {
|
3770
3642
|
equals: item.assetId
|
3771
3643
|
} : undefined,
|
@@ -3798,9 +3670,7 @@ export const Action = {
|
|
3798
3670
|
}
|
3799
3671
|
: { connectOrCreate: props.order.alpacaAccount.alerts.map((item) => ({
|
3800
3672
|
where: {
|
3801
|
-
id: item.id !== undefined ?
|
3802
|
-
equals: item.id
|
3803
|
-
} : undefined,
|
3673
|
+
id: item.id !== undefined ? item.id : undefined,
|
3804
3674
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3805
3675
|
equals: item.alpacaAccountId
|
3806
3676
|
} : undefined,
|
@@ -3823,9 +3693,7 @@ export const Action = {
|
|
3823
3693
|
}
|
3824
3694
|
: { connectOrCreate: {
|
3825
3695
|
where: {
|
3826
|
-
id: props.order.asset.id !== undefined ?
|
3827
|
-
equals: props.order.asset.id
|
3828
|
-
} : undefined,
|
3696
|
+
id: props.order.asset.id !== undefined ? props.order.asset.id : undefined,
|
3829
3697
|
symbol: props.order.asset.symbol !== undefined ? props.order.asset.symbol : undefined,
|
3830
3698
|
name: props.order.asset.name !== undefined ? props.order.asset.name : undefined,
|
3831
3699
|
},
|
@@ -3893,9 +3761,7 @@ export const Action = {
|
|
3893
3761
|
}
|
3894
3762
|
: { connectOrCreate: props.order.asset.trades.map((item) => ({
|
3895
3763
|
where: {
|
3896
|
-
id: item.id !== undefined ?
|
3897
|
-
equals: item.id
|
3898
|
-
} : undefined,
|
3764
|
+
id: item.id !== undefined ? item.id : undefined,
|
3899
3765
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3900
3766
|
equals: item.alpacaAccountId
|
3901
3767
|
} : undefined,
|
@@ -3926,9 +3792,7 @@ export const Action = {
|
|
3926
3792
|
}
|
3927
3793
|
: { connectOrCreate: props.order.asset.positions.map((item) => ({
|
3928
3794
|
where: {
|
3929
|
-
id: item.id !== undefined ?
|
3930
|
-
equals: item.id
|
3931
|
-
} : undefined,
|
3795
|
+
id: item.id !== undefined ? item.id : undefined,
|
3932
3796
|
assetId: item.assetId !== undefined ? {
|
3933
3797
|
equals: item.assetId
|
3934
3798
|
} : undefined,
|
@@ -3961,9 +3825,7 @@ export const Action = {
|
|
3961
3825
|
}
|
3962
3826
|
: { connectOrCreate: props.order.asset.newsMentions.map((item) => ({
|
3963
3827
|
where: {
|
3964
|
-
id: item.id !== undefined ?
|
3965
|
-
equals: item.id
|
3966
|
-
} : undefined,
|
3828
|
+
id: item.id !== undefined ? item.id : undefined,
|
3967
3829
|
url: item.url !== undefined ? item.url : undefined,
|
3968
3830
|
assetId: item.assetId !== undefined ? {
|
3969
3831
|
equals: item.assetId
|
@@ -4020,9 +3882,7 @@ export const Action = {
|
|
4020
3882
|
}`;
|
4021
3883
|
const variables = props.map(prop => ({
|
4022
3884
|
where: {
|
4023
|
-
id: prop.id !== undefined ?
|
4024
|
-
equals: prop.id
|
4025
|
-
} : undefined,
|
3885
|
+
id: prop.id !== undefined ? prop.id : undefined,
|
4026
3886
|
sequence: prop.sequence !== undefined ? prop.sequence : undefined,
|
4027
3887
|
tradeId: prop.tradeId !== undefined ? {
|
4028
3888
|
equals: prop.tradeId
|
@@ -4210,9 +4070,7 @@ export const Action = {
|
|
4210
4070
|
orders: prop.trade.alpacaAccount.orders ? {
|
4211
4071
|
upsert: prop.trade.alpacaAccount.orders.map((item) => ({
|
4212
4072
|
where: {
|
4213
|
-
id: item.id !== undefined ?
|
4214
|
-
equals: item.id
|
4215
|
-
} : undefined,
|
4073
|
+
id: item.id !== undefined ? item.id : undefined,
|
4216
4074
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
4217
4075
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
4218
4076
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -4323,9 +4181,7 @@ export const Action = {
|
|
4323
4181
|
positions: prop.trade.alpacaAccount.positions ? {
|
4324
4182
|
upsert: prop.trade.alpacaAccount.positions.map((item) => ({
|
4325
4183
|
where: {
|
4326
|
-
id: item.id !== undefined ?
|
4327
|
-
equals: item.id
|
4328
|
-
} : undefined,
|
4184
|
+
id: item.id !== undefined ? item.id : undefined,
|
4329
4185
|
assetId: item.assetId !== undefined ? {
|
4330
4186
|
equals: item.assetId
|
4331
4187
|
} : undefined,
|
@@ -4397,9 +4253,7 @@ export const Action = {
|
|
4397
4253
|
alerts: prop.trade.alpacaAccount.alerts ? {
|
4398
4254
|
upsert: prop.trade.alpacaAccount.alerts.map((item) => ({
|
4399
4255
|
where: {
|
4400
|
-
id: item.id !== undefined ?
|
4401
|
-
equals: item.id
|
4402
|
-
} : undefined,
|
4256
|
+
id: item.id !== undefined ? item.id : undefined,
|
4403
4257
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4404
4258
|
equals: item.alpacaAccountId
|
4405
4259
|
} : undefined,
|
@@ -4444,9 +4298,7 @@ export const Action = {
|
|
4444
4298
|
}
|
4445
4299
|
: { connectOrCreate: {
|
4446
4300
|
where: {
|
4447
|
-
id: prop.trade.alpacaAccount.user.id !== undefined ?
|
4448
|
-
equals: prop.trade.alpacaAccount.user.id
|
4449
|
-
} : undefined,
|
4301
|
+
id: prop.trade.alpacaAccount.user.id !== undefined ? prop.trade.alpacaAccount.user.id : undefined,
|
4450
4302
|
email: prop.trade.alpacaAccount.user.email !== undefined ? prop.trade.alpacaAccount.user.email : undefined,
|
4451
4303
|
name: prop.trade.alpacaAccount.user.name !== undefined ? {
|
4452
4304
|
equals: prop.trade.alpacaAccount.user.name
|
@@ -4475,9 +4327,7 @@ export const Action = {
|
|
4475
4327
|
}
|
4476
4328
|
: { connectOrCreate: prop.trade.alpacaAccount.orders.map((item) => ({
|
4477
4329
|
where: {
|
4478
|
-
id: item.id !== undefined ?
|
4479
|
-
equals: item.id
|
4480
|
-
} : undefined,
|
4330
|
+
id: item.id !== undefined ? item.id : undefined,
|
4481
4331
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
4482
4332
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
4483
4333
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -4522,9 +4372,7 @@ export const Action = {
|
|
4522
4372
|
}
|
4523
4373
|
: { connectOrCreate: prop.trade.alpacaAccount.positions.map((item) => ({
|
4524
4374
|
where: {
|
4525
|
-
id: item.id !== undefined ?
|
4526
|
-
equals: item.id
|
4527
|
-
} : undefined,
|
4375
|
+
id: item.id !== undefined ? item.id : undefined,
|
4528
4376
|
assetId: item.assetId !== undefined ? {
|
4529
4377
|
equals: item.assetId
|
4530
4378
|
} : undefined,
|
@@ -4557,9 +4405,7 @@ export const Action = {
|
|
4557
4405
|
}
|
4558
4406
|
: { connectOrCreate: prop.trade.alpacaAccount.alerts.map((item) => ({
|
4559
4407
|
where: {
|
4560
|
-
id: item.id !== undefined ?
|
4561
|
-
equals: item.id
|
4562
|
-
} : undefined,
|
4408
|
+
id: item.id !== undefined ? item.id : undefined,
|
4563
4409
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4564
4410
|
equals: item.alpacaAccountId
|
4565
4411
|
} : undefined,
|
@@ -4759,9 +4605,7 @@ export const Action = {
|
|
4759
4605
|
orders: prop.trade.asset.orders ? {
|
4760
4606
|
upsert: prop.trade.asset.orders.map((item) => ({
|
4761
4607
|
where: {
|
4762
|
-
id: item.id !== undefined ?
|
4763
|
-
equals: item.id
|
4764
|
-
} : undefined,
|
4608
|
+
id: item.id !== undefined ? item.id : undefined,
|
4765
4609
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
4766
4610
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
4767
4611
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -4872,9 +4716,7 @@ export const Action = {
|
|
4872
4716
|
positions: prop.trade.asset.positions ? {
|
4873
4717
|
upsert: prop.trade.asset.positions.map((item) => ({
|
4874
4718
|
where: {
|
4875
|
-
id: item.id !== undefined ?
|
4876
|
-
equals: item.id
|
4877
|
-
} : undefined,
|
4719
|
+
id: item.id !== undefined ? item.id : undefined,
|
4878
4720
|
assetId: item.assetId !== undefined ? {
|
4879
4721
|
equals: item.assetId
|
4880
4722
|
} : undefined,
|
@@ -4946,9 +4788,7 @@ export const Action = {
|
|
4946
4788
|
newsMentions: prop.trade.asset.newsMentions ? {
|
4947
4789
|
upsert: prop.trade.asset.newsMentions.map((item) => ({
|
4948
4790
|
where: {
|
4949
|
-
id: item.id !== undefined ?
|
4950
|
-
equals: item.id
|
4951
|
-
} : undefined,
|
4791
|
+
id: item.id !== undefined ? item.id : undefined,
|
4952
4792
|
url: item.url !== undefined ? item.url : undefined,
|
4953
4793
|
assetId: item.assetId !== undefined ? {
|
4954
4794
|
equals: item.assetId
|
@@ -5047,9 +4887,7 @@ export const Action = {
|
|
5047
4887
|
}
|
5048
4888
|
: { connectOrCreate: prop.trade.asset.orders.map((item) => ({
|
5049
4889
|
where: {
|
5050
|
-
id: item.id !== undefined ?
|
5051
|
-
equals: item.id
|
5052
|
-
} : undefined,
|
4890
|
+
id: item.id !== undefined ? item.id : undefined,
|
5053
4891
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
5054
4892
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
5055
4893
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -5094,9 +4932,7 @@ export const Action = {
|
|
5094
4932
|
}
|
5095
4933
|
: { connectOrCreate: prop.trade.asset.positions.map((item) => ({
|
5096
4934
|
where: {
|
5097
|
-
id: item.id !== undefined ?
|
5098
|
-
equals: item.id
|
5099
|
-
} : undefined,
|
4935
|
+
id: item.id !== undefined ? item.id : undefined,
|
5100
4936
|
assetId: item.assetId !== undefined ? {
|
5101
4937
|
equals: item.assetId
|
5102
4938
|
} : undefined,
|
@@ -5129,9 +4965,7 @@ export const Action = {
|
|
5129
4965
|
}
|
5130
4966
|
: { connectOrCreate: prop.trade.asset.newsMentions.map((item) => ({
|
5131
4967
|
where: {
|
5132
|
-
id: item.id !== undefined ?
|
5133
|
-
equals: item.id
|
5134
|
-
} : undefined,
|
4968
|
+
id: item.id !== undefined ? item.id : undefined,
|
5135
4969
|
url: item.url !== undefined ? item.url : undefined,
|
5136
4970
|
assetId: item.assetId !== undefined ? {
|
5137
4971
|
equals: item.assetId
|
@@ -5172,9 +5006,7 @@ export const Action = {
|
|
5172
5006
|
}
|
5173
5007
|
: { connectOrCreate: {
|
5174
5008
|
where: {
|
5175
|
-
id: prop.trade.alpacaAccount.id !== undefined ?
|
5176
|
-
equals: prop.trade.alpacaAccount.id
|
5177
|
-
} : undefined,
|
5009
|
+
id: prop.trade.alpacaAccount.id !== undefined ? prop.trade.alpacaAccount.id : undefined,
|
5178
5010
|
userId: prop.trade.alpacaAccount.userId !== undefined ? {
|
5179
5011
|
equals: prop.trade.alpacaAccount.userId
|
5180
5012
|
} : undefined,
|
@@ -5197,9 +5029,7 @@ export const Action = {
|
|
5197
5029
|
}
|
5198
5030
|
: { connectOrCreate: {
|
5199
5031
|
where: {
|
5200
|
-
id: prop.trade.alpacaAccount.user.id !== undefined ?
|
5201
|
-
equals: prop.trade.alpacaAccount.user.id
|
5202
|
-
} : undefined,
|
5032
|
+
id: prop.trade.alpacaAccount.user.id !== undefined ? prop.trade.alpacaAccount.user.id : undefined,
|
5203
5033
|
email: prop.trade.alpacaAccount.user.email !== undefined ? prop.trade.alpacaAccount.user.email : undefined,
|
5204
5034
|
name: prop.trade.alpacaAccount.user.name !== undefined ? {
|
5205
5035
|
equals: prop.trade.alpacaAccount.user.name
|
@@ -5228,9 +5058,7 @@ export const Action = {
|
|
5228
5058
|
}
|
5229
5059
|
: { connectOrCreate: prop.trade.alpacaAccount.orders.map((item) => ({
|
5230
5060
|
where: {
|
5231
|
-
id: item.id !== undefined ?
|
5232
|
-
equals: item.id
|
5233
|
-
} : undefined,
|
5061
|
+
id: item.id !== undefined ? item.id : undefined,
|
5234
5062
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
5235
5063
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
5236
5064
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -5275,9 +5103,7 @@ export const Action = {
|
|
5275
5103
|
}
|
5276
5104
|
: { connectOrCreate: prop.trade.alpacaAccount.positions.map((item) => ({
|
5277
5105
|
where: {
|
5278
|
-
id: item.id !== undefined ?
|
5279
|
-
equals: item.id
|
5280
|
-
} : undefined,
|
5106
|
+
id: item.id !== undefined ? item.id : undefined,
|
5281
5107
|
assetId: item.assetId !== undefined ? {
|
5282
5108
|
equals: item.assetId
|
5283
5109
|
} : undefined,
|
@@ -5310,9 +5136,7 @@ export const Action = {
|
|
5310
5136
|
}
|
5311
5137
|
: { connectOrCreate: prop.trade.alpacaAccount.alerts.map((item) => ({
|
5312
5138
|
where: {
|
5313
|
-
id: item.id !== undefined ?
|
5314
|
-
equals: item.id
|
5315
|
-
} : undefined,
|
5139
|
+
id: item.id !== undefined ? item.id : undefined,
|
5316
5140
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5317
5141
|
equals: item.alpacaAccountId
|
5318
5142
|
} : undefined,
|
@@ -5335,9 +5159,7 @@ export const Action = {
|
|
5335
5159
|
}
|
5336
5160
|
: { connectOrCreate: {
|
5337
5161
|
where: {
|
5338
|
-
id: prop.trade.asset.id !== undefined ?
|
5339
|
-
equals: prop.trade.asset.id
|
5340
|
-
} : undefined,
|
5162
|
+
id: prop.trade.asset.id !== undefined ? prop.trade.asset.id : undefined,
|
5341
5163
|
symbol: prop.trade.asset.symbol !== undefined ? prop.trade.asset.symbol : undefined,
|
5342
5164
|
name: prop.trade.asset.name !== undefined ? prop.trade.asset.name : undefined,
|
5343
5165
|
},
|
@@ -5405,9 +5227,7 @@ export const Action = {
|
|
5405
5227
|
}
|
5406
5228
|
: { connectOrCreate: prop.trade.asset.orders.map((item) => ({
|
5407
5229
|
where: {
|
5408
|
-
id: item.id !== undefined ?
|
5409
|
-
equals: item.id
|
5410
|
-
} : undefined,
|
5230
|
+
id: item.id !== undefined ? item.id : undefined,
|
5411
5231
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
5412
5232
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
5413
5233
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -5452,9 +5272,7 @@ export const Action = {
|
|
5452
5272
|
}
|
5453
5273
|
: { connectOrCreate: prop.trade.asset.positions.map((item) => ({
|
5454
5274
|
where: {
|
5455
|
-
id: item.id !== undefined ?
|
5456
|
-
equals: item.id
|
5457
|
-
} : undefined,
|
5275
|
+
id: item.id !== undefined ? item.id : undefined,
|
5458
5276
|
assetId: item.assetId !== undefined ? {
|
5459
5277
|
equals: item.assetId
|
5460
5278
|
} : undefined,
|
@@ -5487,9 +5305,7 @@ export const Action = {
|
|
5487
5305
|
}
|
5488
5306
|
: { connectOrCreate: prop.trade.asset.newsMentions.map((item) => ({
|
5489
5307
|
where: {
|
5490
|
-
id: item.id !== undefined ?
|
5491
|
-
equals: item.id
|
5492
|
-
} : undefined,
|
5308
|
+
id: item.id !== undefined ? item.id : undefined,
|
5493
5309
|
url: item.url !== undefined ? item.url : undefined,
|
5494
5310
|
assetId: item.assetId !== undefined ? {
|
5495
5311
|
equals: item.assetId
|
@@ -5765,9 +5581,7 @@ export const Action = {
|
|
5765
5581
|
trades: prop.order.alpacaAccount.trades ? {
|
5766
5582
|
upsert: prop.order.alpacaAccount.trades.map((item) => ({
|
5767
5583
|
where: {
|
5768
|
-
id: item.id !== undefined ?
|
5769
|
-
equals: item.id
|
5770
|
-
} : undefined,
|
5584
|
+
id: item.id !== undefined ? item.id : undefined,
|
5771
5585
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5772
5586
|
equals: item.alpacaAccountId
|
5773
5587
|
} : undefined,
|
@@ -5831,9 +5645,7 @@ export const Action = {
|
|
5831
5645
|
positions: prop.order.alpacaAccount.positions ? {
|
5832
5646
|
upsert: prop.order.alpacaAccount.positions.map((item) => ({
|
5833
5647
|
where: {
|
5834
|
-
id: item.id !== undefined ?
|
5835
|
-
equals: item.id
|
5836
|
-
} : undefined,
|
5648
|
+
id: item.id !== undefined ? item.id : undefined,
|
5837
5649
|
assetId: item.assetId !== undefined ? {
|
5838
5650
|
equals: item.assetId
|
5839
5651
|
} : undefined,
|
@@ -5905,9 +5717,7 @@ export const Action = {
|
|
5905
5717
|
alerts: prop.order.alpacaAccount.alerts ? {
|
5906
5718
|
upsert: prop.order.alpacaAccount.alerts.map((item) => ({
|
5907
5719
|
where: {
|
5908
|
-
id: item.id !== undefined ?
|
5909
|
-
equals: item.id
|
5910
|
-
} : undefined,
|
5720
|
+
id: item.id !== undefined ? item.id : undefined,
|
5911
5721
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5912
5722
|
equals: item.alpacaAccountId
|
5913
5723
|
} : undefined,
|
@@ -5952,9 +5762,7 @@ export const Action = {
|
|
5952
5762
|
}
|
5953
5763
|
: { connectOrCreate: {
|
5954
5764
|
where: {
|
5955
|
-
id: prop.order.alpacaAccount.user.id !== undefined ?
|
5956
|
-
equals: prop.order.alpacaAccount.user.id
|
5957
|
-
} : undefined,
|
5765
|
+
id: prop.order.alpacaAccount.user.id !== undefined ? prop.order.alpacaAccount.user.id : undefined,
|
5958
5766
|
email: prop.order.alpacaAccount.user.email !== undefined ? prop.order.alpacaAccount.user.email : undefined,
|
5959
5767
|
name: prop.order.alpacaAccount.user.name !== undefined ? {
|
5960
5768
|
equals: prop.order.alpacaAccount.user.name
|
@@ -5983,9 +5791,7 @@ export const Action = {
|
|
5983
5791
|
}
|
5984
5792
|
: { connectOrCreate: prop.order.alpacaAccount.trades.map((item) => ({
|
5985
5793
|
where: {
|
5986
|
-
id: item.id !== undefined ?
|
5987
|
-
equals: item.id
|
5988
|
-
} : undefined,
|
5794
|
+
id: item.id !== undefined ? item.id : undefined,
|
5989
5795
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5990
5796
|
equals: item.alpacaAccountId
|
5991
5797
|
} : undefined,
|
@@ -6016,9 +5822,7 @@ export const Action = {
|
|
6016
5822
|
}
|
6017
5823
|
: { connectOrCreate: prop.order.alpacaAccount.positions.map((item) => ({
|
6018
5824
|
where: {
|
6019
|
-
id: item.id !== undefined ?
|
6020
|
-
equals: item.id
|
6021
|
-
} : undefined,
|
5825
|
+
id: item.id !== undefined ? item.id : undefined,
|
6022
5826
|
assetId: item.assetId !== undefined ? {
|
6023
5827
|
equals: item.assetId
|
6024
5828
|
} : undefined,
|
@@ -6051,9 +5855,7 @@ export const Action = {
|
|
6051
5855
|
}
|
6052
5856
|
: { connectOrCreate: prop.order.alpacaAccount.alerts.map((item) => ({
|
6053
5857
|
where: {
|
6054
|
-
id: item.id !== undefined ?
|
6055
|
-
equals: item.id
|
6056
|
-
} : undefined,
|
5858
|
+
id: item.id !== undefined ? item.id : undefined,
|
6057
5859
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6058
5860
|
equals: item.alpacaAccountId
|
6059
5861
|
} : undefined,
|
@@ -6253,9 +6055,7 @@ export const Action = {
|
|
6253
6055
|
trades: prop.order.asset.trades ? {
|
6254
6056
|
upsert: prop.order.asset.trades.map((item) => ({
|
6255
6057
|
where: {
|
6256
|
-
id: item.id !== undefined ?
|
6257
|
-
equals: item.id
|
6258
|
-
} : undefined,
|
6058
|
+
id: item.id !== undefined ? item.id : undefined,
|
6259
6059
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6260
6060
|
equals: item.alpacaAccountId
|
6261
6061
|
} : undefined,
|
@@ -6319,9 +6119,7 @@ export const Action = {
|
|
6319
6119
|
positions: prop.order.asset.positions ? {
|
6320
6120
|
upsert: prop.order.asset.positions.map((item) => ({
|
6321
6121
|
where: {
|
6322
|
-
id: item.id !== undefined ?
|
6323
|
-
equals: item.id
|
6324
|
-
} : undefined,
|
6122
|
+
id: item.id !== undefined ? item.id : undefined,
|
6325
6123
|
assetId: item.assetId !== undefined ? {
|
6326
6124
|
equals: item.assetId
|
6327
6125
|
} : undefined,
|
@@ -6393,9 +6191,7 @@ export const Action = {
|
|
6393
6191
|
newsMentions: prop.order.asset.newsMentions ? {
|
6394
6192
|
upsert: prop.order.asset.newsMentions.map((item) => ({
|
6395
6193
|
where: {
|
6396
|
-
id: item.id !== undefined ?
|
6397
|
-
equals: item.id
|
6398
|
-
} : undefined,
|
6194
|
+
id: item.id !== undefined ? item.id : undefined,
|
6399
6195
|
url: item.url !== undefined ? item.url : undefined,
|
6400
6196
|
assetId: item.assetId !== undefined ? {
|
6401
6197
|
equals: item.assetId
|
@@ -6494,9 +6290,7 @@ export const Action = {
|
|
6494
6290
|
}
|
6495
6291
|
: { connectOrCreate: prop.order.asset.trades.map((item) => ({
|
6496
6292
|
where: {
|
6497
|
-
id: item.id !== undefined ?
|
6498
|
-
equals: item.id
|
6499
|
-
} : undefined,
|
6293
|
+
id: item.id !== undefined ? item.id : undefined,
|
6500
6294
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6501
6295
|
equals: item.alpacaAccountId
|
6502
6296
|
} : undefined,
|
@@ -6527,9 +6321,7 @@ export const Action = {
|
|
6527
6321
|
}
|
6528
6322
|
: { connectOrCreate: prop.order.asset.positions.map((item) => ({
|
6529
6323
|
where: {
|
6530
|
-
id: item.id !== undefined ?
|
6531
|
-
equals: item.id
|
6532
|
-
} : undefined,
|
6324
|
+
id: item.id !== undefined ? item.id : undefined,
|
6533
6325
|
assetId: item.assetId !== undefined ? {
|
6534
6326
|
equals: item.assetId
|
6535
6327
|
} : undefined,
|
@@ -6562,9 +6354,7 @@ export const Action = {
|
|
6562
6354
|
}
|
6563
6355
|
: { connectOrCreate: prop.order.asset.newsMentions.map((item) => ({
|
6564
6356
|
where: {
|
6565
|
-
id: item.id !== undefined ?
|
6566
|
-
equals: item.id
|
6567
|
-
} : undefined,
|
6357
|
+
id: item.id !== undefined ? item.id : undefined,
|
6568
6358
|
url: item.url !== undefined ? item.url : undefined,
|
6569
6359
|
assetId: item.assetId !== undefined ? {
|
6570
6360
|
equals: item.assetId
|
@@ -6616,9 +6406,7 @@ export const Action = {
|
|
6616
6406
|
}
|
6617
6407
|
: { connectOrCreate: {
|
6618
6408
|
where: {
|
6619
|
-
id: prop.order.stopLoss.id !== undefined ?
|
6620
|
-
equals: prop.order.stopLoss.id
|
6621
|
-
} : undefined,
|
6409
|
+
id: prop.order.stopLoss.id !== undefined ? prop.order.stopLoss.id : undefined,
|
6622
6410
|
orderId: prop.order.stopLoss.orderId !== undefined ? prop.order.stopLoss.orderId : undefined,
|
6623
6411
|
},
|
6624
6412
|
create: {
|
@@ -6635,9 +6423,7 @@ export const Action = {
|
|
6635
6423
|
}
|
6636
6424
|
: { connectOrCreate: {
|
6637
6425
|
where: {
|
6638
|
-
id: prop.order.takeProfit.id !== undefined ?
|
6639
|
-
equals: prop.order.takeProfit.id
|
6640
|
-
} : undefined,
|
6426
|
+
id: prop.order.takeProfit.id !== undefined ? prop.order.takeProfit.id : undefined,
|
6641
6427
|
orderId: prop.order.takeProfit.orderId !== undefined ? prop.order.takeProfit.orderId : undefined,
|
6642
6428
|
},
|
6643
6429
|
create: {
|
@@ -6654,9 +6440,7 @@ export const Action = {
|
|
6654
6440
|
}
|
6655
6441
|
: { connectOrCreate: {
|
6656
6442
|
where: {
|
6657
|
-
id: prop.order.alpacaAccount.id !== undefined ?
|
6658
|
-
equals: prop.order.alpacaAccount.id
|
6659
|
-
} : undefined,
|
6443
|
+
id: prop.order.alpacaAccount.id !== undefined ? prop.order.alpacaAccount.id : undefined,
|
6660
6444
|
userId: prop.order.alpacaAccount.userId !== undefined ? {
|
6661
6445
|
equals: prop.order.alpacaAccount.userId
|
6662
6446
|
} : undefined,
|
@@ -6679,9 +6463,7 @@ export const Action = {
|
|
6679
6463
|
}
|
6680
6464
|
: { connectOrCreate: {
|
6681
6465
|
where: {
|
6682
|
-
id: prop.order.alpacaAccount.user.id !== undefined ?
|
6683
|
-
equals: prop.order.alpacaAccount.user.id
|
6684
|
-
} : undefined,
|
6466
|
+
id: prop.order.alpacaAccount.user.id !== undefined ? prop.order.alpacaAccount.user.id : undefined,
|
6685
6467
|
email: prop.order.alpacaAccount.user.email !== undefined ? prop.order.alpacaAccount.user.email : undefined,
|
6686
6468
|
name: prop.order.alpacaAccount.user.name !== undefined ? {
|
6687
6469
|
equals: prop.order.alpacaAccount.user.name
|
@@ -6710,9 +6492,7 @@ export const Action = {
|
|
6710
6492
|
}
|
6711
6493
|
: { connectOrCreate: prop.order.alpacaAccount.trades.map((item) => ({
|
6712
6494
|
where: {
|
6713
|
-
id: item.id !== undefined ?
|
6714
|
-
equals: item.id
|
6715
|
-
} : undefined,
|
6495
|
+
id: item.id !== undefined ? item.id : undefined,
|
6716
6496
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6717
6497
|
equals: item.alpacaAccountId
|
6718
6498
|
} : undefined,
|
@@ -6743,9 +6523,7 @@ export const Action = {
|
|
6743
6523
|
}
|
6744
6524
|
: { connectOrCreate: prop.order.alpacaAccount.positions.map((item) => ({
|
6745
6525
|
where: {
|
6746
|
-
id: item.id !== undefined ?
|
6747
|
-
equals: item.id
|
6748
|
-
} : undefined,
|
6526
|
+
id: item.id !== undefined ? item.id : undefined,
|
6749
6527
|
assetId: item.assetId !== undefined ? {
|
6750
6528
|
equals: item.assetId
|
6751
6529
|
} : undefined,
|
@@ -6778,9 +6556,7 @@ export const Action = {
|
|
6778
6556
|
}
|
6779
6557
|
: { connectOrCreate: prop.order.alpacaAccount.alerts.map((item) => ({
|
6780
6558
|
where: {
|
6781
|
-
id: item.id !== undefined ?
|
6782
|
-
equals: item.id
|
6783
|
-
} : undefined,
|
6559
|
+
id: item.id !== undefined ? item.id : undefined,
|
6784
6560
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6785
6561
|
equals: item.alpacaAccountId
|
6786
6562
|
} : undefined,
|
@@ -6803,9 +6579,7 @@ export const Action = {
|
|
6803
6579
|
}
|
6804
6580
|
: { connectOrCreate: {
|
6805
6581
|
where: {
|
6806
|
-
id: prop.order.asset.id !== undefined ?
|
6807
|
-
equals: prop.order.asset.id
|
6808
|
-
} : undefined,
|
6582
|
+
id: prop.order.asset.id !== undefined ? prop.order.asset.id : undefined,
|
6809
6583
|
symbol: prop.order.asset.symbol !== undefined ? prop.order.asset.symbol : undefined,
|
6810
6584
|
name: prop.order.asset.name !== undefined ? prop.order.asset.name : undefined,
|
6811
6585
|
},
|
@@ -6873,9 +6647,7 @@ export const Action = {
|
|
6873
6647
|
}
|
6874
6648
|
: { connectOrCreate: prop.order.asset.trades.map((item) => ({
|
6875
6649
|
where: {
|
6876
|
-
id: item.id !== undefined ?
|
6877
|
-
equals: item.id
|
6878
|
-
} : undefined,
|
6650
|
+
id: item.id !== undefined ? item.id : undefined,
|
6879
6651
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6880
6652
|
equals: item.alpacaAccountId
|
6881
6653
|
} : undefined,
|
@@ -6906,9 +6678,7 @@ export const Action = {
|
|
6906
6678
|
}
|
6907
6679
|
: { connectOrCreate: prop.order.asset.positions.map((item) => ({
|
6908
6680
|
where: {
|
6909
|
-
id: item.id !== undefined ?
|
6910
|
-
equals: item.id
|
6911
|
-
} : undefined,
|
6681
|
+
id: item.id !== undefined ? item.id : undefined,
|
6912
6682
|
assetId: item.assetId !== undefined ? {
|
6913
6683
|
equals: item.assetId
|
6914
6684
|
} : undefined,
|
@@ -6941,9 +6711,7 @@ export const Action = {
|
|
6941
6711
|
}
|
6942
6712
|
: { connectOrCreate: prop.order.asset.newsMentions.map((item) => ({
|
6943
6713
|
where: {
|
6944
|
-
id: item.id !== undefined ?
|
6945
|
-
equals: item.id
|
6946
|
-
} : undefined,
|
6714
|
+
id: item.id !== undefined ? item.id : undefined,
|
6947
6715
|
url: item.url !== undefined ? item.url : undefined,
|
6948
6716
|
assetId: item.assetId !== undefined ? {
|
6949
6717
|
equals: item.assetId
|
@@ -7035,9 +6803,7 @@ export const Action = {
|
|
7035
6803
|
}`;
|
7036
6804
|
const variables = {
|
7037
6805
|
where: {
|
7038
|
-
id: props.id !== undefined ?
|
7039
|
-
equals: props.id
|
7040
|
-
} : undefined,
|
6806
|
+
id: props.id !== undefined ? props.id : undefined,
|
7041
6807
|
sequence: props.sequence !== undefined ? props.sequence : undefined,
|
7042
6808
|
tradeId: props.tradeId !== undefined ? {
|
7043
6809
|
equals: props.tradeId
|