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.
Files changed (73) hide show
  1. package/Account.cjs +50 -150
  2. package/Action.cjs +117 -351
  3. package/Alert.cjs +85 -255
  4. package/AlpacaAccount.cjs +130 -390
  5. package/Asset.cjs +129 -387
  6. package/Authenticator.cjs +50 -150
  7. package/Customer.cjs +54 -162
  8. package/EconomicEvent.cjs +3 -9
  9. package/NewsArticle.cjs +30 -90
  10. package/NewsArticleAssetSentiment.cjs +57 -171
  11. package/Order.cjs +119 -357
  12. package/Position.cjs +133 -399
  13. package/Session.cjs +50 -150
  14. package/StopLoss.cjs +68 -204
  15. package/TakeProfit.cjs +68 -204
  16. package/Trade.cjs +145 -435
  17. package/User.cjs +73 -219
  18. package/VerificationToken.cjs +3 -9
  19. package/package.json +1 -1
  20. package/server/Account.d.ts.map +1 -1
  21. package/server/Account.js.map +1 -1
  22. package/server/Account.mjs +50 -150
  23. package/server/Action.d.ts.map +1 -1
  24. package/server/Action.js.map +1 -1
  25. package/server/Action.mjs +117 -351
  26. package/server/Alert.d.ts.map +1 -1
  27. package/server/Alert.js.map +1 -1
  28. package/server/Alert.mjs +85 -255
  29. package/server/AlpacaAccount.d.ts.map +1 -1
  30. package/server/AlpacaAccount.js.map +1 -1
  31. package/server/AlpacaAccount.mjs +130 -390
  32. package/server/Asset.d.ts.map +1 -1
  33. package/server/Asset.js.map +1 -1
  34. package/server/Asset.mjs +129 -387
  35. package/server/Authenticator.d.ts.map +1 -1
  36. package/server/Authenticator.js.map +1 -1
  37. package/server/Authenticator.mjs +50 -150
  38. package/server/Customer.d.ts.map +1 -1
  39. package/server/Customer.js.map +1 -1
  40. package/server/Customer.mjs +54 -162
  41. package/server/EconomicEvent.d.ts.map +1 -1
  42. package/server/EconomicEvent.js.map +1 -1
  43. package/server/EconomicEvent.mjs +3 -9
  44. package/server/NewsArticle.d.ts.map +1 -1
  45. package/server/NewsArticle.js.map +1 -1
  46. package/server/NewsArticle.mjs +30 -90
  47. package/server/NewsArticleAssetSentiment.d.ts.map +1 -1
  48. package/server/NewsArticleAssetSentiment.js.map +1 -1
  49. package/server/NewsArticleAssetSentiment.mjs +57 -171
  50. package/server/Order.d.ts.map +1 -1
  51. package/server/Order.js.map +1 -1
  52. package/server/Order.mjs +119 -357
  53. package/server/Position.d.ts.map +1 -1
  54. package/server/Position.js.map +1 -1
  55. package/server/Position.mjs +133 -399
  56. package/server/Session.d.ts.map +1 -1
  57. package/server/Session.js.map +1 -1
  58. package/server/Session.mjs +50 -150
  59. package/server/StopLoss.d.ts.map +1 -1
  60. package/server/StopLoss.js.map +1 -1
  61. package/server/StopLoss.mjs +68 -204
  62. package/server/TakeProfit.d.ts.map +1 -1
  63. package/server/TakeProfit.js.map +1 -1
  64. package/server/TakeProfit.mjs +68 -204
  65. package/server/Trade.d.ts.map +1 -1
  66. package/server/Trade.js.map +1 -1
  67. package/server/Trade.mjs +145 -435
  68. package/server/User.d.ts.map +1 -1
  69. package/server/User.js.map +1 -1
  70. package/server/User.mjs +73 -219
  71. package/server/VerificationToken.d.ts.map +1 -1
  72. package/server/VerificationToken.js.map +1 -1
  73. package/server/VerificationToken.mjs +3 -9
package/Asset.cjs CHANGED
@@ -306,9 +306,7 @@ exports.Asset = {
306
306
  }
