adaptic-backend 1.0.160 → 1.0.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Account.cjs +50 -150
- package/Action.cjs +117 -351
- package/Alert.cjs +85 -255
- package/AlpacaAccount.cjs +130 -390
- package/Asset.cjs +129 -387
- package/Authenticator.cjs +50 -150
- package/Customer.cjs +54 -162
- package/EconomicEvent.cjs +3 -9
- package/NewsArticle.cjs +30 -90
- package/NewsArticleAssetSentiment.cjs +57 -171
- package/Order.cjs +119 -357
- package/Position.cjs +133 -399
- package/Session.cjs +50 -150
- package/StopLoss.cjs +68 -204
- package/TakeProfit.cjs +68 -204
- package/Trade.cjs +145 -435
- package/User.cjs +73 -219
- package/VerificationToken.cjs +3 -9
- package/package.json +1 -1
- package/server/Account.d.ts.map +1 -1
- package/server/Account.js.map +1 -1
- package/server/Account.mjs +50 -150
- package/server/Action.d.ts.map +1 -1
- package/server/Action.js.map +1 -1
- package/server/Action.mjs +117 -351
- package/server/Alert.d.ts.map +1 -1
- package/server/Alert.js.map +1 -1
- package/server/Alert.mjs +85 -255
- package/server/AlpacaAccount.d.ts.map +1 -1
- package/server/AlpacaAccount.js.map +1 -1
- package/server/AlpacaAccount.mjs +130 -390
- package/server/Asset.d.ts.map +1 -1
- package/server/Asset.js.map +1 -1
- package/server/Asset.mjs +129 -387
- package/server/Authenticator.d.ts.map +1 -1
- package/server/Authenticator.js.map +1 -1
- package/server/Authenticator.mjs +50 -150
- package/server/Customer.d.ts.map +1 -1
- package/server/Customer.js.map +1 -1
- package/server/Customer.mjs +54 -162
- package/server/EconomicEvent.d.ts.map +1 -1
- package/server/EconomicEvent.js.map +1 -1
- package/server/EconomicEvent.mjs +3 -9
- package/server/NewsArticle.d.ts.map +1 -1
- package/server/NewsArticle.js.map +1 -1
- package/server/NewsArticle.mjs +30 -90
- package/server/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/server/NewsArticleAssetSentiment.js.map +1 -1
- package/server/NewsArticleAssetSentiment.mjs +57 -171
- package/server/Order.d.ts.map +1 -1
- package/server/Order.js.map +1 -1
- package/server/Order.mjs +119 -357
- package/server/Position.d.ts.map +1 -1
- package/server/Position.js.map +1 -1
- package/server/Position.mjs +133 -399
- package/server/Session.d.ts.map +1 -1
- package/server/Session.js.map +1 -1
- package/server/Session.mjs +50 -150
- package/server/StopLoss.d.ts.map +1 -1
- package/server/StopLoss.js.map +1 -1
- package/server/StopLoss.mjs +68 -204
- package/server/TakeProfit.d.ts.map +1 -1
- package/server/TakeProfit.js.map +1 -1
- package/server/TakeProfit.mjs +68 -204
- package/server/Trade.d.ts.map +1 -1
- package/server/Trade.js.map +1 -1
- package/server/Trade.mjs +145 -435
- package/server/User.d.ts.map +1 -1
- package/server/User.js.map +1 -1
- package/server/User.mjs +73 -219
- package/server/VerificationToken.d.ts.map +1 -1
- package/server/VerificationToken.js.map +1 -1
- package/server/VerificationToken.mjs +3 -9
package/server/Session.mjs
CHANGED
@@ -99,9 +99,7 @@ export const Session = {
|
|
99
99
|
}
|
100
100
|
: { connectOrCreate: {
|
101
101
|
where: {
|
102
|
-
id: props.user.id !== undefined ?
|
103
|
-
equals: props.user.id
|
104
|
-
} : undefined,
|
102
|
+
id: props.user.id !== undefined ? props.user.id : undefined,
|
105
103
|
email: props.user.email !== undefined ? props.user.email : undefined,
|
106
104
|
name: props.user.name !== undefined ? {
|
107
105
|
equals: props.user.name
|
@@ -127,9 +125,7 @@ export const Session = {
|
|
127
125
|
}
|
128
126
|
: { connectOrCreate: {
|
129
127
|
where: {
|
130
|
-
id: props.user.customer.id !== undefined ?
|
131
|
-
equals: props.user.customer.id
|
132
|
-
} : undefined,
|
128
|
+
id: props.user.customer.id !== undefined ? props.user.customer.id : undefined,
|
133
129
|
stripeCustomerId: props.user.customer.stripeCustomerId !== undefined ? props.user.customer.stripeCustomerId : undefined,
|
134
130
|
stripeSubscriptionId: props.user.customer.stripeSubscriptionId !== undefined ? props.user.customer.stripeSubscriptionId : undefined,
|
135
131
|
authUserId: props.user.customer.authUserId !== undefined ? {
|
@@ -161,9 +157,7 @@ export const Session = {
|
|
161
157
|
}
|
162
158
|
: { connectOrCreate: props.user.accounts.map((item) => ({
|
163
159
|
where: {
|
164
|
-
id: item.id !== undefined ?
|
165
|
-
equals: item.id
|
166
|
-
} : undefined,
|
160
|
+
id: item.id !== undefined ? item.id : undefined,
|
167
161
|
userId: item.userId !== undefined ? {
|
168
162
|
equals: item.userId
|
169
163
|
} : undefined,
|
@@ -193,9 +187,7 @@ export const Session = {
|
|
193
187
|
}
|
194
188
|
: { connectOrCreate: props.user.authenticators.map((item) => ({
|
195
189
|
where: {
|
196
|
-
id: item.id !== undefined ?
|
197
|
-
equals: item.id
|
198
|
-
} : undefined,
|
190
|
+
id: item.id !== undefined ? item.id : undefined,
|
199
191
|
userId: item.userId !== undefined ? {
|
200
192
|
equals: item.userId
|
201
193
|
} : undefined,
|
@@ -215,9 +207,7 @@ export const Session = {
|
|
215
207
|
}
|
216
208
|
: { connectOrCreate: props.user.alpacaAccounts.map((item) => ({
|
217
209
|
where: {
|
218
|
-
id: item.id !== undefined ?
|
219
|
-
equals: item.id
|
220
|
-
} : undefined,
|
210
|
+
id: item.id !== undefined ? item.id : undefined,
|
221
211
|
userId: item.userId !== undefined ? {
|
222
212
|
equals: item.userId
|
223
213
|
} : undefined,
|
@@ -240,9 +230,7 @@ export const Session = {
|
|
240
230
|
}
|
241
231
|
: { connectOrCreate: item.trades.map((item) => ({
|
242
232
|
where: {
|
243
|
-
id: item.id !== undefined ?
|
244
|
-
equals: item.id
|
245
|
-
} : undefined,
|
233
|
+
id: item.id !== undefined ? item.id : undefined,
|
246
234
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
247
235
|
equals: item.alpacaAccountId
|
248
236
|
} : undefined,
|
@@ -273,9 +261,7 @@ export const Session = {
|
|
273
261
|
}
|
274
262
|
: { connectOrCreate: item.orders.map((item) => ({
|
275
263
|
where: {
|
276
|
-
id: item.id !== undefined ?
|
277
|
-
equals: item.id
|
278
|
-
} : undefined,
|
264
|
+
id: item.id !== undefined ? item.id : undefined,
|
279
265
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
280
266
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
281
267
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -320,9 +306,7 @@ export const Session = {
|
|
320
306
|
}
|
321
307
|
: { connectOrCreate: item.positions.map((item) => ({
|
322
308
|
where: {
|
323
|
-
id: item.id !== undefined ?
|
324
|
-
equals: item.id
|
325
|
-
} : undefined,
|
309
|
+
id: item.id !== undefined ? item.id : undefined,
|
326
310
|
assetId: item.assetId !== undefined ? {
|
327
311
|
equals: item.assetId
|
328
312
|
} : undefined,
|
@@ -355,9 +339,7 @@ export const Session = {
|
|
355
339
|
}
|
356
340
|
: { connectOrCreate: item.alerts.map((item) => ({
|
357
341
|
where: {
|
358
|
-
id: item.id !== undefined ?
|
359
|
-
equals: item.id
|
360
|
-
} : undefined,
|
342
|
+
id: item.id !== undefined ? item.id : undefined,
|
361
343
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
362
344
|
equals: item.alpacaAccountId
|
363
345
|
} : undefined,
|
@@ -446,9 +428,7 @@ export const Session = {
|
|
446
428
|
}`;
|
447
429
|
const variables = {
|
448
430
|
where: {
|
449
|
-
id: props.id !== undefined ?
|
450
|
-
equals: props.id
|
451
|
-
} : undefined,
|
431
|
+
id: props.id !== undefined ? props.id : undefined,
|
452
432
|
sessionToken: props.sessionToken !== undefined ? props.sessionToken : undefined,
|
453
433
|
userId: props.userId !== undefined ? {
|
454
434
|
equals: props.userId
|
@@ -582,9 +562,7 @@ export const Session = {
|
|
582
562
|
accounts: props.user.accounts ? {
|
583
563
|
upsert: props.user.accounts.map((item) => ({
|
584
564
|
where: {
|
585
|
-
id: item.id !== undefined ?
|
586
|
-
equals: item.id
|
587
|
-
} : undefined,
|
565
|
+
id: item.id !== undefined ? item.id : undefined,
|
588
566
|
userId: item.userId !== undefined ? {
|
589
567
|
equals: item.userId
|
590
568
|
} : undefined,
|
@@ -644,9 +622,7 @@ export const Session = {
|
|
644
622
|
authenticators: props.user.authenticators ? {
|
645
623
|
upsert: props.user.authenticators.map((item) => ({
|
646
624
|
where: {
|
647
|
-
id: item.id !== undefined ?
|
648
|
-
equals: item.id
|
649
|
-
} : undefined,
|
625
|
+
id: item.id !== undefined ? item.id : undefined,
|
650
626
|
userId: item.userId !== undefined ? {
|
651
627
|
equals: item.userId
|
652
628
|
} : undefined,
|
@@ -675,9 +651,7 @@ export const Session = {
|
|
675
651
|
alpacaAccounts: props.user.alpacaAccounts ? {
|
676
652
|
upsert: props.user.alpacaAccounts.map((item) => ({
|
677
653
|
where: {
|
678
|
-
id: item.id !== undefined ?
|
679
|
-
equals: item.id
|
680
|
-
} : undefined,
|
654
|
+
id: item.id !== undefined ? item.id : undefined,
|
681
655
|
userId: item.userId !== undefined ? {
|
682
656
|
equals: item.userId
|
683
657
|
} : undefined,
|
@@ -716,9 +690,7 @@ export const Session = {
|
|
716
690
|
trades: item.trades ? {
|
717
691
|
upsert: item.trades.map((item) => ({
|
718
692
|
where: {
|
719
|
-
id: item.id !== undefined ?
|
720
|
-
equals: item.id
|
721
|
-
} : undefined,
|
693
|
+
id: item.id !== undefined ? item.id : undefined,
|
722
694
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
723
695
|
equals: item.alpacaAccountId
|
724
696
|
} : undefined,
|
@@ -782,9 +754,7 @@ export const Session = {
|
|
782
754
|
orders: item.orders ? {
|
783
755
|
upsert: item.orders.map((item) => ({
|
784
756
|
where: {
|
785
|
-
id: item.id !== undefined ?
|
786
|
-
equals: item.id
|
787
|
-
} : undefined,
|
757
|
+
id: item.id !== undefined ? item.id : undefined,
|
788
758
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
789
759
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
790
760
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -895,9 +865,7 @@ export const Session = {
|
|
895
865
|
positions: item.positions ? {
|
896
866
|
upsert: item.positions.map((item) => ({
|
897
867
|
where: {
|
898
|
-
id: item.id !== undefined ?
|
899
|
-
equals: item.id
|
900
|
-
} : undefined,
|
868
|
+
id: item.id !== undefined ? item.id : undefined,
|
901
869
|
assetId: item.assetId !== undefined ? {
|
902
870
|
equals: item.assetId
|
903
871
|
} : undefined,
|
@@ -969,9 +937,7 @@ export const Session = {
|
|
969
937
|
alerts: item.alerts ? {
|
970
938
|
upsert: item.alerts.map((item) => ({
|
971
939
|
where: {
|
972
|
-
id: item.id !== undefined ?
|
973
|
-
equals: item.id
|
974
|
-
} : undefined,
|
940
|
+
id: item.id !== undefined ? item.id : undefined,
|
975
941
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
976
942
|
equals: item.alpacaAccountId
|
977
943
|
} : undefined,
|
@@ -1016,9 +982,7 @@ export const Session = {
|
|
1016
982
|
}
|
1017
983
|
: { connectOrCreate: item.trades.map((item) => ({
|
1018
984
|
where: {
|
1019
|
-
id: item.id !== undefined ?
|
1020
|
-
equals: item.id
|
1021
|
-
} : undefined,
|
985
|
+
id: item.id !== undefined ? item.id : undefined,
|
1022
986
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1023
987
|
equals: item.alpacaAccountId
|
1024
988
|
} : undefined,
|
@@ -1049,9 +1013,7 @@ export const Session = {
|
|
1049
1013
|
}
|
1050
1014
|
: { connectOrCreate: item.orders.map((item) => ({
|
1051
1015
|
where: {
|
1052
|
-
id: item.id !== undefined ?
|
1053
|
-
equals: item.id
|
1054
|
-
} : undefined,
|
1016
|
+
id: item.id !== undefined ? item.id : undefined,
|
1055
1017
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1056
1018
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1057
1019
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -1096,9 +1058,7 @@ export const Session = {
|
|
1096
1058
|
}
|
1097
1059
|
: { connectOrCreate: item.positions.map((item) => ({
|
1098
1060
|
where: {
|
1099
|
-
id: item.id !== undefined ?
|
1100
|
-
equals: item.id
|
1101
|
-
} : undefined,
|
1061
|
+
id: item.id !== undefined ? item.id : undefined,
|
1102
1062
|
assetId: item.assetId !== undefined ? {
|
1103
1063
|
equals: item.assetId
|
1104
1064
|
} : undefined,
|
@@ -1131,9 +1091,7 @@ export const Session = {
|
|
1131
1091
|
}
|
1132
1092
|
: { connectOrCreate: item.alerts.map((item) => ({
|
1133
1093
|
where: {
|
1134
|
-
id: item.id !== undefined ?
|
1135
|
-
equals: item.id
|
1136
|
-
} : undefined,
|
1094
|
+
id: item.id !== undefined ? item.id : undefined,
|
1137
1095
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1138
1096
|
equals: item.alpacaAccountId
|
1139
1097
|
} : undefined,
|
@@ -1169,9 +1127,7 @@ export const Session = {
|
|
1169
1127
|
}
|
1170
1128
|
: { connectOrCreate: {
|
1171
1129
|
where: {
|
1172
|
-
id: props.user.customer.id !== undefined ?
|
1173
|
-
equals: props.user.customer.id
|
1174
|
-
} : undefined,
|
1130
|
+
id: props.user.customer.id !== undefined ? props.user.customer.id : undefined,
|
1175
1131
|
stripeCustomerId: props.user.customer.stripeCustomerId !== undefined ? props.user.customer.stripeCustomerId : undefined,
|
1176
1132
|
stripeSubscriptionId: props.user.customer.stripeSubscriptionId !== undefined ? props.user.customer.stripeSubscriptionId : undefined,
|
1177
1133
|
authUserId: props.user.customer.authUserId !== undefined ? {
|
@@ -1203,9 +1159,7 @@ export const Session = {
|
|
1203
1159
|
}
|
1204
1160
|
: { connectOrCreate: props.user.accounts.map((item) => ({
|
1205
1161
|
where: {
|
1206
|
-
id: item.id !== undefined ?
|
1207
|
-
equals: item.id
|
1208
|
-
} : undefined,
|
1162
|
+
id: item.id !== undefined ? item.id : undefined,
|
1209
1163
|
userId: item.userId !== undefined ? {
|
1210
1164
|
equals: item.userId
|
1211
1165
|
} : undefined,
|
@@ -1235,9 +1189,7 @@ export const Session = {
|
|
1235
1189
|
}
|
1236
1190
|
: { connectOrCreate: props.user.authenticators.map((item) => ({
|
1237
1191
|
where: {
|
1238
|
-
id: item.id !== undefined ?
|
1239
|
-
equals: item.id
|
1240
|
-
} : undefined,
|
1192
|
+
id: item.id !== undefined ? item.id : undefined,
|
1241
1193
|
userId: item.userId !== undefined ? {
|
1242
1194
|
equals: item.userId
|
1243
1195
|
} : undefined,
|
@@ -1257,9 +1209,7 @@ export const Session = {
|
|
1257
1209
|
}
|
1258
1210
|
: { connectOrCreate: props.user.alpacaAccounts.map((item) => ({
|
1259
1211
|
where: {
|
1260
|
-
id: item.id !== undefined ?
|
1261
|
-
equals: item.id
|
1262
|
-
} : undefined,
|
1212
|
+
id: item.id !== undefined ? item.id : undefined,
|
1263
1213
|
userId: item.userId !== undefined ? {
|
1264
1214
|
equals: item.userId
|
1265
1215
|
} : undefined,
|
@@ -1282,9 +1232,7 @@ export const Session = {
|
|
1282
1232
|
}
|
1283
1233
|
: { connectOrCreate: item.trades.map((item) => ({
|
1284
1234
|
where: {
|
1285
|
-
id: item.id !== undefined ?
|
1286
|
-
equals: item.id
|
1287
|
-
} : undefined,
|
1235
|
+
id: item.id !== undefined ? item.id : undefined,
|
1288
1236
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1289
1237
|
equals: item.alpacaAccountId
|
1290
1238
|
} : undefined,
|
@@ -1315,9 +1263,7 @@ export const Session = {
|
|
1315
1263
|
}
|
1316
1264
|
: { connectOrCreate: item.orders.map((item) => ({
|
1317
1265
|
where: {
|
1318
|
-
id: item.id !== undefined ?
|
1319
|
-
equals: item.id
|
1320
|
-
} : undefined,
|
1266
|
+
id: item.id !== undefined ? item.id : undefined,
|
1321
1267
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1322
1268
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1323
1269
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -1362,9 +1308,7 @@ export const Session = {
|
|
1362
1308
|
}
|
1363
1309
|
: { connectOrCreate: item.positions.map((item) => ({
|
1364
1310
|
where: {
|
1365
|
-
id: item.id !== undefined ?
|
1366
|
-
equals: item.id
|
1367
|
-
} : undefined,
|
1311
|
+
id: item.id !== undefined ? item.id : undefined,
|
1368
1312
|
assetId: item.assetId !== undefined ? {
|
1369
1313
|
equals: item.assetId
|
1370
1314
|
} : undefined,
|
@@ -1397,9 +1341,7 @@ export const Session = {
|
|
1397
1341
|
}
|
1398
1342
|
: { connectOrCreate: item.alerts.map((item) => ({
|
1399
1343
|
where: {
|
1400
|
-
id: item.id !== undefined ?
|
1401
|
-
equals: item.id
|
1402
|
-
} : undefined,
|
1344
|
+
id: item.id !== undefined ? item.id : undefined,
|
1403
1345
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1404
1346
|
equals: item.alpacaAccountId
|
1405
1347
|
} : undefined,
|
@@ -1451,9 +1393,7 @@ export const Session = {
|
|
1451
1393
|
}`;
|
1452
1394
|
const variables = props.map(prop => ({
|
1453
1395
|
where: {
|
1454
|
-
id: prop.id !== undefined ?
|
1455
|
-
equals: prop.id
|
1456
|
-
} : undefined,
|
1396
|
+
id: prop.id !== undefined ? prop.id : undefined,
|
1457
1397
|
sessionToken: prop.sessionToken !== undefined ? prop.sessionToken : undefined,
|
1458
1398
|
userId: prop.userId !== undefined ? {
|
1459
1399
|
equals: prop.userId
|
@@ -1587,9 +1527,7 @@ export const Session = {
|
|
1587
1527
|
accounts: prop.user.accounts ? {
|
1588
1528
|
upsert: prop.user.accounts.map((item) => ({
|
1589
1529
|
where: {
|
1590
|
-
id: item.id !== undefined ?
|
1591
|
-
equals: item.id
|
1592
|
-
} : undefined,
|
1530
|
+
id: item.id !== undefined ? item.id : undefined,
|
1593
1531
|
userId: item.userId !== undefined ? {
|
1594
1532
|
equals: item.userId
|
1595
1533
|
} : undefined,
|
@@ -1649,9 +1587,7 @@ export const Session = {
|
|
1649
1587
|
authenticators: prop.user.authenticators ? {
|
1650
1588
|
upsert: prop.user.authenticators.map((item) => ({
|
1651
1589
|
where: {
|
1652
|
-
id: item.id !== undefined ?
|
1653
|
-
equals: item.id
|
1654
|
-
} : undefined,
|
1590
|
+
id: item.id !== undefined ? item.id : undefined,
|
1655
1591
|
userId: item.userId !== undefined ? {
|
1656
1592
|
equals: item.userId
|
1657
1593
|
} : undefined,
|
@@ -1680,9 +1616,7 @@ export const Session = {
|
|
1680
1616
|
alpacaAccounts: prop.user.alpacaAccounts ? {
|
1681
1617
|
upsert: prop.user.alpacaAccounts.map((item) => ({
|
1682
1618
|
where: {
|
1683
|
-
id: item.id !== undefined ?
|
1684
|
-
equals: item.id
|
1685
|
-
} : undefined,
|
1619
|
+
id: item.id !== undefined ? item.id : undefined,
|
1686
1620
|
userId: item.userId !== undefined ? {
|
1687
1621
|
equals: item.userId
|
1688
1622
|
} : undefined,
|
@@ -1721,9 +1655,7 @@ export const Session = {
|
|
1721
1655
|
trades: item.trades ? {
|
1722
1656
|
upsert: item.trades.map((item) => ({
|
1723
1657
|
where: {
|
1724
|
-
id: item.id !== undefined ?
|
1725
|
-
equals: item.id
|
1726
|
-
} : undefined,
|
1658
|
+
id: item.id !== undefined ? item.id : undefined,
|
1727
1659
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1728
1660
|
equals: item.alpacaAccountId
|
1729
1661
|
} : undefined,
|
@@ -1787,9 +1719,7 @@ export const Session = {
|
|
1787
1719
|
orders: item.orders ? {
|
1788
1720
|
upsert: item.orders.map((item) => ({
|
1789
1721
|
where: {
|
1790
|
-
id: item.id !== undefined ?
|
1791
|
-
equals: item.id
|
1792
|
-
} : undefined,
|
1722
|
+
id: item.id !== undefined ? item.id : undefined,
|
1793
1723
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1794
1724
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1795
1725
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -1900,9 +1830,7 @@ export const Session = {
|
|
1900
1830
|
positions: item.positions ? {
|
1901
1831
|
upsert: item.positions.map((item) => ({
|
1902
1832
|
where: {
|
1903
|
-
id: item.id !== undefined ?
|
1904
|
-
equals: item.id
|
1905
|
-
} : undefined,
|
1833
|
+
id: item.id !== undefined ? item.id : undefined,
|
1906
1834
|
assetId: item.assetId !== undefined ? {
|
1907
1835
|
equals: item.assetId
|
1908
1836
|
} : undefined,
|
@@ -1974,9 +1902,7 @@ export const Session = {
|
|
1974
1902
|
alerts: item.alerts ? {
|
1975
1903
|
upsert: item.alerts.map((item) => ({
|
1976
1904
|
where: {
|
1977
|
-
id: item.id !== undefined ?
|
1978
|
-
equals: item.id
|
1979
|
-
} : undefined,
|
1905
|
+
id: item.id !== undefined ? item.id : undefined,
|
1980
1906
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1981
1907
|
equals: item.alpacaAccountId
|
1982
1908
|
} : undefined,
|
@@ -2021,9 +1947,7 @@ export const Session = {
|
|
2021
1947
|
}
|
2022
1948
|
: { connectOrCreate: item.trades.map((item) => ({
|
2023
1949
|
where: {
|
2024
|
-
id: item.id !== undefined ?
|
2025
|
-
equals: item.id
|
2026
|
-
} : undefined,
|
1950
|
+
id: item.id !== undefined ? item.id : undefined,
|
2027
1951
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2028
1952
|
equals: item.alpacaAccountId
|
2029
1953
|
} : undefined,
|
@@ -2054,9 +1978,7 @@ export const Session = {
|
|
2054
1978
|
}
|
2055
1979
|
: { connectOrCreate: item.orders.map((item) => ({
|
2056
1980
|
where: {
|
2057
|
-
id: item.id !== undefined ?
|
2058
|
-
equals: item.id
|
2059
|
-
} : undefined,
|
1981
|
+
id: item.id !== undefined ? item.id : undefined,
|
2060
1982
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2061
1983
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2062
1984
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -2101,9 +2023,7 @@ export const Session = {
|
|
2101
2023
|
}
|
2102
2024
|
: { connectOrCreate: item.positions.map((item) => ({
|
2103
2025
|
where: {
|
2104
|
-
id: item.id !== undefined ?
|
2105
|
-
equals: item.id
|
2106
|
-
} : undefined,
|
2026
|
+
id: item.id !== undefined ? item.id : undefined,
|
2107
2027
|
assetId: item.assetId !== undefined ? {
|
2108
2028
|
equals: item.assetId
|
2109
2029
|
} : undefined,
|
@@ -2136,9 +2056,7 @@ export const Session = {
|
|
2136
2056
|
}
|
2137
2057
|
: { connectOrCreate: item.alerts.map((item) => ({
|
2138
2058
|
where: {
|
2139
|
-
id: item.id !== undefined ?
|
2140
|
-
equals: item.id
|
2141
|
-
} : undefined,
|
2059
|
+
id: item.id !== undefined ? item.id : undefined,
|
2142
2060
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2143
2061
|
equals: item.alpacaAccountId
|
2144
2062
|
} : undefined,
|
@@ -2174,9 +2092,7 @@ export const Session = {
|
|
2174
2092
|
}
|
2175
2093
|
: { connectOrCreate: {
|
2176
2094
|
where: {
|
2177
|
-
id: prop.user.customer.id !== undefined ?
|
2178
|
-
equals: prop.user.customer.id
|
2179
|
-
} : undefined,
|
2095
|
+
id: prop.user.customer.id !== undefined ? prop.user.customer.id : undefined,
|
2180
2096
|
stripeCustomerId: prop.user.customer.stripeCustomerId !== undefined ? prop.user.customer.stripeCustomerId : undefined,
|
2181
2097
|
stripeSubscriptionId: prop.user.customer.stripeSubscriptionId !== undefined ? prop.user.customer.stripeSubscriptionId : undefined,
|
2182
2098
|
authUserId: prop.user.customer.authUserId !== undefined ? {
|
@@ -2208,9 +2124,7 @@ export const Session = {
|
|
2208
2124
|
}
|
2209
2125
|
: { connectOrCreate: prop.user.accounts.map((item) => ({
|
2210
2126
|
where: {
|
2211
|
-
id: item.id !== undefined ?
|
2212
|
-
equals: item.id
|
2213
|
-
} : undefined,
|
2127
|
+
id: item.id !== undefined ? item.id : undefined,
|
2214
2128
|
userId: item.userId !== undefined ? {
|
2215
2129
|
equals: item.userId
|
2216
2130
|
} : undefined,
|
@@ -2240,9 +2154,7 @@ export const Session = {
|
|
2240
2154
|
}
|
2241
2155
|
: { connectOrCreate: prop.user.authenticators.map((item) => ({
|
2242
2156
|
where: {
|
2243
|
-
id: item.id !== undefined ?
|
2244
|
-
equals: item.id
|
2245
|
-
} : undefined,
|
2157
|
+
id: item.id !== undefined ? item.id : undefined,
|
2246
2158
|
userId: item.userId !== undefined ? {
|
2247
2159
|
equals: item.userId
|
2248
2160
|
} : undefined,
|
@@ -2262,9 +2174,7 @@ export const Session = {
|
|
2262
2174
|
}
|
2263
2175
|
: { connectOrCreate: prop.user.alpacaAccounts.map((item) => ({
|
2264
2176
|
where: {
|
2265
|
-
id: item.id !== undefined ?
|
2266
|
-
equals: item.id
|
2267
|
-
} : undefined,
|
2177
|
+
id: item.id !== undefined ? item.id : undefined,
|
2268
2178
|
userId: item.userId !== undefined ? {
|
2269
2179
|
equals: item.userId
|
2270
2180
|
} : undefined,
|
@@ -2287,9 +2197,7 @@ export const Session = {
|
|
2287
2197
|
}
|
2288
2198
|
: { connectOrCreate: item.trades.map((item) => ({
|
2289
2199
|
where: {
|
2290
|
-
id: item.id !== undefined ?
|
2291
|
-
equals: item.id
|
2292
|
-
} : undefined,
|
2200
|
+
id: item.id !== undefined ? item.id : undefined,
|
2293
2201
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2294
2202
|
equals: item.alpacaAccountId
|
2295
2203
|
} : undefined,
|
@@ -2320,9 +2228,7 @@ export const Session = {
|
|
2320
2228
|
}
|
2321
2229
|
: { connectOrCreate: item.orders.map((item) => ({
|
2322
2230
|
where: {
|
2323
|
-
id: item.id !== undefined ?
|
2324
|
-
equals: item.id
|
2325
|
-
} : undefined,
|
2231
|
+
id: item.id !== undefined ? item.id : undefined,
|
2326
2232
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2327
2233
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2328
2234
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -2367,9 +2273,7 @@ export const Session = {
|
|
2367
2273
|
}
|
2368
2274
|
: { connectOrCreate: item.positions.map((item) => ({
|
2369
2275
|
where: {
|
2370
|
-
id: item.id !== undefined ?
|
2371
|
-
equals: item.id
|
2372
|
-
} : undefined,
|
2276
|
+
id: item.id !== undefined ? item.id : undefined,
|
2373
2277
|
assetId: item.assetId !== undefined ? {
|
2374
2278
|
equals: item.assetId
|
2375
2279
|
} : undefined,
|
@@ -2402,9 +2306,7 @@ export const Session = {
|
|
2402
2306
|
}
|
2403
2307
|
: { connectOrCreate: item.alerts.map((item) => ({
|
2404
2308
|
where: {
|
2405
|
-
id: item.id !== undefined ?
|
2406
|
-
equals: item.id
|
2407
|
-
} : undefined,
|
2309
|
+
id: item.id !== undefined ? item.id : undefined,
|
2408
2310
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2409
2311
|
equals: item.alpacaAccountId
|
2410
2312
|
} : undefined,
|
@@ -2491,9 +2393,7 @@ export const Session = {
|
|
2491
2393
|
}`;
|
2492
2394
|
const variables = {
|
2493
2395
|
where: {
|
2494
|
-
id: props.id !== undefined ?
|
2495
|
-
equals: props.id
|
2496
|
-
} : undefined,
|
2396
|
+
id: props.id !== undefined ? props.id : undefined,
|
2497
2397
|
sessionToken: props.sessionToken !== undefined ? props.sessionToken : undefined,
|
2498
2398
|
userId: props.userId !== undefined ? {
|
2499
2399
|
equals: props.userId
|
package/server/StopLoss.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StopLoss.d.ts","sourceRoot":"","sources":["../../src/StopLoss.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAoBxF,eAAO,MAAM,QAAQ;IAEnB;;;;OAIG;kBAEiB,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;
|
1
|
+
{"version":3,"file":"StopLoss.d.ts","sourceRoot":"","sources":["../../src/StopLoss.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAoBxF,eAAO,MAAM,QAAQ;IAEnB;;;;OAIG;kBAEiB,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAkc1D;;;;OAIG;sBACqB,YAAY,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAmC1E;;;;OAIG;kBACiB,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAokDxD;;;;OAIG;sBACqB,YAAY,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAukD1E;;;;OAIG;kBACiB,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAiCxD;;;;OAIG;eACc,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAmC5D;;;OAGG;cACa,OAAO,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC;IAyB9C;;;;OAIG;oBACmB,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC;CA2CpE,CAAC"}
|