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/Order.mjs
CHANGED
@@ -226,9 +226,7 @@ export const Order = {
|
|
226
226
|
}
|
227
227
|
: { connectOrCreate: {
|
228
228
|
where: {
|
229
|
-
id: props.stopLoss.id !== undefined ?
|
230
|
-
equals: props.stopLoss.id
|
231
|
-
} : undefined,
|
229
|
+
id: props.stopLoss.id !== undefined ? props.stopLoss.id : undefined,
|
232
230
|
orderId: props.stopLoss.orderId !== undefined ? props.stopLoss.orderId : undefined,
|
233
231
|
},
|
234
232
|
create: {
|
@@ -245,9 +243,7 @@ export const Order = {
|
|
245
243
|
}
|
246
244
|
: { connectOrCreate: {
|
247
245
|
where: {
|
248
|
-
id: props.takeProfit.id !== undefined ?
|
249
|
-
equals: props.takeProfit.id
|
250
|
-
} : undefined,
|
246
|
+
id: props.takeProfit.id !== undefined ? props.takeProfit.id : undefined,
|
251
247
|
orderId: props.takeProfit.orderId !== undefined ? props.takeProfit.orderId : undefined,
|
252
248
|
},
|
253
249
|
create: {
|
@@ -264,9 +260,7 @@ export const Order = {
|
|
264
260
|
}
|
265
261
|
: { connectOrCreate: {
|
266
262
|
where: {
|
267
|
-
id: props.alpacaAccount.id !== undefined ?
|
268
|
-
equals: props.alpacaAccount.id
|
269
|
-
} : undefined,
|
263
|
+
id: props.alpacaAccount.id !== undefined ? props.alpacaAccount.id : undefined,
|
270
264
|
userId: props.alpacaAccount.userId !== undefined ? {
|
271
265
|
equals: props.alpacaAccount.userId
|
272
266
|
} : undefined,
|
@@ -289,9 +283,7 @@ export const Order = {
|
|
289
283
|
}
|
290
284
|
: { connectOrCreate: {
|
291
285
|
where: {
|
292
|
-
id: props.alpacaAccount.user.id !== undefined ?
|
293
|
-
equals: props.alpacaAccount.user.id
|
294
|
-
} : undefined,
|
286
|
+
id: props.alpacaAccount.user.id !== undefined ? props.alpacaAccount.user.id : undefined,
|
295
287
|
email: props.alpacaAccount.user.email !== undefined ? props.alpacaAccount.user.email : undefined,
|
296
288
|
name: props.alpacaAccount.user.name !== undefined ? {
|
297
289
|
equals: props.alpacaAccount.user.name
|
@@ -317,9 +309,7 @@ export const Order = {
|
|
317
309
|
}
|
318
310
|
: { connectOrCreate: {
|
319
311
|
where: {
|
320
|
-
id: props.alpacaAccount.user.customer.id !== undefined ?
|
321
|
-
equals: props.alpacaAccount.user.customer.id
|
322
|
-
} : undefined,
|
312
|
+
id: props.alpacaAccount.user.customer.id !== undefined ? props.alpacaAccount.user.customer.id : undefined,
|
323
313
|
stripeCustomerId: props.alpacaAccount.user.customer.stripeCustomerId !== undefined ? props.alpacaAccount.user.customer.stripeCustomerId : undefined,
|
324
314
|
stripeSubscriptionId: props.alpacaAccount.user.customer.stripeSubscriptionId !== undefined ? props.alpacaAccount.user.customer.stripeSubscriptionId : undefined,
|
325
315
|
authUserId: props.alpacaAccount.user.customer.authUserId !== undefined ? {
|
@@ -351,9 +341,7 @@ export const Order = {
|
|
351
341
|
}
|
352
342
|
: { connectOrCreate: props.alpacaAccount.user.accounts.map((item) => ({
|
353
343
|
where: {
|
354
|
-
id: item.id !== undefined ?
|
355
|
-
equals: item.id
|
356
|
-
} : undefined,
|
344
|
+
id: item.id !== undefined ? item.id : undefined,
|
357
345
|
userId: item.userId !== undefined ? {
|
358
346
|
equals: item.userId
|
359
347
|
} : undefined,
|
@@ -383,9 +371,7 @@ export const Order = {
|
|
383
371
|
}
|
384
372
|
: { connectOrCreate: props.alpacaAccount.user.sessions.map((item) => ({
|
385
373
|
where: {
|
386
|
-
id: item.id !== undefined ?
|
387
|
-
equals: item.id
|
388
|
-
} : undefined,
|
374
|
+
id: item.id !== undefined ? item.id : undefined,
|
389
375
|
userId: item.userId !== undefined ? {
|
390
376
|
equals: item.userId
|
391
377
|
} : undefined,
|
@@ -404,9 +390,7 @@ export const Order = {
|
|
404
390
|
}
|
405
391
|
: { connectOrCreate: props.alpacaAccount.user.authenticators.map((item) => ({
|
406
392
|
where: {
|
407
|
-
id: item.id !== undefined ?
|
408
|
-
equals: item.id
|
409
|
-
} : undefined,
|
393
|
+
id: item.id !== undefined ? item.id : undefined,
|
410
394
|
userId: item.userId !== undefined ? {
|
411
395
|
equals: item.userId
|
412
396
|
} : undefined,
|
@@ -429,9 +413,7 @@ export const Order = {
|
|
429
413
|
}
|
430
414
|
: { connectOrCreate: props.alpacaAccount.trades.map((item) => ({
|
431
415
|
where: {
|
432
|
-
id: item.id !== undefined ?
|
433
|
-
equals: item.id
|
434
|
-
} : undefined,
|
416
|
+
id: item.id !== undefined ? item.id : undefined,
|
435
417
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
436
418
|
equals: item.alpacaAccountId
|
437
419
|
} : undefined,
|
@@ -459,9 +441,7 @@ export const Order = {
|
|
459
441
|
}
|
460
442
|
: { connectOrCreate: {
|
461
443
|
where: {
|
462
|
-
id: item.asset.id !== undefined ?
|
463
|
-
equals: item.asset.id
|
464
|
-
} : undefined,
|
444
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
465
445
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
466
446
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
467
447
|
},
|
@@ -532,9 +512,7 @@ export const Order = {
|
|
532
512
|
}
|
533
513
|
: { connectOrCreate: item.actions.map((item) => ({
|
534
514
|
where: {
|
535
|
-
id: item.id !== undefined ?
|
536
|
-
equals: item.id
|
537
|
-
} : undefined,
|
515
|
+
id: item.id !== undefined ? item.id : undefined,
|
538
516
|
tradeId: item.tradeId !== undefined ? {
|
539
517
|
equals: item.tradeId
|
540
518
|
} : undefined,
|
@@ -559,9 +537,7 @@ export const Order = {
|
|
559
537
|
}
|
560
538
|
: { connectOrCreate: props.alpacaAccount.positions.map((item) => ({
|
561
539
|
where: {
|
562
|
-
id: item.id !== undefined ?
|
563
|
-
equals: item.id
|
564
|
-
} : undefined,
|
540
|
+
id: item.id !== undefined ? item.id : undefined,
|
565
541
|
assetId: item.assetId !== undefined ? {
|
566
542
|
equals: item.assetId
|
567
543
|
} : undefined,
|
@@ -591,9 +567,7 @@ export const Order = {
|
|
591
567
|
}
|
592
568
|
: { connectOrCreate: {
|
593
569
|
where: {
|
594
|
-
id: item.asset.id !== undefined ?
|
595
|
-
equals: item.asset.id
|
596
|
-
} : undefined,
|
570
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
597
571
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
598
572
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
599
573
|
},
|
@@ -667,9 +641,7 @@ export const Order = {
|
|
667
641
|
}
|
668
642
|
: { connectOrCreate: props.alpacaAccount.alerts.map((item) => ({
|
669
643
|
where: {
|
670
|
-
id: item.id !== undefined ?
|
671
|
-
equals: item.id
|
672
|
-
} : undefined,
|
644
|
+
id: item.id !== undefined ? item.id : undefined,
|
673
645
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
674
646
|
equals: item.alpacaAccountId
|
675
647
|
} : undefined,
|
@@ -692,9 +664,7 @@ export const Order = {
|
|
692
664
|
}
|
693
665
|
: { connectOrCreate: {
|
694
666
|
where: {
|
695
|
-
id: props.action.id !== undefined ?
|
696
|
-
equals: props.action.id
|
697
|
-
} : undefined,
|
667
|
+
id: props.action.id !== undefined ? props.action.id : undefined,
|
698
668
|
tradeId: props.action.tradeId !== undefined ? {
|
699
669
|
equals: props.action.tradeId
|
700
670
|
} : undefined,
|
@@ -713,9 +683,7 @@ export const Order = {
|
|
713
683
|
}
|
714
684
|
: { connectOrCreate: {
|
715
685
|
where: {
|
716
|
-
id: props.action.trade.id !== undefined ?
|
717
|
-
equals: props.action.trade.id
|
718
|
-
} : undefined,
|
686
|
+
id: props.action.trade.id !== undefined ? props.action.trade.id : undefined,
|
719
687
|
alpacaAccountId: props.action.trade.alpacaAccountId !== undefined ? {
|
720
688
|
equals: props.action.trade.alpacaAccountId
|
721
689
|
} : undefined,
|
@@ -743,9 +711,7 @@ export const Order = {
|
|
743
711
|
}
|
744
712
|
: { connectOrCreate: {
|
745
713
|
where: {
|
746
|
-
id: props.action.trade.alpacaAccount.id !== undefined ?
|
747
|
-
equals: props.action.trade.alpacaAccount.id
|
748
|
-
} : undefined,
|
714
|
+
id: props.action.trade.alpacaAccount.id !== undefined ? props.action.trade.alpacaAccount.id : undefined,
|
749
715
|
userId: props.action.trade.alpacaAccount.userId !== undefined ? {
|
750
716
|
equals: props.action.trade.alpacaAccount.userId
|
751
717
|
} : undefined,
|
@@ -771,9 +737,7 @@ export const Order = {
|
|
771
737
|
}
|
772
738
|
: { connectOrCreate: {
|
773
739
|
where: {
|
774
|
-
id: props.action.trade.asset.id !== undefined ?
|
775
|
-
equals: props.action.trade.asset.id
|
776
|
-
} : undefined,
|
740
|
+
id: props.action.trade.asset.id !== undefined ? props.action.trade.asset.id : undefined,
|
777
741
|
symbol: props.action.trade.asset.symbol !== undefined ? props.action.trade.asset.symbol : undefined,
|
778
742
|
name: props.action.trade.asset.name !== undefined ? props.action.trade.asset.name : undefined,
|
779
743
|
},
|
@@ -850,9 +814,7 @@ export const Order = {
|
|
850
814
|
}
|
851
815
|
: { connectOrCreate: {
|
852
816
|
where: {
|
853
|
-
id: props.asset.id !== undefined ?
|
854
|
-
equals: props.asset.id
|
855
|
-
} : undefined,
|
817
|
+
id: props.asset.id !== undefined ? props.asset.id : undefined,
|
856
818
|
symbol: props.asset.symbol !== undefined ? props.asset.symbol : undefined,
|
857
819
|
name: props.asset.name !== undefined ? props.asset.name : undefined,
|
858
820
|
},
|
@@ -920,9 +882,7 @@ export const Order = {
|
|
920
882
|
}
|
921
883
|
: { connectOrCreate: props.asset.trades.map((item) => ({
|
922
884
|
where: {
|
923
|
-
id: item.id !== undefined ?
|
924
|
-
equals: item.id
|
925
|
-
} : undefined,
|
885
|
+
id: item.id !== undefined ? item.id : undefined,
|
926
886
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
927
887
|
equals: item.alpacaAccountId
|
928
888
|
} : undefined,
|
@@ -950,9 +910,7 @@ export const Order = {
|
|
950
910
|
}
|
951
911
|
: { connectOrCreate: {
|
952
912
|
where: {
|
953
|
-
id: item.alpacaAccount.id !== undefined ?
|
954
|
-
equals: item.alpacaAccount.id
|
955
|
-
} : undefined,
|
913
|
+
id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
|
956
914
|
userId: item.alpacaAccount.userId !== undefined ? {
|
957
915
|
equals: item.alpacaAccount.userId
|
958
916
|
} : undefined,
|
@@ -978,9 +936,7 @@ export const Order = {
|
|
978
936
|
}
|
979
937
|
: { connectOrCreate: item.actions.map((item) => ({
|
980
938
|
where: {
|
981
|
-
id: item.id !== undefined ?
|
982
|
-
equals: item.id
|
983
|
-
} : undefined,
|
939
|
+
id: item.id !== undefined ? item.id : undefined,
|
984
940
|
tradeId: item.tradeId !== undefined ? {
|
985
941
|
equals: item.tradeId
|
986
942
|
} : undefined,
|
@@ -1005,9 +961,7 @@ export const Order = {
|
|
1005
961
|
}
|
1006
962
|
: { connectOrCreate: props.asset.positions.map((item) => ({
|
1007
963
|
where: {
|
1008
|
-
id: item.id !== undefined ?
|
1009
|
-
equals: item.id
|
1010
|
-
} : undefined,
|
964
|
+
id: item.id !== undefined ? item.id : undefined,
|
1011
965
|
assetId: item.assetId !== undefined ? {
|
1012
966
|
equals: item.assetId
|
1013
967
|
} : undefined,
|
@@ -1037,9 +991,7 @@ export const Order = {
|
|
1037
991
|
}
|
1038
992
|
: { connectOrCreate: {
|
1039
993
|
where: {
|
1040
|
-
id: item.alpacaAccount.id !== undefined ?
|
1041
|
-
equals: item.alpacaAccount.id
|
1042
|
-
} : undefined,
|
994
|
+
id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
|
1043
995
|
userId: item.alpacaAccount.userId !== undefined ? {
|
1044
996
|
equals: item.alpacaAccount.userId
|
1045
997
|
} : undefined,
|
@@ -1068,9 +1020,7 @@ export const Order = {
|
|
1068
1020
|
}
|
1069
1021
|
: { connectOrCreate: props.asset.newsMentions.map((item) => ({
|
1070
1022
|
where: {
|
1071
|
-
id: item.id !== undefined ?
|
1072
|
-
equals: item.id
|
1073
|
-
} : undefined,
|
1023
|
+
id: item.id !== undefined ? item.id : undefined,
|
1074
1024
|
url: item.url !== undefined ? item.url : undefined,
|
1075
1025
|
assetId: item.assetId !== undefined ? {
|
1076
1026
|
equals: item.assetId
|
@@ -1092,9 +1042,7 @@ export const Order = {
|
|
1092
1042
|
}
|
1093
1043
|
: { connectOrCreate: {
|
1094
1044
|
where: {
|
1095
|
-
id: item.news.id !== undefined ?
|
1096
|
-
equals: item.news.id
|
1097
|
-
} : undefined,
|
1045
|
+
id: item.news.id !== undefined ? item.news.id : undefined,
|
1098
1046
|
url: item.news.url !== undefined ? item.news.url : undefined,
|
1099
1047
|
title: item.news.title !== undefined ? {
|
1100
1048
|
equals: item.news.title
|
@@ -1216,9 +1164,7 @@ export const Order = {
|
|
1216
1164
|
}`;
|
1217
1165
|
const variables = {
|
1218
1166
|
where: {
|
1219
|
-
id: props.id !== undefined ?
|
1220
|
-
equals: props.id
|
1221
|
-
} : undefined,
|
1167
|
+
id: props.id !== undefined ? props.id : undefined,
|
1222
1168
|
clientOrderId: props.clientOrderId !== undefined ? props.clientOrderId : undefined,
|
1223
1169
|
actionId: props.actionId !== undefined ? props.actionId : undefined,
|
1224
1170
|
stopLossId: props.stopLossId !== undefined ? props.stopLossId : undefined,
|
@@ -1520,9 +1466,7 @@ export const Order = {
|
|
1520
1466
|
accounts: props.alpacaAccount.user.accounts ? {
|
1521
1467
|
upsert: props.alpacaAccount.user.accounts.map((item) => ({
|
1522
1468
|
where: {
|
1523
|
-
id: item.id !== undefined ?
|
1524
|
-
equals: item.id
|
1525
|
-
} : undefined,
|
1469
|
+
id: item.id !== undefined ? item.id : undefined,
|
1526
1470
|
userId: item.userId !== undefined ? {
|
1527
1471
|
equals: item.userId
|
1528
1472
|
} : undefined,
|
@@ -1582,9 +1526,7 @@ export const Order = {
|
|
1582
1526
|
sessions: props.alpacaAccount.user.sessions ? {
|
1583
1527
|
upsert: props.alpacaAccount.user.sessions.map((item) => ({
|
1584
1528
|
where: {
|
1585
|
-
id: item.id !== undefined ?
|
1586
|
-
equals: item.id
|
1587
|
-
} : undefined,
|
1529
|
+
id: item.id !== undefined ? item.id : undefined,
|
1588
1530
|
userId: item.userId !== undefined ? {
|
1589
1531
|
equals: item.userId
|
1590
1532
|
} : undefined,
|
@@ -1609,9 +1551,7 @@ export const Order = {
|
|
1609
1551
|
authenticators: props.alpacaAccount.user.authenticators ? {
|
1610
1552
|
upsert: props.alpacaAccount.user.authenticators.map((item) => ({
|
1611
1553
|
where: {
|
1612
|
-
id: item.id !== undefined ?
|
1613
|
-
equals: item.id
|
1614
|
-
} : undefined,
|
1554
|
+
id: item.id !== undefined ? item.id : undefined,
|
1615
1555
|
userId: item.userId !== undefined ? {
|
1616
1556
|
equals: item.userId
|
1617
1557
|
} : undefined,
|
@@ -1658,9 +1598,7 @@ export const Order = {
|
|
1658
1598
|
}
|
1659
1599
|
: { connectOrCreate: {
|
1660
1600
|
where: {
|
1661
|
-
id: props.alpacaAccount.user.customer.id !== undefined ?
|
1662
|
-
equals: props.alpacaAccount.user.customer.id
|
1663
|
-
} : undefined,
|
1601
|
+
id: props.alpacaAccount.user.customer.id !== undefined ? props.alpacaAccount.user.customer.id : undefined,
|
1664
1602
|
stripeCustomerId: props.alpacaAccount.user.customer.stripeCustomerId !== undefined ? props.alpacaAccount.user.customer.stripeCustomerId : undefined,
|
1665
1603
|
stripeSubscriptionId: props.alpacaAccount.user.customer.stripeSubscriptionId !== undefined ? props.alpacaAccount.user.customer.stripeSubscriptionId : undefined,
|
1666
1604
|
authUserId: props.alpacaAccount.user.customer.authUserId !== undefined ? {
|
@@ -1692,9 +1630,7 @@ export const Order = {
|
|
1692
1630
|
}
|
1693
1631
|
: { connectOrCreate: props.alpacaAccount.user.accounts.map((item) => ({
|
1694
1632
|
where: {
|
1695
|
-
id: item.id !== undefined ?
|
1696
|
-
equals: item.id
|
1697
|
-
} : undefined,
|
1633
|
+
id: item.id !== undefined ? item.id : undefined,
|
1698
1634
|
userId: item.userId !== undefined ? {
|
1699
1635
|
equals: item.userId
|
1700
1636
|
} : undefined,
|
@@ -1724,9 +1660,7 @@ export const Order = {
|
|
1724
1660
|
}
|
1725
1661
|
: { connectOrCreate: props.alpacaAccount.user.sessions.map((item) => ({
|
1726
1662
|
where: {
|
1727
|
-
id: item.id !== undefined ?
|
1728
|
-
equals: item.id
|
1729
|
-
} : undefined,
|
1663
|
+
id: item.id !== undefined ? item.id : undefined,
|
1730
1664
|
userId: item.userId !== undefined ? {
|
1731
1665
|
equals: item.userId
|
1732
1666
|
} : undefined,
|
@@ -1745,9 +1679,7 @@ export const Order = {
|
|
1745
1679
|
}
|
1746
1680
|
: { connectOrCreate: props.alpacaAccount.user.authenticators.map((item) => ({
|
1747
1681
|
where: {
|
1748
|
-
id: item.id !== undefined ?
|
1749
|
-
equals: item.id
|
1750
|
-
} : undefined,
|
1682
|
+
id: item.id !== undefined ? item.id : undefined,
|
1751
1683
|
userId: item.userId !== undefined ? {
|
1752
1684
|
equals: item.userId
|
1753
1685
|
} : undefined,
|
@@ -1765,9 +1697,7 @@ export const Order = {
|
|
1765
1697
|
trades: props.alpacaAccount.trades ? {
|
1766
1698
|
upsert: props.alpacaAccount.trades.map((item) => ({
|
1767
1699
|
where: {
|
1768
|
-
id: item.id !== undefined ?
|
1769
|
-
equals: item.id
|
1770
|
-
} : undefined,
|
1700
|
+
id: item.id !== undefined ? item.id : undefined,
|
1771
1701
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1772
1702
|
equals: item.alpacaAccountId
|
1773
1703
|
} : undefined,
|
@@ -2057,9 +1987,7 @@ export const Order = {
|
|
2057
1987
|
actions: item.actions ? {
|
2058
1988
|
upsert: item.actions.map((item) => ({
|
2059
1989
|
where: {
|
2060
|
-
id: item.id !== undefined ?
|
2061
|
-
equals: item.id
|
2062
|
-
} : undefined,
|
1990
|
+
id: item.id !== undefined ? item.id : undefined,
|
2063
1991
|
tradeId: item.tradeId !== undefined ? {
|
2064
1992
|
equals: item.tradeId
|
2065
1993
|
} : undefined,
|
@@ -2114,9 +2042,7 @@ export const Order = {
|
|
2114
2042
|
}
|
2115
2043
|
: { connectOrCreate: {
|
2116
2044
|
where: {
|
2117
|
-
id: item.asset.id !== undefined ?
|
2118
|
-
equals: item.asset.id
|
2119
|
-
} : undefined,
|
2045
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
2120
2046
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
2121
2047
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
2122
2048
|
},
|
@@ -2187,9 +2113,7 @@ export const Order = {
|
|
2187
2113
|
}
|
2188
2114
|
: { connectOrCreate: item.actions.map((item) => ({
|
2189
2115
|
where: {
|
2190
|
-
id: item.id !== undefined ?
|
2191
|
-
equals: item.id
|
2192
|
-
} : undefined,
|
2116
|
+
id: item.id !== undefined ? item.id : undefined,
|
2193
2117
|
tradeId: item.tradeId !== undefined ? {
|
2194
2118
|
equals: item.tradeId
|
2195
2119
|
} : undefined,
|
@@ -2209,9 +2133,7 @@ export const Order = {
|
|
2209
2133
|
positions: props.alpacaAccount.positions ? {
|
2210
2134
|
upsert: props.alpacaAccount.positions.map((item) => ({
|
2211
2135
|
where: {
|
2212
|
-
id: item.id !== undefined ?
|
2213
|
-
equals: item.id
|
2214
|
-
} : undefined,
|
2136
|
+
id: item.id !== undefined ? item.id : undefined,
|
2215
2137
|
assetId: item.assetId !== undefined ? {
|
2216
2138
|
equals: item.assetId
|
2217
2139
|
} : undefined,
|
@@ -2527,9 +2449,7 @@ export const Order = {
|
|
2527
2449
|
}
|
2528
2450
|
: { connectOrCreate: {
|
2529
2451
|
where: {
|
2530
|
-
id: item.asset.id !== undefined ?
|
2531
|
-
equals: item.asset.id
|
2532
|
-
} : undefined,
|
2452
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
2533
2453
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
2534
2454
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
2535
2455
|
},
|
@@ -2598,9 +2518,7 @@ export const Order = {
|
|
2598
2518
|
alerts: props.alpacaAccount.alerts ? {
|
2599
2519
|
upsert: props.alpacaAccount.alerts.map((item) => ({
|
2600
2520
|
where: {
|
2601
|
-
id: item.id !== undefined ?
|
2602
|
-
equals: item.id
|
2603
|
-
} : undefined,
|
2521
|
+
id: item.id !== undefined ? item.id : undefined,
|
2604
2522
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2605
2523
|
equals: item.alpacaAccountId
|
2606
2524
|
} : undefined,
|
@@ -2645,9 +2563,7 @@ export const Order = {
|
|
2645
2563
|
}
|
2646
2564
|
: { connectOrCreate: {
|
2647
2565
|
where: {
|
2648
|
-
id: props.alpacaAccount.user.id !== undefined ?
|
2649
|
-
equals: props.alpacaAccount.user.id
|
2650
|
-
} : undefined,
|
2566
|
+
id: props.alpacaAccount.user.id !== undefined ? props.alpacaAccount.user.id : undefined,
|
2651
2567
|
email: props.alpacaAccount.user.email !== undefined ? props.alpacaAccount.user.email : undefined,
|
2652
2568
|
name: props.alpacaAccount.user.name !== undefined ? {
|
2653
2569
|
equals: props.alpacaAccount.user.name
|
@@ -2673,9 +2589,7 @@ export const Order = {
|
|
2673
2589
|
}
|
2674
2590
|
: { connectOrCreate: {
|
2675
2591
|
where: {
|
2676
|
-
id: props.alpacaAccount.user.customer.id !== undefined ?
|
2677
|
-
equals: props.alpacaAccount.user.customer.id
|
2678
|
-
} : undefined,
|
2592
|
+
id: props.alpacaAccount.user.customer.id !== undefined ? props.alpacaAccount.user.customer.id : undefined,
|
2679
2593
|
stripeCustomerId: props.alpacaAccount.user.customer.stripeCustomerId !== undefined ? props.alpacaAccount.user.customer.stripeCustomerId : undefined,
|
2680
2594
|
stripeSubscriptionId: props.alpacaAccount.user.customer.stripeSubscriptionId !== undefined ? props.alpacaAccount.user.customer.stripeSubscriptionId : undefined,
|
2681
2595
|
authUserId: props.alpacaAccount.user.customer.authUserId !== undefined ? {
|
@@ -2707,9 +2621,7 @@ export const Order = {
|
|
2707
2621
|
}
|
2708
2622
|
: { connectOrCreate: props.alpacaAccount.user.accounts.map((item) => ({
|
2709
2623
|
where: {
|
2710
|
-
id: item.id !== undefined ?
|
2711
|
-
equals: item.id
|
2712
|
-
} : undefined,
|
2624
|
+
id: item.id !== undefined ? item.id : undefined,
|
2713
2625
|
userId: item.userId !== undefined ? {
|
2714
2626
|
equals: item.userId
|
2715
2627
|
} : undefined,
|
@@ -2739,9 +2651,7 @@ export const Order = {
|
|
2739
2651
|
}
|
2740
2652
|
: { connectOrCreate: props.alpacaAccount.user.sessions.map((item) => ({
|
2741
2653
|
where: {
|
2742
|
-
id: item.id !== undefined ?
|
2743
|
-
equals: item.id
|
2744
|
-
} : undefined,
|
2654
|
+
id: item.id !== undefined ? item.id : undefined,
|
2745
2655
|
userId: item.userId !== undefined ? {
|
2746
2656
|
equals: item.userId
|
2747
2657
|
} : undefined,
|
@@ -2760,9 +2670,7 @@ export const Order = {
|
|
2760
2670
|
}
|
2761
2671
|
: { connectOrCreate: props.alpacaAccount.user.authenticators.map((item) => ({
|
2762
2672
|
where: {
|
2763
|
-
id: item.id !== undefined ?
|
2764
|
-
equals: item.id
|
2765
|
-
} : undefined,
|
2673
|
+
id: item.id !== undefined ? item.id : undefined,
|
2766
2674
|
userId: item.userId !== undefined ? {
|
2767
2675
|
equals: item.userId
|
2768
2676
|
} : undefined,
|
@@ -2785,9 +2693,7 @@ export const Order = {
|
|
2785
2693
|
}
|
2786
2694
|
: { connectOrCreate: props.alpacaAccount.trades.map((item) => ({
|
2787
2695
|
where: {
|
2788
|
-
id: item.id !== undefined ?
|
2789
|
-
equals: item.id
|
2790
|
-
} : undefined,
|
2696
|
+
id: item.id !== undefined ? item.id : undefined,
|
2791
2697
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2792
2698
|
equals: item.alpacaAccountId
|
2793
2699
|
} : undefined,
|
@@ -2815,9 +2721,7 @@ export const Order = {
|
|
2815
2721
|
}
|
2816
2722
|
: { connectOrCreate: {
|
2817
2723
|
where: {
|
2818
|
-
id: item.asset.id !== undefined ?
|
2819
|
-
equals: item.asset.id
|
2820
|
-
} : undefined,
|
2724
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
2821
2725
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
2822
2726
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
2823
2727
|
},
|
@@ -2888,9 +2792,7 @@ export const Order = {
|
|
2888
2792
|
}
|
2889
2793
|
: { connectOrCreate: item.actions.map((item) => ({
|
2890
2794
|
where: {
|
2891
|
-
id: item.id !== undefined ?
|
2892
|
-
equals: item.id
|
2893
|
-
} : undefined,
|
2795
|
+
id: item.id !== undefined ? item.id : undefined,
|
2894
2796
|
tradeId: item.tradeId !== undefined ? {
|
2895
2797
|
equals: item.tradeId
|
2896
2798
|
} : undefined,
|
@@ -2915,9 +2817,7 @@ export const Order = {
|
|
2915
2817
|
}
|
2916
2818
|
: { connectOrCreate: props.alpacaAccount.positions.map((item) => ({
|
2917
2819
|
where: {
|
2918
|
-
id: item.id !== undefined ?
|
2919
|
-
equals: item.id
|
2920
|
-
} : undefined,
|
2820
|
+
id: item.id !== undefined ? item.id : undefined,
|
2921
2821
|
assetId: item.assetId !== undefined ? {
|
2922
2822
|
equals: item.assetId
|
2923
2823
|
} : undefined,
|
@@ -2947,9 +2847,7 @@ export const Order = {
|
|
2947
2847
|
}
|
2948
2848
|
: { connectOrCreate: {
|
2949
2849
|
where: {
|
2950
|
-
id: item.asset.id !== undefined ?
|
2951
|
-
equals: item.asset.id
|
2952
|
-
} : undefined,
|
2850
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
2953
2851
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
2954
2852
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
2955
2853
|
},
|
@@ -3023,9 +2921,7 @@ export const Order = {
|
|
3023
2921
|
}
|
3024
2922
|
: { connectOrCreate: props.alpacaAccount.alerts.map((item) => ({
|
3025
2923
|
where: {
|
3026
|
-
id: item.id !== undefined ?
|
3027
|
-
equals: item.id
|
3028
|
-
} : undefined,
|
2924
|
+
id: item.id !== undefined ? item.id : undefined,
|
3029
2925
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3030
2926
|
equals: item.alpacaAccountId
|
3031
2927
|
} : undefined,
|
@@ -3437,9 +3333,7 @@ export const Order = {
|
|
3437
3333
|
}
|
3438
3334
|
: { connectOrCreate: {
|
3439
3335
|
where: {
|
3440
|
-
id: props.action.trade.alpacaAccount.id !== undefined ?
|
3441
|
-
equals: props.action.trade.alpacaAccount.id
|
3442
|
-
} : undefined,
|
3336
|
+
id: props.action.trade.alpacaAccount.id !== undefined ? props.action.trade.alpacaAccount.id : undefined,
|
3443
3337
|
userId: props.action.trade.alpacaAccount.userId !== undefined ? {
|
3444
3338
|
equals: props.action.trade.alpacaAccount.userId
|
3445
3339
|
} : undefined,
|
@@ -3465,9 +3359,7 @@ export const Order = {
|
|
3465
3359
|
}
|
3466
3360
|
: { connectOrCreate: {
|
3467
3361
|
where: {
|
3468
|
-
id: props.action.trade.asset.id !== undefined ?
|
3469
|
-
equals: props.action.trade.asset.id
|
3470
|
-
} : undefined,
|
3362
|
+
id: props.action.trade.asset.id !== undefined ? props.action.trade.asset.id : undefined,
|
3471
3363
|
symbol: props.action.trade.asset.symbol !== undefined ? props.action.trade.asset.symbol : undefined,
|
3472
3364
|
name: props.action.trade.asset.name !== undefined ? props.action.trade.asset.name : undefined,
|
3473
3365
|
},
|
@@ -3548,9 +3440,7 @@ export const Order = {
|
|
3548
3440
|
}
|
3549
3441
|
: { connectOrCreate: {
|
3550
3442
|
where: {
|
3551
|
-
id: props.action.trade.id !== undefined ?
|
3552
|
-
equals: props.action.trade.id
|
3553
|
-
} : undefined,
|
3443
|
+
id: props.action.trade.id !== undefined ? props.action.trade.id : undefined,
|
3554
3444
|
alpacaAccountId: props.action.trade.alpacaAccountId !== undefined ? {
|
3555
3445
|
equals: props.action.trade.alpacaAccountId
|
3556
3446
|
} : undefined,
|
@@ -3578,9 +3468,7 @@ export const Order = {
|
|
3578
3468
|
}
|
3579
3469
|
: { connectOrCreate: {
|
3580
3470
|
where: {
|
3581
|
-
id: props.action.trade.alpacaAccount.id !== undefined ?
|
3582
|
-
equals: props.action.trade.alpacaAccount.id
|
3583
|
-
} : undefined,
|
3471
|
+
id: props.action.trade.alpacaAccount.id !== undefined ? props.action.trade.alpacaAccount.id : undefined,
|
3584
3472
|
userId: props.action.trade.alpacaAccount.userId !== undefined ? {
|
3585
3473
|
equals: props.action.trade.alpacaAccount.userId
|
3586
3474
|
} : undefined,
|
@@ -3606,9 +3494,7 @@ export const Order = {
|
|
3606
3494
|
}
|
3607
3495
|
: { connectOrCreate: {
|
3608
3496
|
where: {
|
3609
|
-
id: props.action.trade.asset.id !== undefined ?
|
3610
|
-
equals: props.action.trade.asset.id
|
3611
|
-
} : undefined,
|
3497
|
+
id: props.action.trade.asset.id !== undefined ? props.action.trade.asset.id : undefined,
|
3612
3498
|
symbol: props.action.trade.asset.symbol !== undefined ? props.action.trade.asset.symbol : undefined,
|
3613
3499
|
name: props.action.trade.asset.name !== undefined ? props.action.trade.asset.name : undefined,
|
3614
3500
|
},
|
@@ -3862,9 +3748,7 @@ export const Order = {
|
|
3862
3748
|
trades: props.asset.trades ? {
|
3863
3749
|
upsert: props.asset.trades.map((item) => ({
|
3864
3750
|
where: {
|
3865
|
-
id: item.id !== undefined ?
|
3866
|
-
equals: item.id
|
3867
|
-
} : undefined,
|
3751
|
+
id: item.id !== undefined ? item.id : undefined,
|
3868
3752
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3869
3753
|
equals: item.alpacaAccountId
|
3870
3754
|
} : undefined,
|
@@ -3967,9 +3851,7 @@ export const Order = {
|
|
3967
3851
|
actions: item.actions ? {
|
3968
3852
|
upsert: item.actions.map((item) => ({
|
3969
3853
|
where: {
|
3970
|
-
id: item.id !== undefined ?
|
3971
|
-
equals: item.id
|
3972
|
-
} : undefined,
|
3854
|
+
id: item.id !== undefined ? item.id : undefined,
|
3973
3855
|
tradeId: item.tradeId !== undefined ? {
|
3974
3856
|
equals: item.tradeId
|
3975
3857
|
} : undefined,
|
@@ -4024,9 +3906,7 @@ export const Order = {
|
|
4024
3906
|
}
|
4025
3907
|
: { connectOrCreate: {
|
4026
3908
|
where: {
|
4027
|
-
id: item.alpacaAccount.id !== undefined ?
|
4028
|
-
equals: item.alpacaAccount.id
|
4029
|
-
} : undefined,
|
3909
|
+
id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
|
4030
3910
|
userId: item.alpacaAccount.userId !== undefined ? {
|
4031
3911
|
equals: item.alpacaAccount.userId
|
4032
3912
|
} : undefined,
|
@@ -4052,9 +3932,7 @@ export const Order = {
|
|
4052
3932
|
}
|
4053
3933
|
: { connectOrCreate: item.actions.map((item) => ({
|
4054
3934
|
where: {
|
4055
|
-
id: item.id !== undefined ?
|
4056
|
-
equals: item.id
|
4057
|
-
} : undefined,
|
3935
|
+
id: item.id !== undefined ? item.id : undefined,
|
4058
3936
|
tradeId: item.tradeId !== undefined ? {
|
4059
3937
|
equals: item.tradeId
|
4060
3938
|
} : undefined,
|
@@ -4074,9 +3952,7 @@ export const Order = {
|
|
4074
3952
|
positions: props.asset.positions ? {
|
4075
3953
|
upsert: props.asset.positions.map((item) => ({
|
4076
3954
|
where: {
|
4077
|
-
id: item.id !== undefined ?
|
4078
|
-
equals: item.id
|
4079
|
-
} : undefined,
|
3955
|
+
id: item.id !== undefined ? item.id : undefined,
|
4080
3956
|
assetId: item.assetId !== undefined ? {
|
4081
3957
|
equals: item.assetId
|
4082
3958
|
} : undefined,
|
@@ -4205,9 +4081,7 @@ export const Order = {
|
|
4205
4081
|
}
|
4206
4082
|
: { connectOrCreate: {
|
4207
4083
|
where: {
|
4208
|
-
id: item.alpacaAccount.id !== undefined ?
|
4209
|
-
equals: item.alpacaAccount.id
|
4210
|
-
} : undefined,
|
4084
|
+
id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
|
4211
4085
|
userId: item.alpacaAccount.userId !== undefined ? {
|
4212
4086
|
equals: item.alpacaAccount.userId
|
4213
4087
|
} : undefined,
|
@@ -4231,9 +4105,7 @@ export const Order = {
|
|
4231
4105
|
newsMentions: props.asset.newsMentions ? {
|
4232
4106
|
upsert: props.asset.newsMentions.map((item) => ({
|
4233
4107
|
where: {
|
4234
|
-
id: item.id !== undefined ?
|
4235
|
-
equals: item.id
|
4236
|
-
} : undefined,
|
4108
|
+
id: item.id !== undefined ? item.id : undefined,
|
4237
4109
|
url: item.url !== undefined ? item.url : undefined,
|
4238
4110
|
assetId: item.assetId !== undefined ? {
|
4239
4111
|
equals: item.assetId
|
@@ -4346,9 +4218,7 @@ export const Order = {
|
|
4346
4218
|
}
|
4347
4219
|
: { connectOrCreate: {
|
4348
4220
|
where: {
|
4349
|
-
id: item.news.id !== undefined ?
|
4350
|
-
equals: item.news.id
|
4351
|
-
} : undefined,
|
4221
|
+
id: item.news.id !== undefined ? item.news.id : undefined,
|
4352
4222
|
url: item.news.url !== undefined ? item.news.url : undefined,
|
4353
4223
|
title: item.news.title !== undefined ? {
|
4354
4224
|
equals: item.news.title
|
@@ -4439,9 +4309,7 @@ export const Order = {
|
|
4439
4309
|
}
|
4440
4310
|
: { connectOrCreate: props.asset.trades.map((item) => ({
|
4441
4311
|
where: {
|
4442
|
-
id: item.id !== undefined ?
|
4443
|
-
equals: item.id
|
4444
|
-
} : undefined,
|
4312
|
+
id: item.id !== undefined ? item.id : undefined,
|
4445
4313
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4446
4314
|
equals: item.alpacaAccountId
|
4447
4315
|
} : undefined,
|
@@ -4469,9 +4337,7 @@ export const Order = {
|
|
4469
4337
|
}
|
4470
4338
|
: { connectOrCreate: {
|
4471
4339
|
where: {
|
4472
|
-
id: item.alpacaAccount.id !== undefined ?
|
4473
|
-
equals: item.alpacaAccount.id
|
4474
|
-
} : undefined,
|
4340
|
+
id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
|
4475
4341
|
userId: item.alpacaAccount.userId !== undefined ? {
|
4476
4342
|
equals: item.alpacaAccount.userId
|
4477
4343
|
} : undefined,
|
@@ -4497,9 +4363,7 @@ export const Order = {
|
|
4497
4363
|
}
|
4498
4364
|
: { connectOrCreate: item.actions.map((item) => ({
|
4499
4365
|
where: {
|
4500
|
-
id: item.id !== undefined ?
|
4501
|
-
equals: item.id
|
4502
|
-
} : undefined,
|
4366
|
+
id: item.id !== undefined ? item.id : undefined,
|
4503
4367
|
tradeId: item.tradeId !== undefined ? {
|
4504
4368
|
equals: item.tradeId
|
4505
4369
|
} : undefined,
|
@@ -4524,9 +4388,7 @@ export const Order = {
|
|
4524
4388
|
}
|
4525
4389
|
: { connectOrCreate: props.asset.positions.map((item) => ({
|
4526
4390
|
where: {
|
4527
|
-
id: item.id !== undefined ?
|
4528
|
-
equals: item.id
|
4529
|
-
} : undefined,
|
4391
|
+
id: item.id !== undefined ? item.id : undefined,
|
4530
4392
|
assetId: item.assetId !== undefined ? {
|
4531
4393
|
equals: item.assetId
|
4532
4394
|
} : undefined,
|
@@ -4556,9 +4418,7 @@ export const Order = {
|
|
4556
4418
|
}
|
4557
4419
|
: { connectOrCreate: {
|
4558
4420
|
where: {
|
4559
|
-
id: item.alpacaAccount.id !== undefined ?
|
4560
|
-
equals: item.alpacaAccount.id
|
4561
|
-
} : undefined,
|
4421
|
+
id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
|
4562
4422
|
userId: item.alpacaAccount.userId !== undefined ? {
|
4563
4423
|
equals: item.alpacaAccount.userId
|
4564
4424
|
} : undefined,
|
@@ -4587,9 +4447,7 @@ export const Order = {
|
|
4587
4447
|
}
|
4588
4448
|
: { connectOrCreate: props.asset.newsMentions.map((item) => ({
|
4589
4449
|
where: {
|
4590
|
-
id: item.id !== undefined ?
|
4591
|
-
equals: item.id
|
4592
|
-
} : undefined,
|
4450
|
+
id: item.id !== undefined ? item.id : undefined,
|
4593
4451
|
url: item.url !== undefined ? item.url : undefined,
|
4594
4452
|
assetId: item.assetId !== undefined ? {
|
4595
4453
|
equals: item.assetId
|
@@ -4611,9 +4469,7 @@ export const Order = {
|
|
4611
4469
|
}
|
4612
4470
|
: { connectOrCreate: {
|
4613
4471
|
where: {
|
4614
|
-
id: item.news.id !== undefined ?
|
4615
|
-
equals: item.news.id
|
4616
|
-
} : undefined,
|
4472
|
+
id: item.news.id !== undefined ? item.news.id : undefined,
|
4617
4473
|
url: item.news.url !== undefined ? item.news.url : undefined,
|
4618
4474
|
title: item.news.title !== undefined ? {
|
4619
4475
|
equals: item.news.title
|
@@ -4676,9 +4532,7 @@ export const Order = {
|
|
4676
4532
|
}`;
|
4677
4533
|
const variables = props.map(prop => ({
|
4678
4534
|
where: {
|
4679
|
-
id: prop.id !== undefined ?
|
4680
|
-
equals: prop.id
|
4681
|
-
} : undefined,
|
4535
|
+
id: prop.id !== undefined ? prop.id : undefined,
|
4682
4536
|
clientOrderId: prop.clientOrderId !== undefined ? prop.clientOrderId : undefined,
|
4683
4537
|
actionId: prop.actionId !== undefined ? prop.actionId : undefined,
|
4684
4538
|
stopLossId: prop.stopLossId !== undefined ? prop.stopLossId : undefined,
|
@@ -4980,9 +4834,7 @@ export const Order = {
|
|
4980
4834
|
accounts: prop.alpacaAccount.user.accounts ? {
|
4981
4835
|
upsert: prop.alpacaAccount.user.accounts.map((item) => ({
|
4982
4836
|
where: {
|
4983
|
-
id: item.id !== undefined ?
|
4984
|
-
equals: item.id
|
4985
|
-
} : undefined,
|
4837
|
+
id: item.id !== undefined ? item.id : undefined,
|
4986
4838
|
userId: item.userId !== undefined ? {
|
4987
4839
|
equals: item.userId
|
4988
4840
|
} : undefined,
|
@@ -5042,9 +4894,7 @@ export const Order = {
|
|
5042
4894
|
sessions: prop.alpacaAccount.user.sessions ? {
|
5043
4895
|
upsert: prop.alpacaAccount.user.sessions.map((item) => ({
|
5044
4896
|
where: {
|
5045
|
-
id: item.id !== undefined ?
|
5046
|
-
equals: item.id
|
5047
|
-
} : undefined,
|
4897
|
+
id: item.id !== undefined ? item.id : undefined,
|
5048
4898
|
userId: item.userId !== undefined ? {
|
5049
4899
|
equals: item.userId
|
5050
4900
|
} : undefined,
|
@@ -5069,9 +4919,7 @@ export const Order = {
|
|
5069
4919
|
authenticators: prop.alpacaAccount.user.authenticators ? {
|
5070
4920
|
upsert: prop.alpacaAccount.user.authenticators.map((item) => ({
|
5071
4921
|
where: {
|
5072
|
-
id: item.id !== undefined ?
|
5073
|
-
equals: item.id
|
5074
|
-
} : undefined,
|
4922
|
+
id: item.id !== undefined ? item.id : undefined,
|
5075
4923
|
userId: item.userId !== undefined ? {
|
5076
4924
|
equals: item.userId
|
5077
4925
|
} : undefined,
|
@@ -5118,9 +4966,7 @@ export const Order = {
|
|
5118
4966
|
}
|
5119
4967
|
: { connectOrCreate: {
|
5120
4968
|
where: {
|
5121
|
-
id: prop.alpacaAccount.user.customer.id !== undefined ?
|
5122
|
-
equals: prop.alpacaAccount.user.customer.id
|
5123
|
-
} : undefined,
|
4969
|
+
id: prop.alpacaAccount.user.customer.id !== undefined ? prop.alpacaAccount.user.customer.id : undefined,
|
5124
4970
|
stripeCustomerId: prop.alpacaAccount.user.customer.stripeCustomerId !== undefined ? prop.alpacaAccount.user.customer.stripeCustomerId : undefined,
|
5125
4971
|
stripeSubscriptionId: prop.alpacaAccount.user.customer.stripeSubscriptionId !== undefined ? prop.alpacaAccount.user.customer.stripeSubscriptionId : undefined,
|
5126
4972
|
authUserId: prop.alpacaAccount.user.customer.authUserId !== undefined ? {
|
@@ -5152,9 +4998,7 @@ export const Order = {
|
|
5152
4998
|
}
|
5153
4999
|
: { connectOrCreate: prop.alpacaAccount.user.accounts.map((item) => ({
|
5154
5000
|
where: {
|
5155
|
-
id: item.id !== undefined ?
|
5156
|
-
equals: item.id
|
5157
|
-
} : undefined,
|
5001
|
+
id: item.id !== undefined ? item.id : undefined,
|
5158
5002
|
userId: item.userId !== undefined ? {
|
5159
5003
|
equals: item.userId
|
5160
5004
|
} : undefined,
|
@@ -5184,9 +5028,7 @@ export const Order = {
|
|
5184
5028
|
}
|
5185
5029
|
: { connectOrCreate: prop.alpacaAccount.user.sessions.map((item) => ({
|
5186
5030
|
where: {
|
5187
|
-
id: item.id !== undefined ?
|
5188
|
-
equals: item.id
|
5189
|
-
} : undefined,
|
5031
|
+
id: item.id !== undefined ? item.id : undefined,
|
5190
5032
|
userId: item.userId !== undefined ? {
|
5191
5033
|
equals: item.userId
|
5192
5034
|
} : undefined,
|
@@ -5205,9 +5047,7 @@ export const Order = {
|
|
5205
5047
|
}
|
5206
5048
|
: { connectOrCreate: prop.alpacaAccount.user.authenticators.map((item) => ({
|
5207
5049
|
where: {
|
5208
|
-
id: item.id !== undefined ?
|
5209
|
-
equals: item.id
|
5210
|
-
} : undefined,
|
5050
|
+
id: item.id !== undefined ? item.id : undefined,
|
5211
5051
|
userId: item.userId !== undefined ? {
|
5212
5052
|
equals: item.userId
|
5213
5053
|
} : undefined,
|
@@ -5225,9 +5065,7 @@ export const Order = {
|
|
5225
5065
|
trades: prop.alpacaAccount.trades ? {
|
5226
5066
|
upsert: prop.alpacaAccount.trades.map((item) => ({
|
5227
5067
|
where: {
|
5228
|
-
id: item.id !== undefined ?
|
5229
|
-
equals: item.id
|
5230
|
-
} : undefined,
|
5068
|
+
id: item.id !== undefined ? item.id : undefined,
|
5231
5069
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5232
5070
|
equals: item.alpacaAccountId
|
5233
5071
|
} : undefined,
|
@@ -5517,9 +5355,7 @@ export const Order = {
|
|
5517
5355
|
actions: item.actions ? {
|
5518
5356
|
upsert: item.actions.map((item) => ({
|
5519
5357
|
where: {
|
5520
|
-
id: item.id !== undefined ?
|
5521
|
-
equals: item.id
|
5522
|
-
} : undefined,
|
5358
|
+
id: item.id !== undefined ? item.id : undefined,
|
5523
5359
|
tradeId: item.tradeId !== undefined ? {
|
5524
5360
|
equals: item.tradeId
|
5525
5361
|
} : undefined,
|
@@ -5574,9 +5410,7 @@ export const Order = {
|
|
5574
5410
|
}
|
5575
5411
|
: { connectOrCreate: {
|
5576
5412
|
where: {
|
5577
|
-
id: item.asset.id !== undefined ?
|
5578
|
-
equals: item.asset.id
|
5579
|
-
} : undefined,
|
5413
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
5580
5414
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
5581
5415
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
5582
5416
|
},
|
@@ -5647,9 +5481,7 @@ export const Order = {
|
|
5647
5481
|
}
|
5648
5482
|
: { connectOrCreate: item.actions.map((item) => ({
|
5649
5483
|
where: {
|
5650
|
-
id: item.id !== undefined ?
|
5651
|
-
equals: item.id
|
5652
|
-
} : undefined,
|
5484
|
+
id: item.id !== undefined ? item.id : undefined,
|
5653
5485
|
tradeId: item.tradeId !== undefined ? {
|
5654
5486
|
equals: item.tradeId
|
5655
5487
|
} : undefined,
|
@@ -5669,9 +5501,7 @@ export const Order = {
|
|
5669
5501
|
positions: prop.alpacaAccount.positions ? {
|
5670
5502
|
upsert: prop.alpacaAccount.positions.map((item) => ({
|
5671
5503
|
where: {
|
5672
|
-
id: item.id !== undefined ?
|
5673
|
-
equals: item.id
|
5674
|
-
} : undefined,
|
5504
|
+
id: item.id !== undefined ? item.id : undefined,
|
5675
5505
|
assetId: item.assetId !== undefined ? {
|
5676
5506
|
equals: item.assetId
|
5677
5507
|
} : undefined,
|
@@ -5987,9 +5817,7 @@ export const Order = {
|
|
5987
5817
|
}
|
5988
5818
|
: { connectOrCreate: {
|
5989
5819
|
where: {
|
5990
|
-
id: item.asset.id !== undefined ?
|
5991
|
-
equals: item.asset.id
|
5992
|
-
} : undefined,
|
5820
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
5993
5821
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
5994
5822
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
5995
5823
|
},
|
@@ -6058,9 +5886,7 @@ export const Order = {
|
|
6058
5886
|
alerts: prop.alpacaAccount.alerts ? {
|
6059
5887
|
upsert: prop.alpacaAccount.alerts.map((item) => ({
|
6060
5888
|
where: {
|
6061
|
-
id: item.id !== undefined ?
|
6062
|
-
equals: item.id
|
6063
|
-
} : undefined,
|
5889
|
+
id: item.id !== undefined ? item.id : undefined,
|
6064
5890
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6065
5891
|
equals: item.alpacaAccountId
|
6066
5892
|
} : undefined,
|
@@ -6105,9 +5931,7 @@ export const Order = {
|
|
6105
5931
|
}
|
6106
5932
|
: { connectOrCreate: {
|
6107
5933
|
where: {
|
6108
|
-
id: prop.alpacaAccount.user.id !== undefined ?
|
6109
|
-
equals: prop.alpacaAccount.user.id
|
6110
|
-
} : undefined,
|
5934
|
+
id: prop.alpacaAccount.user.id !== undefined ? prop.alpacaAccount.user.id : undefined,
|
6111
5935
|
email: prop.alpacaAccount.user.email !== undefined ? prop.alpacaAccount.user.email : undefined,
|
6112
5936
|
name: prop.alpacaAccount.user.name !== undefined ? {
|
6113
5937
|
equals: prop.alpacaAccount.user.name
|
@@ -6133,9 +5957,7 @@ export const Order = {
|
|
6133
5957
|
}
|
6134
5958
|
: { connectOrCreate: {
|
6135
5959
|
where: {
|
6136
|
-
id: prop.alpacaAccount.user.customer.id !== undefined ?
|
6137
|
-
equals: prop.alpacaAccount.user.customer.id
|
6138
|
-
} : undefined,
|
5960
|
+
id: prop.alpacaAccount.user.customer.id !== undefined ? prop.alpacaAccount.user.customer.id : undefined,
|
6139
5961
|
stripeCustomerId: prop.alpacaAccount.user.customer.stripeCustomerId !== undefined ? prop.alpacaAccount.user.customer.stripeCustomerId : undefined,
|
6140
5962
|
stripeSubscriptionId: prop.alpacaAccount.user.customer.stripeSubscriptionId !== undefined ? prop.alpacaAccount.user.customer.stripeSubscriptionId : undefined,
|
6141
5963
|
authUserId: prop.alpacaAccount.user.customer.authUserId !== undefined ? {
|
@@ -6167,9 +5989,7 @@ export const Order = {
|
|
6167
5989
|
}
|
6168
5990
|
: { connectOrCreate: prop.alpacaAccount.user.accounts.map((item) => ({
|
6169
5991
|
where: {
|
6170
|
-
id: item.id !== undefined ?
|
6171
|
-
equals: item.id
|
6172
|
-
} : undefined,
|
5992
|
+
id: item.id !== undefined ? item.id : undefined,
|
6173
5993
|
userId: item.userId !== undefined ? {
|
6174
5994
|
equals: item.userId
|
6175
5995
|
} : undefined,
|
@@ -6199,9 +6019,7 @@ export const Order = {
|
|
6199
6019
|
}
|
6200
6020
|
: { connectOrCreate: prop.alpacaAccount.user.sessions.map((item) => ({
|
6201
6021
|
where: {
|
6202
|
-
id: item.id !== undefined ?
|
6203
|
-
equals: item.id
|
6204
|
-
} : undefined,
|
6022
|
+
id: item.id !== undefined ? item.id : undefined,
|
6205
6023
|
userId: item.userId !== undefined ? {
|
6206
6024
|
equals: item.userId
|
6207
6025
|
} : undefined,
|
@@ -6220,9 +6038,7 @@ export const Order = {
|
|
6220
6038
|
}
|
6221
6039
|
: { connectOrCreate: prop.alpacaAccount.user.authenticators.map((item) => ({
|
6222
6040
|
where: {
|
6223
|
-
id: item.id !== undefined ?
|
6224
|
-
equals: item.id
|
6225
|
-
} : undefined,
|
6041
|
+
id: item.id !== undefined ? item.id : undefined,
|
6226
6042
|
userId: item.userId !== undefined ? {
|
6227
6043
|
equals: item.userId
|
6228
6044
|
} : undefined,
|
@@ -6245,9 +6061,7 @@ export const Order = {
|
|
6245
6061
|
}
|
6246
6062
|
: { connectOrCreate: prop.alpacaAccount.trades.map((item) => ({
|
6247
6063
|
where: {
|
6248
|
-
id: item.id !== undefined ?
|
6249
|
-
equals: item.id
|
6250
|
-
} : undefined,
|
6064
|
+
id: item.id !== undefined ? item.id : undefined,
|
6251
6065
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6252
6066
|
equals: item.alpacaAccountId
|
6253
6067
|
} : undefined,
|
@@ -6275,9 +6089,7 @@ export const Order = {
|
|
6275
6089
|
}
|
6276
6090
|
: { connectOrCreate: {
|
6277
6091
|
where: {
|
6278
|
-
id: item.asset.id !== undefined ?
|
6279
|
-
equals: item.asset.id
|
6280
|
-
} : undefined,
|
6092
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
6281
6093
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
6282
6094
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
6283
6095
|
},
|
@@ -6348,9 +6160,7 @@ export const Order = {
|
|
6348
6160
|
}
|
6349
6161
|
: { connectOrCreate: item.actions.map((item) => ({
|
6350
6162
|
where: {
|
6351
|
-
id: item.id !== undefined ?
|
6352
|
-
equals: item.id
|
6353
|
-
} : undefined,
|
6163
|
+
id: item.id !== undefined ? item.id : undefined,
|
6354
6164
|
tradeId: item.tradeId !== undefined ? {
|
6355
6165
|
equals: item.tradeId
|
6356
6166
|
} : undefined,
|
@@ -6375,9 +6185,7 @@ export const Order = {
|
|
6375
6185
|
}
|
6376
6186
|
: { connectOrCreate: prop.alpacaAccount.positions.map((item) => ({
|
6377
6187
|
where: {
|
6378
|
-
id: item.id !== undefined ?
|
6379
|
-
equals: item.id
|
6380
|
-
} : undefined,
|
6188
|
+
id: item.id !== undefined ? item.id : undefined,
|
6381
6189
|
assetId: item.assetId !== undefined ? {
|
6382
6190
|
equals: item.assetId
|
6383
6191
|
} : undefined,
|
@@ -6407,9 +6215,7 @@ export const Order = {
|
|
6407
6215
|
}
|
6408
6216
|
: { connectOrCreate: {
|
6409
6217
|
where: {
|
6410
|
-
id: item.asset.id !== undefined ?
|
6411
|
-
equals: item.asset.id
|
6412
|
-
} : undefined,
|
6218
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
6413
6219
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
6414
6220
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
6415
6221
|
},
|
@@ -6483,9 +6289,7 @@ export const Order = {
|
|
6483
6289
|
}
|
6484
6290
|
: { connectOrCreate: prop.alpacaAccount.alerts.map((item) => ({
|
6485
6291
|
where: {
|
6486
|
-
id: item.id !== undefined ?
|
6487
|
-
equals: item.id
|
6488
|
-
} : undefined,
|
6292
|
+
id: item.id !== undefined ? item.id : undefined,
|
6489
6293
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6490
6294
|
equals: item.alpacaAccountId
|
6491
6295
|
} : undefined,
|
@@ -6897,9 +6701,7 @@ export const Order = {
|
|
6897
6701
|
}
|
6898
6702
|
: { connectOrCreate: {
|
6899
6703
|
where: {
|
6900
|
-
id: prop.action.trade.alpacaAccount.id !== undefined ?
|
6901
|
-
equals: prop.action.trade.alpacaAccount.id
|
6902
|
-
} : undefined,
|
6704
|
+
id: prop.action.trade.alpacaAccount.id !== undefined ? prop.action.trade.alpacaAccount.id : undefined,
|
6903
6705
|
userId: prop.action.trade.alpacaAccount.userId !== undefined ? {
|
6904
6706
|
equals: prop.action.trade.alpacaAccount.userId
|
6905
6707
|
} : undefined,
|
@@ -6925,9 +6727,7 @@ export const Order = {
|
|
6925
6727
|
}
|
6926
6728
|
: { connectOrCreate: {
|
6927
6729
|
where: {
|
6928
|
-
id: prop.action.trade.asset.id !== undefined ?
|
6929
|
-
equals: prop.action.trade.asset.id
|
6930
|
-
} : undefined,
|
6730
|
+
id: prop.action.trade.asset.id !== undefined ? prop.action.trade.asset.id : undefined,
|
6931
6731
|
symbol: prop.action.trade.asset.symbol !== undefined ? prop.action.trade.asset.symbol : undefined,
|
6932
6732
|
name: prop.action.trade.asset.name !== undefined ? prop.action.trade.asset.name : undefined,
|
6933
6733
|
},
|
@@ -7008,9 +6808,7 @@ export const Order = {
|
|
7008
6808
|
}
|
7009
6809
|
: { connectOrCreate: {
|
7010
6810
|
where: {
|
7011
|
-
id: prop.action.trade.id !== undefined ?
|
7012
|
-
equals: prop.action.trade.id
|
7013
|
-
} : undefined,
|
6811
|
+
id: prop.action.trade.id !== undefined ? prop.action.trade.id : undefined,
|
7014
6812
|
alpacaAccountId: prop.action.trade.alpacaAccountId !== undefined ? {
|
7015
6813
|
equals: prop.action.trade.alpacaAccountId
|
7016
6814
|
} : undefined,
|
@@ -7038,9 +6836,7 @@ export const Order = {
|
|
7038
6836
|
}
|
7039
6837
|
: { connectOrCreate: {
|
7040
6838
|
where: {
|
7041
|
-
id: prop.action.trade.alpacaAccount.id !== undefined ?
|
7042
|
-
equals: prop.action.trade.alpacaAccount.id
|
7043
|
-
} : undefined,
|
6839
|
+
id: prop.action.trade.alpacaAccount.id !== undefined ? prop.action.trade.alpacaAccount.id : undefined,
|
7044
6840
|
userId: prop.action.trade.alpacaAccount.userId !== undefined ? {
|
7045
6841
|
equals: prop.action.trade.alpacaAccount.userId
|
7046
6842
|
} : undefined,
|
@@ -7066,9 +6862,7 @@ export const Order = {
|
|
7066
6862
|
}
|
7067
6863
|
: { connectOrCreate: {
|
7068
6864
|
where: {
|
7069
|
-
id: prop.action.trade.asset.id !== undefined ?
|
7070
|
-
equals: prop.action.trade.asset.id
|
7071
|
-
} : undefined,
|
6865
|
+
id: prop.action.trade.asset.id !== undefined ? prop.action.trade.asset.id : undefined,
|
7072
6866
|
symbol: prop.action.trade.asset.symbol !== undefined ? prop.action.trade.asset.symbol : undefined,
|
7073
6867
|
name: prop.action.trade.asset.name !== undefined ? prop.action.trade.asset.name : undefined,
|
7074
6868
|
},
|
@@ -7322,9 +7116,7 @@ export const Order = {
|
|
7322
7116
|
trades: prop.asset.trades ? {
|
7323
7117
|
upsert: prop.asset.trades.map((item) => ({
|
7324
7118
|
where: {
|
7325
|
-
id: item.id !== undefined ?
|
7326
|
-
equals: item.id
|
7327
|
-
} : undefined,
|
7119
|
+
id: item.id !== undefined ? item.id : undefined,
|
7328
7120
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
7329
7121
|
equals: item.alpacaAccountId
|
7330
7122
|
} : undefined,
|
@@ -7427,9 +7219,7 @@ export const Order = {
|
|
7427
7219
|
actions: item.actions ? {
|
7428
7220
|
upsert: item.actions.map((item) => ({
|
7429
7221
|
where: {
|
7430
|
-
id: item.id !== undefined ?
|
7431
|
-
equals: item.id
|
7432
|
-
} : undefined,
|
7222
|
+
id: item.id !== undefined ? item.id : undefined,
|
7433
7223
|
tradeId: item.tradeId !== undefined ? {
|
7434
7224
|
equals: item.tradeId
|
7435
7225
|
} : undefined,
|
@@ -7484,9 +7274,7 @@ export const Order = {
|
|
7484
7274
|
}
|
7485
7275
|
: { connectOrCreate: {
|
7486
7276
|
where: {
|
7487
|
-
id: item.alpacaAccount.id !== undefined ?
|
7488
|
-
equals: item.alpacaAccount.id
|
7489
|
-
} : undefined,
|
7277
|
+
id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
|
7490
7278
|
userId: item.alpacaAccount.userId !== undefined ? {
|
7491
7279
|
equals: item.alpacaAccount.userId
|
7492
7280
|
} : undefined,
|
@@ -7512,9 +7300,7 @@ export const Order = {
|
|
7512
7300
|
}
|
7513
7301
|
: { connectOrCreate: item.actions.map((item) => ({
|
7514
7302
|
where: {
|
7515
|
-
id: item.id !== undefined ?
|
7516
|
-
equals: item.id
|
7517
|
-
} : undefined,
|
7303
|
+
id: item.id !== undefined ? item.id : undefined,
|
7518
7304
|
tradeId: item.tradeId !== undefined ? {
|
7519
7305
|
equals: item.tradeId
|
7520
7306
|
} : undefined,
|
@@ -7534,9 +7320,7 @@ export const Order = {
|
|
7534
7320
|
positions: prop.asset.positions ? {
|
7535
7321
|
upsert: prop.asset.positions.map((item) => ({
|
7536
7322
|
where: {
|
7537
|
-
id: item.id !== undefined ?
|
7538
|
-
equals: item.id
|
7539
|
-
} : undefined,
|
7323
|
+
id: item.id !== undefined ? item.id : undefined,
|
7540
7324
|
assetId: item.assetId !== undefined ? {
|
7541
7325
|
equals: item.assetId
|
7542
7326
|
} : undefined,
|
@@ -7665,9 +7449,7 @@ export const Order = {
|
|
7665
7449
|
}
|
7666
7450
|
: { connectOrCreate: {
|
7667
7451
|
where: {
|
7668
|
-
id: item.alpacaAccount.id !== undefined ?
|
7669
|
-
equals: item.alpacaAccount.id
|
7670
|
-
} : undefined,
|
7452
|
+
id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
|
7671
7453
|
userId: item.alpacaAccount.userId !== undefined ? {
|
7672
7454
|
equals: item.alpacaAccount.userId
|
7673
7455
|
} : undefined,
|
@@ -7691,9 +7473,7 @@ export const Order = {
|
|
7691
7473
|
newsMentions: prop.asset.newsMentions ? {
|
7692
7474
|
upsert: prop.asset.newsMentions.map((item) => ({
|
7693
7475
|
where: {
|
7694
|
-
id: item.id !== undefined ?
|
7695
|
-
equals: item.id
|
7696
|
-
} : undefined,
|
7476
|
+
id: item.id !== undefined ? item.id : undefined,
|
7697
7477
|
url: item.url !== undefined ? item.url : undefined,
|
7698
7478
|
assetId: item.assetId !== undefined ? {
|
7699
7479
|
equals: item.assetId
|
@@ -7806,9 +7586,7 @@ export const Order = {
|
|
7806
7586
|
}
|
7807
7587
|
: { connectOrCreate: {
|
7808
7588
|
where: {
|
7809
|
-
id: item.news.id !== undefined ?
|
7810
|
-
equals: item.news.id
|
7811
|
-
} : undefined,
|
7589
|
+
id: item.news.id !== undefined ? item.news.id : undefined,
|
7812
7590
|
url: item.news.url !== undefined ? item.news.url : undefined,
|
7813
7591
|
title: item.news.title !== undefined ? {
|
7814
7592
|
equals: item.news.title
|
@@ -7899,9 +7677,7 @@ export const Order = {
|
|
7899
7677
|
}
|
7900
7678
|
: { connectOrCreate: prop.asset.trades.map((item) => ({
|
7901
7679
|
where: {
|
7902
|
-
id: item.id !== undefined ?
|
7903
|
-
equals: item.id
|
7904
|
-
} : undefined,
|
7680
|
+
id: item.id !== undefined ? item.id : undefined,
|
7905
7681
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
7906
7682
|
equals: item.alpacaAccountId
|
7907
7683
|
} : undefined,
|
@@ -7929,9 +7705,7 @@ export const Order = {
|
|
7929
7705
|
}
|
7930
7706
|
: { connectOrCreate: {
|
7931
7707
|
where: {
|
7932
|
-
id: item.alpacaAccount.id !== undefined ?
|
7933
|
-
equals: item.alpacaAccount.id
|
7934
|
-
} : undefined,
|
7708
|
+
id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
|
7935
7709
|
userId: item.alpacaAccount.userId !== undefined ? {
|
7936
7710
|
equals: item.alpacaAccount.userId
|
7937
7711
|
} : undefined,
|
@@ -7957,9 +7731,7 @@ export const Order = {
|
|
7957
7731
|
}
|
7958
7732
|
: { connectOrCreate: item.actions.map((item) => ({
|
7959
7733
|
where: {
|
7960
|
-
id: item.id !== undefined ?
|
7961
|
-
equals: item.id
|
7962
|
-
} : undefined,
|
7734
|
+
id: item.id !== undefined ? item.id : undefined,
|
7963
7735
|
tradeId: item.tradeId !== undefined ? {
|
7964
7736
|
equals: item.tradeId
|
7965
7737
|
} : undefined,
|
@@ -7984,9 +7756,7 @@ export const Order = {
|
|
7984
7756
|
}
|
7985
7757
|
: { connectOrCreate: prop.asset.positions.map((item) => ({
|
7986
7758
|
where: {
|
7987
|
-
id: item.id !== undefined ?
|
7988
|
-
equals: item.id
|
7989
|
-
} : undefined,
|
7759
|
+
id: item.id !== undefined ? item.id : undefined,
|
7990
7760
|
assetId: item.assetId !== undefined ? {
|
7991
7761
|
equals: item.assetId
|
7992
7762
|
} : undefined,
|
@@ -8016,9 +7786,7 @@ export const Order = {
|
|
8016
7786
|
}
|
8017
7787
|
: { connectOrCreate: {
|
8018
7788
|
where: {
|
8019
|
-
id: item.alpacaAccount.id !== undefined ?
|
8020
|
-
equals: item.alpacaAccount.id
|
8021
|
-
} : undefined,
|
7789
|
+
id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
|
8022
7790
|
userId: item.alpacaAccount.userId !== undefined ? {
|
8023
7791
|
equals: item.alpacaAccount.userId
|
8024
7792
|
} : undefined,
|
@@ -8047,9 +7815,7 @@ export const Order = {
|
|
8047
7815
|
}
|
8048
7816
|
: { connectOrCreate: prop.asset.newsMentions.map((item) => ({
|
8049
7817
|
where: {
|
8050
|
-
id: item.id !== undefined ?
|
8051
|
-
equals: item.id
|
8052
|
-
} : undefined,
|
7818
|
+
id: item.id !== undefined ? item.id : undefined,
|
8053
7819
|
url: item.url !== undefined ? item.url : undefined,
|
8054
7820
|
assetId: item.assetId !== undefined ? {
|
8055
7821
|
equals: item.assetId
|
@@ -8071,9 +7837,7 @@ export const Order = {
|
|
8071
7837
|
}
|
8072
7838
|
: { connectOrCreate: {
|
8073
7839
|
where: {
|
8074
|
-
id: item.news.id !== undefined ?
|
8075
|
-
equals: item.news.id
|
8076
|
-
} : undefined,
|
7840
|
+
id: item.news.id !== undefined ? item.news.id : undefined,
|
8077
7841
|
url: item.news.url !== undefined ? item.news.url : undefined,
|
8078
7842
|
title: item.news.title !== undefined ? {
|
8079
7843
|
equals: item.news.title
|
@@ -8171,9 +7935,7 @@ export const Order = {
|
|
8171
7935
|
}`;
|
8172
7936
|
const variables = {
|
8173
7937
|
where: {
|
8174
|
-
id: props.id !== undefined ?
|
8175
|
-
equals: props.id
|
8176
|
-
} : undefined,
|
7938
|
+
id: props.id !== undefined ? props.id : undefined,
|
8177
7939
|
clientOrderId: props.clientOrderId !== undefined ? props.clientOrderId : undefined,
|
8178
7940
|
actionId: props.actionId !== undefined ? props.actionId : undefined,
|
8179
7941
|
stopLossId: props.stopLossId !== undefined ? props.stopLossId : undefined,
|