307
307
  : { connectOrCreate: props.trades.map((item) => ({
308
308
  where: {
309
- id: item.id !== undefined ? {
310
- equals: item.id
311
- } : undefined,
309
+ id: item.id !== undefined ? item.id : undefined,
312
310
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
313
311
  equals: item.alpacaAccountId
314
312
  } : undefined,
@@ -336,9 +334,7 @@ exports.Asset = {
336
334
  }
337
335
  : { connectOrCreate: {
338
336
  where: {
339
- id: item.alpacaAccount.id !== undefined ? {
340
- equals: item.alpacaAccount.id
341
- } : undefined,
337
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
342
338
  userId: item.alpacaAccount.userId !== undefined ? {
343
339
  equals: item.alpacaAccount.userId
344
340
  } : undefined,
@@ -361,9 +357,7 @@ exports.Asset = {
361
357
  }
362
358
  : { connectOrCreate: {
363
359
  where: {
364
- id: item.alpacaAccount.user.id !== undefined ? {
365
- equals: item.alpacaAccount.user.id
366
- } : undefined,
360
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
367
361
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
368
362
  name: item.alpacaAccount.user.name !== undefined ? {
369
363
  equals: item.alpacaAccount.user.name
@@ -392,9 +386,7 @@ exports.Asset = {
392
386
  }
393
387
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
394
388
  where: {
395
- id: item.id !== undefined ? {
396
- equals: item.id
397
- } : undefined,
389
+ id: item.id !== undefined ? item.id : undefined,
398
390
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
399
391
  actionId: item.actionId !== undefined ? item.actionId : undefined,
400
392
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -439,9 +431,7 @@ exports.Asset = {
439
431
  }
440
432
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
441
433
  where: {
442
- id: item.id !== undefined ? {
443
- equals: item.id
444
- } : undefined,
434
+ id: item.id !== undefined ? item.id : undefined,
445
435
  assetId: item.assetId !== undefined ? {
446
436
  equals: item.assetId
447
437
  } : undefined,
@@ -474,9 +464,7 @@ exports.Asset = {
474
464
  }
475
465
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
476
466
  where: {
477
- id: item.id !== undefined ? {
478
- equals: item.id
479
- } : undefined,
467
+ id: item.id !== undefined ? item.id : undefined,
480
468
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
481
469
  equals: item.alpacaAccountId
482
470
  } : undefined,
@@ -499,9 +487,7 @@ exports.Asset = {
499
487
  }
500
488
  : { connectOrCreate: item.actions.map((item) => ({
501
489
  where: {
502
- id: item.id !== undefined ? {
503
- equals: item.id
504
- } : undefined,
490
+ id: item.id !== undefined ? item.id : undefined,
505
491
  tradeId: item.tradeId !== undefined ? {
506
492
  equals: item.tradeId
507
493
  } : undefined,
@@ -520,9 +506,7 @@ exports.Asset = {
520
506
  }
521
507
  : { connectOrCreate: {
522
508
  where: {
523
- id: item.order.id !== undefined ? {
524
- equals: item.order.id
525
- } : undefined,
509
+ id: item.order.id !== undefined ? item.order.id : undefined,
526
510
  clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
527
511
  actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
528
512
  stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
@@ -573,9 +557,7 @@ exports.Asset = {
573
557
  }
574
558
  : { connectOrCreate: props.orders.map((item) => ({
575
559
  where: {
576
- id: item.id !== undefined ? {
577
- equals: item.id
578
- } : undefined,
560
+ id: item.id !== undefined ? item.id : undefined,
579
561
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
580
562
  actionId: item.actionId !== undefined ? item.actionId : undefined,
581
563
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -617,9 +599,7 @@ exports.Asset = {
617
599
  }
618
600
  : { connectOrCreate: {
619
601
  where: {
620
- id: item.stopLoss.id !== undefined ? {
621
- equals: item.stopLoss.id
622
- } : undefined,
602
+ id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
623
603
  orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
624
604
  },
625
605
  create: {
@@ -636,9 +616,7 @@ exports.Asset = {
636
616
  }
637
617
  : { connectOrCreate: {
638
618
  where: {
639
- id: item.takeProfit.id !== undefined ? {
640
- equals: item.takeProfit.id
641
- } : undefined,
619
+ id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
642
620
  orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
643
621
  },
644
622
  create: {
@@ -655,9 +633,7 @@ exports.Asset = {
655
633
  }
656
634
  : { connectOrCreate: {
657
635
  where: {
658
- id: item.alpacaAccount.id !== undefined ? {
659
- equals: item.alpacaAccount.id
660
- } : undefined,
636
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
661
637
  userId: item.alpacaAccount.userId !== undefined ? {
662
638
  equals: item.alpacaAccount.userId
663
639
  } : undefined,
@@ -680,9 +656,7 @@ exports.Asset = {
680
656
  }
681
657
  : { connectOrCreate: {
682
658
  where: {
683
- id: item.alpacaAccount.user.id !== undefined ? {
684
- equals: item.alpacaAccount.user.id
685
- } : undefined,
659
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
686
660
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
687
661
  name: item.alpacaAccount.user.name !== undefined ? {
688
662
  equals: item.alpacaAccount.user.name
@@ -711,9 +685,7 @@ exports.Asset = {
711
685
  }
712
686
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
713
687
  where: {
714
- id: item.id !== undefined ? {
715
- equals: item.id
716
- } : undefined,
688
+ id: item.id !== undefined ? item.id : undefined,
717
689
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
718
690
  equals: item.alpacaAccountId
719
691
  } : undefined,
@@ -744,9 +716,7 @@ exports.Asset = {
744
716
  }
745
717
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
746
718
  where: {
747
- id: item.id !== undefined ? {
748
- equals: item.id
749
- } : undefined,
719
+ id: item.id !== undefined ? item.id : undefined,
750
720
  assetId: item.assetId !== undefined ? {
751
721
  equals: item.assetId
752
722
  } : undefined,
@@ -779,9 +749,7 @@ exports.Asset = {
779
749
  }
780
750
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
781
751
  where: {
782
- id: item.id !== undefined ? {
783
- equals: item.id
784
- } : undefined,
752
+ id: item.id !== undefined ? item.id : undefined,
785
753
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
786
754
  equals: item.alpacaAccountId
787
755
  } : undefined,
@@ -804,9 +772,7 @@ exports.Asset = {
804
772
  }
805
773
  : { connectOrCreate: {
806
774
  where: {
807
- id: item.action.id !== undefined ? {
808
- equals: item.action.id
809
- } : undefined,
775
+ id: item.action.id !== undefined ? item.action.id : undefined,
810
776
  tradeId: item.action.tradeId !== undefined ? {
811
777
  equals: item.action.tradeId
812
778
  } : undefined,
@@ -825,9 +791,7 @@ exports.Asset = {
825
791
  }
826
792
  : { connectOrCreate: {
827
793
  where: {
828
- id: item.action.trade.id !== undefined ? {
829
- equals: item.action.trade.id
830
- } : undefined,
794
+ id: item.action.trade.id !== undefined ? item.action.trade.id : undefined,
831
795
  alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
832
796
  equals: item.action.trade.alpacaAccountId
833
797
  } : undefined,
@@ -864,9 +828,7 @@ exports.Asset = {
864
828
  }
865
829
  : { connectOrCreate: props.positions.map((item) => ({
866
830
  where: {
867
- id: item.id !== undefined ? {
868
- equals: item.id
869
- } : undefined,
831
+ id: item.id !== undefined ? item.id : undefined,
870
832
  assetId: item.assetId !== undefined ? {
871
833
  equals: item.assetId
872
834
  } : undefined,
@@ -896,9 +858,7 @@ exports.Asset = {
896
858
  }
897
859
  : { connectOrCreate: {
898
860
  where: {
899
- id: item.alpacaAccount.id !== undefined ? {
900
- equals: item.alpacaAccount.id
901
- } : undefined,
861
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
902
862
  userId: item.alpacaAccount.userId !== undefined ? {
903
863
  equals: item.alpacaAccount.userId
904
864
  } : undefined,
@@ -921,9 +881,7 @@ exports.Asset = {
921
881
  }
922
882
  : { connectOrCreate: {
923
883
  where: {
924
- id: item.alpacaAccount.user.id !== undefined ? {
925
- equals: item.alpacaAccount.user.id
926
- } : undefined,
884
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
927
885
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
928
886
  name: item.alpacaAccount.user.name !== undefined ? {
929
887
  equals: item.alpacaAccount.user.name
@@ -952,9 +910,7 @@ exports.Asset = {
952
910
  }
953
911
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
954
912
  where: {
955
- id: item.id !== undefined ? {
956
- equals: item.id
957
- } : undefined,
913
+ id: item.id !== undefined ? item.id : undefined,
958
914
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
959
915
  equals: item.alpacaAccountId
960
916
  } : undefined,
@@ -985,9 +941,7 @@ exports.Asset = {
985
941
  }
986
942
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
987
943
  where: {
988
- id: item.id !== undefined ? {
989
- equals: item.id
990
- } : undefined,
944
+ id: item.id !== undefined ? item.id : undefined,
991
945
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
992
946
  actionId: item.actionId !== undefined ? item.actionId : undefined,
993
947
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -1032,9 +986,7 @@ exports.Asset = {
1032
986
  }
1033
987
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
1034
988
  where: {
1035
- id: item.id !== undefined ? {
1036
- equals: item.id
1037
- } : undefined,
989
+ id: item.id !== undefined ? item.id : undefined,
1038
990
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1039
991
  equals: item.alpacaAccountId
1040
992
  } : undefined,
@@ -1060,9 +1012,7 @@ exports.Asset = {
1060
1012
  }
1061
1013
  : { connectOrCreate: props.newsMentions.map((item) => ({
1062
1014
  where: {
1063
- id: item.id !== undefined ? {
1064
- equals: item.id
1065
- } : undefined,
1015
+ id: item.id !== undefined ? item.id : undefined,
1066
1016
  url: item.url !== undefined ? item.url : undefined,
1067
1017
  assetId: item.assetId !== undefined ? {
1068
1018
  equals: item.assetId
@@ -1084,9 +1034,7 @@ exports.Asset = {
1084
1034
  }
1085
1035
  : { connectOrCreate: {
1086
1036
  where: {
1087
- id: item.news.id !== undefined ? {
1088
- equals: item.news.id
1089
- } : undefined,
1037
+ id: item.news.id !== undefined ? item.news.id : undefined,
1090
1038
  url: item.news.url !== undefined ? item.news.url : undefined,
1091
1039
  title: item.news.title !== undefined ? {
1092
1040
  equals: item.news.title
@@ -1235,9 +1183,7 @@ exports.Asset = {
1235
1183
  }`;
1236
1184
  const variables = {
1237
1185
  where: {
1238
- id: props.id !== undefined ? {
1239
- equals: props.id
1240
- } : undefined,
1186
+ id: props.id !== undefined ? props.id : undefined,
1241
1187
  symbol: props.symbol !== undefined ? props.symbol : undefined,
1242
1188
  name: props.name !== undefined ? props.name : undefined,
1243
1189
  type: props.type !== undefined ? props.type : undefined,
@@ -1472,9 +1418,7 @@ exports.Asset = {
1472
1418
  trades: props.trades ? {
1473
1419
  upsert: props.trades.map((item) => ({
1474
1420
  where: {
1475
- id: item.id !== undefined ? {
1476
- equals: item.id
1477
- } : undefined,
1421
+ id: item.id !== undefined ? item.id : undefined,
1478
1422
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1479
1423
  equals: item.alpacaAccountId
1480
1424
  } : undefined,
@@ -1629,9 +1573,7 @@ exports.Asset = {
1629
1573
  orders: item.alpacaAccount.orders ? {
1630
1574
  upsert: item.alpacaAccount.orders.map((item) => ({
1631
1575
  where: {
1632
- id: item.id !== undefined ? {
1633
- equals: item.id
1634
- } : undefined,
1576
+ id: item.id !== undefined ? item.id : undefined,
1635
1577
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
1636
1578
  actionId: item.actionId !== undefined ? item.actionId : undefined,
1637
1579
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -1742,9 +1684,7 @@ exports.Asset = {
1742
1684
  positions: item.alpacaAccount.positions ? {
1743
1685
  upsert: item.alpacaAccount.positions.map((item) => ({
1744
1686
  where: {
1745
- id: item.id !== undefined ? {
1746
- equals: item.id
1747
- } : undefined,
1687
+ id: item.id !== undefined ? item.id : undefined,
1748
1688
  assetId: item.assetId !== undefined ? {
1749
1689
  equals: item.assetId
1750
1690
  } : undefined,
@@ -1816,9 +1756,7 @@ exports.Asset = {
1816
1756
  alerts: item.alpacaAccount.alerts ? {
1817
1757
  upsert: item.alpacaAccount.alerts.map((item) => ({
1818
1758
  where: {
1819
- id: item.id !== undefined ? {
1820
- equals: item.id
1821
- } : undefined,
1759
+ id: item.id !== undefined ? item.id : undefined,
1822
1760
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1823
1761
  equals: item.alpacaAccountId
1824
1762
  } : undefined,
@@ -1863,9 +1801,7 @@ exports.Asset = {
1863
1801
  }
1864
1802
  : { connectOrCreate: {
1865
1803
  where: {
1866
- id: item.alpacaAccount.user.id !== undefined ? {
1867
- equals: item.alpacaAccount.user.id
1868
- } : undefined,
1804
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
1869
1805
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
1870
1806
  name: item.alpacaAccount.user.name !== undefined ? {
1871
1807
  equals: item.alpacaAccount.user.name
@@ -1894,9 +1830,7 @@ exports.Asset = {
1894
1830
  }
1895
1831
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
1896
1832
  where: {
1897
- id: item.id !== undefined ? {
1898
- equals: item.id
1899
- } : undefined,
1833
+ id: item.id !== undefined ? item.id : undefined,
1900
1834
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
1901
1835
  actionId: item.actionId !== undefined ? item.actionId : undefined,
1902
1836
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -1941,9 +1875,7 @@ exports.Asset = {
1941
1875
  }
1942
1876
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
1943
1877
  where: {
1944
- id: item.id !== undefined ? {
1945
- equals: item.id
1946
- } : undefined,
1878
+ id: item.id !== undefined ? item.id : undefined,
1947
1879
  assetId: item.assetId !== undefined ? {
1948
1880
  equals: item.assetId
1949
1881
  } : undefined,
@@ -1976,9 +1908,7 @@ exports.Asset = {
1976
1908
  }
1977
1909
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
1978
1910
  where: {
1979
- id: item.id !== undefined ? {
1980
- equals: item.id
1981
- } : undefined,
1911
+ id: item.id !== undefined ? item.id : undefined,
1982
1912
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1983
1913
  equals: item.alpacaAccountId
1984
1914
  } : undefined,
@@ -1996,9 +1926,7 @@ exports.Asset = {
1996
1926
  actions: item.actions ? {
1997
1927
  upsert: item.actions.map((item) => ({
1998
1928
  where: {
1999
- id: item.id !== undefined ? {
2000
- equals: item.id
2001
- } : undefined,
1929
+ id: item.id !== undefined ? item.id : undefined,
2002
1930
  tradeId: item.tradeId !== undefined ? {
2003
1931
  equals: item.tradeId
2004
1932
  } : undefined,
@@ -2153,9 +2081,7 @@ exports.Asset = {
2153
2081
  }
2154
2082
  : { connectOrCreate: {
2155
2083
  where: {
2156
- id: item.order.id !== undefined ? {
2157
- equals: item.order.id
2158
- } : undefined,
2084
+ id: item.order.id !== undefined ? item.order.id : undefined,
2159
2085
  clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
2160
2086
  actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
2161
2087
  stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
@@ -2216,9 +2142,7 @@ exports.Asset = {
2216
2142
  }
2217
2143
  : { connectOrCreate: {
2218
2144
  where: {
2219
- id: item.alpacaAccount.id !== undefined ? {
2220
- equals: item.alpacaAccount.id
2221
- } : undefined,
2145
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
2222
2146
  userId: item.alpacaAccount.userId !== undefined ? {
2223
2147
  equals: item.alpacaAccount.userId
2224
2148
  } : undefined,
@@ -2241,9 +2165,7 @@ exports.Asset = {
2241
2165
  }
2242
2166
  : { connectOrCreate: {
2243
2167
  where: {
2244
- id: item.alpacaAccount.user.id !== undefined ? {
2245
- equals: item.alpacaAccount.user.id
2246
- } : undefined,
2168
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
2247
2169
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
2248
2170
  name: item.alpacaAccount.user.name !== undefined ? {
2249
2171
  equals: item.alpacaAccount.user.name
@@ -2272,9 +2194,7 @@ exports.Asset = {
2272
2194
  }
2273
2195
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
2274
2196
  where: {
2275
- id: item.id !== undefined ? {
2276
- equals: item.id
2277
- } : undefined,
2197
+ id: item.id !== undefined ? item.id : undefined,
2278
2198
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
2279
2199
  actionId: item.actionId !== undefined ? item.actionId : undefined,
2280
2200
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -2319,9 +2239,7 @@ exports.Asset = {
2319
2239
  }
2320
2240
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
2321
2241
  where: {
2322
- id: item.id !== undefined ? {
2323
- equals: item.id
2324
- } : undefined,
2242
+ id: item.id !== undefined ? item.id : undefined,
2325
2243
  assetId: item.assetId !== undefined ? {
2326
2244
  equals: item.assetId
2327
2245
  } : undefined,
@@ -2354,9 +2272,7 @@ exports.Asset = {
2354
2272
  }
2355
2273
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
2356
2274
  where: {
2357
- id: item.id !== undefined ? {
2358
- equals: item.id
2359
- } : undefined,
2275
+ id: item.id !== undefined ? item.id : undefined,
2360
2276
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2361
2277
  equals: item.alpacaAccountId
2362
2278
  } : undefined,
@@ -2379,9 +2295,7 @@ exports.Asset = {
2379
2295
  }
2380
2296
  : { connectOrCreate: item.actions.map((item) => ({
2381
2297
  where: {
2382
- id: item.id !== undefined ? {
2383
- equals: item.id
2384
- } : undefined,
2298
+ id: item.id !== undefined ? item.id : undefined,
2385
2299
  tradeId: item.tradeId !== undefined ? {
2386
2300
  equals: item.tradeId
2387
2301
  } : undefined,
@@ -2400,9 +2314,7 @@ exports.Asset = {
2400
2314
  }
2401
2315
  : { connectOrCreate: {
2402
2316
  where: {
2403
- id: item.order.id !== undefined ? {
2404
- equals: item.order.id
2405
- } : undefined,
2317
+ id: item.order.id !== undefined ? item.order.id : undefined,
2406
2318
  clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
2407
2319
  actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
2408
2320
  stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
@@ -2448,9 +2360,7 @@ exports.Asset = {
2448
2360
  orders: props.orders ? {
2449
2361
  upsert: props.orders.map((item) => ({
2450
2362
  where: {
2451
- id: item.id !== undefined ? {
2452
- equals: item.id
2453
- } : undefined,
2363
+ id: item.id !== undefined ? item.id : undefined,
2454
2364
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
2455
2365
  actionId: item.actionId !== undefined ? item.actionId : undefined,
2456
2366
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -2695,9 +2605,7 @@ exports.Asset = {
2695
2605
  trades: item.alpacaAccount.trades ? {
2696
2606
  upsert: item.alpacaAccount.trades.map((item) => ({
2697
2607
  where: {
2698
- id: item.id !== undefined ? {
2699
- equals: item.id
2700
- } : undefined,
2608
+ id: item.id !== undefined ? item.id : undefined,
2701
2609
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2702
2610
  equals: item.alpacaAccountId
2703
2611
  } : undefined,
@@ -2761,9 +2669,7 @@ exports.Asset = {
2761
2669
  positions: item.alpacaAccount.positions ? {
2762
2670
  upsert: item.alpacaAccount.positions.map((item) => ({
2763
2671
  where: {
2764
- id: item.id !== undefined ? {
2765
- equals: item.id
2766
- } : undefined,
2672
+ id: item.id !== undefined ? item.id : undefined,
2767
2673
  assetId: item.assetId !== undefined ? {
2768
2674
  equals: item.assetId
2769
2675
  } : undefined,
@@ -2835,9 +2741,7 @@ exports.Asset = {
2835
2741
  alerts: item.alpacaAccount.alerts ? {
2836
2742
  upsert: item.alpacaAccount.alerts.map((item) => ({
2837
2743
  where: {
2838
- id: item.id !== undefined ? {
2839
- equals: item.id
2840
- } : undefined,
2744
+ id: item.id !== undefined ? item.id : undefined,
2841
2745
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2842
2746
  equals: item.alpacaAccountId
2843
2747
  } : undefined,
@@ -2882,9 +2786,7 @@ exports.Asset = {
2882
2786
  }
2883
2787
  : { connectOrCreate: {
2884
2788
  where: {
2885
- id: item.alpacaAccount.user.id !== undefined ? {
2886
- equals: item.alpacaAccount.user.id
2887
- } : undefined,
2789
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
2888
2790
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
2889
2791
  name: item.alpacaAccount.user.name !== undefined ? {
2890
2792
  equals: item.alpacaAccount.user.name
@@ -2913,9 +2815,7 @@ exports.Asset = {
2913
2815
  }
2914
2816
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
2915
2817
  where: {
2916
- id: item.id !== undefined ? {
2917
- equals: item.id
2918
- } : undefined,
2818
+ id: item.id !== undefined ? item.id : undefined,
2919
2819
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2920
2820
  equals: item.alpacaAccountId
2921
2821
  } : undefined,
@@ -2946,9 +2846,7 @@ exports.Asset = {
2946
2846
  }
2947
2847
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
2948
2848
  where: {
2949
- id: item.id !== undefined ? {
2950
- equals: item.id
2951
- } : undefined,
2849
+ id: item.id !== undefined ? item.id : undefined,
2952
2850
  assetId: item.assetId !== undefined ? {
2953
2851
  equals: item.assetId
2954
2852
  } : undefined,
@@ -2981,9 +2879,7 @@ exports.Asset = {
2981
2879
  }
2982
2880
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
2983
2881
  where: {
2984
- id: item.id !== undefined ? {
2985
- equals: item.id
2986
- } : undefined,
2882
+ id: item.id !== undefined ? item.id : undefined,
2987
2883
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2988
2884
  equals: item.alpacaAccountId
2989
2885
  } : undefined,
@@ -3108,9 +3004,7 @@ exports.Asset = {
3108
3004
  }
3109
3005
  : { connectOrCreate: {
3110
3006
  where: {
3111
- id: item.action.trade.id !== undefined ? {
3112
- equals: item.action.trade.id
3113
- } : undefined,
3007
+ id: item.action.trade.id !== undefined ? item.action.trade.id : undefined,
3114
3008
  alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
3115
3009
  equals: item.action.trade.alpacaAccountId
3116
3010
  } : undefined,
@@ -3168,9 +3062,7 @@ exports.Asset = {
3168
3062
  }
3169
3063
  : { connectOrCreate: {
3170
3064
  where: {
3171
- id: item.stopLoss.id !== undefined ? {
3172
- equals: item.stopLoss.id
3173
- } : undefined,
3065
+ id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
3174
3066
  orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
3175
3067
  },
3176
3068
  create: {
@@ -3187,9 +3079,7 @@ exports.Asset = {
3187
3079
  }
3188
3080
  : { connectOrCreate: {
3189
3081
  where: {
3190
- id: item.takeProfit.id !== undefined ? {
3191
- equals: item.takeProfit.id
3192
- } : undefined,
3082
+ id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
3193
3083
  orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
3194
3084
  },
3195
3085
  create: {
@@ -3206,9 +3096,7 @@ exports.Asset = {
3206
3096
  }
3207
3097
  : { connectOrCreate: {
3208
3098
  where: {
3209
- id: item.alpacaAccount.id !== undefined ? {
3210
- equals: item.alpacaAccount.id
3211
- } : undefined,
3099
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
3212
3100
  userId: item.alpacaAccount.userId !== undefined ? {
3213
3101
  equals: item.alpacaAccount.userId
3214
3102
  } : undefined,
@@ -3231,9 +3119,7 @@ exports.Asset = {
3231
3119
  }
3232
3120
  : { connectOrCreate: {
3233
3121
  where: {
3234
- id: item.alpacaAccount.user.id !== undefined ? {
3235
- equals: item.alpacaAccount.user.id
3236
- } : undefined,
3122
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
3237
3123
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
3238
3124
  name: item.alpacaAccount.user.name !== undefined ? {
3239
3125
  equals: item.alpacaAccount.user.name
@@ -3262,9 +3148,7 @@ exports.Asset = {
3262
3148
  }
3263
3149
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
3264
3150
  where: {
3265
- id: item.id !== undefined ? {
3266
- equals: item.id
3267
- } : undefined,
3151
+ id: item.id !== undefined ? item.id : undefined,
3268
3152
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3269
3153
  equals: item.alpacaAccountId
3270
3154
  } : undefined,
@@ -3295,9 +3179,7 @@ exports.Asset = {
3295
3179
  }
3296
3180
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
3297
3181
  where: {
3298
- id: item.id !== undefined ? {
3299
- equals: item.id
3300
- } : undefined,
3182
+ id: item.id !== undefined ? item.id : undefined,
3301
3183
  assetId: item.assetId !== undefined ? {
3302
3184
  equals: item.assetId
3303
3185
  } : undefined,
@@ -3330,9 +3212,7 @@ exports.Asset = {
3330
3212
  }
3331
3213
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
3332
3214
  where: {
3333
- id: item.id !== undefined ? {
3334
- equals: item.id
3335
- } : undefined,
3215
+ id: item.id !== undefined ? item.id : undefined,
3336
3216
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3337
3217
  equals: item.alpacaAccountId
3338
3218
  } : undefined,
@@ -3355,9 +3235,7 @@ exports.Asset = {
3355
3235
  }
3356
3236
  : { connectOrCreate: {
3357
3237
  where: {
3358
- id: item.action.id !== undefined ? {
3359
- equals: item.action.id
3360
- } : undefined,
3238
+ id: item.action.id !== undefined ? item.action.id : undefined,
3361
3239
  tradeId: item.action.tradeId !== undefined ? {
3362
3240
  equals: item.action.tradeId
3363
3241
  } : undefined,
@@ -3376,9 +3254,7 @@ exports.Asset = {
3376
3254
  }
3377
3255
  : { connectOrCreate: {
3378
3256
  where: {
3379
- id: item.action.trade.id !== undefined ? {
3380
- equals: item.action.trade.id
3381
- } : undefined,
3257
+ id: item.action.trade.id !== undefined ? item.action.trade.id : undefined,
3382
3258
  alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
3383
3259
  equals: item.action.trade.alpacaAccountId
3384
3260
  } : undefined,
@@ -3410,9 +3286,7 @@ exports.Asset = {
3410
3286
  positions: props.positions ? {
3411
3287
  upsert: props.positions.map((item) => ({
3412
3288
  where: {
3413
- id: item.id !== undefined ? {
3414
- equals: item.id
3415
- } : undefined,
3289
+ id: item.id !== undefined ? item.id : undefined,
3416
3290
  assetId: item.assetId !== undefined ? {
3417
3291
  equals: item.assetId
3418
3292
  } : undefined,
@@ -3573,9 +3447,7 @@ exports.Asset = {
3573
3447
  trades: item.alpacaAccount.trades ? {
3574
3448
  upsert: item.alpacaAccount.trades.map((item) => ({
3575
3449
  where: {
3576
- id: item.id !== undefined ? {
3577
- equals: item.id
3578
- } : undefined,
3450
+ id: item.id !== undefined ? item.id : undefined,
3579
3451
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3580
3452
  equals: item.alpacaAccountId
3581
3453
  } : undefined,
@@ -3639,9 +3511,7 @@ exports.Asset = {
3639
3511
  orders: item.alpacaAccount.orders ? {
3640
3512
  upsert: item.alpacaAccount.orders.map((item) => ({
3641
3513
  where: {
3642
- id: item.id !== undefined ? {
3643
- equals: item.id
3644
- } : undefined,
3514
+ id: item.id !== undefined ? item.id : undefined,
3645
3515
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
3646
3516
  actionId: item.actionId !== undefined ? item.actionId : undefined,
3647
3517
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -3752,9 +3622,7 @@ exports.Asset = {
3752
3622
  alerts: item.alpacaAccount.alerts ? {
3753
3623
  upsert: item.alpacaAccount.alerts.map((item) => ({
3754
3624
  where: {
3755
- id: item.id !== undefined ? {
3756
- equals: item.id
3757
- } : undefined,
3625
+ id: item.id !== undefined ? item.id : undefined,
3758
3626
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3759
3627
  equals: item.alpacaAccountId
3760
3628
  } : undefined,
@@ -3799,9 +3667,7 @@ exports.Asset = {
3799
3667
  }
3800
3668
  : { connectOrCreate: {
3801
3669
  where: {
3802
- id: item.alpacaAccount.user.id !== undefined ? {
3803
- equals: item.alpacaAccount.user.id
3804
- } : undefined,
3670
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
3805
3671
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
3806
3672
  name: item.alpacaAccount.user.name !== undefined ? {
3807
3673
  equals: item.alpacaAccount.user.name
@@ -3830,9 +3696,7 @@ exports.Asset = {
3830
3696
  }
3831
3697
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
3832
3698
  where: {
3833
- id: item.id !== undefined ? {
3834
- equals: item.id
3835
- } : undefined,
3699
+ id: item.id !== undefined ? item.id : undefined,
3836
3700
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3837
3701
  equals: item.alpacaAccountId
3838
3702
  } : undefined,
@@ -3863,9 +3727,7 @@ exports.Asset = {
3863
3727
  }
3864
3728
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
3865
3729
  where: {
3866
- id: item.id !== undefined ? {
3867
- equals: item.id
3868
- } : undefined,
3730
+ id: item.id !== undefined ? item.id : undefined,
3869
3731
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
3870
3732
  actionId: item.actionId !== undefined ? item.actionId : undefined,
3871
3733
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -3910,9 +3772,7 @@ exports.Asset = {
3910
3772
  }
3911
3773
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
3912
3774
  where: {
3913
- id: item.id !== undefined ? {
3914
- equals: item.id
3915
- } : undefined,
3775
+ id: item.id !== undefined ? item.id : undefined,
3916
3776
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3917
3777
  equals: item.alpacaAccountId
3918
3778
  } : undefined,
@@ -3950,9 +3810,7 @@ exports.Asset = {
3950
3810
  }
3951
3811
  : { connectOrCreate: {
3952
3812
  where: {
3953
- id: item.alpacaAccount.id !== undefined ? {
3954
- equals: item.alpacaAccount.id
3955
- } : undefined,
3813
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
3956
3814
  userId: item.alpacaAccount.userId !== undefined ? {
3957
3815
  equals: item.alpacaAccount.userId
3958
3816
  } : undefined,
@@ -3975,9 +3833,7 @@ exports.Asset = {
3975
3833
  }
3976
3834
  : { connectOrCreate: {
3977
3835
  where: {
3978
- id: item.alpacaAccount.user.id !== undefined ? {
3979
- equals: item.alpacaAccount.user.id
3980
- } : undefined,
3836
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
3981
3837
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
3982
3838
  name: item.alpacaAccount.user.name !== undefined ? {
3983
3839
  equals: item.alpacaAccount.user.name
@@ -4006,9 +3862,7 @@ exports.Asset = {
4006
3862
  }
4007
3863
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
4008
3864
  where: {
4009
- id: item.id !== undefined ? {
4010
- equals: item.id
4011
- } : undefined,
3865
+ id: item.id !== undefined ? item.id : undefined,
4012
3866
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
4013
3867
  equals: item.alpacaAccountId
4014
3868
  } : undefined,
@@ -4039,9 +3893,7 @@ exports.Asset = {
4039
3893
  }
4040
3894
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
4041
3895
  where: {
4042
- id: item.id !== undefined ? {
4043
- equals: item.id
4044
- } : undefined,
3896
+ id: item.id !== undefined ? item.id : undefined,
4045
3897
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
4046
3898
  actionId: item.actionId !== undefined ? item.actionId : undefined,
4047
3899
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -4086,9 +3938,7 @@ exports.Asset = {
4086
3938
  }
4087
3939
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
4088
3940
  where: {
4089
- id: item.id !== undefined ? {
4090
- equals: item.id
4091
- } : undefined,
3941
+ id: item.id !== undefined ? item.id : undefined,
4092
3942
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
4093
3943
  equals: item.alpacaAccountId
4094
3944
  } : undefined,
@@ -4109,9 +3959,7 @@ exports.Asset = {
4109
3959
  newsMentions: props.newsMentions ? {
4110
3960
  upsert: props.newsMentions.map((item) => ({
4111
3961
  where: {
4112
- id: item.id !== undefined ? {
4113
- equals: item.id
4114
- } : undefined,
3962
+ id: item.id !== undefined ? item.id : undefined,
4115
3963
  url: item.url !== undefined ? item.url : undefined,
4116
3964
  assetId: item.assetId !== undefined ? {
4117
3965
  equals: item.assetId
@@ -4224,9 +4072,7 @@ exports.Asset = {
4224
4072
  }
4225
4073
  : { connectOrCreate: {
4226
4074
  where: {
4227
- id: item.news.id !== undefined ? {
4228
- equals: item.news.id
4229
- } : undefined,
4075
+ id: item.news.id !== undefined ? item.news.id : undefined,
4230
4076
  url: item.news.url !== undefined ? item.news.url : undefined,
4231
4077
  title: item.news.title !== undefined ? {
4232
4078
  equals: item.news.title
@@ -4286,9 +4132,7 @@ exports.Asset = {
4286
4132
  }`;
4287
4133
  const variables = props.map(prop => ({
4288
4134
  where: {
4289
- id: prop.id !== undefined ? {
4290
- equals: prop.id
4291
- } : undefined,
4135
+ id: prop.id !== undefined ? prop.id : undefined,
4292
4136
  symbol: prop.symbol !== undefined ? prop.symbol : undefined,
4293
4137
  name: prop.name !== undefined ? prop.name : undefined,
4294
4138
  type: prop.type !== undefined ? prop.type : undefined,
@@ -4523,9 +4367,7 @@ exports.Asset = {
4523
4367
  trades: prop.trades ? {
4524
4368
  upsert: prop.trades.map((item) => ({
4525
4369
  where: {
4526
- id: item.id !== undefined ? {
4527
- equals: item.id
4528
- } : undefined,
4370
+ id: item.id !== undefined ? item.id : undefined,
4529
4371
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
4530
4372
  equals: item.alpacaAccountId
4531
4373
  } : undefined,
@@ -4680,9 +4522,7 @@ exports.Asset = {
4680
4522
  orders: item.alpacaAccount.orders ? {
4681
4523
  upsert: item.alpacaAccount.orders.map((item) => ({
4682
4524
  where: {
4683
- id: item.id !== undefined ? {
4684
- equals: item.id
4685
- } : undefined,
4525
+ id: item.id !== undefined ? item.id : undefined,
4686
4526
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
4687
4527
  actionId: item.actionId !== undefined ? item.actionId : undefined,
4688
4528
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -4793,9 +4633,7 @@ exports.Asset = {
4793
4633
  positions: item.alpacaAccount.positions ? {
4794
4634
  upsert: item.alpacaAccount.positions.map((item) => ({
4795
4635
  where: {
4796
- id: item.id !== undefined ? {
4797
- equals: item.id
4798
- } : undefined,
4636
+ id: item.id !== undefined ? item.id : undefined,
4799
4637
  assetId: item.assetId !== undefined ? {
4800
4638
  equals: item.assetId
4801
4639
  } : undefined,
@@ -4867,9 +4705,7 @@ exports.Asset = {
4867
4705
  alerts: item.alpacaAccount.alerts ? {
4868
4706
  upsert: item.alpacaAccount.alerts.map((item) => ({
4869
4707
  where: {
4870
- id: item.id !== undefined ? {
4871
- equals: item.id
4872
- } : undefined,
4708
+ id: item.id !== undefined ? item.id : undefined,
4873
4709
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
4874
4710
  equals: item.alpacaAccountId
4875
4711
  } : undefined,
@@ -4914,9 +4750,7 @@ exports.Asset = {
4914
4750
  }
4915
4751
  : { connectOrCreate: {
4916
4752
  where: {
4917
- id: item.alpacaAccount.user.id !== undefined ? {
4918
- equals: item.alpacaAccount.user.id
4919
- } : undefined,
4753
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
4920
4754
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
4921
4755
  name: item.alpacaAccount.user.name !== undefined ? {
4922
4756
  equals: item.alpacaAccount.user.name
@@ -4945,9 +4779,7 @@ exports.Asset = {
4945
4779
  }
4946
4780
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
4947
4781
  where: {
4948
- id: item.id !== undefined ? {
4949
- equals: item.id
4950
- } : undefined,
4782
+ id: item.id !== undefined ? item.id : undefined,
4951
4783
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
4952
4784
  actionId: item.actionId !== undefined ? item.actionId : undefined,
4953
4785
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -4992,9 +4824,7 @@ exports.Asset = {
4992
4824
  }
4993
4825
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
4994
4826
  where: {
4995
- id: item.id !== undefined ? {
4996
- equals: item.id
4997
- } : undefined,
4827
+ id: item.id !== undefined ? item.id : undefined,
4998
4828
  assetId: item.assetId !== undefined ? {
4999
4829
  equals: item.assetId
5000
4830
  } : undefined,
@@ -5027,9 +4857,7 @@ exports.Asset = {
5027
4857
  }
5028
4858
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
5029
4859
  where: {
5030
- id: item.id !== undefined ? {
5031
- equals: item.id
5032
- } : undefined,
4860
+ id: item.id !== undefined ? item.id : undefined,
5033
4861
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
5034
4862
  equals: item.alpacaAccountId
5035
4863
  } : undefined,
@@ -5047,9 +4875,7 @@ exports.Asset = {
5047
4875
  actions: item.actions ? {
5048
4876
  upsert: item.actions.map((item) => ({
5049
4877
  where: {
5050
- id: item.id !== undefined ? {
5051
- equals: item.id
5052
- } : undefined,
4878
+ id: item.id !== undefined ? item.id : undefined,
5053
4879
  tradeId: item.tradeId !== undefined ? {
5054
4880
  equals: item.tradeId
5055
4881
  } : undefined,
@@ -5204,9 +5030,7 @@ exports.Asset = {
5204
5030
  }
5205
5031
  : { connectOrCreate: {
5206
5032
  where: {
5207
- id: item.order.id !== undefined ? {
5208
- equals: item.order.id
5209
- } : undefined,
5033
+ id: item.order.id !== undefined ? item.order.id : undefined,
5210
5034
  clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
5211
5035
  actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
5212
5036
  stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
@@ -5267,9 +5091,7 @@ exports.Asset = {
5267
5091
  }
5268
5092
  : { connectOrCreate: {
5269
5093
  where: {
5270
- id: item.alpacaAccount.id !== undefined ? {
5271
- equals: item.alpacaAccount.id
5272
- } : undefined,
5094
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
5273
5095
  userId: item.alpacaAccount.userId !== undefined ? {
5274
5096
  equals: item.alpacaAccount.userId
5275
5097
  } : undefined,
@@ -5292,9 +5114,7 @@ exports.Asset = {
5292
5114
  }
5293
5115
  : { connectOrCreate: {
5294
5116
  where: {
5295
- id: item.alpacaAccount.user.id !== undefined ? {
5296
- equals: item.alpacaAccount.user.id
5297
- } : undefined,
5117
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
5298
5118
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
5299
5119
  name: item.alpacaAccount.user.name !== undefined ? {
5300
5120
  equals: item.alpacaAccount.user.name
@@ -5323,9 +5143,7 @@ exports.Asset = {
5323
5143
  }
5324
5144
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
5325
5145
  where: {
5326
- id: item.id !== undefined ? {
5327
- equals: item.id
5328
- } : undefined,
5146
+ id: item.id !== undefined ? item.id : undefined,
5329
5147
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
5330
5148
  actionId: item.actionId !== undefined ? item.actionId : undefined,
5331
5149
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -5370,9 +5188,7 @@ exports.Asset = {
5370
5188
  }
5371
5189
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
5372
5190
  where: {
5373
- id: item.id !== undefined ? {
5374
- equals: item.id
5375
- } : undefined,
5191
+ id: item.id !== undefined ? item.id : undefined,
5376
5192
  assetId: item.assetId !== undefined ? {
5377
5193
  equals: item.assetId
5378
5194
  } : undefined,
@@ -5405,9 +5221,7 @@ exports.Asset = {
5405
5221
  }
5406
5222
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
5407
5223
  where: {
5408
- id: item.id !== undefined ? {
5409
- equals: item.id
5410
- } : undefined,
5224
+ id: item.id !== undefined ? item.id : undefined,
5411
5225
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
5412
5226
  equals: item.alpacaAccountId
5413
5227
  } : undefined,
@@ -5430,9 +5244,7 @@ exports.Asset = {
5430
5244
  }
5431
5245
  : { connectOrCreate: item.actions.map((item) => ({
5432
5246
  where: {
5433
- id: item.id !== undefined ? {
5434
- equals: item.id
5435
- } : undefined,
5247
+ id: item.id !== undefined ? item.id : undefined,
5436
5248
  tradeId: item.tradeId !== undefined ? {
5437
5249
  equals: item.tradeId
5438
5250
  } : undefined,
@@ -5451,9 +5263,7 @@ exports.Asset = {
5451
5263
  }
5452
5264
  : { connectOrCreate: {
5453
5265
  where: {
5454
- id: item.order.id !== undefined ? {
5455
- equals: item.order.id
5456
- } : undefined,
5266
+ id: item.order.id !== undefined ? item.order.id : undefined,
5457
5267
  clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
5458
5268
  actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
5459
5269
  stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
@@ -5499,9 +5309,7 @@ exports.Asset = {
5499
5309
  orders: prop.orders ? {
5500
5310
  upsert: prop.orders.map((item) => ({
5501
5311
  where: {
5502
- id: item.id !== undefined ? {
5503
- equals: item.id
5504
- } : undefined,
5312
+ id: item.id !== undefined ? item.id : undefined,
5505
5313
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
5506
5314
  actionId: item.actionId !== undefined ? item.actionId : undefined,
5507
5315
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -5746,9 +5554,7 @@ exports.Asset = {
5746
5554
  trades: item.alpacaAccount.trades ? {
5747
5555
  upsert: item.alpacaAccount.trades.map((item) => ({
5748
5556
  where: {
5749
- id: item.id !== undefined ? {
5750
- equals: item.id
5751
- } : undefined,
5557
+ id: item.id !== undefined ? item.id : undefined,
5752
5558
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
5753
5559
  equals: item.alpacaAccountId
5754
5560
  } : undefined,
@@ -5812,9 +5618,7 @@ exports.Asset = {
5812
5618
  positions: item.alpacaAccount.positions ? {
5813
5619
  upsert: item.alpacaAccount.positions.map((item) => ({
5814
5620
  where: {
5815
- id: item.id !== undefined ? {
5816
- equals: item.id
5817
- } : undefined,
5621
+ id: item.id !== undefined ? item.id : undefined,
5818
5622
  assetId: item.assetId !== undefined ? {
5819
5623
  equals: item.assetId
5820
5624
  } : undefined,
@@ -5886,9 +5690,7 @@ exports.Asset = {
5886
5690
  alerts: item.alpacaAccount.alerts ? {
5887
5691
  upsert: item.alpacaAccount.alerts.map((item) => ({
5888
5692
  where: {
5889
- id: item.id !== undefined ? {
5890
- equals: item.id
5891
- } : undefined,
5693
+ id: item.id !== undefined ? item.id : undefined,
5892
5694
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
5893
5695
  equals: item.alpacaAccountId
5894
5696
  } : undefined,
@@ -5933,9 +5735,7 @@ exports.Asset = {
5933
5735
  }
5934
5736
  : { connectOrCreate: {
5935
5737
  where: {
5936
- id: item.alpacaAccount.user.id !== undefined ? {
5937
- equals: item.alpacaAccount.user.id
5938
- } : undefined,
5738
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
5939
5739
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
5940
5740
  name: item.alpacaAccount.user.name !== undefined ? {
5941
5741
  equals: item.alpacaAccount.user.name
@@ -5964,9 +5764,7 @@ exports.Asset = {
5964
5764
  }
5965
5765
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
5966
5766
  where: {
5967
- id: item.id !== undefined ? {
5968
- equals: item.id
5969
- } : undefined,
5767
+ id: item.id !== undefined ? item.id : undefined,
5970
5768
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
5971
5769
  equals: item.alpacaAccountId
5972
5770
  } : undefined,
@@ -5997,9 +5795,7 @@ exports.Asset = {
5997
5795
  }
5998
5796
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
5999
5797
  where: {
6000
- id: item.id !== undefined ? {
6001
- equals: item.id
6002
- } : undefined,
5798
+ id: item.id !== undefined ? item.id : undefined,
6003
5799
  assetId: item.assetId !== undefined ? {
6004
5800
  equals: item.assetId
6005
5801
  } : undefined,
@@ -6032,9 +5828,7 @@ exports.Asset = {
6032
5828
  }
6033
5829
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
6034
5830
  where: {
6035
- id: item.id !== undefined ? {
6036
- equals: item.id
6037
- } : undefined,
5831
+ id: item.id !== undefined ? item.id : undefined,
6038
5832
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6039
5833
  equals: item.alpacaAccountId
6040
5834
  } : undefined,
@@ -6159,9 +5953,7 @@ exports.Asset = {
6159
5953
  }
6160
5954
  : { connectOrCreate: {
6161
5955
  where: {
6162
- id: item.action.trade.id !== undefined ? {
6163
- equals: item.action.trade.id
6164
- } : undefined,
5956
+ id: item.action.trade.id !== undefined ? item.action.trade.id : undefined,
6165
5957
  alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
6166
5958
  equals: item.action.trade.alpacaAccountId
6167
5959
  } : undefined,
@@ -6219,9 +6011,7 @@ exports.Asset = {
6219
6011
  }
6220
6012
  : { connectOrCreate: {
6221
6013
  where: {
6222
- id: item.stopLoss.id !== undefined ? {
6223
- equals: item.stopLoss.id
6224
- } : undefined,
6014
+ id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
6225
6015
  orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
6226
6016
  },
6227
6017
  create: {
@@ -6238,9 +6028,7 @@ exports.Asset = {
6238
6028
  }
6239
6029
  : { connectOrCreate: {
6240
6030
  where: {
6241
- id: item.takeProfit.id !== undefined ? {
6242
- equals: item.takeProfit.id
6243
- } : undefined,
6031
+ id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
6244
6032
  orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
6245
6033
  },
6246
6034
  create: {
@@ -6257,9 +6045,7 @@ exports.Asset = {
6257
6045
  }
6258
6046
  : { connectOrCreate: {
6259
6047
  where: {
6260
- id: item.alpacaAccount.id !== undefined ? {
6261
- equals: item.alpacaAccount.id
6262
- } : undefined,
6048
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
6263
6049
  userId: item.alpacaAccount.userId !== undefined ? {
6264
6050
  equals: item.alpacaAccount.userId
6265
6051
  } : undefined,
@@ -6282,9 +6068,7 @@ exports.Asset = {
6282
6068
  }
6283
6069
  : { connectOrCreate: {
6284
6070
  where: {
6285
- id: item.alpacaAccount.user.id !== undefined ? {
6286
- equals: item.alpacaAccount.user.id
6287
- } : undefined,
6071
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
6288
6072
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
6289
6073
  name: item.alpacaAccount.user.name !== undefined ? {
6290
6074
  equals: item.alpacaAccount.user.name
@@ -6313,9 +6097,7 @@ exports.Asset = {
6313
6097
  }
6314
6098
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
6315
6099
  where: {
6316
- id: item.id !== undefined ? {
6317
- equals: item.id
6318
- } : undefined,
6100
+ id: item.id !== undefined ? item.id : undefined,
6319
6101
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6320
6102
  equals: item.alpacaAccountId
6321
6103
  } : undefined,
@@ -6346,9 +6128,7 @@ exports.Asset = {
6346
6128
  }
6347
6129
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
6348
6130
  where: {
6349
- id: item.id !== undefined ? {
6350
- equals: item.id
6351
- } : undefined,
6131
+ id: item.id !== undefined ? item.id : undefined,
6352
6132
  assetId: item.assetId !== undefined ? {
6353
6133
  equals: item.assetId
6354
6134
  } : undefined,
@@ -6381,9 +6161,7 @@ exports.Asset = {
6381
6161
  }
6382
6162
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
6383
6163
  where: {
6384
- id: item.id !== undefined ? {
6385
- equals: item.id
6386
- } : undefined,
6164
+ id: item.id !== undefined ? item.id : undefined,
6387
6165
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6388
6166
  equals: item.alpacaAccountId
6389
6167
  } : undefined,
@@ -6406,9 +6184,7 @@ exports.Asset = {
6406
6184
  }
6407
6185
  : { connectOrCreate: {
6408
6186
  where: {
6409
- id: item.action.id !== undefined ? {
6410
- equals: item.action.id
6411
- } : undefined,
6187
+ id: item.action.id !== undefined ? item.action.id : undefined,
6412
6188
  tradeId: item.action.tradeId !== undefined ? {
6413
6189
  equals: item.action.tradeId
6414
6190
  } : undefined,
@@ -6427,9 +6203,7 @@ exports.Asset = {
6427
6203
  }
6428
6204
  : { connectOrCreate: {
6429
6205
  where: {
6430
- id: item.action.trade.id !== undefined ? {
6431
- equals: item.action.trade.id
6432
- } : undefined,
6206
+ id: item.action.trade.id !== undefined ? item.action.trade.id : undefined,
6433
6207
  alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
6434
6208
  equals: item.action.trade.alpacaAccountId
6435
6209
  } : undefined,
@@ -6461,9 +6235,7 @@ exports.Asset = {
6461
6235
  positions: prop.positions ? {
6462
6236
  upsert: prop.positions.map((item) => ({
6463
6237
  where: {
6464
- id: item.id !== undefined ? {
6465
- equals: item.id
6466
- } : undefined,
6238
+ id: item.id !== undefined ? item.id : undefined,
6467
6239
  assetId: item.assetId !== undefined ? {
6468
6240
  equals: item.assetId
6469
6241
  } : undefined,
@@ -6624,9 +6396,7 @@ exports.Asset = {
6624
6396
  trades: item.alpacaAccount.trades ? {
6625
6397
  upsert: item.alpacaAccount.trades.map((item) => ({
6626
6398
  where: {
6627
- id: item.id !== undefined ? {
6628
- equals: item.id
6629
- } : undefined,
6399
+ id: item.id !== undefined ? item.id : undefined,
6630
6400
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6631
6401
  equals: item.alpacaAccountId
6632
6402
  } : undefined,
@@ -6690,9 +6460,7 @@ exports.Asset = {
6690
6460
  orders: item.alpacaAccount.orders ? {
6691
6461
  upsert: item.alpacaAccount.orders.map((item) => ({
6692
6462
  where: {
6693
- id: item.id !== undefined ? {
6694
- equals: item.id
6695
- } : undefined,
6463
+ id: item.id !== undefined ? item.id : undefined,
6696
6464
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
6697
6465
  actionId: item.actionId !== undefined ? item.actionId : undefined,
6698
6466
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -6803,9 +6571,7 @@ exports.Asset = {
6803
6571
  alerts: item.alpacaAccount.alerts ? {
6804
6572
  upsert: item.alpacaAccount.alerts.map((item) => ({
6805
6573
  where: {
6806
- id: item.id !== undefined ? {
6807
- equals: item.id
6808
- } : undefined,
6574
+ id: item.id !== undefined ? item.id : undefined,
6809
6575
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6810
6576
  equals: item.alpacaAccountId
6811
6577
  } : undefined,
@@ -6850,9 +6616,7 @@ exports.Asset = {
6850
6616
  }
6851
6617
  : { connectOrCreate: {
6852
6618
  where: {
6853
- id: item.alpacaAccount.user.id !== undefined ? {
6854
- equals: item.alpacaAccount.user.id
6855
- } : undefined,
6619
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
6856
6620
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
6857
6621
  name: item.alpacaAccount.user.name !== undefined ? {
6858
6622
  equals: item.alpacaAccount.user.name
@@ -6881,9 +6645,7 @@ exports.Asset = {
6881
6645
  }
6882
6646
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
6883
6647
  where: {
6884
- id: item.id !== undefined ? {
6885
- equals: item.id
6886
- } : undefined,
6648
+ id: item.id !== undefined ? item.id : undefined,
6887
6649
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6888
6650
  equals: item.alpacaAccountId
6889
6651
  } : undefined,
@@ -6914,9 +6676,7 @@ exports.Asset = {
6914
6676
  }
6915
6677
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
6916
6678
  where: {
6917
- id: item.id !== undefined ? {
6918
- equals: item.id
6919
- } : undefined,
6679
+ id: item.id !== undefined ? item.id : undefined,
6920
6680
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
6921
6681
  actionId: item.actionId !== undefined ? item.actionId : undefined,
6922
6682
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -6961,9 +6721,7 @@ exports.Asset = {
6961
6721
  }
6962
6722
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
6963
6723
  where: {
6964
- id: item.id !== undefined ? {
6965
- equals: item.id
6966
- } : undefined,
6724
+ id: item.id !== undefined ? item.id : undefined,
6967
6725
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6968
6726
  equals: item.alpacaAccountId
6969
6727
  } : undefined,
@@ -7001,9 +6759,7 @@ exports.Asset = {
7001
6759
  }
7002
6760
  : { connectOrCreate: {
7003
6761
  where: {
7004
- id: item.alpacaAccount.id !== undefined ? {
7005
- equals: item.alpacaAccount.id
7006
- } : undefined,
6762
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
7007
6763
  userId: item.alpacaAccount.userId !== undefined ? {
7008
6764
  equals: item.alpacaAccount.userId
7009
6765
  } : undefined,
@@ -7026,9 +6782,7 @@ exports.Asset = {
7026
6782
  }
7027
6783
  : { connectOrCreate: {
7028
6784
  where: {
7029
- id: item.alpacaAccount.user.id !== undefined ? {
7030
- equals: item.alpacaAccount.user.id
7031
- } : undefined,
6785
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
7032
6786
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
7033
6787
  name: item.alpacaAccount.user.name !== undefined ? {
7034
6788
  equals: item.alpacaAccount.user.name
@@ -7057,9 +6811,7 @@ exports.Asset = {
7057
6811
  }
7058
6812
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
7059
6813
  where: {
7060
- id: item.id !== undefined ? {
7061
- equals: item.id
7062
- } : undefined,
6814
+ id: item.id !== undefined ? item.id : undefined,
7063
6815
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
7064
6816
  equals: item.alpacaAccountId
7065
6817
  } : undefined,
@@ -7090,9 +6842,7 @@ exports.Asset = {
7090
6842
  }
7091
6843
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
7092
6844
  where: {
7093
- id: item.id !== undefined ? {
7094
- equals: item.id
7095
- } : undefined,
6845
+ id: item.id !== undefined ? item.id : undefined,
7096
6846
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
7097
6847
  actionId: item.actionId !== undefined ? item.actionId : undefined,
7098
6848
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -7137,9 +6887,7 @@ exports.Asset = {
7137
6887
  }
7138
6888
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
7139
6889
  where: {
7140
- id: item.id !== undefined ? {
7141
- equals: item.id
7142
- } : undefined,
6890
+ id: item.id !== undefined ? item.id : undefined,
7143
6891
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
7144
6892
  equals: item.alpacaAccountId
7145
6893
  } : undefined,
@@ -7160,9 +6908,7 @@ exports.Asset = {
7160
6908
  newsMentions: prop.newsMentions ? {
7161
6909
  upsert: prop.newsMentions.map((item) => ({
7162
6910
  where: {
7163
- id: item.id !== undefined ? {
7164
- equals: item.id
7165
- } : undefined,
6911
+ id: item.id !== undefined ? item.id : undefined,
7166
6912
  url: item.url !== undefined ? item.url : undefined,
7167
6913
  assetId: item.assetId !== undefined ? {
7168
6914
  equals: item.assetId
@@ -7275,9 +7021,7 @@ exports.Asset = {
7275
7021
  }
7276
7022
  : { connectOrCreate: {
7277
7023
  where: {
7278
- id: item.news.id !== undefined ? {
7279
- equals: item.news.id
7280
- } : undefined,
7024
+ id: item.news.id !== undefined ? item.news.id : undefined,
7281
7025
  url: item.news.url !== undefined ? item.news.url : undefined,
7282
7026
  title: item.news.title !== undefined ? {
7283
7027
  equals: item.news.title
@@ -7373,9 +7117,7 @@ exports.Asset = {
7373
7117
  }`;
7374
7118
  const variables = {
7375
7119
  where: {
7376
- id: props.id !== undefined ? {
7377
- equals: props.id
7378
- } : undefined,
7120
+ id: props.id !== undefined ? props.id : undefined,
7379
7121
  symbol: props.symbol !== undefined ? props.symbol : undefined,
7380
7122
  name: props.name !== undefined ? props.name : undefined,
7381
7123
  type: props.type !== undefined ? props.type : undefined,