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/Alert.mjs
CHANGED
@@ -44,9 +44,7 @@ export const Alert = {
|
|
44
44
|
}
|
45
45
|
: { connectOrCreate: {
|
46
46
|
where: {
|
47
|
-
id: props.alpacaAccount.id !== undefined ?
|
48
|
-
equals: props.alpacaAccount.id
|
49
|
-
} : undefined,
|
47
|
+
id: props.alpacaAccount.id !== undefined ? props.alpacaAccount.id : undefined,
|
50
48
|
userId: props.alpacaAccount.userId !== undefined ? {
|
51
49
|
equals: props.alpacaAccount.userId
|
52
50
|
} : undefined,
|
@@ -69,9 +67,7 @@ export const Alert = {
|
|
69
67
|
}
|
70
68
|
: { connectOrCreate: {
|
71
69
|
where: {
|
72
|
-
id: props.alpacaAccount.user.id !== undefined ?
|
73
|
-
equals: props.alpacaAccount.user.id
|
74
|
-
} : undefined,
|
70
|
+
id: props.alpacaAccount.user.id !== undefined ? props.alpacaAccount.user.id : undefined,
|
75
71
|
email: props.alpacaAccount.user.email !== undefined ? props.alpacaAccount.user.email : undefined,
|
76
72
|
name: props.alpacaAccount.user.name !== undefined ? {
|
77
73
|
equals: props.alpacaAccount.user.name
|
@@ -97,9 +93,7 @@ export const Alert = {
|
|
97
93
|
}
|
98
94
|
: { connectOrCreate: {
|
99
95
|
where: {
|
100
|
-
id: props.alpacaAccount.user.customer.id !== undefined ?
|
101
|
-
equals: props.alpacaAccount.user.customer.id
|
102
|
-
} : undefined,
|
96
|
+
id: props.alpacaAccount.user.customer.id !== undefined ? props.alpacaAccount.user.customer.id : undefined,
|
103
97
|
stripeCustomerId: props.alpacaAccount.user.customer.stripeCustomerId !== undefined ? props.alpacaAccount.user.customer.stripeCustomerId : undefined,
|
104
98
|
stripeSubscriptionId: props.alpacaAccount.user.customer.stripeSubscriptionId !== undefined ? props.alpacaAccount.user.customer.stripeSubscriptionId : undefined,
|
105
99
|
authUserId: props.alpacaAccount.user.customer.authUserId !== undefined ? {
|
@@ -131,9 +125,7 @@ export const Alert = {
|
|
131
125
|
}
|
132
126
|
: { connectOrCreate: props.alpacaAccount.user.accounts.map((item) => ({
|
133
127
|
where: {
|
134
|
-
id: item.id !== undefined ?
|
135
|
-
equals: item.id
|
136
|
-
} : undefined,
|
128
|
+
id: item.id !== undefined ? item.id : undefined,
|
137
129
|
userId: item.userId !== undefined ? {
|
138
130
|
equals: item.userId
|
139
131
|
} : undefined,
|
@@ -163,9 +155,7 @@ export const Alert = {
|
|
163
155
|
}
|
164
156
|
: { connectOrCreate: props.alpacaAccount.user.sessions.map((item) => ({
|
165
157
|
where: {
|
166
|
-
id: item.id !== undefined ?
|
167
|
-
equals: item.id
|
168
|
-
} : undefined,
|
158
|
+
id: item.id !== undefined ? item.id : undefined,
|
169
159
|
userId: item.userId !== undefined ? {
|
170
160
|
equals: item.userId
|
171
161
|
} : undefined,
|
@@ -184,9 +174,7 @@ export const Alert = {
|
|
184
174
|
}
|
185
175
|
: { connectOrCreate: props.alpacaAccount.user.authenticators.map((item) => ({
|
186
176
|
where: {
|
187
|
-
id: item.id !== undefined ?
|
188
|
-
equals: item.id
|
189
|
-
} : undefined,
|
177
|
+
id: item.id !== undefined ? item.id : undefined,
|
190
178
|
userId: item.userId !== undefined ? {
|
191
179
|
equals: item.userId
|
192
180
|
} : undefined,
|
@@ -209,9 +197,7 @@ export const Alert = {
|
|
209
197
|
}
|
210
198
|
: { connectOrCreate: props.alpacaAccount.trades.map((item) => ({
|
211
199
|
where: {
|
212
|
-
id: item.id !== undefined ?
|
213
|
-
equals: item.id
|
214
|
-
} : undefined,
|
200
|
+
id: item.id !== undefined ? item.id : undefined,
|
215
201
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
216
202
|
equals: item.alpacaAccountId
|
217
203
|
} : undefined,
|
@@ -239,9 +225,7 @@ export const Alert = {
|
|
239
225
|
}
|
240
226
|
: { connectOrCreate: {
|
241
227
|
where: {
|
242
|
-
id: item.asset.id !== undefined ?
|
243
|
-
equals: item.asset.id
|
244
|
-
} : undefined,
|
228
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
245
229
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
246
230
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
247
231
|
},
|
@@ -312,9 +296,7 @@ export const Alert = {
|
|
312
296
|
}
|
313
297
|
: { connectOrCreate: item.actions.map((item) => ({
|
314
298
|
where: {
|
315
|
-
id: item.id !== undefined ?
|
316
|
-
equals: item.id
|
317
|
-
} : undefined,
|
299
|
+
id: item.id !== undefined ? item.id : undefined,
|
318
300
|
tradeId: item.tradeId !== undefined ? {
|
319
301
|
equals: item.tradeId
|
320
302
|
} : undefined,
|
@@ -339,9 +321,7 @@ export const Alert = {
|
|
339
321
|
}
|
340
322
|
: { connectOrCreate: props.alpacaAccount.orders.map((item) => ({
|
341
323
|
where: {
|
342
|
-
id: item.id !== undefined ?
|
343
|
-
equals: item.id
|
344
|
-
} : undefined,
|
324
|
+
id: item.id !== undefined ? item.id : undefined,
|
345
325
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
346
326
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
347
327
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -383,9 +363,7 @@ export const Alert = {
|
|
383
363
|
}
|
384
364
|
: { connectOrCreate: {
|
385
365
|
where: {
|
386
|
-
id: item.stopLoss.id !== undefined ?
|
387
|
-
equals: item.stopLoss.id
|
388
|
-
} : undefined,
|
366
|
+
id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
|
389
367
|
orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
|
390
368
|
},
|
391
369
|
create: {
|
@@ -402,9 +380,7 @@ export const Alert = {
|
|
402
380
|
}
|
403
381
|
: { connectOrCreate: {
|
404
382
|
where: {
|
405
|
-
id: item.takeProfit.id !== undefined ?
|
406
|
-
equals: item.takeProfit.id
|
407
|
-
} : undefined,
|
383
|
+
id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
|
408
384
|
orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
|
409
385
|
},
|
410
386
|
create: {
|
@@ -421,9 +397,7 @@ export const Alert = {
|
|
421
397
|
}
|
422
398
|
: { connectOrCreate: {
|
423
399
|
where: {
|
424
|
-
id: item.action.id !== undefined ?
|
425
|
-
equals: item.action.id
|
426
|
-
} : undefined,
|
400
|
+
id: item.action.id !== undefined ? item.action.id : undefined,
|
427
401
|
tradeId: item.action.tradeId !== undefined ? {
|
428
402
|
equals: item.action.tradeId
|
429
403
|
} : undefined,
|
@@ -445,9 +419,7 @@ export const Alert = {
|
|
445
419
|
}
|
446
420
|
: { connectOrCreate: {
|
447
421
|
where: {
|
448
|
-
id: item.asset.id !== undefined ?
|
449
|
-
equals: item.asset.id
|
450
|
-
} : undefined,
|
422
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
451
423
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
452
424
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
453
425
|
},
|
@@ -521,9 +493,7 @@ export const Alert = {
|
|
521
493
|
}
|
522
494
|
: { connectOrCreate: props.alpacaAccount.positions.map((item) => ({
|
523
495
|
where: {
|
524
|
-
id: item.id !== undefined ?
|
525
|
-
equals: item.id
|
526
|
-
} : undefined,
|
496
|
+
id: item.id !== undefined ? item.id : undefined,
|
527
497
|
assetId: item.assetId !== undefined ? {
|
528
498
|
equals: item.assetId
|
529
499
|
} : undefined,
|
@@ -553,9 +523,7 @@ export const Alert = {
|
|
553
523
|
}
|
554
524
|
: { connectOrCreate: {
|
555
525
|
where: {
|
556
|
-
id: item.asset.id !== undefined ?
|
557
|
-
equals: item.asset.id
|
558
|
-
} : undefined,
|
526
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
559
527
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
560
528
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
561
529
|
},
|
@@ -696,9 +664,7 @@ export const Alert = {
|
|
696
664
|
}`;
|
697
665
|
const variables = {
|
698
666
|
where: {
|
699
|
-
id: props.id !== undefined ?
|
700
|
-
equals: props.id
|
701
|
-
} : undefined,
|
667
|
+
id: props.id !== undefined ? props.id : undefined,
|
702
668
|
alpacaAccountId: props.alpacaAccountId !== undefined ? {
|
703
669
|
equals: props.alpacaAccountId
|
704
670
|
} : undefined,
|
@@ -876,9 +842,7 @@ export const Alert = {
|
|
876
842
|
accounts: props.alpacaAccount.user.accounts ? {
|
877
843
|
upsert: props.alpacaAccount.user.accounts.map((item) => ({
|
878
844
|
where: {
|
879
|
-
id: item.id !== undefined ?
|
880
|
-
equals: item.id
|
881
|
-
} : undefined,
|
845
|
+
id: item.id !== undefined ? item.id : undefined,
|
882
846
|
userId: item.userId !== undefined ? {
|
883
847
|
equals: item.userId
|
884
848
|
} : undefined,
|
@@ -938,9 +902,7 @@ export const Alert = {
|
|
938
902
|
sessions: props.alpacaAccount.user.sessions ? {
|
939
903
|
upsert: props.alpacaAccount.user.sessions.map((item) => ({
|
940
904
|
where: {
|
941
|
-
id: item.id !== undefined ?
|
942
|
-
equals: item.id
|
943
|
-
} : undefined,
|
905
|
+
id: item.id !== undefined ? item.id : undefined,
|
944
906
|
userId: item.userId !== undefined ? {
|
945
907
|
equals: item.userId
|
946
908
|
} : undefined,
|
@@ -965,9 +927,7 @@ export const Alert = {
|
|
965
927
|
authenticators: props.alpacaAccount.user.authenticators ? {
|
966
928
|
upsert: props.alpacaAccount.user.authenticators.map((item) => ({
|
967
929
|
where: {
|
968
|
-
id: item.id !== undefined ?
|
969
|
-
equals: item.id
|
970
|
-
} : undefined,
|
930
|
+
id: item.id !== undefined ? item.id : undefined,
|
971
931
|
userId: item.userId !== undefined ? {
|
972
932
|
equals: item.userId
|
973
933
|
} : undefined,
|
@@ -1014,9 +974,7 @@ export const Alert = {
|
|
1014
974
|
}
|
1015
975
|
: { connectOrCreate: {
|
1016
976
|
where: {
|
1017
|
-
id: props.alpacaAccount.user.customer.id !== undefined ?
|
1018
|
-
equals: props.alpacaAccount.user.customer.id
|
1019
|
-
} : undefined,
|
977
|
+
id: props.alpacaAccount.user.customer.id !== undefined ? props.alpacaAccount.user.customer.id : undefined,
|
1020
978
|
stripeCustomerId: props.alpacaAccount.user.customer.stripeCustomerId !== undefined ? props.alpacaAccount.user.customer.stripeCustomerId : undefined,
|
1021
979
|
stripeSubscriptionId: props.alpacaAccount.user.customer.stripeSubscriptionId !== undefined ? props.alpacaAccount.user.customer.stripeSubscriptionId : undefined,
|
1022
980
|
authUserId: props.alpacaAccount.user.customer.authUserId !== undefined ? {
|
@@ -1048,9 +1006,7 @@ export const Alert = {
|
|
1048
1006
|
}
|
1049
1007
|
: { connectOrCreate: props.alpacaAccount.user.accounts.map((item) => ({
|
1050
1008
|
where: {
|
1051
|
-
id: item.id !== undefined ?
|
1052
|
-
equals: item.id
|
1053
|
-
} : undefined,
|
1009
|
+
id: item.id !== undefined ? item.id : undefined,
|
1054
1010
|
userId: item.userId !== undefined ? {
|
1055
1011
|
equals: item.userId
|
1056
1012
|
} : undefined,
|
@@ -1080,9 +1036,7 @@ export const Alert = {
|
|
1080
1036
|
}
|
1081
1037
|
: { connectOrCreate: props.alpacaAccount.user.sessions.map((item) => ({
|
1082
1038
|
where: {
|
1083
|
-
id: item.id !== undefined ?
|
1084
|
-
equals: item.id
|
1085
|
-
} : undefined,
|
1039
|
+
id: item.id !== undefined ? item.id : undefined,
|
1086
1040
|
userId: item.userId !== undefined ? {
|
1087
1041
|
equals: item.userId
|
1088
1042
|
} : undefined,
|
@@ -1101,9 +1055,7 @@ export const Alert = {
|
|
1101
1055
|
}
|
1102
1056
|
: { connectOrCreate: props.alpacaAccount.user.authenticators.map((item) => ({
|
1103
1057
|
where: {
|
1104
|
-
id: item.id !== undefined ?
|
1105
|
-
equals: item.id
|
1106
|
-
} : undefined,
|
1058
|
+
id: item.id !== undefined ? item.id : undefined,
|
1107
1059
|
userId: item.userId !== undefined ? {
|
1108
1060
|
equals: item.userId
|
1109
1061
|
} : undefined,
|
@@ -1121,9 +1073,7 @@ export const Alert = {
|
|
1121
1073
|
trades: props.alpacaAccount.trades ? {
|
1122
1074
|
upsert: props.alpacaAccount.trades.map((item) => ({
|
1123
1075
|
where: {
|
1124
|
-
id: item.id !== undefined ?
|
1125
|
-
equals: item.id
|
1126
|
-
} : undefined,
|
1076
|
+
id: item.id !== undefined ? item.id : undefined,
|
1127
1077
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1128
1078
|
equals: item.alpacaAccountId
|
1129
1079
|
} : undefined,
|
@@ -1413,9 +1363,7 @@ export const Alert = {
|
|
1413
1363
|
actions: item.actions ? {
|
1414
1364
|
upsert: item.actions.map((item) => ({
|
1415
1365
|
where: {
|
1416
|
-
id: item.id !== undefined ?
|
1417
|
-
equals: item.id
|
1418
|
-
} : undefined,
|
1366
|
+
id: item.id !== undefined ? item.id : undefined,
|
1419
1367
|
tradeId: item.tradeId !== undefined ? {
|
1420
1368
|
equals: item.tradeId
|
1421
1369
|
} : undefined,
|
@@ -1470,9 +1418,7 @@ export const Alert = {
|
|
1470
1418
|
}
|
1471
1419
|
: { connectOrCreate: {
|
1472
1420
|
where: {
|
1473
|
-
id: item.asset.id !== undefined ?
|
1474
|
-
equals: item.asset.id
|
1475
|
-
} : undefined,
|
1421
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
1476
1422
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
1477
1423
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
1478
1424
|
},
|
@@ -1543,9 +1489,7 @@ export const Alert = {
|
|
1543
1489
|
}
|
1544
1490
|
: { connectOrCreate: item.actions.map((item) => ({
|
1545
1491
|
where: {
|
1546
|
-
id: item.id !== undefined ?
|
1547
|
-
equals: item.id
|
1548
|
-
} : undefined,
|
1492
|
+
id: item.id !== undefined ? item.id : undefined,
|
1549
1493
|
tradeId: item.tradeId !== undefined ? {
|
1550
1494
|
equals: item.tradeId
|
1551
1495
|
} : undefined,
|
@@ -1565,9 +1509,7 @@ export const Alert = {
|
|
1565
1509
|
orders: props.alpacaAccount.orders ? {
|
1566
1510
|
upsert: props.alpacaAccount.orders.map((item) => ({
|
1567
1511
|
where: {
|
1568
|
-
id: item.id !== undefined ?
|
1569
|
-
equals: item.id
|
1570
|
-
} : undefined,
|
1512
|
+
id: item.id !== undefined ? item.id : undefined,
|
1571
1513
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1572
1514
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1573
1515
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -2015,9 +1957,7 @@ export const Alert = {
|
|
2015
1957
|
}
|
2016
1958
|
: { connectOrCreate: {
|
2017
1959
|
where: {
|
2018
|
-
id: item.stopLoss.id !== undefined ?
|
2019
|
-
equals: item.stopLoss.id
|
2020
|
-
} : undefined,
|
1960
|
+
id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
|
2021
1961
|
orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
|
2022
1962
|
},
|
2023
1963
|
create: {
|
@@ -2034,9 +1974,7 @@ export const Alert = {
|
|
2034
1974
|
}
|
2035
1975
|
: { connectOrCreate: {
|
2036
1976
|
where: {
|
2037
|
-
id: item.takeProfit.id !== undefined ?
|
2038
|
-
equals: item.takeProfit.id
|
2039
|
-
} : undefined,
|
1977
|
+
id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
|
2040
1978
|
orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
|
2041
1979
|
},
|
2042
1980
|
create: {
|
@@ -2053,9 +1991,7 @@ export const Alert = {
|
|
2053
1991
|
}
|
2054
1992
|
: { connectOrCreate: {
|
2055
1993
|
where: {
|
2056
|
-
id: item.action.id !== undefined ?
|
2057
|
-
equals: item.action.id
|
2058
|
-
} : undefined,
|
1994
|
+
id: item.action.id !== undefined ? item.action.id : undefined,
|
2059
1995
|
tradeId: item.action.tradeId !== undefined ? {
|
2060
1996
|
equals: item.action.tradeId
|
2061
1997
|
} : undefined,
|
@@ -2077,9 +2013,7 @@ export const Alert = {
|
|
2077
2013
|
}
|
2078
2014
|
: { connectOrCreate: {
|
2079
2015
|
where: {
|
2080
|
-
id: item.asset.id !== undefined ?
|
2081
|
-
equals: item.asset.id
|
2082
|
-
} : undefined,
|
2016
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
2083
2017
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
2084
2018
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
2085
2019
|
},
|
@@ -2148,9 +2082,7 @@ export const Alert = {
|
|
2148
2082
|
positions: props.alpacaAccount.positions ? {
|
2149
2083
|
upsert: props.alpacaAccount.positions.map((item) => ({
|
2150
2084
|
where: {
|
2151
|
-
id: item.id !== undefined ?
|
2152
|
-
equals: item.id
|
2153
|
-
} : undefined,
|
2085
|
+
id: item.id !== undefined ? item.id : undefined,
|
2154
2086
|
assetId: item.assetId !== undefined ? {
|
2155
2087
|
equals: item.assetId
|
2156
2088
|
} : undefined,
|
@@ -2466,9 +2398,7 @@ export const Alert = {
|
|
2466
2398
|
}
|
2467
2399
|
: { connectOrCreate: {
|
2468
2400
|
where: {
|
2469
|
-
id: item.asset.id !== undefined ?
|
2470
|
-
equals: item.asset.id
|
2471
|
-
} : undefined,
|
2401
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
2472
2402
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
2473
2403
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
2474
2404
|
},
|
@@ -2553,9 +2483,7 @@ export const Alert = {
|
|
2553
2483
|
}
|
2554
2484
|
: { connectOrCreate: {
|
2555
2485
|
where: {
|
2556
|
-
id: props.alpacaAccount.user.id !== undefined ?
|
2557
|
-
equals: props.alpacaAccount.user.id
|
2558
|
-
} : undefined,
|
2486
|
+
id: props.alpacaAccount.user.id !== undefined ? props.alpacaAccount.user.id : undefined,
|
2559
2487
|
email: props.alpacaAccount.user.email !== undefined ? props.alpacaAccount.user.email : undefined,
|
2560
2488
|
name: props.alpacaAccount.user.name !== undefined ? {
|
2561
2489
|
equals: props.alpacaAccount.user.name
|
@@ -2581,9 +2509,7 @@ export const Alert = {
|
|
2581
2509
|
}
|
2582
2510
|
: { connectOrCreate: {
|
2583
2511
|
where: {
|
2584
|
-
id: props.alpacaAccount.user.customer.id !== undefined ?
|
2585
|
-
equals: props.alpacaAccount.user.customer.id
|
2586
|
-
} : undefined,
|
2512
|
+
id: props.alpacaAccount.user.customer.id !== undefined ? props.alpacaAccount.user.customer.id : undefined,
|
2587
2513
|
stripeCustomerId: props.alpacaAccount.user.customer.stripeCustomerId !== undefined ? props.alpacaAccount.user.customer.stripeCustomerId : undefined,
|
2588
2514
|
stripeSubscriptionId: props.alpacaAccount.user.customer.stripeSubscriptionId !== undefined ? props.alpacaAccount.user.customer.stripeSubscriptionId : undefined,
|
2589
2515
|
authUserId: props.alpacaAccount.user.customer.authUserId !== undefined ? {
|
@@ -2615,9 +2541,7 @@ export const Alert = {
|
|
2615
2541
|
}
|
2616
2542
|
: { connectOrCreate: props.alpacaAccount.user.accounts.map((item) => ({
|
2617
2543
|
where: {
|
2618
|
-
id: item.id !== undefined ?
|
2619
|
-
equals: item.id
|
2620
|
-
} : undefined,
|
2544
|
+
id: item.id !== undefined ? item.id : undefined,
|
2621
2545
|
userId: item.userId !== undefined ? {
|
2622
2546
|
equals: item.userId
|
2623
2547
|
} : undefined,
|
@@ -2647,9 +2571,7 @@ export const Alert = {
|
|
2647
2571
|
}
|
2648
2572
|
: { connectOrCreate: props.alpacaAccount.user.sessions.map((item) => ({
|
2649
2573
|
where: {
|
2650
|
-
id: item.id !== undefined ?
|
2651
|
-
equals: item.id
|
2652
|
-
} : undefined,
|
2574
|
+
id: item.id !== undefined ? item.id : undefined,
|
2653
2575
|
userId: item.userId !== undefined ? {
|
2654
2576
|
equals: item.userId
|
2655
2577
|
} : undefined,
|
@@ -2668,9 +2590,7 @@ export const Alert = {
|
|
2668
2590
|
}
|
2669
2591
|
: { connectOrCreate: props.alpacaAccount.user.authenticators.map((item) => ({
|
2670
2592
|
where: {
|
2671
|
-
id: item.id !== undefined ?
|
2672
|
-
equals: item.id
|
2673
|
-
} : undefined,
|
2593
|
+
id: item.id !== undefined ? item.id : undefined,
|
2674
2594
|
userId: item.userId !== undefined ? {
|
2675
2595
|
equals: item.userId
|
2676
2596
|
} : undefined,
|
@@ -2693,9 +2613,7 @@ export const Alert = {
|
|
2693
2613
|
}
|
2694
2614
|
: { connectOrCreate: props.alpacaAccount.trades.map((item) => ({
|
2695
2615
|
where: {
|
2696
|
-
id: item.id !== undefined ?
|
2697
|
-
equals: item.id
|
2698
|
-
} : undefined,
|
2616
|
+
id: item.id !== undefined ? item.id : undefined,
|
2699
2617
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2700
2618
|
equals: item.alpacaAccountId
|
2701
2619
|
} : undefined,
|
@@ -2723,9 +2641,7 @@ export const Alert = {
|
|
2723
2641
|
}
|
2724
2642
|
: { connectOrCreate: {
|
2725
2643
|
where: {
|
2726
|
-
id: item.asset.id !== undefined ?
|
2727
|
-
equals: item.asset.id
|
2728
|
-
} : undefined,
|
2644
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
2729
2645
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
2730
2646
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
2731
2647
|
},
|
@@ -2796,9 +2712,7 @@ export const Alert = {
|
|
2796
2712
|
}
|
2797
2713
|
: { connectOrCreate: item.actions.map((item) => ({
|
2798
2714
|
where: {
|
2799
|
-
id: item.id !== undefined ?
|
2800
|
-
equals: item.id
|
2801
|
-
} : undefined,
|
2715
|
+
id: item.id !== undefined ? item.id : undefined,
|
2802
2716
|
tradeId: item.tradeId !== undefined ? {
|
2803
2717
|
equals: item.tradeId
|
2804
2718
|
} : undefined,
|
@@ -2823,9 +2737,7 @@ export const Alert = {
|
|
2823
2737
|
}
|
2824
2738
|
: { connectOrCreate: props.alpacaAccount.orders.map((item) => ({
|
2825
2739
|
where: {
|
2826
|
-
id: item.id !== undefined ?
|
2827
|
-
equals: item.id
|
2828
|
-
} : undefined,
|
2740
|
+
id: item.id !== undefined ? item.id : undefined,
|
2829
2741
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2830
2742
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2831
2743
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -2867,9 +2779,7 @@ export const Alert = {
|
|
2867
2779
|
}
|
2868
2780
|
: { connectOrCreate: {
|
2869
2781
|
where: {
|
2870
|
-
id: item.stopLoss.id !== undefined ?
|
2871
|
-
equals: item.stopLoss.id
|
2872
|
-
} : undefined,
|
2782
|
+
id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
|
2873
2783
|
orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
|
2874
2784
|
},
|
2875
2785
|
create: {
|
@@ -2886,9 +2796,7 @@ export const Alert = {
|
|
2886
2796
|
}
|
2887
2797
|
: { connectOrCreate: {
|
2888
2798
|
where: {
|
2889
|
-
id: item.takeProfit.id !== undefined ?
|
2890
|
-
equals: item.takeProfit.id
|
2891
|
-
} : undefined,
|
2799
|
+
id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
|
2892
2800
|
orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
|
2893
2801
|
},
|
2894
2802
|
create: {
|
@@ -2905,9 +2813,7 @@ export const Alert = {
|
|
2905
2813
|
}
|
2906
2814
|
: { connectOrCreate: {
|
2907
2815
|
where: {
|
2908
|
-
id: item.action.id !== undefined ?
|
2909
|
-
equals: item.action.id
|
2910
|
-
} : undefined,
|
2816
|
+
id: item.action.id !== undefined ? item.action.id : undefined,
|
2911
2817
|
tradeId: item.action.tradeId !== undefined ? {
|
2912
2818
|
equals: item.action.tradeId
|
2913
2819
|
} : undefined,
|
@@ -2929,9 +2835,7 @@ export const Alert = {
|
|
2929
2835
|
}
|
2930
2836
|
: { connectOrCreate: {
|
2931
2837
|
where: {
|
2932
|
-
id: item.asset.id !== undefined ?
|
2933
|
-
equals: item.asset.id
|
2934
|
-
} : undefined,
|
2838
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
2935
2839
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
2936
2840
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
2937
2841
|
},
|
@@ -3005,9 +2909,7 @@ export const Alert = {
|
|
3005
2909
|
}
|
3006
2910
|
: { connectOrCreate: props.alpacaAccount.positions.map((item) => ({
|
3007
2911
|
where: {
|
3008
|
-
id: item.id !== undefined ?
|
3009
|
-
equals: item.id
|
3010
|
-
} : undefined,
|
2912
|
+
id: item.id !== undefined ? item.id : undefined,
|
3011
2913
|
assetId: item.assetId !== undefined ? {
|
3012
2914
|
equals: item.assetId
|
3013
2915
|
} : undefined,
|
@@ -3037,9 +2939,7 @@ export const Alert = {
|
|
3037
2939
|
}
|
3038
2940
|
: { connectOrCreate: {
|
3039
2941
|
where: {
|
3040
|
-
id: item.asset.id !== undefined ?
|
3041
|
-
equals: item.asset.id
|
3042
|
-
} : undefined,
|
2942
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
3043
2943
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
3044
2944
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
3045
2945
|
},
|
@@ -3142,9 +3042,7 @@ export const Alert = {
|
|
3142
3042
|
}`;
|
3143
3043
|
const variables = props.map(prop => ({
|
3144
3044
|
where: {
|
3145
|
-
id: prop.id !== undefined ?
|
3146
|
-
equals: prop.id
|
3147
|
-
} : undefined,
|
3045
|
+
id: prop.id !== undefined ? prop.id : undefined,
|
3148
3046
|
alpacaAccountId: prop.alpacaAccountId !== undefined ? {
|
3149
3047
|
equals: prop.alpacaAccountId
|
3150
3048
|
} : undefined,
|
@@ -3322,9 +3220,7 @@ export const Alert = {
|
|
3322
3220
|
accounts: prop.alpacaAccount.user.accounts ? {
|
3323
3221
|
upsert: prop.alpacaAccount.user.accounts.map((item) => ({
|
3324
3222
|
where: {
|
3325
|
-
id: item.id !== undefined ?
|
3326
|
-
equals: item.id
|
3327
|
-
} : undefined,
|
3223
|
+
id: item.id !== undefined ? item.id : undefined,
|
3328
3224
|
userId: item.userId !== undefined ? {
|
3329
3225
|
equals: item.userId
|
3330
3226
|
} : undefined,
|
@@ -3384,9 +3280,7 @@ export const Alert = {
|
|
3384
3280
|
sessions: prop.alpacaAccount.user.sessions ? {
|
3385
3281
|
upsert: prop.alpacaAccount.user.sessions.map((item) => ({
|
3386
3282
|
where: {
|
3387
|
-
id: item.id !== undefined ?
|
3388
|
-
equals: item.id
|
3389
|
-
} : undefined,
|
3283
|
+
id: item.id !== undefined ? item.id : undefined,
|
3390
3284
|
userId: item.userId !== undefined ? {
|
3391
3285
|
equals: item.userId
|
3392
3286
|
} : undefined,
|
@@ -3411,9 +3305,7 @@ export const Alert = {
|
|
3411
3305
|
authenticators: prop.alpacaAccount.user.authenticators ? {
|
3412
3306
|
upsert: prop.alpacaAccount.user.authenticators.map((item) => ({
|
3413
3307
|
where: {
|
3414
|
-
id: item.id !== undefined ?
|
3415
|
-
equals: item.id
|
3416
|
-
} : undefined,
|
3308
|
+
id: item.id !== undefined ? item.id : undefined,
|
3417
3309
|
userId: item.userId !== undefined ? {
|
3418
3310
|
equals: item.userId
|
3419
3311
|
} : undefined,
|
@@ -3460,9 +3352,7 @@ export const Alert = {
|
|
3460
3352
|
}
|
3461
3353
|
: { connectOrCreate: {
|
3462
3354
|
where: {
|
3463
|
-
id: prop.alpacaAccount.user.customer.id !== undefined ?
|
3464
|
-
equals: prop.alpacaAccount.user.customer.id
|
3465
|
-
} : undefined,
|
3355
|
+
id: prop.alpacaAccount.user.customer.id !== undefined ? prop.alpacaAccount.user.customer.id : undefined,
|
3466
3356
|
stripeCustomerId: prop.alpacaAccount.user.customer.stripeCustomerId !== undefined ? prop.alpacaAccount.user.customer.stripeCustomerId : undefined,
|
3467
3357
|
stripeSubscriptionId: prop.alpacaAccount.user.customer.stripeSubscriptionId !== undefined ? prop.alpacaAccount.user.customer.stripeSubscriptionId : undefined,
|
3468
3358
|
authUserId: prop.alpacaAccount.user.customer.authUserId !== undefined ? {
|
@@ -3494,9 +3384,7 @@ export const Alert = {
|
|
3494
3384
|
}
|
3495
3385
|
: { connectOrCreate: prop.alpacaAccount.user.accounts.map((item) => ({
|
3496
3386
|
where: {
|
3497
|
-
id: item.id !== undefined ?
|
3498
|
-
equals: item.id
|
3499
|
-
} : undefined,
|
3387
|
+
id: item.id !== undefined ? item.id : undefined,
|
3500
3388
|
userId: item.userId !== undefined ? {
|
3501
3389
|
equals: item.userId
|
3502
3390
|
} : undefined,
|
@@ -3526,9 +3414,7 @@ export const Alert = {
|
|
3526
3414
|
}
|
3527
3415
|
: { connectOrCreate: prop.alpacaAccount.user.sessions.map((item) => ({
|
3528
3416
|
where: {
|
3529
|
-
id: item.id !== undefined ?
|
3530
|
-
equals: item.id
|
3531
|
-
} : undefined,
|
3417
|
+
id: item.id !== undefined ? item.id : undefined,
|
3532
3418
|
userId: item.userId !== undefined ? {
|
3533
3419
|
equals: item.userId
|
3534
3420
|
} : undefined,
|
@@ -3547,9 +3433,7 @@ export const Alert = {
|
|
3547
3433
|
}
|
3548
3434
|
: { connectOrCreate: prop.alpacaAccount.user.authenticators.map((item) => ({
|
3549
3435
|
where: {
|
3550
|
-
id: item.id !== undefined ?
|
3551
|
-
equals: item.id
|
3552
|
-
} : undefined,
|
3436
|
+
id: item.id !== undefined ? item.id : undefined,
|
3553
3437
|
userId: item.userId !== undefined ? {
|
3554
3438
|
equals: item.userId
|
3555
3439
|
} : undefined,
|
@@ -3567,9 +3451,7 @@ export const Alert = {
|
|
3567
3451
|
trades: prop.alpacaAccount.trades ? {
|
3568
3452
|
upsert: prop.alpacaAccount.trades.map((item) => ({
|
3569
3453
|
where: {
|
3570
|
-
id: item.id !== undefined ?
|
3571
|
-
equals: item.id
|
3572
|
-
} : undefined,
|
3454
|
+
id: item.id !== undefined ? item.id : undefined,
|
3573
3455
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3574
3456
|
equals: item.alpacaAccountId
|
3575
3457
|
} : undefined,
|
@@ -3859,9 +3741,7 @@ export const Alert = {
|
|
3859
3741
|
actions: item.actions ? {
|
3860
3742
|
upsert: item.actions.map((item) => ({
|
3861
3743
|
where: {
|
3862
|
-
id: item.id !== undefined ?
|
3863
|
-
equals: item.id
|
3864
|
-
} : undefined,
|
3744
|
+
id: item.id !== undefined ? item.id : undefined,
|
3865
3745
|
tradeId: item.tradeId !== undefined ? {
|
3866
3746
|
equals: item.tradeId
|
3867
3747
|
} : undefined,
|
@@ -3916,9 +3796,7 @@ export const Alert = {
|
|
3916
3796
|
}
|
3917
3797
|
: { connectOrCreate: {
|
3918
3798
|
where: {
|
3919
|
-
id: item.asset.id !== undefined ?
|
3920
|
-
equals: item.asset.id
|
3921
|
-
} : undefined,
|
3799
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
3922
3800
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
3923
3801
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
3924
3802
|
},
|
@@ -3989,9 +3867,7 @@ export const Alert = {
|
|
3989
3867
|
}
|
3990
3868
|
: { connectOrCreate: item.actions.map((item) => ({
|
3991
3869
|
where: {
|
3992
|
-
id: item.id !== undefined ?
|
3993
|
-
equals: item.id
|
3994
|
-
} : undefined,
|
3870
|
+
id: item.id !== undefined ? item.id : undefined,
|
3995
3871
|
tradeId: item.tradeId !== undefined ? {
|
3996
3872
|
equals: item.tradeId
|
3997
3873
|
} : undefined,
|
@@ -4011,9 +3887,7 @@ export const Alert = {
|
|
4011
3887
|
orders: prop.alpacaAccount.orders ? {
|
4012
3888
|
upsert: prop.alpacaAccount.orders.map((item) => ({
|
4013
3889
|
where: {
|
4014
|
-
id: item.id !== undefined ?
|
4015
|
-
equals: item.id
|
4016
|
-
} : undefined,
|
3890
|
+
id: item.id !== undefined ? item.id : undefined,
|
4017
3891
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
4018
3892
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
4019
3893
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -4461,9 +4335,7 @@ export const Alert = {
|
|
4461
4335
|
}
|
4462
4336
|
: { connectOrCreate: {
|
4463
4337
|
where: {
|
4464
|
-
id: item.stopLoss.id !== undefined ?
|
4465
|
-
equals: item.stopLoss.id
|
4466
|
-
} : undefined,
|
4338
|
+
id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
|
4467
4339
|
orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
|
4468
4340
|
},
|
4469
4341
|
create: {
|
@@ -4480,9 +4352,7 @@ export const Alert = {
|
|
4480
4352
|
}
|
4481
4353
|
: { connectOrCreate: {
|
4482
4354
|
where: {
|
4483
|
-
id: item.takeProfit.id !== undefined ?
|
4484
|
-
equals: item.takeProfit.id
|
4485
|
-
} : undefined,
|
4355
|
+
id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
|
4486
4356
|
orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
|
4487
4357
|
},
|
4488
4358
|
create: {
|
@@ -4499,9 +4369,7 @@ export const Alert = {
|
|
4499
4369
|
}
|
4500
4370
|
: { connectOrCreate: {
|
4501
4371
|
where: {
|
4502
|
-
id: item.action.id !== undefined ?
|
4503
|
-
equals: item.action.id
|
4504
|
-
} : undefined,
|
4372
|
+
id: item.action.id !== undefined ? item.action.id : undefined,
|
4505
4373
|
tradeId: item.action.tradeId !== undefined ? {
|
4506
4374
|
equals: item.action.tradeId
|
4507
4375
|
} : undefined,
|
@@ -4523,9 +4391,7 @@ export const Alert = {
|
|
4523
4391
|
}
|
4524
4392
|
: { connectOrCreate: {
|
4525
4393
|
where: {
|
4526
|
-
id: item.asset.id !== undefined ?
|
4527
|
-
equals: item.asset.id
|
4528
|
-
} : undefined,
|
4394
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
4529
4395
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
4530
4396
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
4531
4397
|
},
|
@@ -4594,9 +4460,7 @@ export const Alert = {
|
|
4594
4460
|
positions: prop.alpacaAccount.positions ? {
|
4595
4461
|
upsert: prop.alpacaAccount.positions.map((item) => ({
|
4596
4462
|
where: {
|
4597
|
-
id: item.id !== undefined ?
|
4598
|
-
equals: item.id
|
4599
|
-
} : undefined,
|
4463
|
+
id: item.id !== undefined ? item.id : undefined,
|
4600
4464
|
assetId: item.assetId !== undefined ? {
|
4601
4465
|
equals: item.assetId
|
4602
4466
|
} : undefined,
|
@@ -4912,9 +4776,7 @@ export const Alert = {
|
|
4912
4776
|
}
|
4913
4777
|
: { connectOrCreate: {
|
4914
4778
|
where: {
|
4915
|
-
id: item.asset.id !== undefined ?
|
4916
|
-
equals: item.asset.id
|
4917
|
-
} : undefined,
|
4779
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
4918
4780
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
4919
4781
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
4920
4782
|
},
|
@@ -4999,9 +4861,7 @@ export const Alert = {
|
|
4999
4861
|
}
|
5000
4862
|
: { connectOrCreate: {
|
5001
4863
|
where: {
|
5002
|
-
id: prop.alpacaAccount.user.id !== undefined ?
|
5003
|
-
equals: prop.alpacaAccount.user.id
|
5004
|
-
} : undefined,
|
4864
|
+
id: prop.alpacaAccount.user.id !== undefined ? prop.alpacaAccount.user.id : undefined,
|
5005
4865
|
email: prop.alpacaAccount.user.email !== undefined ? prop.alpacaAccount.user.email : undefined,
|
5006
4866
|
name: prop.alpacaAccount.user.name !== undefined ? {
|
5007
4867
|
equals: prop.alpacaAccount.user.name
|
@@ -5027,9 +4887,7 @@ export const Alert = {
|
|
5027
4887
|
}
|
5028
4888
|
: { connectOrCreate: {
|
5029
4889
|
where: {
|
5030
|
-
id: prop.alpacaAccount.user.customer.id !== undefined ?
|
5031
|
-
equals: prop.alpacaAccount.user.customer.id
|
5032
|
-
} : undefined,
|
4890
|
+
id: prop.alpacaAccount.user.customer.id !== undefined ? prop.alpacaAccount.user.customer.id : undefined,
|
5033
4891
|
stripeCustomerId: prop.alpacaAccount.user.customer.stripeCustomerId !== undefined ? prop.alpacaAccount.user.customer.stripeCustomerId : undefined,
|
5034
4892
|
stripeSubscriptionId: prop.alpacaAccount.user.customer.stripeSubscriptionId !== undefined ? prop.alpacaAccount.user.customer.stripeSubscriptionId : undefined,
|
5035
4893
|
authUserId: prop.alpacaAccount.user.customer.authUserId !== undefined ? {
|
@@ -5061,9 +4919,7 @@ export const Alert = {
|
|
5061
4919
|
}
|
5062
4920
|
: { connectOrCreate: prop.alpacaAccount.user.accounts.map((item) => ({
|
5063
4921
|
where: {
|
5064
|
-
id: item.id !== undefined ?
|
5065
|
-
equals: item.id
|
5066
|
-
} : undefined,
|
4922
|
+
id: item.id !== undefined ? item.id : undefined,
|
5067
4923
|
userId: item.userId !== undefined ? {
|
5068
4924
|
equals: item.userId
|
5069
4925
|
} : undefined,
|
@@ -5093,9 +4949,7 @@ export const Alert = {
|
|
5093
4949
|
}
|
5094
4950
|
: { connectOrCreate: prop.alpacaAccount.user.sessions.map((item) => ({
|
5095
4951
|
where: {
|
5096
|
-
id: item.id !== undefined ?
|
5097
|
-
equals: item.id
|
5098
|
-
} : undefined,
|
4952
|
+
id: item.id !== undefined ? item.id : undefined,
|
5099
4953
|
userId: item.userId !== undefined ? {
|
5100
4954
|
equals: item.userId
|
5101
4955
|
} : undefined,
|
@@ -5114,9 +4968,7 @@ export const Alert = {
|
|
5114
4968
|
}
|
5115
4969
|
: { connectOrCreate: prop.alpacaAccount.user.authenticators.map((item) => ({
|
5116
4970
|
where: {
|
5117
|
-
id: item.id !== undefined ?
|
5118
|
-
equals: item.id
|
5119
|
-
} : undefined,
|
4971
|
+
id: item.id !== undefined ? item.id : undefined,
|
5120
4972
|
userId: item.userId !== undefined ? {
|
5121
4973
|
equals: item.userId
|
5122
4974
|
} : undefined,
|
@@ -5139,9 +4991,7 @@ export const Alert = {
|
|
5139
4991
|
}
|
5140
4992
|
: { connectOrCreate: prop.alpacaAccount.trades.map((item) => ({
|
5141
4993
|
where: {
|
5142
|
-
id: item.id !== undefined ?
|
5143
|
-
equals: item.id
|
5144
|
-
} : undefined,
|
4994
|
+
id: item.id !== undefined ? item.id : undefined,
|
5145
4995
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5146
4996
|
equals: item.alpacaAccountId
|
5147
4997
|
} : undefined,
|
@@ -5169,9 +5019,7 @@ export const Alert = {
|
|
5169
5019
|
}
|
5170
5020
|
: { connectOrCreate: {
|
5171
5021
|
where: {
|
5172
|
-
id: item.asset.id !== undefined ?
|
5173
|
-
equals: item.asset.id
|
5174
|
-
} : undefined,
|
5022
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
5175
5023
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
5176
5024
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
5177
5025
|
},
|
@@ -5242,9 +5090,7 @@ export const Alert = {
|
|
5242
5090
|
}
|
5243
5091
|
: { connectOrCreate: item.actions.map((item) => ({
|
5244
5092
|
where: {
|
5245
|
-
id: item.id !== undefined ?
|
5246
|
-
equals: item.id
|
5247
|
-
} : undefined,
|
5093
|
+
id: item.id !== undefined ? item.id : undefined,
|
5248
5094
|
tradeId: item.tradeId !== undefined ? {
|
5249
5095
|
equals: item.tradeId
|
5250
5096
|
} : undefined,
|
@@ -5269,9 +5115,7 @@ export const Alert = {
|
|
5269
5115
|
}
|
5270
5116
|
: { connectOrCreate: prop.alpacaAccount.orders.map((item) => ({
|
5271
5117
|
where: {
|
5272
|
-
id: item.id !== undefined ?
|
5273
|
-
equals: item.id
|
5274
|
-
} : undefined,
|
5118
|
+
id: item.id !== undefined ? item.id : undefined,
|
5275
5119
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
5276
5120
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
5277
5121
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
@@ -5313,9 +5157,7 @@ export const Alert = {
|
|
5313
5157
|
}
|
5314
5158
|
: { connectOrCreate: {
|
5315
5159
|
where: {
|
5316
|
-
id: item.stopLoss.id !== undefined ?
|
5317
|
-
equals: item.stopLoss.id
|
5318
|
-
} : undefined,
|
5160
|
+
id: item.stopLoss.id !== undefined ? item.stopLoss.id : undefined,
|
5319
5161
|
orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
|
5320
5162
|
},
|
5321
5163
|
create: {
|
@@ -5332,9 +5174,7 @@ export const Alert = {
|
|
5332
5174
|
}
|
5333
5175
|
: { connectOrCreate: {
|
5334
5176
|
where: {
|
5335
|
-
id: item.takeProfit.id !== undefined ?
|
5336
|
-
equals: item.takeProfit.id
|
5337
|
-
} : undefined,
|
5177
|
+
id: item.takeProfit.id !== undefined ? item.takeProfit.id : undefined,
|
5338
5178
|
orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
|
5339
5179
|
},
|
5340
5180
|
create: {
|
@@ -5351,9 +5191,7 @@ export const Alert = {
|
|
5351
5191
|
}
|
5352
5192
|
: { connectOrCreate: {
|
5353
5193
|
where: {
|
5354
|
-
id: item.action.id !== undefined ?
|
5355
|
-
equals: item.action.id
|
5356
|
-
} : undefined,
|
5194
|
+
id: item.action.id !== undefined ? item.action.id : undefined,
|
5357
5195
|
tradeId: item.action.tradeId !== undefined ? {
|
5358
5196
|
equals: item.action.tradeId
|
5359
5197
|
} : undefined,
|
@@ -5375,9 +5213,7 @@ export const Alert = {
|
|
5375
5213
|
}
|
5376
5214
|
: { connectOrCreate: {
|
5377
5215
|
where: {
|
5378
|
-
id: item.asset.id !== undefined ?
|
5379
|
-
equals: item.asset.id
|
5380
|
-
} : undefined,
|
5216
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
5381
5217
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
5382
5218
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
5383
5219
|
},
|
@@ -5451,9 +5287,7 @@ export const Alert = {
|
|
5451
5287
|
}
|
5452
5288
|
: { connectOrCreate: prop.alpacaAccount.positions.map((item) => ({
|
5453
5289
|
where: {
|
5454
|
-
id: item.id !== undefined ?
|
5455
|
-
equals: item.id
|
5456
|
-
} : undefined,
|
5290
|
+
id: item.id !== undefined ? item.id : undefined,
|
5457
5291
|
assetId: item.assetId !== undefined ? {
|
5458
5292
|
equals: item.assetId
|
5459
5293
|
} : undefined,
|
@@ -5483,9 +5317,7 @@ export const Alert = {
|
|
5483
5317
|
}
|
5484
5318
|
: { connectOrCreate: {
|
5485
5319
|
where: {
|
5486
|
-
id: item.asset.id !== undefined ?
|
5487
|
-
equals: item.asset.id
|
5488
|
-
} : undefined,
|
5320
|
+
id: item.asset.id !== undefined ? item.asset.id : undefined,
|
5489
5321
|
symbol: item.asset.symbol !== undefined ? item.asset.symbol : undefined,
|
5490
5322
|
name: item.asset.name !== undefined ? item.asset.name : undefined,
|
5491
5323
|
},
|
@@ -5623,9 +5455,7 @@ export const Alert = {
|
|
5623
5455
|
}`;
|
5624
5456
|
const variables = {
|
5625
5457
|
where: {
|
5626
|
-
id: props.id !== undefined ?
|
5627
|
-
equals: props.id
|
5628
|
-
} : undefined,
|
5458
|
+
id: props.id !== undefined ? props.id : undefined,
|
5629
5459
|
alpacaAccountId: props.alpacaAccountId !== undefined ? {
|
5630
5460
|
equals: props.alpacaAccountId
|
5631
5461
|
} : undefined,
|