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
@@ -215,9 +215,7 @@ export const Account = {
215
215
  }
216
216
  : { connectOrCreate: {
217
217
  where: {
218
- id: props.user.id !== undefined ? {
219
- equals: props.user.id
220
- } : undefined,
218
+ id: props.user.id !== undefined ? props.user.id : undefined,
221
219
  email: props.user.email !== undefined ? props.user.email : undefined,
222
220
  name: props.user.name !== undefined ? {
223
221
  equals: props.user.name
@@ -243,9 +241,7 @@ export const Account = {
243
241
  }
244
242
  : { connectOrCreate: {
245
243
  where: {
246
- id: props.user.customer.id !== undefined ? {
247
- equals: props.user.customer.id
248
- } : undefined,
244
+ id: props.user.customer.id !== undefined ? props.user.customer.id : undefined,
249
245
  stripeCustomerId: props.user.customer.stripeCustomerId !== undefined ? props.user.customer.stripeCustomerId : undefined,
250
246
  stripeSubscriptionId: props.user.customer.stripeSubscriptionId !== undefined ? props.user.customer.stripeSubscriptionId : undefined,
251
247
  authUserId: props.user.customer.authUserId !== undefined ? {
@@ -277,9 +273,7 @@ export const Account = {
277
273
  }
278
274
  : { connectOrCreate: props.user.sessions.map((item) => ({
279
275
  where: {
280
- id: item.id !== undefined ? {
281
- equals: item.id
282
- } : undefined,
276
+ id: item.id !== undefined ? item.id : undefined,
283
277
  userId: item.userId !== undefined ? {
284
278
  equals: item.userId
285
279
  } : undefined,
@@ -298,9 +292,7 @@ export const Account = {
298
292
  }
299
293
  : { connectOrCreate: props.user.authenticators.map((item) => ({
300
294
  where: {
301
- id: item.id !== undefined ? {
302
- equals: item.id
303
- } : undefined,
295
+ id: item.id !== undefined ? item.id : undefined,
304
296
  userId: item.userId !== undefined ? {
305
297
  equals: item.userId
306
298
  } : undefined,
@@ -320,9 +312,7 @@ export const Account = {
320
312
  }
321
313
  : { connectOrCreate: props.user.alpacaAccounts.map((item) => ({
322
314
  where: {
323
- id: item.id !== undefined ? {
324
- equals: item.id
325
- } : undefined,
315
+ id: item.id !== undefined ? item.id : undefined,
326
316
  userId: item.userId !== undefined ? {
327
317
  equals: item.userId
328
318
  } : undefined,
@@ -345,9 +335,7 @@ export const Account = {
345
335
  }
346
336
  : { connectOrCreate: item.trades.map((item) => ({
347
337
  where: {
348
- id: item.id !== undefined ? {
349
- equals: item.id
350
- } : undefined,
338
+ id: item.id !== undefined ? item.id : undefined,
351
339
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
352
340
  equals: item.alpacaAccountId
353
341
  } : undefined,
@@ -378,9 +366,7 @@ export const Account = {
378
366
  }
379
367
  : { connectOrCreate: item.orders.map((item) => ({
380
368
  where: {
381
- id: item.id !== undefined ? {
382
- equals: item.id
383
- } : undefined,
369
+ id: item.id !== undefined ? item.id : undefined,
384
370
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
385
371
  actionId: item.actionId !== undefined ? item.actionId : undefined,
386
372
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -425,9 +411,7 @@ export const Account = {
425
411
  }
426
412
  : { connectOrCreate: item.positions.map((item) => ({
427
413
  where: {
428
- id: item.id !== undefined ? {
429
- equals: item.id
430
- } : undefined,
414
+ id: item.id !== undefined ? item.id : undefined,
431
415
  assetId: item.assetId !== undefined ? {
432
416
  equals: item.assetId
433
417
  } : undefined,
@@ -460,9 +444,7 @@ export const Account = {
460
444
  }
461
445
  : { connectOrCreate: item.alerts.map((item) => ({
462
446
  where: {
463
- id: item.id !== undefined ? {
464
- equals: item.id
465
- } : undefined,
447
+ id: item.id !== undefined ? item.id : undefined,
466
448
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
467
449
  equals: item.alpacaAccountId
468
450
  } : undefined,
@@ -559,9 +541,7 @@ export const Account = {
559
541
  }`;
560
542
  const variables = {
561
543
  where: {
562
- id: props.id !== undefined ? {
563
- equals: props.id
564
- } : undefined,
544
+ id: props.id !== undefined ? props.id : undefined,
565
545
  userId: props.userId !== undefined ? {
566
546
  equals: props.userId
567
547
  } : undefined,
@@ -728,9 +708,7 @@ export const Account = {
728
708
  sessions: props.user.sessions ? {
729
709
  upsert: props.user.sessions.map((item) => ({
730
710
  where: {
731
- id: item.id !== undefined ? {
732
- equals: item.id
733
- } : undefined,
711
+ id: item.id !== undefined ? item.id : undefined,
734
712
  userId: item.userId !== undefined ? {
735
713
  equals: item.userId
736
714
  } : undefined,
@@ -755,9 +733,7 @@ export const Account = {
755
733
  authenticators: props.user.authenticators ? {
756
734
  upsert: props.user.authenticators.map((item) => ({
757
735
  where: {
758
- id: item.id !== undefined ? {
759
- equals: item.id
760
- } : undefined,
736
+ id: item.id !== undefined ? item.id : undefined,
761
737
  userId: item.userId !== undefined ? {
762
738
  equals: item.userId
763
739
  } : undefined,
@@ -786,9 +762,7 @@ export const Account = {
786
762
  alpacaAccounts: props.user.alpacaAccounts ? {
787
763
  upsert: props.user.alpacaAccounts.map((item) => ({
788
764
  where: {
789
- id: item.id !== undefined ? {
790
- equals: item.id
791
- } : undefined,
765
+ id: item.id !== undefined ? item.id : undefined,
792
766
  userId: item.userId !== undefined ? {
793
767
  equals: item.userId
794
768
  } : undefined,
@@ -827,9 +801,7 @@ export const Account = {
827
801
  trades: item.trades ? {
828
802
  upsert: item.trades.map((item) => ({
829
803
  where: {
830
- id: item.id !== undefined ? {
831
- equals: item.id
832
- } : undefined,
804
+ id: item.id !== undefined ? item.id : undefined,
833
805
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
834
806
  equals: item.alpacaAccountId
835
807
  } : undefined,
@@ -893,9 +865,7 @@ export const Account = {
893
865
  orders: item.orders ? {
894
866
  upsert: item.orders.map((item) => ({
895
867
  where: {
896
- id: item.id !== undefined ? {
897
- equals: item.id
898
- } : undefined,
868
+ id: item.id !== undefined ? item.id : undefined,
899
869
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
900
870
  actionId: item.actionId !== undefined ? item.actionId : undefined,
901
871
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -1006,9 +976,7 @@ export const Account = {
1006
976
  positions: item.positions ? {
1007
977
  upsert: item.positions.map((item) => ({
1008
978
  where: {
1009
- id: item.id !== undefined ? {
1010
- equals: item.id
1011
- } : undefined,
979
+ id: item.id !== undefined ? item.id : undefined,
1012
980
  assetId: item.assetId !== undefined ? {
1013
981
  equals: item.assetId
1014
982
  } : undefined,
@@ -1080,9 +1048,7 @@ export const Account = {
1080
1048
  alerts: item.alerts ? {
1081
1049
  upsert: item.alerts.map((item) => ({
1082
1050
  where: {
1083
- id: item.id !== undefined ? {
1084
- equals: item.id
1085
- } : undefined,
1051
+ id: item.id !== undefined ? item.id : undefined,
1086
1052
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1087
1053
  equals: item.alpacaAccountId
1088
1054
  } : undefined,
@@ -1127,9 +1093,7 @@ export const Account = {
1127
1093
  }
1128
1094
  : { connectOrCreate: item.trades.map((item) => ({
1129
1095
  where: {
1130
- id: item.id !== undefined ? {
1131
- equals: item.id
1132
- } : undefined,
1096
+ id: item.id !== undefined ? item.id : undefined,
1133
1097
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1134
1098
  equals: item.alpacaAccountId
1135
1099
  } : undefined,
@@ -1160,9 +1124,7 @@ export const Account = {
1160
1124
  }
1161
1125
  : { connectOrCreate: item.orders.map((item) => ({
1162
1126
  where: {
1163
- id: item.id !== undefined ? {
1164
- equals: item.id
1165
- } : undefined,
1127
+ id: item.id !== undefined ? item.id : undefined,
1166
1128
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
1167
1129
  actionId: item.actionId !== undefined ? item.actionId : undefined,
1168
1130
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -1207,9 +1169,7 @@ export const Account = {
1207
1169
  }
1208
1170
  : { connectOrCreate: item.positions.map((item) => ({
1209
1171
  where: {
1210
- id: item.id !== undefined ? {
1211
- equals: item.id
1212
- } : undefined,
1172
+ id: item.id !== undefined ? item.id : undefined,
1213
1173
  assetId: item.assetId !== undefined ? {
1214
1174
  equals: item.assetId
1215
1175
  } : undefined,
@@ -1242,9 +1202,7 @@ export const Account = {
1242
1202
  }
1243
1203
  : { connectOrCreate: item.alerts.map((item) => ({
1244
1204
  where: {
1245
- id: item.id !== undefined ? {
1246
- equals: item.id
1247
- } : undefined,
1205
+ id: item.id !== undefined ? item.id : undefined,
1248
1206
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1249
1207
  equals: item.alpacaAccountId
1250
1208
  } : undefined,
@@ -1280,9 +1238,7 @@ export const Account = {
1280
1238
  }
1281
1239
  : { connectOrCreate: {
1282
1240
  where: {
1283
- id: props.user.customer.id !== undefined ? {
1284
- equals: props.user.customer.id
1285
- } : undefined,
1241
+ id: props.user.customer.id !== undefined ? props.user.customer.id : undefined,
1286
1242
  stripeCustomerId: props.user.customer.stripeCustomerId !== undefined ? props.user.customer.stripeCustomerId : undefined,
1287
1243
  stripeSubscriptionId: props.user.customer.stripeSubscriptionId !== undefined ? props.user.customer.stripeSubscriptionId : undefined,
1288
1244
  authUserId: props.user.customer.authUserId !== undefined ? {
@@ -1314,9 +1270,7 @@ export const Account = {
1314
1270
  }
1315
1271
  : { connectOrCreate: props.user.sessions.map((item) => ({
1316
1272
  where: {
1317
- id: item.id !== undefined ? {
1318
- equals: item.id
1319
- } : undefined,
1273
+ id: item.id !== undefined ? item.id : undefined,
1320
1274
  userId: item.userId !== undefined ? {
1321
1275
  equals: item.userId
1322
1276
  } : undefined,
@@ -1335,9 +1289,7 @@ export const Account = {
1335
1289
  }
1336
1290
  : { connectOrCreate: props.user.authenticators.map((item) => ({
1337
1291
  where: {
1338
- id: item.id !== undefined ? {
1339
- equals: item.id
1340
- } : undefined,
1292
+ id: item.id !== undefined ? item.id : undefined,
1341
1293
  userId: item.userId !== undefined ? {
1342
1294
  equals: item.userId
1343
1295
  } : undefined,
@@ -1357,9 +1309,7 @@ export const Account = {
1357
1309
  }
1358
1310
  : { connectOrCreate: props.user.alpacaAccounts.map((item) => ({
1359
1311
  where: {
1360
- id: item.id !== undefined ? {
1361
- equals: item.id
1362
- } : undefined,
1312
+ id: item.id !== undefined ? item.id : undefined,
1363
1313
  userId: item.userId !== undefined ? {
1364
1314
  equals: item.userId
1365
1315
  } : undefined,
@@ -1382,9 +1332,7 @@ export const Account = {
1382
1332
  }
1383
1333
  : { connectOrCreate: item.trades.map((item) => ({
1384
1334
  where: {
1385
- id: item.id !== undefined ? {
1386
- equals: item.id
1387
- } : undefined,
1335
+ id: item.id !== undefined ? item.id : undefined,
1388
1336
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1389
1337
  equals: item.alpacaAccountId
1390
1338
  } : undefined,
@@ -1415,9 +1363,7 @@ export const Account = {
1415
1363
  }
1416
1364
  : { connectOrCreate: item.orders.map((item) => ({
1417
1365
  where: {
1418
- id: item.id !== undefined ? {
1419
- equals: item.id
1420
- } : undefined,
1366
+ id: item.id !== undefined ? item.id : undefined,
1421
1367
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
1422
1368
  actionId: item.actionId !== undefined ? item.actionId : undefined,
1423
1369
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -1462,9 +1408,7 @@ export const Account = {
1462
1408
  }
1463
1409
  : { connectOrCreate: item.positions.map((item) => ({
1464
1410
  where: {
1465
- id: item.id !== undefined ? {
1466
- equals: item.id
1467
- } : undefined,
1411
+ id: item.id !== undefined ? item.id : undefined,
1468
1412
  assetId: item.assetId !== undefined ? {
1469
1413
  equals: item.assetId
1470
1414
  } : undefined,
@@ -1497,9 +1441,7 @@ export const Account = {
1497
1441
  }
1498
1442
  : { connectOrCreate: item.alerts.map((item) => ({
1499
1443
  where: {
1500
- id: item.id !== undefined ? {
1501
- equals: item.id
1502
- } : undefined,
1444
+ id: item.id !== undefined ? item.id : undefined,
1503
1445
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1504
1446
  equals: item.alpacaAccountId
1505
1447
  } : undefined,
@@ -1551,9 +1493,7 @@ export const Account = {
1551
1493
  }`;
1552
1494
  const variables = props.map(prop => ({
1553
1495
  where: {
1554
- id: prop.id !== undefined ? {
1555
- equals: prop.id
1556
- } : undefined,
1496
+ id: prop.id !== undefined ? prop.id : undefined,
1557
1497
  userId: prop.userId !== undefined ? {
1558
1498
  equals: prop.userId
1559
1499
  } : undefined,
@@ -1720,9 +1660,7 @@ export const Account = {
1720
1660
  sessions: prop.user.sessions ? {
1721
1661
  upsert: prop.user.sessions.map((item) => ({
1722
1662
  where: {
1723
- id: item.id !== undefined ? {
1724
- equals: item.id
1725
- } : undefined,
1663
+ id: item.id !== undefined ? item.id : undefined,
1726
1664
  userId: item.userId !== undefined ? {
1727
1665
  equals: item.userId
1728
1666
  } : undefined,
@@ -1747,9 +1685,7 @@ export const Account = {
1747
1685
  authenticators: prop.user.authenticators ? {
1748
1686
  upsert: prop.user.authenticators.map((item) => ({
1749
1687
  where: {
1750
- id: item.id !== undefined ? {
1751
- equals: item.id
1752
- } : undefined,
1688
+ id: item.id !== undefined ? item.id : undefined,
1753
1689
  userId: item.userId !== undefined ? {
1754
1690
  equals: item.userId
1755
1691
  } : undefined,
@@ -1778,9 +1714,7 @@ export const Account = {
1778
1714
  alpacaAccounts: prop.user.alpacaAccounts ? {
1779
1715
  upsert: prop.user.alpacaAccounts.map((item) => ({
1780
1716
  where: {
1781
- id: item.id !== undefined ? {
1782
- equals: item.id
1783
- } : undefined,
1717
+ id: item.id !== undefined ? item.id : undefined,
1784
1718
  userId: item.userId !== undefined ? {
1785
1719
  equals: item.userId
1786
1720
  } : undefined,
@@ -1819,9 +1753,7 @@ export const Account = {
1819
1753
  trades: item.trades ? {
1820
1754
  upsert: item.trades.map((item) => ({
1821
1755
  where: {
1822
- id: item.id !== undefined ? {
1823
- equals: item.id
1824
- } : undefined,
1756
+ id: item.id !== undefined ? item.id : undefined,
1825
1757
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1826
1758
  equals: item.alpacaAccountId
1827
1759
  } : undefined,
@@ -1885,9 +1817,7 @@ export const Account = {
1885
1817
  orders: item.orders ? {
1886
1818
  upsert: item.orders.map((item) => ({
1887
1819
  where: {
1888
- id: item.id !== undefined ? {
1889
- equals: item.id
1890
- } : undefined,
1820
+ id: item.id !== undefined ? item.id : undefined,
1891
1821
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
1892
1822
  actionId: item.actionId !== undefined ? item.actionId : undefined,
1893
1823
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -1998,9 +1928,7 @@ export const Account = {
1998
1928
  positions: item.positions ? {
1999
1929
  upsert: item.positions.map((item) => ({
2000
1930
  where: {
2001
- id: item.id !== undefined ? {
2002
- equals: item.id
2003
- } : undefined,
1931
+ id: item.id !== undefined ? item.id : undefined,
2004
1932
  assetId: item.assetId !== undefined ? {
2005
1933
  equals: item.assetId
2006
1934
  } : undefined,
@@ -2072,9 +2000,7 @@ export const Account = {
2072
2000
  alerts: item.alerts ? {
2073
2001
  upsert: item.alerts.map((item) => ({
2074
2002
  where: {
2075
- id: item.id !== undefined ? {
2076
- equals: item.id
2077
- } : undefined,
2003
+ id: item.id !== undefined ? item.id : undefined,
2078
2004
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2079
2005
  equals: item.alpacaAccountId
2080
2006
  } : undefined,
@@ -2119,9 +2045,7 @@ export const Account = {
2119
2045
  }
2120
2046
  : { connectOrCreate: item.trades.map((item) => ({
2121
2047
  where: {
2122
- id: item.id !== undefined ? {
2123
- equals: item.id
2124
- } : undefined,
2048
+ id: item.id !== undefined ? item.id : undefined,
2125
2049
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2126
2050
  equals: item.alpacaAccountId
2127
2051
  } : undefined,
@@ -2152,9 +2076,7 @@ export const Account = {
2152
2076
  }
2153
2077
  : { connectOrCreate: item.orders.map((item) => ({
2154
2078
  where: {
2155
- id: item.id !== undefined ? {
2156
- equals: item.id
2157
- } : undefined,
2079
+ id: item.id !== undefined ? item.id : undefined,
2158
2080
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
2159
2081
  actionId: item.actionId !== undefined ? item.actionId : undefined,
2160
2082
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -2199,9 +2121,7 @@ export const Account = {
2199
2121
  }
2200
2122
  : { connectOrCreate: item.positions.map((item) => ({
2201
2123
  where: {
2202
- id: item.id !== undefined ? {
2203
- equals: item.id
2204
- } : undefined,
2124
+ id: item.id !== undefined ? item.id : undefined,
2205
2125
  assetId: item.assetId !== undefined ? {
2206
2126
  equals: item.assetId
2207
2127
  } : undefined,
@@ -2234,9 +2154,7 @@ export const Account = {
2234
2154
  }
2235
2155
  : { connectOrCreate: item.alerts.map((item) => ({
2236
2156
  where: {
2237
- id: item.id !== undefined ? {
2238
- equals: item.id
2239
- } : undefined,
2157
+ id: item.id !== undefined ? item.id : undefined,
2240
2158
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2241
2159
  equals: item.alpacaAccountId
2242
2160
  } : undefined,
@@ -2272,9 +2190,7 @@ export const Account = {
2272
2190
  }
2273
2191
  : { connectOrCreate: {
2274
2192
  where: {
2275
- id: prop.user.customer.id !== undefined ? {
2276
- equals: prop.user.customer.id
2277
- } : undefined,
2193
+ id: prop.user.customer.id !== undefined ? prop.user.customer.id : undefined,
2278
2194
  stripeCustomerId: prop.user.customer.stripeCustomerId !== undefined ? prop.user.customer.stripeCustomerId : undefined,
2279
2195
  stripeSubscriptionId: prop.user.customer.stripeSubscriptionId !== undefined ? prop.user.customer.stripeSubscriptionId : undefined,
2280
2196
  authUserId: prop.user.customer.authUserId !== undefined ? {
@@ -2306,9 +2222,7 @@ export const Account = {
2306
2222
  }
2307
2223
  : { connectOrCreate: prop.user.sessions.map((item) => ({
2308
2224
  where: {
2309
- id: item.id !== undefined ? {
2310
- equals: item.id
2311
- } : undefined,
2225
+ id: item.id !== undefined ? item.id : undefined,
2312
2226
  userId: item.userId !== undefined ? {
2313
2227
  equals: item.userId
2314
2228
  } : undefined,
@@ -2327,9 +2241,7 @@ export const Account = {
2327
2241
  }
2328
2242
  : { connectOrCreate: prop.user.authenticators.map((item) => ({
2329
2243
  where: {
2330
- id: item.id !== undefined ? {
2331
- equals: item.id
2332
- } : undefined,
2244
+ id: item.id !== undefined ? item.id : undefined,
2333
2245
  userId: item.userId !== undefined ? {
2334
2246
  equals: item.userId
2335
2247
  } : undefined,
@@ -2349,9 +2261,7 @@ export const Account = {
2349
2261
  }
2350
2262
  : { connectOrCreate: prop.user.alpacaAccounts.map((item) => ({
2351
2263
  where: {
2352
- id: item.id !== undefined ? {
2353
- equals: item.id
2354
- } : undefined,
2264
+ id: item.id !== undefined ? item.id : undefined,
2355
2265
  userId: item.userId !== undefined ? {
2356
2266
  equals: item.userId
2357
2267
  } : undefined,
@@ -2374,9 +2284,7 @@ export const Account = {
2374
2284
  }
2375
2285
  : { connectOrCreate: item.trades.map((item) => ({
2376
2286
  where: {
2377
- id: item.id !== undefined ? {
2378
- equals: item.id
2379
- } : undefined,
2287
+ id: item.id !== undefined ? item.id : undefined,
2380
2288
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2381
2289
  equals: item.alpacaAccountId
2382
2290
  } : undefined,
@@ -2407,9 +2315,7 @@ export const Account = {
2407
2315
  }
2408
2316
  : { connectOrCreate: item.orders.map((item) => ({
2409
2317
  where: {
2410
- id: item.id !== undefined ? {
2411
- equals: item.id
2412
- } : undefined,
2318
+ id: item.id !== undefined ? item.id : undefined,
2413
2319
  clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
2414
2320
  actionId: item.actionId !== undefined ? item.actionId : undefined,
2415
2321
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
@@ -2454,9 +2360,7 @@ export const Account = {
2454
2360
  }
2455
2361
  : { connectOrCreate: item.positions.map((item) => ({
2456
2362
  where: {
2457
- id: item.id !== undefined ? {
2458
- equals: item.id
2459
- } : undefined,
2363
+ id: item.id !== undefined ? item.id : undefined,
2460
2364
  assetId: item.assetId !== undefined ? {
2461
2365
  equals: item.assetId
2462
2366
  } : undefined,
@@ -2489,9 +2393,7 @@ export const Account = {
2489
2393
  }
2490
2394
  : { connectOrCreate: item.alerts.map((item) => ({
2491
2395
  where: {
2492
- id: item.id !== undefined ? {
2493
- equals: item.id
2494
- } : undefined,
2396
+ id: item.id !== undefined ? item.id : undefined,
2495
2397
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2496
2398
  equals: item.alpacaAccountId
2497
2399
  } : undefined,
@@ -2578,9 +2480,7 @@ export const Account = {
2578
2480
  }`;
2579
2481
  const variables = {
2580
2482
  where: {
2581
- id: props.id !== undefined ? {
2582
- equals: props.id
2583
- } : undefined,
2483
+ id: props.id !== undefined ? props.id : undefined,
2584
2484
  userId: props.userId !== undefined ? {
2585
2485
  equals: props.userId
2586
2486
  } : undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../src/Action.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAyKlF,eAAO,MAAM,MAAM;IAEjB;;;;OAIG;kBAEiB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAmzBtD;;;;OAIG;sBACqB,UAAU,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAsCxE;;;;OAIG;kBACiB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAk6FpD;;;;OAIG;sBACqB,UAAU,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAq6FxE;;;;OAIG;kBACiB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAiCpD;;;;OAIG;eACc,UAAU,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAyCxD;;;OAGG;cACa,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;IAyB5C;;;;OAIG;oBACmB,UAAU,GAAG,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;CA6ChE,CAAC"}
1
+ {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../src/Action.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAyKlF,eAAO,MAAM,MAAM;IAEjB;;;;OAIG;kBAEiB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAuwBtD;;;;OAIG;sBACqB,UAAU,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAsCxE;;;;OAIG;kBACiB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAo0FpD;;;;OAIG;sBACqB,UAAU,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAu0FxE;;;;OAIG;kBACiB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAiCpD;;;;OAIG;eACc,UAAU,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAuCxD;;;OAGG;cACa,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;IAyB5C;;;;OAIG;oBACmB,UAAU,GAAG,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;CA6ChE,CAAC"}