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
@@ -123,9 +123,7 @@ export const NewsArticleAssetSentiment = {
123
123
  }
124
124
  : { connectOrCreate: {
125
125
  where: {
126
- id: props.news.id !== undefined ? {
127
- equals: props.news.id
128
- } : undefined,
126
+ id: props.news.id !== undefined ? props.news.id : undefined,
129
127
  url: props.news.url !== undefined ? props.news.url : undefined,
130
128
  title: props.news.title !== undefined ? {
131
129
  equals: props.news.title
@@ -156,9 +154,7 @@ export const NewsArticleAssetSentiment = {
156
154
  }
157
155
  : { connectOrCreate: {
158
156
  where: {
159
- id: props.asset.id !== undefined ? {
160
- equals: props.asset.id
161
- } : undefined,
157
+ id: props.asset.id !== undefined ? props.asset.id : undefined,
162
158
  symbol: props.asset.symbol !== undefined ? props.asset.symbol : undefined,
163
159
  name: props.asset.name !== undefined ? props.asset.name : undefined,
164
160
  },
@@ -226,9 +222,7 @@ export const NewsArticleAssetSentiment = {
226
222
  }
227
223
  : { connectOrCreate: props.asset.trades.map((item) => ({
228
224
  where: {
229
- id: item.id !== undefined ? {
230
- equals: item.id
231
- } : undefined,
225
+ id: item.id !== undefined ? item.id : undefined,
232
226
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
233
227
  equals: item.alpacaAccountId
234
228
  } : undefined,
@@ -256,9 +250,7 @@ export const NewsArticleAssetSentiment = {
256
250
  }
257
251
  : { connectOrCreate: {
258
252
  where: {
259
- id: item.alpacaAccount.id !== undefined ? {
260
- equals: item.alpacaAccount.id
261
- } : undefined,
253
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
262
254
  userId: item.alpacaAccount.userId !== undefined ? {
263
255
  equals: item.alpacaAccount.userId
264
256
  } : undefined,
@@ -284,9 +276,7 @@ export const NewsArticleAssetSentiment = {
284
276
  }
285
277
  : { connectOrCreate: item.actions.map((item) => ({
286
278
  where: {
287
- id: item.id !== undefined ? {
288
- equals: item.id
289
- } : undefined,
279
+ id: item.id !== undefined ? item.id : undefined,
290
280
  tradeId: item.tradeId !== undefined ? {
291
281
  equals: item.tradeId
292
282
  } : undefined,
@@ -311,9 +301,7 @@ export const NewsArticleAssetSentiment = {
311
301
  }
312
302
  : { connectOrCreate: props.asset.orders.map((item) => ({
313
303
  where: {
314
- id: item.id !== undefined ? {
315
- equals: item.id
316
- } : undefined,
304
+ id: item.id !== undefined ? item.id : undefined,
317
305
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
318
306
  actionId: item.actionId !== undefined ? item.actionId : undefined,
319
307
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -355,9 +343,7 @@ export const NewsArticleAssetSentiment = {
355
343
  }
356
344
  : { connectOrCreate: {
357
345
  where: {
358
- id: item.stopLoss.id !== undefined ? {
359
- equals: item.stopLoss.id
360
- } : undefined,
346
+ id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
361
347
  orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
362
348
  },
363
349
  create: {
@@ -374,9 +360,7 @@ export const NewsArticleAssetSentiment = {
374
360
  }
375
361
  : { connectOrCreate: {
376
362
  where: {
377
- id: item.takeProfit.id !== undefined ? {
378
- equals: item.takeProfit.id
379
- } : undefined,
363
+ id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
380
364
  orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
381
365
  },
382
366
  create: {
@@ -393,9 +377,7 @@ export const NewsArticleAssetSentiment = {
393
377
  }
394
378
  : { connectOrCreate: {
395
379
  where: {
396
- id: item.alpacaAccount.id !== undefined ? {
397
- equals: item.alpacaAccount.id
398
- } : undefined,
380
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
399
381
  userId: item.alpacaAccount.userId !== undefined ? {
400
382
  equals: item.alpacaAccount.userId
401
383
  } : undefined,
@@ -421,9 +403,7 @@ export const NewsArticleAssetSentiment = {
421
403
  }
422
404
  : { connectOrCreate: {
423
405
  where: {
424
- id: item.action.id !== undefined ? {
425
- equals: item.action.id
426
- } : undefined,
406
+ id: item.action.id !== undefined ? item.action.id : undefined,
427
407
  tradeId: item.action.tradeId !== undefined ? {
428
408
  equals: item.action.tradeId
429
409
  } : undefined,
@@ -448,9 +428,7 @@ export const NewsArticleAssetSentiment = {
448
428
  }
449
429
  : { connectOrCreate: props.asset.positions.map((item) => ({
450
430
  where: {
451
- id: item.id !== undefined ? {
452
- equals: item.id
453
- } : undefined,
431
+ id: item.id !== undefined ? item.id : undefined,
454
432
  assetId: item.assetId !== undefined ? {
455
433
  equals: item.assetId
456
434
  } : undefined,
@@ -480,9 +458,7 @@ export const NewsArticleAssetSentiment = {
480
458
  }
481
459
  : { connectOrCreate: {
482
460
  where: {
483
- id: item.alpacaAccount.id !== undefined ? {
484
- equals: item.alpacaAccount.id
485
- } : undefined,
461
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
486
462
  userId: item.alpacaAccount.userId !== undefined ? {
487
463
  equals: item.alpacaAccount.userId
488
464
  } : undefined,
@@ -580,9 +556,7 @@ export const NewsArticleAssetSentiment = {
580
556
  }`;
581
557
  const variables = {
582
558
  where: {
583
- id: props.id !== undefined ? {
584
- equals: props.id
585
- } : undefined,
559
+ id: props.id !== undefined ? props.id : undefined,
586
560
  url: props.url !== undefined ? props.url : undefined,
587
561
  assetId: props.assetId !== undefined ? {
588
562
  equals: props.assetId
@@ -869,9 +843,7 @@ export const NewsArticleAssetSentiment = {
869
843
  trades: props.asset.trades ? {
870
844
  upsert: props.asset.trades.map((item) => ({
871
845
  where: {
872
- id: item.id !== undefined ? {
873
- equals: item.id
874
- } : undefined,
846
+ id: item.id !== undefined ? item.id : undefined,
875
847
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
876
848
  equals: item.alpacaAccountId
877
849
  } : undefined,
@@ -974,9 +946,7 @@ export const NewsArticleAssetSentiment = {
974
946
  actions: item.actions ? {
975
947
  upsert: item.actions.map((item) => ({
976
948
  where: {
977
- id: item.id !== undefined ? {
978
- equals: item.id
979
- } : undefined,
949
+ id: item.id !== undefined ? item.id : undefined,
980
950
  tradeId: item.tradeId !== undefined ? {
981
951
  equals: item.tradeId
982
952
  } : undefined,
@@ -1031,9 +1001,7 @@ export const NewsArticleAssetSentiment = {
1031
1001
  }
1032
1002
  : { connectOrCreate: {
1033
1003
  where: {
1034
- id: item.alpacaAccount.id !== undefined ? {
1035
- equals: item.alpacaAccount.id
1036
- } : undefined,
1004
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
1037
1005
  userId: item.alpacaAccount.userId !== undefined ? {
1038
1006
  equals: item.alpacaAccount.userId
1039
1007
  } : undefined,
@@ -1059,9 +1027,7 @@ export const NewsArticleAssetSentiment = {
1059
1027
  }
1060
1028
  : { connectOrCreate: item.actions.map((item) => ({
1061
1029
  where: {
1062
- id: item.id !== undefined ? {
1063
- equals: item.id
1064
- } : undefined,
1030
+ id: item.id !== undefined ? item.id : undefined,
1065
1031
  tradeId: item.tradeId !== undefined ? {
1066
1032
  equals: item.tradeId
1067
1033
  } : undefined,
@@ -1081,9 +1047,7 @@ export const NewsArticleAssetSentiment = {
1081
1047
  orders: props.asset.orders ? {
1082
1048
  upsert: props.asset.orders.map((item) => ({
1083
1049
  where: {
1084
- id: item.id !== undefined ? {
1085
- equals: item.id
1086
- } : undefined,
1050
+ id: item.id !== undefined ? item.id : undefined,
1087
1051
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
1088
1052
  actionId: item.actionId !== undefined ? item.actionId : undefined,
1089
1053
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -1344,9 +1308,7 @@ export const NewsArticleAssetSentiment = {
1344
1308
  }
1345
1309
  : { connectOrCreate: {
1346
1310
  where: {
1347
- id: item.stopLoss.id !== undefined ? {
1348
- equals: item.stopLoss.id
1349
- } : undefined,
1311
+ id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
1350
1312
  orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
1351
1313
  },
1352
1314
  create: {
@@ -1363,9 +1325,7 @@ export const NewsArticleAssetSentiment = {
1363
1325
  }
1364
1326
  : { connectOrCreate: {
1365
1327
  where: {
1366
- id: item.takeProfit.id !== undefined ? {
1367
- equals: item.takeProfit.id
1368
- } : undefined,
1328
+ id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
1369
1329
  orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
1370
1330
  },
1371
1331
  create: {
@@ -1382,9 +1342,7 @@ export const NewsArticleAssetSentiment = {
1382
1342
  }
1383
1343
  : { connectOrCreate: {
1384
1344
  where: {
1385
- id: item.alpacaAccount.id !== undefined ? {
1386
- equals: item.alpacaAccount.id
1387
- } : undefined,
1345
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
1388
1346
  userId: item.alpacaAccount.userId !== undefined ? {
1389
1347
  equals: item.alpacaAccount.userId
1390
1348
  } : undefined,
@@ -1410,9 +1368,7 @@ export const NewsArticleAssetSentiment = {
1410
1368
  }
1411
1369
  : { connectOrCreate: {
1412
1370
  where: {
1413
- id: item.action.id !== undefined ? {
1414
- equals: item.action.id
1415
- } : undefined,
1371
+ id: item.action.id !== undefined ? item.action.id : undefined,
1416
1372
  tradeId: item.action.tradeId !== undefined ? {
1417
1373
  equals: item.action.tradeId
1418
1374
  } : undefined,
@@ -1432,9 +1388,7 @@ export const NewsArticleAssetSentiment = {
1432
1388
  positions: props.asset.positions ? {
1433
1389
  upsert: props.asset.positions.map((item) => ({
1434
1390
  where: {
1435
- id: item.id !== undefined ? {
1436
- equals: item.id
1437
- } : undefined,
1391
+ id: item.id !== undefined ? item.id : undefined,
1438
1392
  assetId: item.assetId !== undefined ? {
1439
1393
  equals: item.assetId
1440
1394
  } : undefined,
@@ -1563,9 +1517,7 @@ export const NewsArticleAssetSentiment = {
1563
1517
  }
1564
1518
  : { connectOrCreate: {
1565
1519
  where: {
1566
- id: item.alpacaAccount.id !== undefined ? {
1567
- equals: item.alpacaAccount.id
1568
- } : undefined,
1520
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
1569
1521
  userId: item.alpacaAccount.userId !== undefined ? {
1570
1522
  equals: item.alpacaAccount.userId
1571
1523
  } : undefined,
@@ -1651,9 +1603,7 @@ export const NewsArticleAssetSentiment = {
1651
1603
  }
1652
1604
  : { connectOrCreate: props.asset.trades.map((item) => ({
1653
1605
  where: {
1654
- id: item.id !== undefined ? {
1655
- equals: item.id
1656
- } : undefined,
1606
+ id: item.id !== undefined ? item.id : undefined,
1657
1607
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1658
1608
  equals: item.alpacaAccountId
1659
1609
  } : undefined,
@@ -1681,9 +1631,7 @@ export const NewsArticleAssetSentiment = {
1681
1631
  }
1682
1632
  : { connectOrCreate: {
1683
1633
  where: {
1684
- id: item.alpacaAccount.id !== undefined ? {
1685
- equals: item.alpacaAccount.id
1686
- } : undefined,
1634
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
1687
1635
  userId: item.alpacaAccount.userId !== undefined ? {
1688
1636
  equals: item.alpacaAccount.userId
1689
1637
  } : undefined,
@@ -1709,9 +1657,7 @@ export const NewsArticleAssetSentiment = {
1709
1657
  }
1710
1658
  : { connectOrCreate: item.actions.map((item) => ({
1711
1659
  where: {
1712
- id: item.id !== undefined ? {
1713
- equals: item.id
1714
- } : undefined,
1660
+ id: item.id !== undefined ? item.id : undefined,
1715
1661
  tradeId: item.tradeId !== undefined ? {
1716
1662
  equals: item.tradeId
1717
1663
  } : undefined,
@@ -1736,9 +1682,7 @@ export const NewsArticleAssetSentiment = {
1736
1682
  }
1737
1683
  : { connectOrCreate: props.asset.orders.map((item) => ({
1738
1684
  where: {
1739
- id: item.id !== undefined ? {
1740
- equals: item.id
1741
- } : undefined,
1685
+ id: item.id !== undefined ? item.id : undefined,
1742
1686
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
1743
1687
  actionId: item.actionId !== undefined ? item.actionId : undefined,
1744
1688
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -1780,9 +1724,7 @@ export const NewsArticleAssetSentiment = {
1780
1724
  }
1781
1725
  : { connectOrCreate: {
1782
1726
  where: {
1783
- id: item.stopLoss.id !== undefined ? {
1784
- equals: item.stopLoss.id
1785
- } : undefined,
1727
+ id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
1786
1728
  orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
1787
1729
  },
1788
1730
  create: {
@@ -1799,9 +1741,7 @@ export const NewsArticleAssetSentiment = {
1799
1741
  }
1800
1742
  : { connectOrCreate: {
1801
1743
  where: {
1802
- id: item.takeProfit.id !== undefined ? {
1803
- equals: item.takeProfit.id
1804
- } : undefined,
1744
+ id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
1805
1745
  orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
1806
1746
  },
1807
1747
  create: {
@@ -1818,9 +1758,7 @@ export const NewsArticleAssetSentiment = {
1818
1758
  }
1819
1759
  : { connectOrCreate: {
1820
1760
  where: {
1821
- id: item.alpacaAccount.id !== undefined ? {
1822
- equals: item.alpacaAccount.id
1823
- } : undefined,
1761
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
1824
1762
  userId: item.alpacaAccount.userId !== undefined ? {
1825
1763
  equals: item.alpacaAccount.userId
1826
1764
  } : undefined,
@@ -1846,9 +1784,7 @@ export const NewsArticleAssetSentiment = {
1846
1784
  }
1847
1785
  : { connectOrCreate: {
1848
1786
  where: {
1849
- id: item.action.id !== undefined ? {
1850
- equals: item.action.id
1851
- } : undefined,
1787
+ id: item.action.id !== undefined ? item.action.id : undefined,
1852
1788
  tradeId: item.action.tradeId !== undefined ? {
1853
1789
  equals: item.action.tradeId
1854
1790
  } : undefined,
@@ -1873,9 +1809,7 @@ export const NewsArticleAssetSentiment = {
1873
1809
  }
1874
1810
  : { connectOrCreate: props.asset.positions.map((item) => ({
1875
1811
  where: {
1876
- id: item.id !== undefined ? {
1877
- equals: item.id
1878
- } : undefined,
1812
+ id: item.id !== undefined ? item.id : undefined,
1879
1813
  assetId: item.assetId !== undefined ? {
1880
1814
  equals: item.assetId
1881
1815
  } : undefined,
@@ -1905,9 +1839,7 @@ export const NewsArticleAssetSentiment = {
1905
1839
  }
1906
1840
  : { connectOrCreate: {
1907
1841
  where: {
1908
- id: item.alpacaAccount.id !== undefined ? {
1909
- equals: item.alpacaAccount.id
1910
- } : undefined,
1842
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
1911
1843
  userId: item.alpacaAccount.userId !== undefined ? {
1912
1844
  equals: item.alpacaAccount.userId
1913
1845
  } : undefined,
@@ -1965,9 +1897,7 @@ export const NewsArticleAssetSentiment = {
1965
1897
  }`;
1966
1898
  const variables = props.map(prop => ({
1967
1899
  where: {
1968
- id: prop.id !== undefined ? {
1969
- equals: prop.id
1970
- } : undefined,
1900
+ id: prop.id !== undefined ? prop.id : undefined,
1971
1901
  url: prop.url !== undefined ? prop.url : undefined,
1972
1902
  assetId: prop.assetId !== undefined ? {
1973
1903
  equals: prop.assetId
@@ -2254,9 +2184,7 @@ export const NewsArticleAssetSentiment = {
2254
2184
  trades: prop.asset.trades ? {
2255
2185
  upsert: prop.asset.trades.map((item) => ({
2256
2186
  where: {
2257
- id: item.id !== undefined ? {
2258
- equals: item.id
2259
- } : undefined,
2187
+ id: item.id !== undefined ? item.id : undefined,
2260
2188
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2261
2189
  equals: item.alpacaAccountId
2262
2190
  } : undefined,
@@ -2359,9 +2287,7 @@ export const NewsArticleAssetSentiment = {
2359
2287
  actions: item.actions ? {
2360
2288
  upsert: item.actions.map((item) => ({
2361
2289
  where: {
2362
- id: item.id !== undefined ? {
2363
- equals: item.id
2364
- } : undefined,
2290
+ id: item.id !== undefined ? item.id : undefined,
2365
2291
  tradeId: item.tradeId !== undefined ? {
2366
2292
  equals: item.tradeId
2367
2293
  } : undefined,
@@ -2416,9 +2342,7 @@ export const NewsArticleAssetSentiment = {
2416
2342
  }
2417
2343
  : { connectOrCreate: {
2418
2344
  where: {
2419
- id: item.alpacaAccount.id !== undefined ? {
2420
- equals: item.alpacaAccount.id
2421
- } : undefined,
2345
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
2422
2346
  userId: item.alpacaAccount.userId !== undefined ? {
2423
2347
  equals: item.alpacaAccount.userId
2424
2348
  } : undefined,
@@ -2444,9 +2368,7 @@ export const NewsArticleAssetSentiment = {
2444
2368
  }
2445
2369
  : { connectOrCreate: item.actions.map((item) => ({
2446
2370
  where: {
2447
- id: item.id !== undefined ? {
2448
- equals: item.id
2449
- } : undefined,
2371
+ id: item.id !== undefined ? item.id : undefined,
2450
2372
  tradeId: item.tradeId !== undefined ? {
2451
2373
  equals: item.tradeId
2452
2374
  } : undefined,
@@ -2466,9 +2388,7 @@ export const NewsArticleAssetSentiment = {
2466
2388
  orders: prop.asset.orders ? {
2467
2389
  upsert: prop.asset.orders.map((item) => ({
2468
2390
  where: {
2469
- id: item.id !== undefined ? {
2470
- equals: item.id
2471
- } : undefined,
2391
+ id: item.id !== undefined ? item.id : undefined,
2472
2392
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
2473
2393
  actionId: item.actionId !== undefined ? item.actionId : undefined,
2474
2394
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -2729,9 +2649,7 @@ export const NewsArticleAssetSentiment = {
2729
2649
  }
2730
2650
  : { connectOrCreate: {
2731
2651
  where: {
2732
- id: item.stopLoss.id !== undefined ? {
2733
- equals: item.stopLoss.id
2734
- } : undefined,
2652
+ id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
2735
2653
  orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
2736
2654
  },
2737
2655
  create: {
@@ -2748,9 +2666,7 @@ export const NewsArticleAssetSentiment = {
2748
2666
  }
2749
2667
  : { connectOrCreate: {
2750
2668
  where: {
2751
- id: item.takeProfit.id !== undefined ? {
2752
- equals: item.takeProfit.id
2753
- } : undefined,
2669
+ id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
2754
2670
  orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
2755
2671
  },
2756
2672
  create: {
@@ -2767,9 +2683,7 @@ export const NewsArticleAssetSentiment = {
2767
2683
  }
2768
2684
  : { connectOrCreate: {
2769
2685
  where: {
2770
- id: item.alpacaAccount.id !== undefined ? {
2771
- equals: item.alpacaAccount.id
2772
- } : undefined,
2686
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
2773
2687
  userId: item.alpacaAccount.userId !== undefined ? {
2774
2688
  equals: item.alpacaAccount.userId
2775
2689
  } : undefined,
@@ -2795,9 +2709,7 @@ export const NewsArticleAssetSentiment = {
2795
2709
  }
2796
2710
  : { connectOrCreate: {
2797
2711
  where: {
2798
- id: item.action.id !== undefined ? {
2799
- equals: item.action.id
2800
- } : undefined,
2712
+ id: item.action.id !== undefined ? item.action.id : undefined,
2801
2713
  tradeId: item.action.tradeId !== undefined ? {
2802
2714
  equals: item.action.tradeId
2803
2715
  } : undefined,
@@ -2817,9 +2729,7 @@ export const NewsArticleAssetSentiment = {
2817
2729
  positions: prop.asset.positions ? {
2818
2730
  upsert: prop.asset.positions.map((item) => ({
2819
2731
  where: {
2820
- id: item.id !== undefined ? {
2821
- equals: item.id
2822
- } : undefined,
2732
+ id: item.id !== undefined ? item.id : undefined,
2823
2733
  assetId: item.assetId !== undefined ? {
2824
2734
  equals: item.assetId
2825
2735
  } : undefined,
@@ -2948,9 +2858,7 @@ export const NewsArticleAssetSentiment = {
2948
2858
  }
2949
2859
  : { connectOrCreate: {
2950
2860
  where: {
2951
- id: item.alpacaAccount.id !== undefined ? {
2952
- equals: item.alpacaAccount.id
2953
- } : undefined,
2861
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
2954
2862
  userId: item.alpacaAccount.userId !== undefined ? {
2955
2863
  equals: item.alpacaAccount.userId
2956
2864
  } : undefined,
@@ -3036,9 +2944,7 @@ export const NewsArticleAssetSentiment = {
3036
2944
  }
3037
2945
  : { connectOrCreate: prop.asset.trades.map((item) => ({
3038
2946
  where: {
3039
- id: item.id !== undefined ? {
3040
- equals: item.id
3041
- } : undefined,
2947
+ id: item.id !== undefined ? item.id : undefined,
3042
2948
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
3043
2949
  equals: item.alpacaAccountId
3044
2950
  } : undefined,
@@ -3066,9 +2972,7 @@ export const NewsArticleAssetSentiment = {
3066
2972
  }
3067
2973
  : { connectOrCreate: {
3068
2974
  where: {
3069
- id: item.alpacaAccount.id !== undefined ? {
3070
- equals: item.alpacaAccount.id
3071
- } : undefined,
2975
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
3072
2976
  userId: item.alpacaAccount.userId !== undefined ? {
3073
2977
  equals: item.alpacaAccount.userId
3074
2978
  } : undefined,
@@ -3094,9 +2998,7 @@ export const NewsArticleAssetSentiment = {
3094
2998
  }
3095
2999
  : { connectOrCreate: item.actions.map((item) => ({
3096
3000
  where: {
3097
- id: item.id !== undefined ? {
3098
- equals: item.id
3099
- } : undefined,
3001
+ id: item.id !== undefined ? item.id : undefined,
3100
3002
  tradeId: item.tradeId !== undefined ? {
3101
3003
  equals: item.tradeId
3102
3004
  } : undefined,
@@ -3121,9 +3023,7 @@ export const NewsArticleAssetSentiment = {
3121
3023
  }
3122
3024
  : { connectOrCreate: prop.asset.orders.map((item) => ({
3123
3025
  where: {
3124
- id: item.id !== undefined ? {
3125
- equals: item.id
3126
- } : undefined,
3026
+ id: item.id !== undefined ? item.id : undefined,
3127
3027
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
3128
3028
  actionId: item.actionId !== undefined ? item.actionId : undefined,
3129
3029
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -3165,9 +3065,7 @@ export const NewsArticleAssetSentiment = {
3165
3065
  }
3166
3066
  : { connectOrCreate: {
3167
3067
  where: {
3168
- id: item.stopLoss.id !== undefined ? {
3169
- equals: item.stopLoss.id
3170
- } : undefined,
3068
+ id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
3171
3069
  orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
3172
3070
  },
3173
3071
  create: {
@@ -3184,9 +3082,7 @@ export const NewsArticleAssetSentiment = {
3184
3082
  }
3185
3083
  : { connectOrCreate: {
3186
3084
  where: {
3187
- id: item.takeProfit.id !== undefined ? {
3188
- equals: item.takeProfit.id
3189
- } : undefined,
3085
+ id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
3190
3086
  orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
3191
3087
  },
3192
3088
  create: {
@@ -3203,9 +3099,7 @@ export const NewsArticleAssetSentiment = {
3203
3099
  }
3204
3100
  : { connectOrCreate: {
3205
3101
  where: {
3206
- id: item.alpacaAccount.id !== undefined ? {
3207
- equals: item.alpacaAccount.id
3208
- } : undefined,
3102
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
3209
3103
  userId: item.alpacaAccount.userId !== undefined ? {
3210
3104
  equals: item.alpacaAccount.userId
3211
3105
  } : undefined,
@@ -3231,9 +3125,7 @@ export const NewsArticleAssetSentiment = {
3231
3125
  }
3232
3126
  : { connectOrCreate: {
3233
3127
  where: {
3234
- id: item.action.id !== undefined ? {
3235
- equals: item.action.id
3236
- } : undefined,
3128
+ id: item.action.id !== undefined ? item.action.id : undefined,
3237
3129
  tradeId: item.action.tradeId !== undefined ? {
3238
3130
  equals: item.action.tradeId
3239
3131
  } : undefined,
@@ -3258,9 +3150,7 @@ export const NewsArticleAssetSentiment = {
3258
3150
  }
3259
3151
  : { connectOrCreate: prop.asset.positions.map((item) => ({
3260
3152
  where: {
3261
- id: item.id !== undefined ? {
3262
- equals: item.id
3263
- } : undefined,
3153
+ id: item.id !== undefined ? item.id : undefined,
3264
3154
  assetId: item.assetId !== undefined ? {
3265
3155
  equals: item.assetId
3266
3156
  } : undefined,
@@ -3290,9 +3180,7 @@ export const NewsArticleAssetSentiment = {
3290
3180
  }
3291
3181
  : { connectOrCreate: {
3292
3182
  where: {
3293
- id: item.alpacaAccount.id !== undefined ? {
3294
- equals: item.alpacaAccount.id
3295
- } : undefined,
3183
+ id: item.alpacaAccount.id !== undefined ? item.alpacaAccount.id : undefined,
3296
3184
  userId: item.alpacaAccount.userId !== undefined ? {
3297
3185
  equals: item.alpacaAccount.userId
3298
3186
  } : undefined,
@@ -3385,9 +3273,7 @@ export const NewsArticleAssetSentiment = {
3385
3273
  }`;
3386
3274
  const variables = {
3387
3275
  where: {
3388
- id: props.id !== undefined ? {
3389
- equals: props.id
3390
- } : undefined,
3276
+ id: props.id !== undefined ? props.id : undefined,
3391
3277
  url: props.url !== undefined ? props.url : undefined,
3392
3278
  assetId: props.assetId !== undefined ? {
3393
3279
  equals: props.assetId
@@ -1 +1 @@
1
- {"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../src/Order.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAwL/E,eAAO,MAAM,KAAK;IAEhB;;;;OAIG;kBAEiB,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAi8BpD;;;;OAIG;sBACqB,SAAS,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAyDvE;;;;OAIG;kBACiB,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAk4GlD;;;;OAIG;sBACqB,SAAS,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAq4GvE;;;;OAIG;kBACiB,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAiClD;;;;OAIG;eACc,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;IAsDtD;;;OAGG;cACa,OAAO,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC;IAyB3C;;;;OAIG;oBACmB,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC;CA6D9D,CAAC"}
1
+ {"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../src/Order.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAwL/E,eAAO,MAAM,KAAK;IAEhB;;;;OAIG;kBAEiB,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IA64BpD;;;;OAIG;sBACqB,SAAS,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAyDvE;;;;OAIG;kBACiB,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAsyGlD;;;;OAIG;sBACqB,SAAS,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAyyGvE;;;;OAIG;kBACiB,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAiClD;;;;OAIG;eACc,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;IAoDtD;;;OAGG;cACa,OAAO,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC;IAyB3C;;;;OAIG;oBACmB,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC;CA6D9D,CAAC"}