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/server/Asset.mjs CHANGED
@@ -304,9 +304,7 @@ export const Asset = {
304
304
  }
305
305
  : { connectOrCreate: props.trades.map((item) => ({
306
306
  where: {
307
- id: item.id !== undefined ? {
308
- equals: item.id
309
- } : undefined,
307
+ id: item.id !== undefined ? item.id : undefined,
310
308
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
311
309
  equals: item.alpacaAccountId
312
310
  } : undefined,
@@ -334,9 +332,7 @@ export const Asset = {
334
332
  }
335
333
  : { connectOrCreate: {
336
334
  where: {
337
- id: item.alpacaAccount.id !== undefined ? {
338
- equals: item.alpacaAccount.id
339
- } : undefined,
335
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
340
336
  userId: item.alpacaAccount.userId !== undefined ? {
341
337
  equals: item.alpacaAccount.userId
342
338
  } : undefined,
@@ -359,9 +355,7 @@ export const Asset = {
359
355
  }
360
356
  : { connectOrCreate: {
361
357
  where: {
362
- id: item.alpacaAccount.user.id !== undefined ? {
363
- equals: item.alpacaAccount.user.id
364
- } : undefined,
358
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
365
359
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
366
360
  name: item.alpacaAccount.user.name !== undefined ? {
367
361
  equals: item.alpacaAccount.user.name
@@ -390,9 +384,7 @@ export const Asset = {
390
384
  }
391
385
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
392
386
  where: {
393
- id: item.id !== undefined ? {
394
- equals: item.id
395
- } : undefined,
387
+ id: item.id !== undefined ? item.id : undefined,
396
388
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
397
389
  actionId: item.actionId !== undefined ? item.actionId : undefined,
398
390
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -437,9 +429,7 @@ export const Asset = {
437
429
  }
438
430
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
439
431
  where: {
440
- id: item.id !== undefined ? {
441
- equals: item.id
442
- } : undefined,
432
+ id: item.id !== undefined ? item.id : undefined,
443
433
  assetId: item.assetId !== undefined ? {
444
434
  equals: item.assetId
445
435
  } : undefined,
@@ -472,9 +462,7 @@ export const Asset = {
472
462
  }
473
463
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
474
464
  where: {
475
- id: item.id !== undefined ? {
476
- equals: item.id
477
- } : undefined,
465
+ id: item.id !== undefined ? item.id : undefined,
478
466
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
479
467
  equals: item.alpacaAccountId
480
468
  } : undefined,
@@ -497,9 +485,7 @@ export const Asset = {
497
485
  }
498
486
  : { connectOrCreate: item.actions.map((item) => ({
499
487
  where: {
500
- id: item.id !== undefined ? {
501
- equals: item.id
502
- } : undefined,
488
+ id: item.id !== undefined ? item.id : undefined,
503
489
  tradeId: item.tradeId !== undefined ? {
504
490
  equals: item.tradeId
505
491
  } : undefined,
@@ -518,9 +504,7 @@ export const Asset = {
518
504
  }
519
505
  : { connectOrCreate: {
520
506
  where: {
521
- id: item.order.id !== undefined ? {
522
- equals: item.order.id
523
- } : undefined,
507
+ id: item.order.id !== undefined ? item.order.id : undefined,
524
508
  clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
525
509
  actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
526
510
  stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
@@ -571,9 +555,7 @@ export const Asset = {
571
555
  }
572
556
  : { connectOrCreate: props.orders.map((item) => ({
573
557
  where: {
574
- id: item.id !== undefined ? {
575
- equals: item.id
576
- } : undefined,
558
+ id: item.id !== undefined ? item.id : undefined,
577
559
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
578
560
  actionId: item.actionId !== undefined ? item.actionId : undefined,
579
561
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -615,9 +597,7 @@ export const Asset = {
615
597
  }
616
598
  : { connectOrCreate: {
617
599
  where: {
618
- id: item.stopLoss.id !== undefined ? {
619
- equals: item.stopLoss.id
620
- } : undefined,
600
+ id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
621
601
  orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
622
602
  },
623
603
  create: {
@@ -634,9 +614,7 @@ export const Asset = {
634
614
  }
635
615
  : { connectOrCreate: {
636
616
  where: {
637
- id: item.takeProfit.id !== undefined ? {
638
- equals: item.takeProfit.id
639
- } : undefined,
617
+ id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
640
618
  orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
641
619
  },
642
620
  create: {
@@ -653,9 +631,7 @@ export const Asset = {
653
631
  }
654
632
  : { connectOrCreate: {
655
633
  where: {
656
- id: item.alpacaAccount.id !== undefined ? {
657
- equals: item.alpacaAccount.id
658
- } : undefined,
634
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
659
635
  userId: item.alpacaAccount.userId !== undefined ? {
660
636
  equals: item.alpacaAccount.userId
661
637
  } : undefined,
@@ -678,9 +654,7 @@ export const Asset = {
678
654
  }
679
655
  : { connectOrCreate: {
680
656
  where: {
681
- id: item.alpacaAccount.user.id !== undefined ? {
682
- equals: item.alpacaAccount.user.id
683
- } : undefined,
657
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
684
658
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
685
659
  name: item.alpacaAccount.user.name !== undefined ? {
686
660
  equals: item.alpacaAccount.user.name
@@ -709,9 +683,7 @@ export const Asset = {
709
683
  }
710
684
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
711
685
  where: {
712
- id: item.id !== undefined ? {
713
- equals: item.id
714
- } : undefined,
686
+ id: item.id !== undefined ? item.id : undefined,
715
687
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
716
688
  equals: item.alpacaAccountId
717
689
  } : undefined,
@@ -742,9 +714,7 @@ export const Asset = {
742
714
  }
743
715
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
744
716
  where: {
745
- id: item.id !== undefined ? {
746
- equals: item.id
747
- } : undefined,
717
+ id: item.id !== undefined ? item.id : undefined,
748
718
  assetId: item.assetId !== undefined ? {
749
719
  equals: item.assetId
750
720
  } : undefined,
@@ -777,9 +747,7 @@ export const Asset = {
777
747
  }
778
748
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
779
749
  where: {
780
- id: item.id !== undefined ? {
781
- equals: item.id
782
- } : undefined,
750
+ id: item.id !== undefined ? item.id : undefined,
783
751
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
784
752
  equals: item.alpacaAccountId
785
753
  } : undefined,
@@ -802,9 +770,7 @@ export const Asset = {
802
770
  }
803
771
  : { connectOrCreate: {
804
772
  where: {
805
- id: item.action.id !== undefined ? {
806
- equals: item.action.id
807
- } : undefined,
773
+ id: item.action.id !== undefined ? item.action.id : undefined,
808
774
  tradeId: item.action.tradeId !== undefined ? {
809
775
  equals: item.action.tradeId
810
776
  } : undefined,
@@ -823,9 +789,7 @@ export const Asset = {
823
789
  }
824
790
  : { connectOrCreate: {
825
791
  where: {
826
- id: item.action.trade.id !== undefined ? {
827
- equals: item.action.trade.id
828
- } : undefined,
792
+ id: item.action.trade.id !== undefined ? item.action.trade.id : undefined,
829
793
  alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
830
794
  equals: item.action.trade.alpacaAccountId
831
795
  } : undefined,
@@ -862,9 +826,7 @@ export const Asset = {
862
826
  }
863
827
  : { connectOrCreate: props.positions.map((item) => ({
864
828
  where: {
865
- id: item.id !== undefined ? {
866
- equals: item.id
867
- } : undefined,
829
+ id: item.id !== undefined ? item.id : undefined,
868
830
  assetId: item.assetId !== undefined ? {
869
831
  equals: item.assetId
870
832
  } : undefined,
@@ -894,9 +856,7 @@ export const Asset = {
894
856
  }
895
857
  : { connectOrCreate: {
896
858
  where: {
897
- id: item.alpacaAccount.id !== undefined ? {
898
- equals: item.alpacaAccount.id
899
- } : undefined,
859
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
900
860
  userId: item.alpacaAccount.userId !== undefined ? {
901
861
  equals: item.alpacaAccount.userId
902
862
  } : undefined,
@@ -919,9 +879,7 @@ export const Asset = {
919
879
  }
920
880
  : { connectOrCreate: {
921
881
  where: {
922
- id: item.alpacaAccount.user.id !== undefined ? {
923
- equals: item.alpacaAccount.user.id
924
- } : undefined,
882
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
925
883
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
926
884
  name: item.alpacaAccount.user.name !== undefined ? {
927
885
  equals: item.alpacaAccount.user.name
@@ -950,9 +908,7 @@ export const Asset = {
950
908
  }
951
909
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
952
910
  where: {
953
- id: item.id !== undefined ? {
954
- equals: item.id
955
- } : undefined,
911
+ id: item.id !== undefined ? item.id : undefined,
956
912
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
957
913
  equals: item.alpacaAccountId
958
914
  } : undefined,
@@ -983,9 +939,7 @@ export const Asset = {
983
939
  }
984
940
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
985
941
  where: {
986
- id: item.id !== undefined ? {
987
- equals: item.id
988
- } : undefined,
942
+ id: item.id !== undefined ? item.id : undefined,
989
943
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
990
944
  actionId: item.actionId !== undefined ? item.actionId : undefined,
991
945
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -1030,9 +984,7 @@ export const Asset = {
1030
984
  }
1031
985
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
1032
986
  where: {
1033
- id: item.id !== undefined ? {
1034
- equals: item.id
1035
- } : undefined,
987
+ id: item.id !== undefined ? item.id : undefined,
1036
988
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1037
989
  equals: item.alpacaAccountId
1038
990
  } : undefined,
@@ -1058,9 +1010,7 @@ export const Asset = {
1058
1010
  }
1059
1011
  : { connectOrCreate: props.newsMentions.map((item) => ({
1060
1012
  where: {
1061
- id: item.id !== undefined ? {
1062
- equals: item.id
1063
- } : undefined,
1013
+ id: item.id !== undefined ? item.id : undefined,
1064
1014
  url: item.url !== undefined ? item.url : undefined,
1065
1015
  assetId: item.assetId !== undefined ? {
1066
1016
  equals: item.assetId
@@ -1082,9 +1032,7 @@ export const Asset = {
1082
1032
  }
1083
1033
  : { connectOrCreate: {
1084
1034
  where: {
1085
- id: item.news.id !== undefined ? {
1086
- equals: item.news.id
1087
- } : undefined,
1035
+ id: item.news.id !== undefined ? item.news.id : undefined,
1088
1036
  url: item.news.url !== undefined ? item.news.url : undefined,
1089
1037
  title: item.news.title !== undefined ? {
1090
1038
  equals: item.news.title
@@ -1233,9 +1181,7 @@ export const Asset = {
1233
1181
  }`;
1234
1182
  const variables = {
1235
1183
  where: {
1236
- id: props.id !== undefined ? {
1237
- equals: props.id
1238
- } : undefined,
1184
+ id: props.id !== undefined ? props.id : undefined,
1239
1185
  symbol: props.symbol !== undefined ? props.symbol : undefined,
1240
1186
  name: props.name !== undefined ? props.name : undefined,
1241
1187
  type: props.type !== undefined ? props.type : undefined,
@@ -1470,9 +1416,7 @@ export const Asset = {
1470
1416
  trades: props.trades ? {
1471
1417
  upsert: props.trades.map((item) => ({
1472
1418
  where: {
1473
- id: item.id !== undefined ? {
1474
- equals: item.id
1475
- } : undefined,
1419
+ id: item.id !== undefined ? item.id : undefined,
1476
1420
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1477
1421
  equals: item.alpacaAccountId
1478
1422
  } : undefined,
@@ -1627,9 +1571,7 @@ export const Asset = {
1627
1571
  orders: item.alpacaAccount.orders ? {
1628
1572
  upsert: item.alpacaAccount.orders.map((item) => ({
1629
1573
  where: {
1630
- id: item.id !== undefined ? {
1631
- equals: item.id
1632
- } : undefined,
1574
+ id: item.id !== undefined ? item.id : undefined,
1633
1575
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
1634
1576
  actionId: item.actionId !== undefined ? item.actionId : undefined,
1635
1577
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -1740,9 +1682,7 @@ export const Asset = {
1740
1682
  positions: item.alpacaAccount.positions ? {
1741
1683
  upsert: item.alpacaAccount.positions.map((item) => ({
1742
1684
  where: {
1743
- id: item.id !== undefined ? {
1744
- equals: item.id
1745
- } : undefined,
1685
+ id: item.id !== undefined ? item.id : undefined,
1746
1686
  assetId: item.assetId !== undefined ? {
1747
1687
  equals: item.assetId
1748
1688
  } : undefined,
@@ -1814,9 +1754,7 @@ export const Asset = {
1814
1754
  alerts: item.alpacaAccount.alerts ? {
1815
1755
  upsert: item.alpacaAccount.alerts.map((item) => ({
1816
1756
  where: {
1817
- id: item.id !== undefined ? {
1818
- equals: item.id
1819
- } : undefined,
1757
+ id: item.id !== undefined ? item.id : undefined,
1820
1758
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1821
1759
  equals: item.alpacaAccountId
1822
1760
  } : undefined,
@@ -1861,9 +1799,7 @@ export const Asset = {
1861
1799
  }
1862
1800
  : { connectOrCreate: {
1863
1801
  where: {
1864
- id: item.alpacaAccount.user.id !== undefined ? {
1865
- equals: item.alpacaAccount.user.id
1866
- } : undefined,
1802
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
1867
1803
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
1868
1804
  name: item.alpacaAccount.user.name !== undefined ? {
1869
1805
  equals: item.alpacaAccount.user.name
@@ -1892,9 +1828,7 @@ export const Asset = {
1892
1828
  }
1893
1829
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
1894
1830
  where: {
1895
- id: item.id !== undefined ? {
1896
- equals: item.id
1897
- } : undefined,
1831
+ id: item.id !== undefined ? item.id : undefined,
1898
1832
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
1899
1833
  actionId: item.actionId !== undefined ? item.actionId : undefined,
1900
1834
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -1939,9 +1873,7 @@ export const Asset = {
1939
1873
  }
1940
1874
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
1941
1875
  where: {
1942
- id: item.id !== undefined ? {
1943
- equals: item.id
1944
- } : undefined,
1876
+ id: item.id !== undefined ? item.id : undefined,
1945
1877
  assetId: item.assetId !== undefined ? {
1946
1878
  equals: item.assetId
1947
1879
  } : undefined,
@@ -1974,9 +1906,7 @@ export const Asset = {
1974
1906
  }
1975
1907
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
1976
1908
  where: {
1977
- id: item.id !== undefined ? {
1978
- equals: item.id
1979
- } : undefined,
1909
+ id: item.id !== undefined ? item.id : undefined,
1980
1910
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1981
1911
  equals: item.alpacaAccountId
1982
1912
  } : undefined,
@@ -1994,9 +1924,7 @@ export const Asset = {
1994
1924
  actions: item.actions ? {
1995
1925
  upsert: item.actions.map((item) => ({
1996
1926
  where: {
1997
- id: item.id !== undefined ? {
1998
- equals: item.id
1999
- } : undefined,
1927
+ id: item.id !== undefined ? item.id : undefined,
2000
1928
  tradeId: item.tradeId !== undefined ? {
2001
1929
  equals: item.tradeId
2002
1930
  } : undefined,
@@ -2151,9 +2079,7 @@ export const Asset = {
2151
2079
  }
2152
2080
  : { connectOrCreate: {
2153
2081
  where: {
2154
- id: item.order.id !== undefined ? {
2155
- equals: item.order.id
2156
- } : undefined,
2082
+ id: item.order.id !== undefined ? item.order.id : undefined,
2157
2083
  clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
2158
2084
  actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
2159
2085
  stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
@@ -2214,9 +2140,7 @@ export const Asset = {
2214
2140
  }
2215
2141
  : { connectOrCreate: {
2216
2142
  where: {
2217
- id: item.alpacaAccount.id !== undefined ? {
2218
- equals: item.alpacaAccount.id
2219
- } : undefined,
2143
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
2220
2144
  userId: item.alpacaAccount.userId !== undefined ? {
2221
2145
  equals: item.alpacaAccount.userId
2222
2146
  } : undefined,
@@ -2239,9 +2163,7 @@ export const Asset = {
2239
2163
  }
2240
2164
  : { connectOrCreate: {
2241
2165
  where: {
2242
- id: item.alpacaAccount.user.id !== undefined ? {
2243
- equals: item.alpacaAccount.user.id
2244
- } : undefined,
2166
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
2245
2167
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
2246
2168
  name: item.alpacaAccount.user.name !== undefined ? {
2247
2169
  equals: item.alpacaAccount.user.name
@@ -2270,9 +2192,7 @@ export const Asset = {
2270
2192
  }
2271
2193
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
2272
2194
  where: {
2273
- id: item.id !== undefined ? {
2274
- equals: item.id
2275
- } : undefined,
2195
+ id: item.id !== undefined ? item.id : undefined,
2276
2196
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
2277
2197
  actionId: item.actionId !== undefined ? item.actionId : undefined,
2278
2198
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -2317,9 +2237,7 @@ export const Asset = {
2317
2237
  }
2318
2238
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
2319
2239
  where: {
2320
- id: item.id !== undefined ? {
2321
- equals: item.id
2322
- } : undefined,
2240
+ id: item.id !== undefined ? item.id : undefined,
2323
2241
  assetId: item.assetId !== undefined ? {
2324
2242
  equals: item.assetId
2325
2243
  } : undefined,
@@ -2352,9 +2270,7 @@ export const Asset = {
2352
2270
  }
2353
2271
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
2354
2272
  where: {
2355
- id: item.id !== undefined ? {
2356
- equals: item.id
2357
- } : undefined,
2273
+ id: item.id !== undefined ? item.id : undefined,
2358
2274
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2359
2275
  equals: item.alpacaAccountId
2360
2276
  } : undefined,
@@ -2377,9 +2293,7 @@ export const Asset = {
2377
2293
  }
2378
2294
  : { connectOrCreate: item.actions.map((item) => ({
2379
2295
  where: {
2380
- id: item.id !== undefined ? {
2381
- equals: item.id
2382
- } : undefined,
2296
+ id: item.id !== undefined ? item.id : undefined,
2383
2297
  tradeId: item.tradeId !== undefined ? {
2384
2298
  equals: item.tradeId
2385
2299
  } : undefined,
@@ -2398,9 +2312,7 @@ export const Asset = {
2398
2312
  }
2399
2313
  : { connectOrCreate: {
2400
2314
  where: {
2401
- id: item.order.id !== undefined ? {
2402
- equals: item.order.id
2403
- } : undefined,
2315
+ id: item.order.id !== undefined ? item.order.id : undefined,
2404
2316
  clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
2405
2317
  actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
2406
2318
  stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
@@ -2446,9 +2358,7 @@ export const Asset = {
2446
2358
  orders: props.orders ? {
2447
2359
  upsert: props.orders.map((item) => ({
2448
2360
  where: {
2449
- id: item.id !== undefined ? {
2450
- equals: item.id
2451
- } : undefined,
2361
+ id: item.id !== undefined ? item.id : undefined,
2452
2362
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
2453
2363
  actionId: item.actionId !== undefined ? item.actionId : undefined,
2454
2364
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -2693,9 +2603,7 @@ export const Asset = {
2693
2603
  trades: item.alpacaAccount.trades ? {
2694
2604
  upsert: item.alpacaAccount.trades.map((item) => ({
2695
2605
  where: {
2696
- id: item.id !== undefined ? {
2697
- equals: item.id
2698
- } : undefined,
2606
+ id: item.id !== undefined ? item.id : undefined,
2699
2607
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2700
2608
  equals: item.alpacaAccountId
2701
2609
  } : undefined,
@@ -2759,9 +2667,7 @@ export const Asset = {
2759
2667
  positions: item.alpacaAccount.positions ? {
2760
2668
  upsert: item.alpacaAccount.positions.map((item) => ({
2761
2669
  where: {
2762
- id: item.id !== undefined ? {
2763
- equals: item.id
2764
- } : undefined,
2670
+ id: item.id !== undefined ? item.id : undefined,
2765
2671
  assetId: item.assetId !== undefined ? {
2766
2672
  equals: item.assetId
2767
2673
  } : undefined,
@@ -2833,9 +2739,7 @@ export const Asset = {
2833
2739
  alerts: item.alpacaAccount.alerts ? {
2834
2740
  upsert: item.alpacaAccount.alerts.map((item) => ({
2835
2741
  where: {
2836
- id: item.id !== undefined ? {
2837
- equals: item.id
2838
- } : undefined,
2742
+ id: item.id !== undefined ? item.id : undefined,
2839
2743
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2840
2744
  equals: item.alpacaAccountId
2841
2745
  } : undefined,
@@ -2880,9 +2784,7 @@ export const Asset = {
2880
2784
  }
2881
2785
  : { connectOrCreate: {
2882
2786
  where: {
2883
- id: item.alpacaAccount.user.id !== undefined ? {
2884
- equals: item.alpacaAccount.user.id
2885
- } : undefined,
2787
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
2886
2788
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
2887
2789
  name: item.alpacaAccount.user.name !== undefined ? {
2888
2790
  equals: item.alpacaAccount.user.name
@@ -2911,9 +2813,7 @@ export const Asset = {
2911
2813
  }
2912
2814
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
2913
2815
  where: {
2914
- id: item.id !== undefined ? {
2915
- equals: item.id
2916
- } : undefined,
2816
+ id: item.id !== undefined ? item.id : undefined,
2917
2817
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2918
2818
  equals: item.alpacaAccountId
2919
2819
  } : undefined,
@@ -2944,9 +2844,7 @@ export const Asset = {
2944
2844
  }
2945
2845
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
2946
2846
  where: {
2947
- id: item.id !== undefined ? {
2948
- equals: item.id
2949
- } : undefined,
2847
+ id: item.id !== undefined ? item.id : undefined,
2950
2848
  assetId: item.assetId !== undefined ? {
2951
2849
  equals: item.assetId
2952
2850
  } : undefined,
@@ -2979,9 +2877,7 @@ export const Asset = {
2979
2877
  }
2980
2878
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
2981
2879
  where: {
2982
- id: item.id !== undefined ? {
2983
- equals: item.id
2984
- } : undefined,
2880
+ id: item.id !== undefined ? item.id : undefined,
2985
2881
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2986
2882
  equals: item.alpacaAccountId
2987
2883
  } : undefined,
@@ -3106,9 +3002,7 @@ export const Asset = {
3106
3002
  }
3107
3003
  : { connectOrCreate: {
3108
3004
  where: {
3109
- id: item.action.trade.id !== undefined ? {
3110
- equals: item.action.trade.id
3111
- } : undefined,
3005
+ id: item.action.trade.id !== undefined ? item.action.trade.id : undefined,
3112
3006
  alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
3113
3007
  equals: item.action.trade.alpacaAccountId
3114
3008
  } : undefined,
@@ -3166,9 +3060,7 @@ export const Asset = {
3166
3060
  }
3167
3061
  : { connectOrCreate: {
3168
3062
  where: {
3169
- id: item.stopLoss.id !== undefined ? {
3170
- equals: item.stopLoss.id
3171
- } : undefined,
3063
+ id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
3172
3064
  orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
3173
3065
  },
3174
3066
  create: {
@@ -3185,9 +3077,7 @@ export const Asset = {
3185
3077
  }
3186
3078
  : { connectOrCreate: {
3187
3079
  where: {
3188
- id: item.takeProfit.id !== undefined ? {
3189
- equals: item.takeProfit.id
3190
- } : undefined,
3080
+ id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
3191
3081
  orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
3192
3082
  },
3193
3083
  create: {
@@ -3204,9 +3094,7 @@ export const Asset = {
3204
3094
  }
3205
3095
  : { connectOrCreate: {
3206
3096
  where: {
3207
- id: item.alpacaAccount.id !== undefined ? {
3208
- equals: item.alpacaAccount.id
3209
- } : undefined,
3097
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
3210
3098
  userId: item.alpacaAccount.userId !== undefined ? {
3211
3099
  equals: item.alpacaAccount.userId
3212
3100
  } : undefined,
@@ -3229,9 +3117,7 @@ export const Asset = {
3229
3117
  }
3230
3118
  : { connectOrCreate: {
3231
3119
  where: {
3232
- id: item.alpacaAccount.user.id !== undefined ? {
3233
- equals: item.alpacaAccount.user.id
3234
- } : undefined,
3120
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
3235
3121
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
3236
3122
  name: item.alpacaAccount.user.name !== undefined ? {
3237
3123
  equals: item.alpacaAccount.user.name
@@ -3260,9 +3146,7 @@ export const Asset = {
3260
3146
  }
3261
3147
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
3262
3148
  where: {
3263
- id: item.id !== undefined ? {
3264
- equals: item.id
3265
- } : undefined,
3149
+ id: item.id !== undefined ? item.id : undefined,
3266
3150
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3267
3151
  equals: item.alpacaAccountId
3268
3152
  } : undefined,
@@ -3293,9 +3177,7 @@ export const Asset = {
3293
3177
  }
3294
3178
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
3295
3179
  where: {
3296
- id: item.id !== undefined ? {
3297
- equals: item.id
3298
- } : undefined,
3180
+ id: item.id !== undefined ? item.id : undefined,
3299
3181
  assetId: item.assetId !== undefined ? {
3300
3182
  equals: item.assetId
3301
3183
  } : undefined,
@@ -3328,9 +3210,7 @@ export const Asset = {
3328
3210
  }
3329
3211
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
3330
3212
  where: {
3331
- id: item.id !== undefined ? {
3332
- equals: item.id
3333
- } : undefined,
3213
+ id: item.id !== undefined ? item.id : undefined,
3334
3214
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3335
3215
  equals: item.alpacaAccountId
3336
3216
  } : undefined,
@@ -3353,9 +3233,7 @@ export const Asset = {
3353
3233
  }
3354
3234
  : { connectOrCreate: {
3355
3235
  where: {
3356
- id: item.action.id !== undefined ? {
3357
- equals: item.action.id
3358
- } : undefined,
3236
+ id: item.action.id !== undefined ? item.action.id : undefined,
3359
3237
  tradeId: item.action.tradeId !== undefined ? {
3360
3238
  equals: item.action.tradeId
3361
3239
  } : undefined,
@@ -3374,9 +3252,7 @@ export const Asset = {
3374
3252
  }
3375
3253
  : { connectOrCreate: {
3376
3254
  where: {
3377
- id: item.action.trade.id !== undefined ? {
3378
- equals: item.action.trade.id
3379
- } : undefined,
3255
+ id: item.action.trade.id !== undefined ? item.action.trade.id : undefined,
3380
3256
  alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
3381
3257
  equals: item.action.trade.alpacaAccountId
3382
3258
  } : undefined,
@@ -3408,9 +3284,7 @@ export const Asset = {
3408
3284
  positions: props.positions ? {
3409
3285
  upsert: props.positions.map((item) => ({
3410
3286
  where: {
3411
- id: item.id !== undefined ? {
3412
- equals: item.id
3413
- } : undefined,
3287
+ id: item.id !== undefined ? item.id : undefined,
3414
3288
  assetId: item.assetId !== undefined ? {
3415
3289
  equals: item.assetId
3416
3290
  } : undefined,
@@ -3571,9 +3445,7 @@ export const Asset = {
3571
3445
  trades: item.alpacaAccount.trades ? {
3572
3446
  upsert: item.alpacaAccount.trades.map((item) => ({
3573
3447
  where: {
3574
- id: item.id !== undefined ? {
3575
- equals: item.id
3576
- } : undefined,
3448
+ id: item.id !== undefined ? item.id : undefined,
3577
3449
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3578
3450
  equals: item.alpacaAccountId
3579
3451
  } : undefined,
@@ -3637,9 +3509,7 @@ export const Asset = {
3637
3509
  orders: item.alpacaAccount.orders ? {
3638
3510
  upsert: item.alpacaAccount.orders.map((item) => ({
3639
3511
  where: {
3640
- id: item.id !== undefined ? {
3641
- equals: item.id
3642
- } : undefined,
3512
+ id: item.id !== undefined ? item.id : undefined,
3643
3513
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
3644
3514
  actionId: item.actionId !== undefined ? item.actionId : undefined,
3645
3515
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -3750,9 +3620,7 @@ export const Asset = {
3750
3620
  alerts: item.alpacaAccount.alerts ? {
3751
3621
  upsert: item.alpacaAccount.alerts.map((item) => ({
3752
3622
  where: {
3753
- id: item.id !== undefined ? {
3754
- equals: item.id
3755
- } : undefined,
3623
+ id: item.id !== undefined ? item.id : undefined,
3756
3624
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3757
3625
  equals: item.alpacaAccountId
3758
3626
  } : undefined,
@@ -3797,9 +3665,7 @@ export const Asset = {
3797
3665
  }
3798
3666
  : { connectOrCreate: {
3799
3667
  where: {
3800
- id: item.alpacaAccount.user.id !== undefined ? {
3801
- equals: item.alpacaAccount.user.id
3802
- } : undefined,
3668
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
3803
3669
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
3804
3670
  name: item.alpacaAccount.user.name !== undefined ? {
3805
3671
  equals: item.alpacaAccount.user.name
@@ -3828,9 +3694,7 @@ export const Asset = {
3828
3694
  }
3829
3695
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
3830
3696
  where: {
3831
- id: item.id !== undefined ? {
3832
- equals: item.id
3833
- } : undefined,
3697
+ id: item.id !== undefined ? item.id : undefined,
3834
3698
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3835
3699
  equals: item.alpacaAccountId
3836
3700
  } : undefined,
@@ -3861,9 +3725,7 @@ export const Asset = {
3861
3725
  }
3862
3726
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
3863
3727
  where: {
3864
- id: item.id !== undefined ? {
3865
- equals: item.id
3866
- } : undefined,
3728
+ id: item.id !== undefined ? item.id : undefined,
3867
3729
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
3868
3730
  actionId: item.actionId !== undefined ? item.actionId : undefined,
3869
3731
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -3908,9 +3770,7 @@ export const Asset = {
3908
3770
  }
3909
3771
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
3910
3772
  where: {
3911
- id: item.id !== undefined ? {
3912
- equals: item.id
3913
- } : undefined,
3773
+ id: item.id !== undefined ? item.id : undefined,
3914
3774
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3915
3775
  equals: item.alpacaAccountId
3916
3776
  } : undefined,
@@ -3948,9 +3808,7 @@ export const Asset = {
3948
3808
  }
3949
3809
  : { connectOrCreate: {
3950
3810
  where: {
3951
- id: item.alpacaAccount.id !== undefined ? {
3952
- equals: item.alpacaAccount.id
3953
- } : undefined,
3811
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
3954
3812
  userId: item.alpacaAccount.userId !== undefined ? {
3955
3813
  equals: item.alpacaAccount.userId
3956
3814
  } : undefined,
@@ -3973,9 +3831,7 @@ export const Asset = {
3973
3831
  }
3974
3832
  : { connectOrCreate: {
3975
3833
  where: {
3976
- id: item.alpacaAccount.user.id !== undefined ? {
3977
- equals: item.alpacaAccount.user.id
3978
- } : undefined,
3834
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
3979
3835
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
3980
3836
  name: item.alpacaAccount.user.name !== undefined ? {
3981
3837
  equals: item.alpacaAccount.user.name
@@ -4004,9 +3860,7 @@ export const Asset = {
4004
3860
  }
4005
3861
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
4006
3862
  where: {
4007
- id: item.id !== undefined ? {
4008
- equals: item.id
4009
- } : undefined,
3863
+ id: item.id !== undefined ? item.id : undefined,
4010
3864
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
4011
3865
  equals: item.alpacaAccountId
4012
3866
  } : undefined,
@@ -4037,9 +3891,7 @@ export const Asset = {
4037
3891
  }
4038
3892
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
4039
3893
  where: {
4040
- id: item.id !== undefined ? {
4041
- equals: item.id
4042
- } : undefined,
3894
+ id: item.id !== undefined ? item.id : undefined,
4043
3895
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
4044
3896
  actionId: item.actionId !== undefined ? item.actionId : undefined,
4045
3897
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -4084,9 +3936,7 @@ export const Asset = {
4084
3936
  }
4085
3937
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
4086
3938
  where: {
4087
- id: item.id !== undefined ? {
4088
- equals: item.id
4089
- } : undefined,
3939
+ id: item.id !== undefined ? item.id : undefined,
4090
3940
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
4091
3941
  equals: item.alpacaAccountId
4092
3942
  } : undefined,
@@ -4107,9 +3957,7 @@ export const Asset = {
4107
3957
  newsMentions: props.newsMentions ? {
4108
3958
  upsert: props.newsMentions.map((item) => ({
4109
3959
  where: {
4110
- id: item.id !== undefined ? {
4111
- equals: item.id
4112
- } : undefined,
3960
+ id: item.id !== undefined ? item.id : undefined,
4113
3961
  url: item.url !== undefined ? item.url : undefined,
4114
3962
  assetId: item.assetId !== undefined ? {
4115
3963
  equals: item.assetId
@@ -4222,9 +4070,7 @@ export const Asset = {
4222
4070
  }
4223
4071
  : { connectOrCreate: {
4224
4072
  where: {
4225
- id: item.news.id !== undefined ? {
4226
- equals: item.news.id
4227
- } : undefined,
4073
+ id: item.news.id !== undefined ? item.news.id : undefined,
4228
4074
  url: item.news.url !== undefined ? item.news.url : undefined,
4229
4075
  title: item.news.title !== undefined ? {
4230
4076
  equals: item.news.title
@@ -4284,9 +4130,7 @@ export const Asset = {
4284
4130
  }`;
4285
4131
  const variables = props.map(prop => ({
4286
4132
  where: {
4287
- id: prop.id !== undefined ? {
4288
- equals: prop.id
4289
- } : undefined,
4133
+ id: prop.id !== undefined ? prop.id : undefined,
4290
4134
  symbol: prop.symbol !== undefined ? prop.symbol : undefined,
4291
4135
  name: prop.name !== undefined ? prop.name : undefined,
4292
4136
  type: prop.type !== undefined ? prop.type : undefined,
@@ -4521,9 +4365,7 @@ export const Asset = {
4521
4365
  trades: prop.trades ? {
4522
4366
  upsert: prop.trades.map((item) => ({
4523
4367
  where: {
4524
- id: item.id !== undefined ? {
4525
- equals: item.id
4526
- } : undefined,
4368
+ id: item.id !== undefined ? item.id : undefined,
4527
4369
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
4528
4370
  equals: item.alpacaAccountId
4529
4371
  } : undefined,
@@ -4678,9 +4520,7 @@ export const Asset = {
4678
4520
  orders: item.alpacaAccount.orders ? {
4679
4521
  upsert: item.alpacaAccount.orders.map((item) => ({
4680
4522
  where: {
4681
- id: item.id !== undefined ? {
4682
- equals: item.id
4683
- } : undefined,
4523
+ id: item.id !== undefined ? item.id : undefined,
4684
4524
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
4685
4525
  actionId: item.actionId !== undefined ? item.actionId : undefined,
4686
4526
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -4791,9 +4631,7 @@ export const Asset = {
4791
4631
  positions: item.alpacaAccount.positions ? {
4792
4632
  upsert: item.alpacaAccount.positions.map((item) => ({
4793
4633
  where: {
4794
- id: item.id !== undefined ? {
4795
- equals: item.id
4796
- } : undefined,
4634
+ id: item.id !== undefined ? item.id : undefined,
4797
4635
  assetId: item.assetId !== undefined ? {
4798
4636
  equals: item.assetId
4799
4637
  } : undefined,
@@ -4865,9 +4703,7 @@ export const Asset = {
4865
4703
  alerts: item.alpacaAccount.alerts ? {
4866
4704
  upsert: item.alpacaAccount.alerts.map((item) => ({
4867
4705
  where: {
4868
- id: item.id !== undefined ? {
4869
- equals: item.id
4870
- } : undefined,
4706
+ id: item.id !== undefined ? item.id : undefined,
4871
4707
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
4872
4708
  equals: item.alpacaAccountId
4873
4709
  } : undefined,
@@ -4912,9 +4748,7 @@ export const Asset = {
4912
4748
  }
4913
4749
  : { connectOrCreate: {
4914
4750
  where: {
4915
- id: item.alpacaAccount.user.id !== undefined ? {
4916
- equals: item.alpacaAccount.user.id
4917
- } : undefined,
4751
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
4918
4752
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
4919
4753
  name: item.alpacaAccount.user.name !== undefined ? {
4920
4754
  equals: item.alpacaAccount.user.name
@@ -4943,9 +4777,7 @@ export const Asset = {
4943
4777
  }
4944
4778
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
4945
4779
  where: {
4946
- id: item.id !== undefined ? {
4947
- equals: item.id
4948
- } : undefined,
4780
+ id: item.id !== undefined ? item.id : undefined,
4949
4781
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
4950
4782
  actionId: item.actionId !== undefined ? item.actionId : undefined,
4951
4783
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -4990,9 +4822,7 @@ export const Asset = {
4990
4822
  }
4991
4823
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
4992
4824
  where: {
4993
- id: item.id !== undefined ? {
4994
- equals: item.id
4995
- } : undefined,
4825
+ id: item.id !== undefined ? item.id : undefined,
4996
4826
  assetId: item.assetId !== undefined ? {
4997
4827
  equals: item.assetId
4998
4828
  } : undefined,
@@ -5025,9 +4855,7 @@ export const Asset = {
5025
4855
  }
5026
4856
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
5027
4857
  where: {
5028
- id: item.id !== undefined ? {
5029
- equals: item.id
5030
- } : undefined,
4858
+ id: item.id !== undefined ? item.id : undefined,
5031
4859
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
5032
4860
  equals: item.alpacaAccountId
5033
4861
  } : undefined,
@@ -5045,9 +4873,7 @@ export const Asset = {
5045
4873
  actions: item.actions ? {
5046
4874
  upsert: item.actions.map((item) => ({
5047
4875
  where: {
5048
- id: item.id !== undefined ? {
5049
- equals: item.id
5050
- } : undefined,
4876
+ id: item.id !== undefined ? item.id : undefined,
5051
4877
  tradeId: item.tradeId !== undefined ? {
5052
4878
  equals: item.tradeId
5053
4879
  } : undefined,
@@ -5202,9 +5028,7 @@ export const Asset = {
5202
5028
  }
5203
5029
  : { connectOrCreate: {
5204
5030
  where: {
5205
- id: item.order.id !== undefined ? {
5206
- equals: item.order.id
5207
- } : undefined,
5031
+ id: item.order.id !== undefined ? item.order.id : undefined,
5208
5032
  clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
5209
5033
  actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
5210
5034
  stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
@@ -5265,9 +5089,7 @@ export const Asset = {
5265
5089
  }
5266
5090
  : { connectOrCreate: {
5267
5091
  where: {
5268
- id: item.alpacaAccount.id !== undefined ? {
5269
- equals: item.alpacaAccount.id
5270
- } : undefined,
5092
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
5271
5093
  userId: item.alpacaAccount.userId !== undefined ? {
5272
5094
  equals: item.alpacaAccount.userId
5273
5095
  } : undefined,
@@ -5290,9 +5112,7 @@ export const Asset = {
5290
5112
  }
5291
5113
  : { connectOrCreate: {
5292
5114
  where: {
5293
- id: item.alpacaAccount.user.id !== undefined ? {
5294
- equals: item.alpacaAccount.user.id
5295
- } : undefined,
5115
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
5296
5116
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
5297
5117
  name: item.alpacaAccount.user.name !== undefined ? {
5298
5118
  equals: item.alpacaAccount.user.name
@@ -5321,9 +5141,7 @@ export const Asset = {
5321
5141
  }
5322
5142
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
5323
5143
  where: {
5324
- id: item.id !== undefined ? {
5325
- equals: item.id
5326
- } : undefined,
5144
+ id: item.id !== undefined ? item.id : undefined,
5327
5145
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
5328
5146
  actionId: item.actionId !== undefined ? item.actionId : undefined,
5329
5147
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -5368,9 +5186,7 @@ export const Asset = {
5368
5186
  }
5369
5187
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
5370
5188
  where: {
5371
- id: item.id !== undefined ? {
5372
- equals: item.id
5373
- } : undefined,
5189
+ id: item.id !== undefined ? item.id : undefined,
5374
5190
  assetId: item.assetId !== undefined ? {
5375
5191
  equals: item.assetId
5376
5192
  } : undefined,
@@ -5403,9 +5219,7 @@ export const Asset = {
5403
5219
  }
5404
5220
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
5405
5221
  where: {
5406
- id: item.id !== undefined ? {
5407
- equals: item.id
5408
- } : undefined,
5222
+ id: item.id !== undefined ? item.id : undefined,
5409
5223
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
5410
5224
  equals: item.alpacaAccountId
5411
5225
  } : undefined,
@@ -5428,9 +5242,7 @@ export const Asset = {
5428
5242
  }
5429
5243
  : { connectOrCreate: item.actions.map((item) => ({
5430
5244
  where: {
5431
- id: item.id !== undefined ? {
5432
- equals: item.id
5433
- } : undefined,
5245
+ id: item.id !== undefined ? item.id : undefined,
5434
5246
  tradeId: item.tradeId !== undefined ? {
5435
5247
  equals: item.tradeId
5436
5248
  } : undefined,
@@ -5449,9 +5261,7 @@ export const Asset = {
5449
5261
  }
5450
5262
  : { connectOrCreate: {
5451
5263
  where: {
5452
- id: item.order.id !== undefined ? {
5453
- equals: item.order.id
5454
- } : undefined,
5264
+ id: item.order.id !== undefined ? item.order.id : undefined,
5455
5265
  clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
5456
5266
  actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
5457
5267
  stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
@@ -5497,9 +5307,7 @@ export const Asset = {
5497
5307
  orders: prop.orders ? {
5498
5308
  upsert: prop.orders.map((item) => ({
5499
5309
  where: {
5500
- id: item.id !== undefined ? {
5501
- equals: item.id
5502
- } : undefined,
5310
+ id: item.id !== undefined ? item.id : undefined,
5503
5311
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
5504
5312
  actionId: item.actionId !== undefined ? item.actionId : undefined,
5505
5313
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -5744,9 +5552,7 @@ export const Asset = {
5744
5552
  trades: item.alpacaAccount.trades ? {
5745
5553
  upsert: item.alpacaAccount.trades.map((item) => ({
5746
5554
  where: {
5747
- id: item.id !== undefined ? {
5748
- equals: item.id
5749
- } : undefined,
5555
+ id: item.id !== undefined ? item.id : undefined,
5750
5556
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
5751
5557
  equals: item.alpacaAccountId
5752
5558
  } : undefined,
@@ -5810,9 +5616,7 @@ export const Asset = {
5810
5616
  positions: item.alpacaAccount.positions ? {
5811
5617
  upsert: item.alpacaAccount.positions.map((item) => ({
5812
5618
  where: {
5813
- id: item.id !== undefined ? {
5814
- equals: item.id
5815
- } : undefined,
5619
+ id: item.id !== undefined ? item.id : undefined,
5816
5620
  assetId: item.assetId !== undefined ? {
5817
5621
  equals: item.assetId
5818
5622
  } : undefined,
@@ -5884,9 +5688,7 @@ export const Asset = {
5884
5688
  alerts: item.alpacaAccount.alerts ? {
5885
5689
  upsert: item.alpacaAccount.alerts.map((item) => ({
5886
5690
  where: {
5887
- id: item.id !== undefined ? {
5888
- equals: item.id
5889
- } : undefined,
5691
+ id: item.id !== undefined ? item.id : undefined,
5890
5692
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
5891
5693
  equals: item.alpacaAccountId
5892
5694
  } : undefined,
@@ -5931,9 +5733,7 @@ export const Asset = {
5931
5733
  }
5932
5734
  : { connectOrCreate: {
5933
5735
  where: {
5934
- id: item.alpacaAccount.user.id !== undefined ? {
5935
- equals: item.alpacaAccount.user.id
5936
- } : undefined,
5736
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
5937
5737
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
5938
5738
  name: item.alpacaAccount.user.name !== undefined ? {
5939
5739
  equals: item.alpacaAccount.user.name
@@ -5962,9 +5762,7 @@ export const Asset = {
5962
5762
  }
5963
5763
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
5964
5764
  where: {
5965
- id: item.id !== undefined ? {
5966
- equals: item.id
5967
- } : undefined,
5765
+ id: item.id !== undefined ? item.id : undefined,
5968
5766
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
5969
5767
  equals: item.alpacaAccountId
5970
5768
  } : undefined,
@@ -5995,9 +5793,7 @@ export const Asset = {
5995
5793
  }
5996
5794
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
5997
5795
  where: {
5998
- id: item.id !== undefined ? {
5999
- equals: item.id
6000
- } : undefined,
5796
+ id: item.id !== undefined ? item.id : undefined,
6001
5797
  assetId: item.assetId !== undefined ? {
6002
5798
  equals: item.assetId
6003
5799
  } : undefined,
@@ -6030,9 +5826,7 @@ export const Asset = {
6030
5826
  }
6031
5827
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
6032
5828
  where: {
6033
- id: item.id !== undefined ? {
6034
- equals: item.id
6035
- } : undefined,
5829
+ id: item.id !== undefined ? item.id : undefined,
6036
5830
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6037
5831
  equals: item.alpacaAccountId
6038
5832
  } : undefined,
@@ -6157,9 +5951,7 @@ export const Asset = {
6157
5951
  }
6158
5952
  : { connectOrCreate: {
6159
5953
  where: {
6160
- id: item.action.trade.id !== undefined ? {
6161
- equals: item.action.trade.id
6162
- } : undefined,
5954
+ id: item.action.trade.id !== undefined ? item.action.trade.id : undefined,
6163
5955
  alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
6164
5956
  equals: item.action.trade.alpacaAccountId
6165
5957
  } : undefined,
@@ -6217,9 +6009,7 @@ export const Asset = {
6217
6009
  }
6218
6010
  : { connectOrCreate: {
6219
6011
  where: {
6220
- id: item.stopLoss.id !== undefined ? {
6221
- equals: item.stopLoss.id
6222
- } : undefined,
6012
+ id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
6223
6013
  orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
6224
6014
  },
6225
6015
  create: {
@@ -6236,9 +6026,7 @@ export const Asset = {
6236
6026
  }
6237
6027
  : { connectOrCreate: {
6238
6028
  where: {
6239
- id: item.takeProfit.id !== undefined ? {
6240
- equals: item.takeProfit.id
6241
- } : undefined,
6029
+ id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
6242
6030
  orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
6243
6031
  },
6244
6032
  create: {
@@ -6255,9 +6043,7 @@ export const Asset = {
6255
6043
  }
6256
6044
  : { connectOrCreate: {
6257
6045
  where: {
6258
- id: item.alpacaAccount.id !== undefined ? {
6259
- equals: item.alpacaAccount.id
6260
- } : undefined,
6046
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
6261
6047
  userId: item.alpacaAccount.userId !== undefined ? {
6262
6048
  equals: item.alpacaAccount.userId
6263
6049
  } : undefined,
@@ -6280,9 +6066,7 @@ export const Asset = {
6280
6066
  }
6281
6067
  : { connectOrCreate: {
6282
6068
  where: {
6283
- id: item.alpacaAccount.user.id !== undefined ? {
6284
- equals: item.alpacaAccount.user.id
6285
- } : undefined,
6069
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
6286
6070
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
6287
6071
  name: item.alpacaAccount.user.name !== undefined ? {
6288
6072
  equals: item.alpacaAccount.user.name
@@ -6311,9 +6095,7 @@ export const Asset = {
6311
6095
  }
6312
6096
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
6313
6097
  where: {
6314
- id: item.id !== undefined ? {
6315
- equals: item.id
6316
- } : undefined,
6098
+ id: item.id !== undefined ? item.id : undefined,
6317
6099
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6318
6100
  equals: item.alpacaAccountId
6319
6101
  } : undefined,
@@ -6344,9 +6126,7 @@ export const Asset = {
6344
6126
  }
6345
6127
  : { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
6346
6128
  where: {
6347
- id: item.id !== undefined ? {
6348
- equals: item.id
6349
- } : undefined,
6129
+ id: item.id !== undefined ? item.id : undefined,
6350
6130
  assetId: item.assetId !== undefined ? {
6351
6131
  equals: item.assetId
6352
6132
  } : undefined,
@@ -6379,9 +6159,7 @@ export const Asset = {
6379
6159
  }
6380
6160
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
6381
6161
  where: {
6382
- id: item.id !== undefined ? {
6383
- equals: item.id
6384
- } : undefined,
6162
+ id: item.id !== undefined ? item.id : undefined,
6385
6163
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6386
6164
  equals: item.alpacaAccountId
6387
6165
  } : undefined,
@@ -6404,9 +6182,7 @@ export const Asset = {
6404
6182
  }
6405
6183
  : { connectOrCreate: {
6406
6184
  where: {
6407
- id: item.action.id !== undefined ? {
6408
- equals: item.action.id
6409
- } : undefined,
6185
+ id: item.action.id !== undefined ? item.action.id : undefined,
6410
6186
  tradeId: item.action.tradeId !== undefined ? {
6411
6187
  equals: item.action.tradeId
6412
6188
  } : undefined,
@@ -6425,9 +6201,7 @@ export const Asset = {
6425
6201
  }
6426
6202
  : { connectOrCreate: {
6427
6203
  where: {
6428
- id: item.action.trade.id !== undefined ? {
6429
- equals: item.action.trade.id
6430
- } : undefined,
6204
+ id: item.action.trade.id !== undefined ? item.action.trade.id : undefined,
6431
6205
  alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
6432
6206
  equals: item.action.trade.alpacaAccountId
6433
6207
  } : undefined,
@@ -6459,9 +6233,7 @@ export const Asset = {
6459
6233
  positions: prop.positions ? {
6460
6234
  upsert: prop.positions.map((item) => ({
6461
6235
  where: {
6462
- id: item.id !== undefined ? {
6463
- equals: item.id
6464
- } : undefined,
6236
+ id: item.id !== undefined ? item.id : undefined,
6465
6237
  assetId: item.assetId !== undefined ? {
6466
6238
  equals: item.assetId
6467
6239
  } : undefined,
@@ -6622,9 +6394,7 @@ export const Asset = {
6622
6394
  trades: item.alpacaAccount.trades ? {
6623
6395
  upsert: item.alpacaAccount.trades.map((item) => ({
6624
6396
  where: {
6625
- id: item.id !== undefined ? {
6626
- equals: item.id
6627
- } : undefined,
6397
+ id: item.id !== undefined ? item.id : undefined,
6628
6398
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6629
6399
  equals: item.alpacaAccountId
6630
6400
  } : undefined,
@@ -6688,9 +6458,7 @@ export const Asset = {
6688
6458
  orders: item.alpacaAccount.orders ? {
6689
6459
  upsert: item.alpacaAccount.orders.map((item) => ({
6690
6460
  where: {
6691
- id: item.id !== undefined ? {
6692
- equals: item.id
6693
- } : undefined,
6461
+ id: item.id !== undefined ? item.id : undefined,
6694
6462
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
6695
6463
  actionId: item.actionId !== undefined ? item.actionId : undefined,
6696
6464
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -6801,9 +6569,7 @@ export const Asset = {
6801
6569
  alerts: item.alpacaAccount.alerts ? {
6802
6570
  upsert: item.alpacaAccount.alerts.map((item) => ({
6803
6571
  where: {
6804
- id: item.id !== undefined ? {
6805
- equals: item.id
6806
- } : undefined,
6572
+ id: item.id !== undefined ? item.id : undefined,
6807
6573
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6808
6574
  equals: item.alpacaAccountId
6809
6575
  } : undefined,
@@ -6848,9 +6614,7 @@ export const Asset = {
6848
6614
  }
6849
6615
  : { connectOrCreate: {
6850
6616
  where: {
6851
- id: item.alpacaAccount.user.id !== undefined ? {
6852
- equals: item.alpacaAccount.user.id
6853
- } : undefined,
6617
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
6854
6618
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
6855
6619
  name: item.alpacaAccount.user.name !== undefined ? {
6856
6620
  equals: item.alpacaAccount.user.name
@@ -6879,9 +6643,7 @@ export const Asset = {
6879
6643
  }
6880
6644
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
6881
6645
  where: {
6882
- id: item.id !== undefined ? {
6883
- equals: item.id
6884
- } : undefined,
6646
+ id: item.id !== undefined ? item.id : undefined,
6885
6647
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6886
6648
  equals: item.alpacaAccountId
6887
6649
  } : undefined,
@@ -6912,9 +6674,7 @@ export const Asset = {
6912
6674
  }
6913
6675
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
6914
6676
  where: {
6915
- id: item.id !== undefined ? {
6916
- equals: item.id
6917
- } : undefined,
6677
+ id: item.id !== undefined ? item.id : undefined,
6918
6678
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
6919
6679
  actionId: item.actionId !== undefined ? item.actionId : undefined,
6920
6680
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -6959,9 +6719,7 @@ export const Asset = {
6959
6719
  }
6960
6720
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
6961
6721
  where: {
6962
- id: item.id !== undefined ? {
6963
- equals: item.id
6964
- } : undefined,
6722
+ id: item.id !== undefined ? item.id : undefined,
6965
6723
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
6966
6724
  equals: item.alpacaAccountId
6967
6725
  } : undefined,
@@ -6999,9 +6757,7 @@ export const Asset = {
6999
6757
  }
7000
6758
  : { connectOrCreate: {
7001
6759
  where: {
7002
- id: item.alpacaAccount.id !== undefined ? {
7003
- equals: item.alpacaAccount.id
7004
- } : undefined,
6760
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
7005
6761
  userId: item.alpacaAccount.userId !== undefined ? {
7006
6762
  equals: item.alpacaAccount.userId
7007
6763
  } : undefined,
@@ -7024,9 +6780,7 @@ export const Asset = {
7024
6780
  }
7025
6781
  : { connectOrCreate: {
7026
6782
  where: {
7027
- id: item.alpacaAccount.user.id !== undefined ? {
7028
- equals: item.alpacaAccount.user.id
7029
- } : undefined,
6783
+ id: item.alpacaAccount.user.id !== undefined ? item.alpacaAccount.user.id : undefined,
7030
6784
  email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
7031
6785
  name: item.alpacaAccount.user.name !== undefined ? {
7032
6786
  equals: item.alpacaAccount.user.name
@@ -7055,9 +6809,7 @@ export const Asset = {
7055
6809
  }
7056
6810
  : { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
7057
6811
  where: {
7058
- id: item.id !== undefined ? {
7059
- equals: item.id
7060
- } : undefined,
6812
+ id: item.id !== undefined ? item.id : undefined,
7061
6813
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
7062
6814
  equals: item.alpacaAccountId
7063
6815
  } : undefined,
@@ -7088,9 +6840,7 @@ export const Asset = {
7088
6840
  }
7089
6841
  : { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
7090
6842
  where: {
7091
- id: item.id !== undefined ? {
7092
- equals: item.id
7093
- } : undefined,
6843
+ id: item.id !== undefined ? item.id : undefined,
7094
6844
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
7095
6845
  actionId: item.actionId !== undefined ? item.actionId : undefined,
7096
6846
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -7135,9 +6885,7 @@ export const Asset = {
7135
6885
  }
7136
6886
  : { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
7137
6887
  where: {
7138
- id: item.id !== undefined ? {
7139
- equals: item.id
7140
- } : undefined,
6888
+ id: item.id !== undefined ? item.id : undefined,
7141
6889
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
7142
6890
  equals: item.alpacaAccountId
7143
6891
  } : undefined,
@@ -7158,9 +6906,7 @@ export const Asset = {
7158
6906
  newsMentions: prop.newsMentions ? {
7159
6907
  upsert: prop.newsMentions.map((item) => ({
7160
6908
  where: {
7161
- id: item.id !== undefined ? {
7162
- equals: item.id
7163
- } : undefined,
6909
+ id: item.id !== undefined ? item.id : undefined,
7164
6910
  url: item.url !== undefined ? item.url : undefined,
7165
6911
  assetId: item.assetId !== undefined ? {
7166
6912
  equals: item.assetId
@@ -7273,9 +7019,7 @@ export const Asset = {
7273
7019
  }
7274
7020
  : { connectOrCreate: {
7275
7021
  where: {
7276
- id: item.news.id !== undefined ? {
7277
- equals: item.news.id
7278
- } : undefined,
7022
+ id: item.news.id !== undefined ? item.news.id : undefined,
7279
7023
  url: item.news.url !== undefined ? item.news.url : undefined,
7280
7024
  title: item.news.title !== undefined ? {
7281
7025
  equals: item.news.title
@@ -7370,9 +7114,7 @@ export const Asset = {
7370
7114
  }`;
7371
7115
  const variables = {
7372
7116
  where: {
7373
- id: props.id !== undefined ? {
7374
- equals: props.id
7375
- } : undefined,
7117
+ id: props.id !== undefined ? props.id : undefined,
7376
7118
  symbol: props.symbol !== undefined ? props.symbol : undefined,
7377
7119
  name: props.name !== undefined ? props.name : undefined,
7378
7120
  type: props.type !== undefined ? props.type : undefined,